From 9b6d4ce5944ca80759f5d9f6a6348f9287b45f65 Mon Sep 17 00:00:00 2001 From: Bertie690 <136088738+Bertie690@users.noreply.github.com> Date: Mon, 14 Jul 2025 11:28:54 +0200 Subject: [PATCH] Update mirror_move.test.ts --- test/moves/mirror_move.test.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/test/moves/mirror_move.test.ts b/test/moves/mirror_move.test.ts index 53b84c1e25c..df502b49709 100644 --- a/test/moves/mirror_move.test.ts +++ b/test/moves/mirror_move.test.ts @@ -1,5 +1,6 @@ import { BattlerIndex } from "#enums/battler-index"; -import { Stat } from "#app/enums/stat"; +import { Stat } from "#enums/stat"; +import { MoveUseMode } from "#enums/move-use-mode"; import { MoveResult } from "#enums/move-result"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; @@ -33,7 +34,7 @@ describe("Moves - Mirror Move", () => { .enemyMoveset(MoveId.SPLASH); }); - it("should use the last move that the target used against any pokemon", async () => { + it("should use the last move that the target used against it", async () => { game.override.battleStyle("double"); await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.MAGIKARP]); @@ -44,9 +45,20 @@ describe("Moves - Mirror Move", () => { await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.ENEMY_2, BattlerIndex.PLAYER_2, BattlerIndex.PLAYER]); await game.toNextTurn(); + // Feebas copied enemy tackle against it const [feebas, magikarp] = game.scene.getPlayerField(); - expect(feebas.getLastXMoves()[0].move).toBe(MoveId.TACKLE); - expect(magikarp.getLastXMoves()[0].move).toBe(MoveId.SWORDS_DANCE); + expect(feebas.getLastXMoves()[0]).toMatchObject({ + move: MoveId.TACKLE, + targets: [BattlerIndex.ENEMY], + useMode: MoveUseMode.FOLLOW_UP, + }); + expect(game.field.getEnemyPokemon().isFullHp()).toBe(false); + expect(magikarp.getLastXMoves()[0]).toMatchObject({ + move: MoveId.SWORDS_DANCE, + targets: [BattlerIndex.PLAYER_2], + useMode: MoveUseMode.FOLLOW_UP, + }); + expect(magikarp.getStatStage(Stat.ATK)).toBe(2); }); it("should apply secondary effects of the called move", async () => {