From ca64c4aaf2dfce38e89133f7445a65acf89948ee Mon Sep 17 00:00:00 2001 From: Jacob Knispel Date: Sun, 4 Aug 2024 00:04:59 -0500 Subject: [PATCH] [Bug] Skip forced switch if the fainted party member has been revived already (#1236) --- src/phases.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/phases.ts b/src/phases.ts index 7e2d8058aef..a38fff8b077 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -4468,6 +4468,10 @@ export class SwitchPhase extends BattlePhase { return super.end(); } + // Skip if the fainted party member has been revived already + if (this.isModal && !this.scene.getParty()[this.fieldIndex].isFainted()) + return super.end(); + // Check if there is any space still in field if (this.isModal && this.scene.getPlayerField().filter(p => p.isAllowedInBattle() && p.isActive(true)).length >= this.scene.currentBattle.getBattlerCount()) { return super.end();