From 8e0e8952da08a2dbc7b2bfc3b34a4a3eb23d60d8 Mon Sep 17 00:00:00 2001 From: Xavion3 Date: Sun, 9 Jun 2024 09:05:18 +1000 Subject: [PATCH] Fix switching moves in challenge mode (#1972) --- src/data/move.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 71e577bd2f6..d9c52803538 100755 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -4416,7 +4416,7 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { } const party = player ? user.scene.getParty() : user.scene.getEnemyParty(); - return (!player && !user.scene.currentBattle.battleType) || party.filter(p => !p.isFainted() && (player || (p as EnemyPokemon).trainerSlot === (switchOutTarget as EnemyPokemon).trainerSlot)).length > user.scene.currentBattle.getBattlerCount(); + return (!player && !user.scene.currentBattle.battleType) || party.filter(p => p.isAllowedInBattle() && (player || (p as EnemyPokemon).trainerSlot === (switchOutTarget as EnemyPokemon).trainerSlot)).length > user.scene.currentBattle.getBattlerCount(); }; }