mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-14 18:25:11 -04:00
Build 29106110
This commit is contained in:
parent
4df70f6591
commit
ea13142f1d
22 changed files with 3086 additions and 4112 deletions
|
@ -4,10 +4,6 @@ export function clamp(value: number, min: number, max: number) {
|
|||
return Math.max(min, Math.min(value, max));
|
||||
}
|
||||
|
||||
export function comboKeepingRate(level: number) {
|
||||
return clamp(1 - (1 / (1 + level)) * 1.5, 0, 1);
|
||||
}
|
||||
|
||||
export function ballTransparency(ball: Ball, gameState: GameState) {
|
||||
if (!gameState.perks.transparency) return 0;
|
||||
return clamp(
|
||||
|
@ -138,3 +134,15 @@ export function levelCodeToRawLevel(code: string) {
|
|||
credit,
|
||||
};
|
||||
}
|
||||
|
||||
export function comboKeepingRate(level: number) {
|
||||
return clamp(1 - (1 / (1 + level)) * 1.5, 0, 1);
|
||||
}
|
||||
|
||||
export function base_combo_from_stronger_foundation(perkLevel: number) {
|
||||
let base = 1;
|
||||
for (let i = 0; i < perkLevel; i++) {
|
||||
base += 3 + i;
|
||||
}
|
||||
return base;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue