Build 29071397

This commit is contained in:
Renan LE CARO 2025-04-10 13:17:38 +02:00
parent 5f33aad670
commit 16880533dd
19 changed files with 123 additions and 49 deletions

View file

@ -13,7 +13,7 @@ import { dontOfferTooSoon, resetBalls } from "./gameStateMutators";
import { isOptionOn } from "./options";
import { getHistory } from "./gameOver";
import { getSettingValue, getTotalScore } from "./settings";
import { isStartingPerk } from "./startingPerks";
import { isBlackListedForStart, isStartingPerk } from "./startingPerks";
export function getRunLevels(
params: RunParams,
@ -52,9 +52,10 @@ export function newGameState(params: RunParams): GameState {
let randomGift: PerkId | undefined = undefined;
if (!sumOfValues(perks)) {
const giftable = upgrades.filter(
(u) => getTotalScore() >= u.threshold && isStartingPerk(u),
);
let giftable = upgrades.filter((u) => isStartingPerk(u));
if (!giftable.length) {
giftable = upgrades.filter((u) => !isBlackListedForStart(u));
}
randomGift =
(isOptionOn("easy") && "slow_down") ||