Build 29095000

This commit is contained in:
Renan LE CARO 2025-04-26 22:40:32 +02:00
parent 096f7d4abd
commit 4c324d211c
27 changed files with 500 additions and 1350 deletions

View file

@ -1,9 +1,9 @@
import {Ball, Coin, GameState, Level, PerkId, PerksMap,} from "./types";
import {icons, upgrades} from "./loadGameData";
import {t} from "./i18n/i18n";
import {clamp} from "./pure_functions";
import {getSettingValue, getTotalScore} from "./settings";
import {isOptionOn} from "./options";
import { Ball, Coin, GameState, Level, PerkId, PerksMap } from "./types";
import { icons, upgrades } from "./loadGameData";
import { t } from "./i18n/i18n";
import { clamp } from "./pure_functions";
import { getSettingValue, getTotalScore } from "./settings";
import { isOptionOn } from "./options";
export function describeLevel(level: Level) {
let bricks = 0,
@ -192,10 +192,13 @@ export function telekinesisEffectRate(gameState: GameState, ball: Ball) {
}
export function yoyoEffectRate(gameState: GameState, ball: Ball) {
if(ball.vy < 0) return 0
if(!gameState.perks.yoyo) return 0
return Math.abs(gameState.puckPosition - ball.x)/gameState.gameZoneWidth * gameState.perks.yoyo/2
if (ball.vy < 0) return 0;
if (!gameState.perks.yoyo) return 0;
return (
((Math.abs(gameState.puckPosition - ball.x) / gameState.gameZoneWidth) *
gameState.perks.yoyo) /
2
);
}
export function findLast<T>(