Fix crash in Disguise effectiveness handler out of move sequences

This commit is contained in:
Slayer95 2017-01-28 15:01:08 -05:00 committed by GitHub
parent 3ce65953be
commit 7b7ec0846e

View File

@ -709,6 +709,7 @@ exports.BattleAbilities = {
}
},
onEffectiveness: function (typeMod, type, move) {
if (!this.activeTarget) return;
let pokemon = this.activeTarget;
if (pokemon.template.speciesid !== 'mimikyu' || pokemon.transformed) return;
if (!pokemon.runImmunity(move.type)) return;