From 50572cea88e801147cfdd278f765c541cc1fe1db Mon Sep 17 00:00:00 2001 From: innerthunder Date: Tue, 8 Oct 2024 21:31:12 -0700 Subject: [PATCH] Electro Shot Multi Lens test --- src/test/moves/electro_shot.test.ts | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/src/test/moves/electro_shot.test.ts b/src/test/moves/electro_shot.test.ts index 4e218cb739be..1373b4941eb7 100644 --- a/src/test/moves/electro_shot.test.ts +++ b/src/test/moves/electro_shot.test.ts @@ -73,14 +73,32 @@ describe("Moves - Electro Shot", () => { game.move.select(Moves.ELECTRO_SHOT); + await game.phaseInterceptor.to("MoveEffectPhase", false); + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); + await game.phaseInterceptor.to("MoveEndPhase"); expect(playerPokemon.getTag(BattlerTagType.CHARGING)).toBeUndefined(); expect(enemyPokemon.hp).toBeLessThan(enemyPokemon.getMaxHp()); expect(playerPokemon.getMoveHistory()).toHaveLength(2); - expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); expect(playerPokemon.getLastXMoves(1)[0].result).toBe(MoveResult.SUCCESS); const playerElectroShot = playerPokemon.getMoveset().find(mv => mv && mv.moveId === Moves.ELECTRO_SHOT); expect(playerElectroShot?.ppUsed).toBe(1); }); + + it("should only increase Sp. Atk once with Multi-Lens", async () => { + game.override + .weather(WeatherType.RAIN) + .startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); + + await game.classicMode.startBattle([ Species.MAGIKARP ]); + + const playerPokemon = game.scene.getPlayerPokemon()!; + + game.move.select(Moves.ELECTRO_SHOT); + + await game.phaseInterceptor.to("MoveEndPhase"); + expect(playerPokemon.turnData.hitCount).toBe(2); + expect(playerPokemon.getStatStage(Stat.SPATK)).toBe(1); + }); });