Merge branch 'beta' into pr-illusion

This commit is contained in:
Lylian BALL 2025-04-11 19:16:21 +02:00 committed by GitHub
commit 7d2745ee90
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -33,23 +33,19 @@ export class SelectBiomePhase extends BattlePhase {
} else if (globalScene.gameMode.hasRandomBiomes) { } else if (globalScene.gameMode.hasRandomBiomes) {
setNextBiome(this.generateNextBiome()); setNextBiome(this.generateNextBiome());
} else if (Array.isArray(biomeLinks[currentBiome])) { } else if (Array.isArray(biomeLinks[currentBiome])) {
let biomes: Biome[] = []; const biomes: Biome[] = (biomeLinks[currentBiome] as (Biome | [Biome, number])[])
globalScene.executeWithSeedOffset(() => { .filter(b => !Array.isArray(b) || !randSeedInt(b[1]))
biomes = (biomeLinks[currentBiome] as (Biome | [Biome, number])[]) .map(b => (!Array.isArray(b) ? b : b[0]));
.filter(b => !Array.isArray(b) || !randSeedInt(b[1]))
.map(b => (!Array.isArray(b) ? b : b[0]));
}, globalScene.currentBattle.waveIndex);
if (biomes.length > 1 && globalScene.findModifier(m => m instanceof MapModifier)) { if (biomes.length > 1 && globalScene.findModifier(m => m instanceof MapModifier)) {
let biomeChoices: Biome[] = []; const biomeChoices: Biome[] = (
globalScene.executeWithSeedOffset(() => { !Array.isArray(biomeLinks[currentBiome])
biomeChoices = ( ? [biomeLinks[currentBiome] as Biome]
!Array.isArray(biomeLinks[currentBiome]) : (biomeLinks[currentBiome] as (Biome | [Biome, number])[])
? [biomeLinks[currentBiome] as Biome] )
: (biomeLinks[currentBiome] as (Biome | [Biome, number])[]) .filter(b => !Array.isArray(b) || !randSeedInt(b[1]))
) .map(b => (Array.isArray(b) ? b[0] : b));
.filter(b => !Array.isArray(b) || !randSeedInt(b[1]))
.map(b => (Array.isArray(b) ? b[0] : b));
}, globalScene.currentBattle.waveIndex);
const biomeSelectItems = biomeChoices.map(b => { const biomeSelectItems = biomeChoices.map(b => {
const ret: OptionSelectItem = { const ret: OptionSelectItem = {
label: getBiomeName(b), label: getBiomeName(b),