Prevent trainer battles on the first wave of a new biome

pull/2/head
Flashfyre 2023-10-21 09:00:42 -04:00
parent 96a15ccb0d
commit 8222d67408
1 changed files with 3 additions and 2 deletions

View File

@ -588,10 +588,11 @@ export default class BattleScene extends Phaser.Scene {
if (battleType === undefined) {
if (newWaveIndex > 10 && newWaveIndex % 20 === 10)
newBattleType = BattleType.TRAINER;
else {
else if (newWaveIndex % 10 !== 1) {
const trainerChance = this.arena.getTrainerChance();
newBattleType = trainerChance && !Utils.randSeedInt(trainerChance) ? BattleType.TRAINER : BattleType.WILD;
}
} else
newBattleType = BattleType.WILD;
} else
newBattleType = battleType;