Build 29068588

This commit is contained in:
Renan LE CARO 2025-04-08 14:29:00 +02:00
parent c6665d9b0e
commit 269f1b8b94
8 changed files with 26 additions and 13 deletions

View file

@ -1,5 +1,5 @@
// The version of the cache.
const VERSION = "29068568";
const VERSION = "29068588";
// The name of the cache
const CACHE_NAME = `breakout-71-${VERSION}`;

View file

@ -1 +1 @@
"29068568"
"29068588"

View file

@ -29,6 +29,7 @@ import {
cycleMaxParticles,
getCurrentMaxCoins,
getCurrentMaxParticles,
getSettingValue,
getTotalScore,
setSettingValue,
} from "./settings";
@ -808,8 +809,13 @@ async function openUnlocksList() {
: help(1),
}));
const unlockedBefore = new Set(
getSettingValue("breakout_71_unlocked_levels", []),
);
const levelActions = allLevels.map((l, li) => {
const lockedBecause = reasonLevelIsLocked(li, getHistory(), true);
const lockedBecause = unlockedBefore.has(l.name)
? null
: reasonLevelIsLocked(li, getHistory(), true);
const percentUnlocked = lockedBecause?.reached
? `<span class="progress-inline"><span style="transform: scale(${Math.floor((lockedBecause.reached / lockedBecause.minScore) * 100) / 100},1)"></span></span>`
: "";

View file

@ -314,7 +314,7 @@ export function getLevelUnlockCondition(levelIndex: number) {
(a, b) => hashCode(levelIndex + a.id) - hashCode(levelIndex + b.id),
);
const length = Math.ceil(levelIndex / 30);
const length = Math.min(3, Math.ceil(levelIndex / 30));
required = possibletargets.slice(0, length);
forbidden = possibletargets.slice(length, length + length);
}

View file

@ -12,16 +12,21 @@ import {
import { dontOfferTooSoon, resetBalls } from "./gameStateMutators";
import { isOptionOn } from "./options";
import { getHistory } from "./gameOver";
import { getTotalScore } from "./settings";
import { getSettingValue, getTotalScore } from "./settings";
import { isStartingPerk } from "./startingPerks";
export function getRunLevels(
params: RunParams,
randomGift: PerkId | undefined,
) {
const unlockedBefore = new Set(
getSettingValue("breakout_71_unlocked_levels", []),
);
const history = getHistory();
const unlocked = allLevels.filter(
(l, li) => !reasonLevelIsLocked(li, history, false),
(l, li) =>
unlockedBefore.has(l.name) || !reasonLevelIsLocked(li, history, false),
);
const firstLevel =