mirror of
https://github.com/smogon/pokemon-showdown.git
synced 2026-04-26 02:39:38 -05:00
Fix Commander with Neutralizing Gas after Dondozo faints
This commit is contained in:
parent
82f840e4cb
commit
ba2a5e31f2
|
|
@ -824,7 +824,7 @@ export class Pokemon {
|
|||
for (const pokemon of this.battle.getAllActive()) {
|
||||
// can't use hasAbility because it would lead to infinite recursion
|
||||
if (pokemon.ability === ('neutralizinggas' as ID) && !pokemon.volatiles['gastroacid'] &&
|
||||
!pokemon.transformed && !pokemon.abilityState.ending) {
|
||||
!pokemon.transformed && !pokemon.abilityState.ending && !this.volatiles['commanding']) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -192,6 +192,27 @@ describe('Commander', function () {
|
|||
assert.fullHP(shuckle, `Shuckle should have never taken damage from Dazzling Gleam`);
|
||||
});
|
||||
|
||||
it(`should allow Tatsugiri to move again if Dondozo faints while Neutralizing Gas is active`, function () {
|
||||
battle = common.createBattle({gameType: 'doubles'}, [[
|
||||
{species: 'shuckle', moves: ['sleeptalk']},
|
||||
{species: 'wynaut', moves: ['sleeptalk']},
|
||||
{species: 'weezing', ability: 'neutralizinggas', moves: ['sleeptalk']},
|
||||
], [
|
||||
{species: 'tatsugiri', ability: 'commander', moves: ['dazzlinggleam']},
|
||||
{species: 'dondozo', moves: ['memento']},
|
||||
]]);
|
||||
|
||||
battle.makeChoices('switch 3, move sleeptalk', 'auto');
|
||||
battle.makeChoices();
|
||||
|
||||
const tatsugiri = battle.p2.pokemon[0];
|
||||
assert.false(!!tatsugiri.volatiles['commanding']);
|
||||
|
||||
battle.makeChoices();
|
||||
const shuckle = battle.p1.active[0];
|
||||
assert.false.fullHP(shuckle, `Shuckle should have taken damage from Dazzling Gleam`);
|
||||
});
|
||||
|
||||
it.skip(`should activate after hazards run`, function () {
|
||||
battle = common.createBattle({gameType: 'doubles'}, [[
|
||||
{species: 'regieleki', moves: ['toxicspikes']},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user