mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-20 14:29:28 +02:00
simplify if statement
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
809e710b87
commit
844fbe3d3f
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user