pokemon-showdown/test/sim/moves/rapidspin.js
Leonard Craft III 606576f453
Add various mechanics tests (#8313)
* Standardize Photon Geyser tests
* Add Gulp Missile tests
* Add Berserk Dragon Darts test
* Add Ring Target tests
* Add and improve Metronome tests
* Add Sparkling Aria tests
* Add additional Fling tests
* Standardize Mummy tests
* Add Rollout submove targeting test
* Improve Flower Veil tests
* Add Acupressure tests
* Improve Sky Drop tests
* Add Future Sight tests
* Improve Wandering Spirit tests
* Improve Rapid Spin tests
* Add Rocky Helmet victory test
* Improve Focus Punch tests
* Add a skipped Stomping Tantrum test
2021-05-20 08:43:08 -04:00

49 lines
1.4 KiB
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Rapid Spin', function () {
afterEach(function () {
battle.destroy();
});
it(`should remove entry hazards`, function () {
battle = common.createBattle([[
{species: 'Omastar', moves: ['stealthrock', 'spikes', 'toxicspikes', 'stickyweb']},
], [
{species: 'Armaldo', moves: ['sleeptalk', 'rapidspin']},
]]);
for (let i = 1; i < 5; i++) {
battle.makeChoices('move ' + i, 'auto');
}
battle.makeChoices('move toxicspikes', 'move rapidspin');
const side = battle.p2.sideConditions;
assert(!side['stealthrock'] && !side['spikes'] && !side['toxicspikes'] && !side['stickyweb']);
});
it(`should remove entry hazards past a Substitute`, function () {
battle = common.createBattle([[
{species: 'Cobalion', moves: ['stealthrock', 'substitute']},
], [
{species: 'Armaldo', moves: ['sleeptalk', 'rapidspin']},
]]);
battle.makeChoices();
battle.makeChoices('move substitute', 'move rapidspin');
assert(!battle.p2.sideConditions['stealthrock']);
});
it(`should not remove hazards if the user faints`, function () {
battle = common.createBattle([[
{species: 'Mew', item: 'rockyhelmet', moves: ['stealthrock']},
], [
{species: 'Shedinja', moves: ['rapidspin']},
{species: 'Wynaut', moves: ['sleeptalk']},
]]);
battle.makeChoices();
assert(battle.p2.sideConditions['stealthrock']);
});
});