simplify if statement

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
muscode 2024-11-01 10:33:38 -06:00 committed by GitHub
parent 809e710b87
commit 844fbe3d3f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4822,7 +4822,7 @@ class ForceSwitchOutHelper {
const switchOutTarget = pokemon; const switchOutTarget = pokemon;
const player = switchOutTarget instanceof PlayerPokemon; const player = switchOutTarget instanceof PlayerPokemon;
if (switchOutTarget instanceof PlayerPokemon) { if (player) {
if (!player && pokemon.scene.currentBattle.isBattleMysteryEncounter() && !pokemon.scene.currentBattle.mysteryEncounter?.fleeAllowed) { if (!player && pokemon.scene.currentBattle.isBattleMysteryEncounter() && !pokemon.scene.currentBattle.mysteryEncounter?.fleeAllowed) {
return false; return false;
} }