Skip to content

Commit

Permalink
Gen 1: Fix two turn moves
Browse files Browse the repository at this point in the history
This fixes two turn moves as latest changes maonde this necessary.
Related to 7977b2c
  • Loading branch information
Joimer committed Jan 12, 2015
1 parent 930509c commit e67e5ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mods/gen1/scripts.js
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit e67e5ec

Please sign in to comment.