Encore shouldn't change target if move isn't changed

This commit is contained in:
Guangcong Luo 2013-07-29 00:30:09 -07:00
parent c6afc0fe80
commit ba2610825d
2 changed files with 3 additions and 3 deletions

View File

@ -3075,8 +3075,8 @@ exports.BattleMovedex = {
this.effectData.duration++;
}
},
onOverrideDecision: function(pokemon) {
return this.effectData.move;
onOverrideDecision: function(pokemon, target, move) {
if (move.id !== this.effectData.move) return this.effectData.move;
},
onResidualOrder: 13,
onResidual: function(target) {

View File

@ -2,7 +2,7 @@ exports.BattleScripts = {
gen: 5,
runMove: function(move, pokemon, target, sourceEffect) {
if (!sourceEffect && toId(move) !== 'struggle') {
var changedMove = this.runEvent('OverrideDecision', pokemon);
var changedMove = this.runEvent('OverrideDecision', pokemon, target, move);
if (changedMove && changedMove !== true) {
move = changedMove;
target = null;