pokemon-showdown/test/sim/abilities/mummy.js
Leonard Craft III 8a5bbbd255
Implement Ability flags (#10048)
* Add AbilityFlags interface

* Add flags to abilities data (Karthik's script)

* Convert isBreakable to its new flag

* Convert most of isPermanent to its new flag

* Convert Trace to its new flag

* Convert Skill Swap to its new flag

* Convert Wandering Spirit to the failskillswap flag

* Update miscelleneous descriptions that depend on cantsuppress

* Convert Entrainment to its flag

* Convert Receiver/PoA to its flag

* Convert Role Play to its flag

* Implement Doodle failure conditions

* Various cleanup

* Breakable fixes

* How did I manage to do this

* Allow LightningRod to be breakable in Gen 3

* Implement notransform flag

* Tera Shell oopsie

* Fix more things after the rebase

* And fix Teraform Zero

* Update data/abilities.ts

* Update data/abilities.ts

* Update data/abilities.ts

* Update data/mods/partnersincrime/abilities.ts

* Update data/abilities.ts

* Update data/mods/sharedpower/abilities.ts

* Update abilities.ts

---------

Co-authored-by: Kris Johnson <11083252+KrisXV@users.noreply.github.com>
2024-01-02 23:55:17 -07: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 abilities that can't be suppressed`, 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);
});
});