fix atk increase

This commit is contained in:
torranx 2024-09-07 03:42:46 +08:00
parent ba92bcd4f9
commit 8ebd463c67
2 changed files with 3 additions and 8 deletions

View File

@ -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);
}
/**

View File

@ -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));