Bug fixes for Illusion with 1 Pokémon in team, Magician triggering and Fake Out failing after switching in by an effect

This commit is contained in:
Maruno17
2021-02-08 18:36:02 +00:00
parent f3f21d4679
commit 9fe513ca16
6 changed files with 10 additions and 8 deletions

View File

@@ -195,7 +195,7 @@ class PokeBattle_Battler
@effects[PBEffects::Illusion] = nil
if hasActiveAbility?(:ILLUSION)
idxLastParty = @battle.pbLastInTeam(@index)
if idxLastParty!=@pokemonIndex
if idxLastParty >= 0 && idxLastParty != @pokemonIndex
@effects[PBEffects::Illusion] = @battle.pbParty(@index)[idxLastParty]
end
end