diff --git a/data/scripts.js b/data/scripts.js index 7e9334c0da..120e6ccdc1 100644 --- a/data/scripts.js +++ b/data/scripts.js @@ -195,9 +195,7 @@ exports.BattleScripts = { } } - if (hitResult === 0) { - target = null; - } else if (!hitResult) { + if (hitResult !== 0 && !hitResult) { if (hitResult === false) this.add('-fail', target); return false; } @@ -239,6 +237,11 @@ exports.BattleScripts = { return false; } + if (hitResult === 0) { + // substitute + target = null; + } + var damage = 0; pokemon.lastDamage = 0; if (move.multihit) {