mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-06-02 22:08:36 -05:00
Encore shouldn't change target if move isn't changed
This commit is contained in:
parent
c6afc0fe80
commit
ba2610825d
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user