mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-12-16 14:55:22 +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")) {
|
if (this.isFusion() && ability.hasAttr("NoFusionAbilityAbAttr")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (this.isTransformed() && ability.hasAttr("NoTransformAbilityAbAttr")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
const arena = globalScene?.arena;
|
const arena = globalScene?.arena;
|
||||||
if (arena.ignoreAbilities && arena.ignoringEffectSource !== this.getBattlerIndex() && ability.ignorable) {
|
if (arena.ignoreAbilities && arena.ignoringEffectSource !== this.getBattlerIndex() && ability.ignorable) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -74,7 +74,7 @@ describe("Abilities - Shields Down", () => {
|
|||||||
|
|
||||||
minior.hp = 0;
|
minior.hp = 0;
|
||||||
minior.status = new Status(StatusEffect.FAINT);
|
minior.status = new Status(StatusEffect.FAINT);
|
||||||
expect(minior.isFainted()).toBe(true);
|
expect(minior).toHaveFainted();
|
||||||
|
|
||||||
game.move.use(MoveId.SPLASH);
|
game.move.use(MoveId.SPLASH);
|
||||||
await game.doKillOpponents();
|
await game.doKillOpponents();
|
||||||
@ -176,15 +176,15 @@ describe("Abilities - Shields Down", () => {
|
|||||||
expect(game.field.getPlayerPokemon()).toHaveBattlerTag(BattlerTagType.CONFUSED);
|
expect(game.field.getPlayerPokemon()).toHaveBattlerTag(BattlerTagType.CONFUSED);
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: The `NoTransformAbilityAbAttr` attribute is not checked anywhere, so this test cannot pass.
|
it("should not activate when transformed", async () => {
|
||||||
// TODO: Move this to a transform test
|
|
||||||
it.todo("should not activate when transformed", async () => {
|
|
||||||
game.override.enemyAbility(AbilityId.IMPOSTER);
|
game.override.enemyAbility(AbilityId.IMPOSTER);
|
||||||
await game.classicMode.startBattle([SpeciesId.MINIOR]);
|
await game.classicMode.startBattle([SpeciesId.MINIOR]);
|
||||||
|
|
||||||
game.move.use(MoveId.SPORE);
|
game.move.use(MoveId.SPORE);
|
||||||
await game.toEndOfTurn();
|
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