mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-23 13:36:15 -04:00
Build 29071397
This commit is contained in:
parent
5f33aad670
commit
16880533dd
19 changed files with 123 additions and 49 deletions
|
@ -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") ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue