From 8ebd463c6743de7ca5d61af1c4c79f3d5b619ba5 Mon Sep 17 00:00:00 2001 From: torranx Date: Sat, 7 Sep 2024 03:42:46 +0800 Subject: [PATCH] fix atk increase --- src/data/battler-tags.ts | 3 +-- src/test/abilities/gorilla_tactics.test.ts | 8 ++------ 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/data/battler-tags.ts b/src/data/battler-tags.ts index 58c0b425e40..48d44d8f28e 100644 --- a/src/data/battler-tags.ts +++ b/src/data/battler-tags.ts @@ -266,8 +266,7 @@ export class GorillaTacticsTag extends MoveRestrictionBattlerTag { } this.moveId = lastValidMove; - pokemon.setStatStage(Stat.ATK, 1); - pokemon.updateInfo(); + pokemon.setStat(Stat.ATK, pokemon.getStat(Stat.ATK, false) * 1.5, false); } /** diff --git a/src/test/abilities/gorilla_tactics.test.ts b/src/test/abilities/gorilla_tactics.test.ts index c799411c3e6..7af456cbd20 100644 --- a/src/test/abilities/gorilla_tactics.test.ts +++ b/src/test/abilities/gorilla_tactics.test.ts @@ -39,12 +39,13 @@ describe("Abilities - Gorilla Tactics", () => { await game.classicMode.startBattle([Species.GALAR_DARMANITAN]); const darmanitan = game.scene.getPlayerPokemon()!; + const initialAtkStat = darmanitan.getStat(Stat.ATK); game.move.select(Moves.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); - expect(darmanitan.getStatStage(Stat.ATK)).toBe(1); + expect(darmanitan.getStat(Stat.ATK, false)).toBeCloseTo(initialAtkStat * 1.5); // Other moves should be restricted expect(darmanitan.isMoveRestricted(Moves.TACKLE)).toBe(true); expect(darmanitan.isMoveRestricted(Moves.SPLASH)).toBe(false); @@ -60,11 +61,6 @@ describe("Abilities - Gorilla Tactics", () => { await game.phaseInterceptor.to("TurnEndPhase"); - expect(darmanitan.getStatStage(Stat.ATK)).toBe(1); - // Other moves should be restricted - expect(darmanitan.isMoveRestricted(Moves.TACKLE)).toBe(true); - expect(darmanitan.isMoveRestricted(Moves.SPLASH)).toBe(false); - // Turn where Tackle is interrupted by Disable await game.toNextTurn(); game.override.enemyMoveset(Array(4).fill(Moves.DISABLE));