From e253ea3e7d36cf44bc182b1fc0f3cc47544915c4 Mon Sep 17 00:00:00 2001 From: Juanma Serrano Date: Mon, 12 Jan 2015 10:03:21 +0100 Subject: [PATCH] Gen 1: Fix two turn moves This fixes two turn moves as latest changes maonde this necessary. Related to 7977b2c3cdd24c6ff2f7ba2a93c14f1ef3c7d53b --- mods/gen1/scripts.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mods/gen1/scripts.js b/mods/gen1/scripts.js index b457333baa..f64397db36 100644 --- a/mods/gen1/scripts.js +++ b/mods/gen1/scripts.js @@ -142,7 +142,8 @@ exports.BattleScripts = { this.setActiveMove(move, pokemon, target); if (pokemon.movedThisTurn || !this.runEvent('BeforeMove', pokemon, target, move)) { - this.debug('' + pokemon.id + ' move interrupted; movedThisTurn: ' + pokemon.movedThisTurn); + // Prevent invulnerability from persisting until the turn ends + pokemon.removeVolatile('twoturnmove'); this.clearActiveMove(true); // This is only run for sleep this.runEvent('AfterMoveSelf', pokemon, target, move); @@ -174,6 +175,7 @@ exports.BattleScripts = { // We remove screens target.side.removeSideCondition('reflect'); target.side.removeSideCondition('lightscreen'); + pokemon.removeVolatile('twoturnmove'); } else { this.runEvent('AfterMoveSelf', pokemon, target, move); }