From 7b7ec0846e2db338cc3e4ccb4e833069c1ff5576 Mon Sep 17 00:00:00 2001 From: Slayer95 Date: Sat, 28 Jan 2017 15:01:08 -0500 Subject: [PATCH] Fix crash in Disguise effectiveness handler out of move sequences --- data/abilities.js | 1 + 1 file changed, 1 insertion(+) diff --git a/data/abilities.js b/data/abilities.js index fe85fca5b3..e1b9f78748 100644 --- a/data/abilities.js +++ b/data/abilities.js @@ -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;