pokemon-showdown/test/sim/abilities/dazzling.js
Guangcong Luo 80634c6918 Fix Dazzling
I don't like using Bulbapedia as a source, but our researchers are all
asleep and TI said this was high-priority.
2020-04-16 03:12:40 -07:00

35 lines
1.1 KiB
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Dazzling', function () {
afterEach(function () {
battle.destroy();
});
it('should block moves with positive priority', function () {
battle = common.createBattle([
[{species: "Sableye", ability: 'prankster', moves: ['taunt']}],
[{species: "Bruxish", ability: 'dazzling', moves: ['swordsdance']}],
]);
battle.makeChoices('move taunt', 'move swordsdance');
assert.equal(battle.p2.active[0].boosts.atk, 2);
});
it('should not block moves that target all Pokemon, except Perish Song, Rototiller, and Flower Shield', function () {
battle = common.createBattle([
[{species: "Bruxish", ability: 'dazzling', moves: ['swordsdance', 'sleeptalk']}],
[{species: "Mew", ability: 'prankster', moves: ['perishsong', 'haze']}],
]);
battle.makeChoices('move swordsdance', 'move perishsong');
battle.makeChoices('move sleeptalk', 'move haze');
assert.equal(battle.p1.active[0].boosts.atk, 0);
assert.false(battle.p1.active[0].volatiles.perishsong);
});
});