From f49e4d647e6b373c8bd8e8f1a91b8936925a6986 Mon Sep 17 00:00:00 2001 From: Bertie690 Date: Fri, 6 Jun 2025 13:52:02 -0400 Subject: [PATCH] Added test for status moves --- test/abilities/rattled.test.ts | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/test/abilities/rattled.test.ts b/test/abilities/rattled.test.ts index ff183131bb0..f3732688100 100644 --- a/test/abilities/rattled.test.ts +++ b/test/abilities/rattled.test.ts @@ -31,7 +31,7 @@ describe("Abilities - Rattled", () => { .battleType(BattleType.TRAINER) .disableCrits() .battleStyle("single") - .enemySpecies(SpeciesId.MAGIKARP) + .enemySpecies(SpeciesId.DUSKULL) .enemyAbility(AbilityId.INTIMIDATE) .enemyPassiveAbility(AbilityId.NO_GUARD); }); @@ -66,6 +66,25 @@ describe("Abilities - Rattled", () => { expect(game.textInterceptor.logs.filter(t => t === statChangeText)).toHaveLength(enemyHits); }); + it.each<{ type: string; move: MoveId }>([ + { type: "Bug", move: MoveId.POWDER }, + { type: "Ghost", move: MoveId.CONFUSE_RAY }, + { type: "Dark", move: MoveId.TAUNT }, + ])("should not trigger from $type-type status moves", async ({ move }) => { + game.override.enemyAbility(AbilityId.BALL_FETCH); + await game.classicMode.startBattle([SpeciesId.GIMMIGHOUL]); + + game.move.use(MoveId.SPLASH); + await game.move.forceEnemyMove(move); + await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); + await game.phaseInterceptor.to("MoveEndPhase"); + + const gimmighoul = game.field.getPlayerPokemon(); + expect(gimmighoul.getStatStage(Stat.SPD)).toBe(0); + expect(game.phaseInterceptor.log).not.toContain("ShowAbilityPhase"); + expect(game.phaseInterceptor.log).not.toContain("StatStageChangePhase"); + }); + it("should activate after Intimidate attack drop on initial send out", async () => { // `runToSummon` used instead of `startBattle` to avoid skipping past initial "post send out" effects await game.classicMode.runToSummon([SpeciesId.GIMMIGHOUL]);