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 f79cc1a
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions test/sim/moves/imprison.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('Imprison', function () {
battle.destroy();
});

it(`should prevent foes from using moves that the user knows`, function () {
it.only(`should prevent foes from using moves that the user knows`, function () {
battle = common.createBattle();
battle.setPlayer('p1', {team: [
{species: 'Abra', ability: 'prankster', moves: ['imprison', 'calmmind', 'batonpass']},
Expand All @@ -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 f79cc1a

Please sign in to comment.