Update position when swapping in Wonder Trade

Closes #5931
This commit is contained in:
HoeenHero
2019-11-05 13:09:32 -05:00
parent 50c44fa822
commit 762b04ea34

View File

@@ -827,6 +827,9 @@ let BattleMovedex = {
let original = currentTeam[newIdx];
currentTeam[newIdx] = currentTeam[idx];
currentTeam[idx] = original;
// Update pokemon.position flags to prevent errors
currentTeam[newIdx].position = newIdx;
currentTeam[idx].position = idx;
}
source.side.pokemon = currentTeam;
this.add('message', `${source.name} wonder traded ${source.side.name}'s team away!`);