From 5d57aaaedf13a94c175417679268489bdef0d226 Mon Sep 17 00:00:00 2001 From: Guangcong Luo Date: Sun, 26 Apr 2020 18:20:14 -0700 Subject: [PATCH] Fix Imprison test I'm pretty sure the old Imprison test was straight-up wrong, and based on the old bugged behavior. --- test/sim/moves/imprison.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/sim/moves/imprison.js b/test/sim/moves/imprison.js index 1dfdce43da22..4a9186c90eb0 100644 --- a/test/sim/moves/imprison.js +++ b/test/sim/moves/imprison.js @@ -27,12 +27,14 @@ describe('Imprison', function () { assert.cantMove(() => battle.choose('p2', 'move calmmind'), 'Abra', 'Calm Mind', true); // Imprison doesn't end when the foe switches - battle.makeChoices('default', 'switch 2'); - battle.makeChoices('move calmmind', 'move calmmind'); - assert.statStage(battle.p2.active[0], 'spa', 0); + battle.makeChoices('auto', 'switch 2'); + assert.cantMove(() => battle.choose('p2', 'move calmmind')); + + // Imprison should cause Struggle if all moves match + battle.makeChoices('auto', 'move struggle'); // Imprison is not passed by Baton Pass - battle.makeChoices('move batonpass', 'move calmmind'); + battle.makeChoices('move batonpass', 'move struggle'); assert.statStage(battle.p2.active[0], 'spa', 0); battle.makeChoices('switch 2', ''); assert.statStage(battle.p2.active[0], 'spa', 0);