Biome can't change before a boss in endless mode
parent
9a3e71219e
commit
444b4075fe
Binary file not shown.
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 6.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 4.3 KiB After Width: | Height: | Size: 12 KiB |
|
@ -894,7 +894,7 @@ export default class BattleScene extends SceneBase {
|
|||
|
||||
if (!waveIndex && lastBattle) {
|
||||
let isNewBiome = !(lastBattle.waveIndex % 10) || ((this.gameMode.hasShortBiomes || this.gameMode.isDaily) && (lastBattle.waveIndex % 50) === 49);
|
||||
if (!isNewBiome && this.gameMode.hasShortBiomes) {
|
||||
if (!isNewBiome && this.gameMode.hasShortBiomes && (newWaveIndex % 10) < 9) {
|
||||
let w = lastBattle.waveIndex - ((lastBattle.waveIndex % 10) - 1);
|
||||
let biomeWaves = 1;
|
||||
while (w < lastBattle.waveIndex) {
|
||||
|
@ -1978,15 +1978,15 @@ export default class BattleScene extends SceneBase {
|
|||
|
||||
applyShuffledModifiers(scene: BattleScene, modifierType: { new(...args: any[]): Modifier }, player: boolean = true, ...args: any[]): PersistentModifier[] {
|
||||
let modifiers = (player ? this.modifiers : this.enemyModifiers).filter(m => m instanceof modifierType && m.shouldApply(args));
|
||||
if (modifiers.length > 1) {
|
||||
scene.executeWithSeedOffset(() => {
|
||||
const shuffleModifiers = mods => {
|
||||
if (mods.length < 1)
|
||||
return mods;
|
||||
const rand = Math.floor(Utils.randSeedInt(mods.length));
|
||||
return [mods[rand], ...shuffleModifiers(mods.filter((_, i) => i !== rand))];
|
||||
};
|
||||
modifiers = shuffleModifiers(modifiers);
|
||||
}, scene.currentBattle.turn << 4, scene.waveSeed);
|
||||
}
|
||||
return this.applyModifiersInternal(modifiers, player, args);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue