pokemon-showdown/test/sim/abilities/mummy.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('Mummy', function () {
afterEach(function () {
battle.destroy();
});
it(`should set the attacker's ability to Mummy when the user is hit by a contact move`, function () {
battle = common.createBattle([[
{species: 'Cofagrigus', ability: 'mummy', moves: ['sleeptalk']},
], [
{species: 'Mew', ability: 'synchronize', moves: ['aerialace']},
]]);
battle.makeChoices();
assert.equal(battle.p2.active[0].ability, 'mummy');
});
it(`should not change isPermanent abilities`, function () {
battle = common.createBattle([[
{species: 'Cofagrigus', ability: 'mummy', moves: ['sleeptalk']},
], [
{species: 'Mimikyu', ability: 'disguise', moves: ['aerialace']},
]]);
battle.makeChoices();
assert.equal(battle.p2.active[0].ability, 'disguise');
});
it(`should not activate before all damage calculation is complete`, function () {
battle = common.createBattle({gameType: 'doubles'}, [[
{species: 'Sableye', ability: 'toughclaws', moves: ['brutalswing']},
{species: 'Golisopod', ability: 'emergencyexit', moves: ['sleeptalk']},
], [
{species: 'Cofagrigus', ability: 'mummy', moves: ['sleeptalk']},
{species: 'Hoopa', ability: 'shellarmor', moves: ['sleeptalk']},
]]);
const hoopa = battle.p2.active[1];
battle.makeChoices();
assert.fainted(hoopa);
});
});