Prevent trainer battles on the first wave of a new biome

This commit is contained in:
Flashfyre 2023-10-21 09:00:42 -04:00
parent 96a15ccb0d
commit 8222d67408

View File

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