diff --git a/src/phases.ts b/src/phases.ts index 75f82383f..75f053c9c 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -2806,7 +2806,7 @@ export class VictoryPhase extends PokemonPhase { } } - if (!this.scene.getEnemyParty().find(p => this.scene.currentBattle.battleType ? !p?.isFainted(true) : p.isActive(true))) { + if (!this.scene.getEnemyParty().filter(p => !p?.isFainted(true)).length) { this.scene.pushPhase(new BattleEndPhase(this.scene)); if (this.scene.currentBattle.battleType === BattleType.TRAINER) this.scene.pushPhase(new TrainerVictoryPhase(this.scene));