diff --git a/resources/moves.js b/resources/moves.js index 028b9f7..131e397 100644 --- a/resources/moves.js +++ b/resources/moves.js @@ -34,9 +34,9 @@ function makeSacrificeMove(move, func) { return; } user.faint(); - var slot = user.position; - user.switchOut(); field.sendMessage("informReplacePokemon", user); + var slot = user.position; + user.switchOut(); // note: sets user.position to -1. selection.sendOut(slot); if (!selection.fainted) { func(field, selection); @@ -231,9 +231,9 @@ function makeRandomSwitchMove(move) { return; } var choice = choices[field.random(0, length - 1)]; + field.sendMessage("informReplacePokemon", target); var slot = target.position; target.switchOut(); // note: sets target.position to -1. - field.sendMessage("informReplacePokemon", target); choice.sendOut(slot); }; } diff --git a/resources/moves.xml b/resources/moves.xml index 74b79c4..b4f0a33 100644 --- a/resources/moves.xml +++ b/resources/moves.xml @@ -589,9 +589,9 @@ this.effects_.forEach(function(i) { field.narration = true; } }); +field.sendMessage("informBatonPass", user); var slot = user.position; user.switchOut(); -field.sendMessage("informBatonPass", user); selection.sendOut(slot); ]]>