diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index 6b7b36e4807..bd56c45f943 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -1698,8 +1698,7 @@ export class GorillaTacticsAbAttr extends ExecutedMoveAbAttr { } override canApplyExecutedMove(pokemon: Pokemon, simulated: boolean): boolean { - return super.canApplyExecutedMove(pokemon, simulated) && - simulated || !pokemon.getTag(BattlerTagType.GORILLA_TACTICS); + return simulated || !pokemon.getTag(BattlerTagType.GORILLA_TACTICS); } override applyExecutedMove(pokemon: Pokemon, simulated: boolean): void { diff --git a/test/abilities/gorilla_tactics.test.ts b/test/abilities/gorilla_tactics.test.ts index bfb4f95d144..3ad138749a8 100644 --- a/test/abilities/gorilla_tactics.test.ts +++ b/test/abilities/gorilla_tactics.test.ts @@ -73,7 +73,7 @@ describe("Abilities - Gorilla Tactics", () => { await game.toNextTurn(); game.move.select(MoveId.TACKLE); - await game.selectTarget(MoveId.SPLASH); //prevent protect from being used by the enemy + await game.move.forceEnemyMove(MoveId.SPLASH); //prevent protect from being used by the enemy await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("MoveEndPhase"); @@ -83,12 +83,12 @@ describe("Abilities - Gorilla Tactics", () => { it("should activate when the opponenet protects", async () => { await game.classicMode.startBattle([SpeciesId.GALAR_DARMANITAN]); - const darmanitan = game.scene.getPlayerPokemon()!; + const darmanitan = game.field.getPlayerPokemon(); game.move.select(MoveId.TACKLE); await game.move.selectEnemyMove(MoveId.PROTECT); - await game.phaseInterceptor.to("TurnEndPhase"); + await game.toEndOfTurn(); expect(darmanitan.isMoveRestricted(MoveId.SPLASH)).toBe(true); expect(darmanitan.isMoveRestricted(MoveId.TACKLE)).toBe(false); }); @@ -96,13 +96,13 @@ describe("Abilities - Gorilla Tactics", () => { it("should activate when a move is succesfully executed but misses", async () => { await game.classicMode.startBattle([SpeciesId.GALAR_DARMANITAN]); - const darmanitan = game.scene.getPlayerPokemon()!; + const darmanitan = game.field.getPlayerPokemon(); game.move.select(MoveId.TACKLE); await game.move.selectEnemyMove(MoveId.SPLASH); await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.move.forceMiss(); - await game.phaseInterceptor.to("TurnEndPhase"); + await game.toEndOfTurn(); expect(darmanitan.isMoveRestricted(MoveId.SPLASH)).toBe(true); expect(darmanitan.isMoveRestricted(MoveId.TACKLE)).toBe(false);