From 3657b3e208f1a17747e4ce015d7e5374b628a62b Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Sat, 16 Nov 2024 13:30:42 -0500 Subject: [PATCH] Fixed protect test Fixed test passing regardless of intended result --- src/test/moves/instruct.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/moves/instruct.test.ts b/src/test/moves/instruct.test.ts index fec28e30c95..87b8f86ecde 100644 --- a/src/test/moves/instruct.test.ts +++ b/src/test/moves/instruct.test.ts @@ -195,17 +195,16 @@ describe("Moves - Instruct", () => { }); it("should not repeat enemy's move through protect", async () => { - game.override.enemyMoveset([ Moves.SONIC_BOOM, Moves.PROTECT ]); await game.classicMode.startBattle([ Species.AMOONGUSS ]); const enemyPokemon = game.scene.getEnemyPokemon()!; - enemyPokemon.battleSummonData.moveHistory = [{ move: Moves.SONIC_BOOM, targets: [ BattlerIndex.PLAYER ], result: MoveResult.SUCCESS, virtual: false }]; - + game.move.changeMoveset(enemyPokemon, Moves.PROTECT); game.move.select(Moves.INSTRUCT); await game.forceEnemyMove(Moves.PROTECT); await game.phaseInterceptor.to("TurnEndPhase", false); expect(enemyPokemon.getLastXMoves()[0].move).toBe(Moves.PROTECT); + expect(enemyPokemon.getMoveset().find(m => m?.moveId === Moves.PROTECT)?.ppUsed).toBe(1); }); it("should not repeat enemy's charging move", async () => {