From c1595bf2b76d887cafac43eb7fb955e5c1ee2548 Mon Sep 17 00:00:00 2001 From: allen925 <62000482+allen925@users.noreply.github.com> Date: Thu, 1 Aug 2024 09:35:11 -0700 Subject: [PATCH] [Bug] fix stuck/sprite issue with double battle player pokemon both died same turn then wins battle with one bench pokemon only (#3266) --- src/phases.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/phases.ts b/src/phases.ts index c41ad333b9d..d77ff7c29df 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -3789,11 +3789,10 @@ export class FaintPhase extends PokemonPhase { const nonFaintedPartyMemberCount = nonFaintedLegalPartyMembers.length; if (!nonFaintedPartyMemberCount) { this.scene.unshiftPhase(new GameOverPhase(this.scene)); - } else if (nonFaintedPartyMemberCount >= this.scene.currentBattle.getBattlerCount() || (this.scene.currentBattle.double && !nonFaintedLegalPartyMembers[0].isActive(true))) { - this.scene.pushPhase(new SwitchPhase(this.scene, this.fieldIndex, true, false)); - } - if (nonFaintedPartyMemberCount === 1 && this.scene.currentBattle.double) { + } else if (nonFaintedPartyMemberCount === 1 && this.scene.currentBattle.double) { this.scene.unshiftPhase(new ToggleDoublePositionPhase(this.scene, true)); + } else if (nonFaintedPartyMemberCount >= this.scene.currentBattle.getBattlerCount()) { + this.scene.pushPhase(new SwitchPhase(this.scene, this.fieldIndex, true, false)); } } else { this.scene.unshiftPhase(new VictoryPhase(this.scene, this.battlerIndex));