mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-15 06:15:20 +01:00
[Bug] Fix NoTransformAbilityAttr not doing anything (#6693)
[Bug] Fix `NoTransformAbilityAttr` not doing anythin
This commit is contained in:
parent
6cf28bf13b
commit
4b9ccf5408
@ -2200,6 +2200,9 @@ export abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||
if (this.isFusion() && ability.hasAttr("NoFusionAbilityAbAttr")) {
|
||||
return false;
|
||||
}
|
||||
if (this.isTransformed() && ability.hasAttr("NoTransformAbilityAbAttr")) {
|
||||
return false;
|
||||
}
|
||||
const arena = globalScene?.arena;
|
||||
if (arena.ignoreAbilities && arena.ignoringEffectSource !== this.getBattlerIndex() && ability.ignorable) {
|
||||
return false;
|
||||
|
||||
@ -74,7 +74,7 @@ describe("Abilities - Shields Down", () => {
|
||||
|
||||
minior.hp = 0;
|
||||
minior.status = new Status(StatusEffect.FAINT);
|
||||
expect(minior.isFainted()).toBe(true);
|
||||
expect(minior).toHaveFainted();
|
||||
|
||||
game.move.use(MoveId.SPLASH);
|
||||
await game.doKillOpponents();
|
||||
@ -176,15 +176,15 @@ describe("Abilities - Shields Down", () => {
|
||||
expect(game.field.getPlayerPokemon()).toHaveBattlerTag(BattlerTagType.CONFUSED);
|
||||
});
|
||||
|
||||
// TODO: The `NoTransformAbilityAbAttr` attribute is not checked anywhere, so this test cannot pass.
|
||||
// TODO: Move this to a transform test
|
||||
it.todo("should not activate when transformed", async () => {
|
||||
it("should not activate when transformed", async () => {
|
||||
game.override.enemyAbility(AbilityId.IMPOSTER);
|
||||
await game.classicMode.startBattle([SpeciesId.MINIOR]);
|
||||
|
||||
game.move.use(MoveId.SPORE);
|
||||
await game.toEndOfTurn();
|
||||
|
||||
expect(game.field.getEnemyPokemon()).toHaveStatusEffect(StatusEffect.SLEEP);
|
||||
const karp = game.field.getEnemyPokemon();
|
||||
expect(karp).not.toHaveAbilityApplied(AbilityId.SHIELDS_DOWN);
|
||||
expect(karp).toHaveStatusEffect(StatusEffect.SLEEP);
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user