From ecdaac20faebed67324b8e35ab51bd0c69ee5d8d Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Tue, 24 Jun 2025 18:40:15 -0700 Subject: [PATCH] [Test] Fix Gorilla Tactics tests --- test/abilities/gorilla_tactics.test.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/abilities/gorilla_tactics.test.ts b/test/abilities/gorilla_tactics.test.ts index 330b4f51bcd..7a563f5b37f 100644 --- a/test/abilities/gorilla_tactics.test.ts +++ b/test/abilities/gorilla_tactics.test.ts @@ -28,8 +28,10 @@ describe("Abilities - Gorilla Tactics", () => { game = new GameManager(phaserGame); game.override .battleStyle("single") + .criticalHits(false) .enemyAbility(AbilityId.BALL_FETCH) .enemySpecies(SpeciesId.MAGIKARP) + .enemyMoveset(MoveId.SPLASH) .enemyLevel(30) .moveset([MoveId.SPLASH, MoveId.TACKLE, MoveId.GROWL, MoveId.METRONOME]) .ability(AbilityId.GORILLA_TACTICS); @@ -42,7 +44,6 @@ describe("Abilities - Gorilla Tactics", () => { const initialAtkStat = darmanitan.getStat(Stat.ATK); game.move.select(MoveId.SPLASH); - await game.move.forceEnemyMove(MoveId.SPLASH); await game.toEndOfTurn(); expect(darmanitan.getStat(Stat.ATK, false)).toBeCloseTo(initialAtkStat * 1.5); @@ -59,7 +60,6 @@ describe("Abilities - Gorilla Tactics", () => { // First turn, lock move to Growl game.move.select(MoveId.GROWL); - await game.move.forceEnemyMove(MoveId.SPLASH); await game.toNextTurn(); // Second turn, Growl is interrupted by Disable @@ -72,7 +72,7 @@ describe("Abilities - Gorilla Tactics", () => { // Third turn, Struggle is used game.move.select(MoveId.TACKLE); - await game.move.forceEnemyMove(MoveId.SPLASH); //prevent protect from being used by the enemy + await game.move.forceEnemyMove(MoveId.SPLASH); // prevent disable from being used by the enemy await game.setTurnOrder([BattlerIndex.PLAYER, BattlerIndex.ENEMY]); await game.phaseInterceptor.to("MoveEndPhase"); @@ -106,11 +106,13 @@ describe("Abilities - Gorilla Tactics", () => { const darmanitan = game.field.getPlayerPokemon(); game.move.select(MoveId.TACKLE); - await game.move.selectEnemyMove(MoveId.PROTECT); + await game.move.forceEnemyMove(MoveId.PROTECT); await game.toEndOfTurn(); expect(darmanitan.isMoveRestricted(MoveId.SPLASH)).toBe(true); expect(darmanitan.isMoveRestricted(MoveId.TACKLE)).toBe(false); + const enemy = game.field.getEnemyPokemon(); + expect(enemy.hp).toBe(enemy.getMaxHp()); }); it("should activate when a move is succesfully executed but misses", async () => { @@ -119,7 +121,6 @@ describe("Abilities - Gorilla Tactics", () => { 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.toEndOfTurn();