mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-23 13:36:15 -04:00
Build 29068563
This commit is contained in:
parent
6ef13f2d19
commit
df8bfbb350
25 changed files with 384 additions and 336 deletions
|
@ -42,14 +42,13 @@ export function getRunLevels(
|
|||
|
||||
export function newGameState(params: RunParams): GameState {
|
||||
const highScore = getHighScore();
|
||||
const totalScoreAtRunStart=getTotalScore()
|
||||
|
||||
const perks = { ...makeEmptyPerksMap(upgrades), ...(params?.perks || {}) };
|
||||
|
||||
let randomGift: PerkId | undefined = undefined;
|
||||
if (!sumOfValues(perks)) {
|
||||
const giftable = upgrades.filter(
|
||||
(u) => totalScoreAtRunStart >= u.threshold && isStartingPerk(u),
|
||||
(u) => getTotalScore() >= u.threshold && isStartingPerk(u),
|
||||
);
|
||||
|
||||
randomGift =
|
||||
|
@ -108,7 +107,6 @@ export function newGameState(params: RunParams): GameState {
|
|||
coinSize: 14,
|
||||
puckHeight: 20,
|
||||
|
||||
totalScoreAtRunStart,
|
||||
pauseUsesDuringRun: 0,
|
||||
keyboardPuckSpeed: 0,
|
||||
lastTick: performance.now(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue