mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-24 00:36:27 -05:00
- This cuts down tons of code that define player names, avatars, and deal with Team Preview.
24 lines
786 B
JavaScript
24 lines
786 B
JavaScript
'use strict';
|
|
|
|
const assert = require('./../../assert');
|
|
const common = require('./../../common');
|
|
|
|
let battle;
|
|
|
|
describe('Imprison', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it('should prevent foes from using moves that the user knows', function () {
|
|
battle = common.createBattle();
|
|
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');
|
|
});
|
|
});
|