pokemon-showdown/test/simulator/moves/imprison.js
Kevin Lau a5bc0632b1 Upgrade Imprison Tests
Imprison should actively prevent the Pokemon from using imprisoned moves.
2015-05-14 14:18:07 -07:00

20 lines
728 B
JavaScript

var assert = require('assert');
var battle;
describe('Imprison', function () {
afterEach(function () {
battle.destroy();
});
it('should prevent foes from using moves that the user knows', function () {
battle = BattleEngine.Battle.construct();
battle.join('p1', 'Guest 1', 1, [{species: 'Abra', ability: 'prankster', moves: ['imprison', 'calmmind']}]);
battle.join('p2', 'Guest 2', 1, [{species: 'Abra', ability: 'synchronize', moves: ['calmmind', 'confusion']}]);
battle.commitDecisions();
assert.strictEqual(battle.p2.active[0].boosts['spa'], 0);
assert.strictEqual(battle.p2.active[0].boosts['spd'], 0);
battle.commitDecisions();
assert.strictEqual(battle.p2.active[0].lastMove, 'confusion');
});
});