Skip to content

Commit

Permalink
Fix Imprison test
Browse files Browse the repository at this point in the history
I'm pretty sure the old Imprison test was straight-up wrong, and based
on the old bugged behavior.
  • Loading branch information
Zarel committed Apr 27, 2020
1 parent e8e3493 commit 5d57aaa
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/sim/moves/imprison.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5d57aaa

Please sign in to comment.