mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-04-22 21:16:14 -04:00
Fixed enderman level background and level picker in unlock
This commit is contained in:
parent
f28ce15495
commit
e14e958686
6 changed files with 94 additions and 55 deletions
|
@ -495,13 +495,13 @@ function getPossibleUpgrades() {
|
|||
function shuffleLevels(nameToAvoid: string | null = null) {
|
||||
const target = nextRunOverrides?.level;
|
||||
delete nextRunOverrides.level;
|
||||
const firstLevel = nextRunOverrides?.level
|
||||
const firstLevel = target
|
||||
? allLevels.filter((l) => l.name === target)
|
||||
: [];
|
||||
|
||||
const restInRandomOrder = allLevels
|
||||
.filter((l) => totalScoreAtRunStart >= l.threshold)
|
||||
.filter((l) => l.name !== nextRunOverrides?.level)
|
||||
.filter((l) => l.name !== target)
|
||||
.filter((l) => l.name !== nameToAvoid || allLevels.length === 1)
|
||||
.sort(() => Math.random() - 0.5);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue