From d3323aadce141b4e9f263ed6108148b96c5ba464 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Mon, 23 Oct 2023 08:44:04 -0400 Subject: [PATCH] Fix checking wrong party for non fainted enemy party members --- src/battle-phases.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/battle-phases.ts b/src/battle-phases.ts index e4cdccf12f1..077a2a8040a 100644 --- a/src/battle-phases.ts +++ b/src/battle-phases.ts @@ -1968,7 +1968,7 @@ export class FaintPhase extends PokemonPhase { } else { this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex)); if (this.scene.currentBattle.battleType === BattleType.TRAINER) { - const nonFaintedPartyMemberCount = this.scene.getParty().filter(p => !p.isFainted()).length; + const nonFaintedPartyMemberCount = this.scene.getEnemyParty().filter(p => !p.isFainted()).length; if (nonFaintedPartyMemberCount >= this.scene.currentBattle.getBattlerCount()) this.scene.unshiftPhase(new SwitchSummonPhase(this.scene, this.fieldIndex, this.scene.currentBattle.trainer.getNextSummonIndex(), false, false, false)); }