pokemon-showdown/test/sim/abilities/wanderingspirit.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

44 lines
1.4 KiB
JavaScript

'use strict';
const assert = require('./../../assert');
const common = require('./../../common');
let battle;
describe('Wandering Spirit', function () {
afterEach(() => battle.destroy());
it(`should exchange abilities with an attacker that makes contact`, function () {
battle = common.createBattle([[
{species: 'Decidueye', ability: 'overgrow', moves: ['shadowsneak']},
], [
{species: 'Runerigus', ability: 'wanderingspirit', moves: ['sleeptalk']},
]]);
battle.makeChoices();
assert(battle.p1.active[0].hasAbility('wanderingspirit'));
assert(battle.p2.active[0].hasAbility('overgrow'));
});
it(`should not activate while Dynamaxed`, function () {
battle = common.createBattle([[
{species: 'Decidueye', ability: 'overgrow', moves: ['shadowsneak']},
], [
{species: 'Runerigus', ability: 'wanderingspirit', moves: ['bodypress']},
]]);
battle.makeChoices('auto', 'move bodypress dynamax');
assert(battle.p1.active[0].hasAbility('overgrow'));
assert(battle.p2.active[0].hasAbility('wanderingspirit'));
});
it(`should not swap with Wonder Guard`, function () {
battle = common.createBattle([[
{species: 'Shedinja', ability: 'wonderguard', moves: ['shadowsneak']},
], [
{species: 'Runerigus', ability: 'wanderingspirit', moves: ['sleeptalk']},
]]);
battle.makeChoices();
assert(battle.p1.active[0].hasAbility('wonderguard'));
assert(battle.p2.active[0].hasAbility('wanderingspirit'));
});
});