Gen 1: Fix two turn moves

This fixes two turn moves as latest changes maonde this necessary.
Related to 7977b2c3cd
This commit is contained in:
Juanma Serrano 2015-01-12 10:03:21 +01:00
parent 263cb0b422
commit e253ea3e7d

View File

@ -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);
}