mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 15:52:18 +02:00
Modify gastro acid to call onLose attributes when suppressing
This commit is contained in:
parent
e1b2dfd827
commit
6134016655
@ -7635,11 +7635,12 @@ export class SuppressAbilitiesAttr extends MoveEffectAttr {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
target.summonData.abilitySuppressed = true;
|
|
||||||
globalScene.arena.triggerWeatherBasedFormChangesToNormal();
|
|
||||||
|
|
||||||
globalScene.queueMessage(i18next.t("moveTriggers:suppressAbilities", { pokemonName: getPokemonNameWithAffix(target) }));
|
globalScene.queueMessage(i18next.t("moveTriggers:suppressAbilities", { pokemonName: getPokemonNameWithAffix(target) }));
|
||||||
|
|
||||||
|
target.suppressAbility();
|
||||||
|
|
||||||
|
globalScene.arena.triggerWeatherBasedFormChangesToNormal();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1498,6 +1498,14 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
|||||||
applyOnGainAbAttrs(this, passive);
|
applyOnGainAbAttrs(this, passive);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Suppresses an ability and calls its onlose attributes
|
||||||
|
*/
|
||||||
|
public suppressAbility() {
|
||||||
|
this.summonData.abilitySuppressed = true;
|
||||||
|
[ true, false ].forEach((v) => applyOnLoseAbAttrs(this, v));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if a pokemon has a passive either from:
|
* Checks if a pokemon has a passive either from:
|
||||||
* - bought with starter candy
|
* - bought with starter candy
|
||||||
|
@ -125,7 +125,7 @@ describe("Abilities - Neutralizing Gas", () => {
|
|||||||
expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeUndefined(); // No neut gas users are left
|
expect(game.scene.arena.getTag(ArenaTagType.NEUTRALIZING_GAS)).toBeUndefined(); // No neut gas users are left
|
||||||
});
|
});
|
||||||
|
|
||||||
it.todo("should deactivate when suppressed by gastro acid", async () => {
|
it("should deactivate when suppressed by gastro acid", async () => {
|
||||||
game.override.enemyMoveset(Moves.GASTRO_ACID);
|
game.override.enemyMoveset(Moves.GASTRO_ACID);
|
||||||
|
|
||||||
await game.classicMode.startBattle([ Species.FEEBAS ]);
|
await game.classicMode.startBattle([ Species.FEEBAS ]);
|
||||||
|
Loading…
Reference in New Issue
Block a user