pokemon-showdown/test/simulator/moves/bugbuzz.js
Kevin Lau d7b77a76a4 Mocha: Normalize oldgen descriptions for tests
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)
2015-06-19 00:25:03 -07:00

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');
});
});