[Bug] Fix doubles trainers not initializing properly (#5702)

* [Bug] Fix doubles trainers not initializing properly

* Add missing override in Whirlwind test
This commit is contained in:
NightKev 2025-04-23 17:22:25 -07:00 committed by GitHub
parent 75400a39ed
commit 6ea5b4fa9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -1394,9 +1394,9 @@ export default class BattleScene extends SceneBase {
if (double === undefined && newWaveIndex > 1) {
if (newBattleType === BattleType.WILD && !this.gameMode.isWaveFinal(newWaveIndex)) {
newDouble = !randSeedInt(this.getDoubleBattleChance(newWaveIndex, playerField));
}
} else if (double === undefined && newBattleType === BattleType.TRAINER) {
} else if (newBattleType === BattleType.TRAINER) {
newDouble = newTrainer?.variant === TrainerVariant.DOUBLE;
}
} else if (!battleConfig) {
newDouble = !!double;
}

View File

@ -163,6 +163,7 @@ describe("Moves - Whirlwind", () => {
it("should not pull in the other trainer's pokemon in a partner trainer battle", async () => {
game.override
.startingWave(2)
.battleType(BattleType.TRAINER)
.randomTrainer({
trainerType: TrainerType.BREEDER,