mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-05-06 13:47:24 -05:00
Listing the generation number imitates the style used in PS! format names, and is clearer on which generation it is than listing games from that gen (so GSC -> Gen 2, etc)
36 lines
1.3 KiB
JavaScript
36 lines
1.3 KiB
JavaScript
var assert = require('assert');
|
|
var battle;
|
|
|
|
describe('Bug Buzz', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it('should pierce through substitutes', function () {
|
|
battle = BattleEngine.Battle.construct();
|
|
battle.join('p1', 'Guest 1', 1, [{species: "Deoxys-Attack", ability: 'victorystar', item: 'laggingtail', moves: ['splash', 'bugbuzz']}]);
|
|
battle.join('p2', 'Guest 2', 1, [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]);
|
|
battle.commitDecisions();
|
|
battle.choose('p1', 'move 2');
|
|
battle.choose('p2', 'move 2');
|
|
assert.strictEqual(battle.p2.active[0].item, '');
|
|
});
|
|
});
|
|
|
|
describe('Bug Buzz [Gen 5]', function () {
|
|
afterEach(function () {
|
|
battle.destroy();
|
|
});
|
|
|
|
it('should not pierce through substitutes', function () {
|
|
battle = BattleEngine.Battle.construct('battle-bugbuzz-bw', 'gen5customgame');
|
|
battle.join('p1', 'Guest 1', 1, [{species: "Deoxys-Attack", ability: 'victorystar', item: 'laggingtail', moves: ['splash', 'bugbuzz']}]);
|
|
battle.join('p2', 'Guest 2', 1, [{species: "Caterpie", level: 2, ability: 'naturalcure', item: 'focussash', moves: ['substitute', 'rest']}]);
|
|
battle.commitDecisions();
|
|
battle.commitDecisions();
|
|
battle.choose('p1', 'move 2');
|
|
battle.choose('p2', 'move 2');
|
|
assert.strictEqual(battle.p2.active[0].item, 'focussash');
|
|
});
|
|
});
|