From 844fbe3d3f1dc4c131b18463a4958e9f576ef5dd Mon Sep 17 00:00:00 2001 From: muscode Date: Fri, 1 Nov 2024 10:33:38 -0600 Subject: [PATCH] simplify if statement Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com> --- src/data/ability.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data/ability.ts b/src/data/ability.ts index b1e18ebce35..4749a2d46c3 100644 --- a/src/data/ability.ts +++ b/src/data/ability.ts @@ -4822,7 +4822,7 @@ class ForceSwitchOutHelper { const switchOutTarget = pokemon; const player = switchOutTarget instanceof PlayerPokemon; - if (switchOutTarget instanceof PlayerPokemon) { + if (player) { if (!player && pokemon.scene.currentBattle.isBattleMysteryEncounter() && !pokemon.scene.currentBattle.mysteryEncounter?.fleeAllowed) { return false; }