From b3abd0d98eaf0c3b0ea1a98e998de3a51072d5d1 Mon Sep 17 00:00:00 2001 From: xsn34kzx Date: Sun, 1 Sep 2024 20:32:19 -0400 Subject: [PATCH] Fix Moody Test --- src/test/abilities/moody.test.ts | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/test/abilities/moody.test.ts b/src/test/abilities/moody.test.ts index 2404e1edb14..5c46ea68ec5 100644 --- a/src/test/abilities/moody.test.ts +++ b/src/test/abilities/moody.test.ts @@ -1,4 +1,4 @@ -import { BATTLE_STATS } from "#enums/stat"; +import { BATTLE_STATS, EFFECTIVE_STATS } from "#enums/stat"; import { Abilities } from "#enums/abilities"; import { Moves } from "#enums/moves"; import { Species } from "#enums/species"; @@ -28,7 +28,6 @@ describe("Abilities - Moody", () => { .battleType("single") .enemySpecies(Species.RATTATA) .enemyAbility(Abilities.BALL_FETCH) - .enemyPassiveAbility(Abilities.HYDRATION) .ability(Abilities.MOODY) .enemyMoveset(SPLASH_ONLY) .moveset(SPLASH_ONLY); @@ -36,14 +35,14 @@ describe("Abilities - Moody", () => { it("should increase one stat stage by 2 and decrease a different stat stage by 1", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const playerPokemon = game.scene.getPlayerPokemon()!; game.move.select(Moves.SPLASH); await game.toNextTurn(); // Find the increased and decreased stats, make sure they are different. - const changedStats = BATTLE_STATS.filter(s => playerPokemon.getStatStage(s) === 2 || playerPokemon.getStatStage(s) === -1); + const changedStats = EFFECTIVE_STATS.filter(s => playerPokemon.getStatStage(s) === 2 || playerPokemon.getStatStage(s) === -1); expect(changedStats).toBeTruthy(); expect(changedStats.length).toBe(2); @@ -52,7 +51,7 @@ describe("Abilities - Moody", () => { it("should only increase one stat stage by 2 if all stat stages are at -6", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const playerPokemon = game.scene.getPlayerPokemon()!; @@ -62,8 +61,8 @@ describe("Abilities - Moody", () => { game.move.select(Moves.SPLASH); await game.toNextTurn(); - // Should increase one BattleStat by 2 (from -6, meaning it will be -4) - const increasedStat = BATTLE_STATS.filter(s => playerPokemon.getStatStage(s) === -4); + // Should increase one stat stage by 2 (from -6, meaning it will be -4) + const increasedStat = EFFECTIVE_STATS.filter(s => playerPokemon.getStatStage(s) === -4); expect(increasedStat).toBeTruthy(); expect(increasedStat.length).toBe(1); @@ -71,7 +70,7 @@ describe("Abilities - Moody", () => { it("should only decrease one stat stage by 1 stage if all stat stages are at 6", async () => { - await game.startBattle(); + await game.classicMode.startBattle(); const playerPokemon = game.scene.getPlayerPokemon()!; @@ -81,8 +80,8 @@ describe("Abilities - Moody", () => { game.move.select(Moves.SPLASH); await game.toNextTurn(); - // Should decrease one BattleStat by 1 (from 6, meaning it will be 5) - const decreasedStat = BATTLE_STATS.filter(s => playerPokemon.getStatStage(s) === 5); + // Should decrease one stat stage by 1 (from 6, meaning it will be 5) + const decreasedStat = EFFECTIVE_STATS.filter(s => playerPokemon.getStatStage(s) === 5); expect(decreasedStat).toBeTruthy(); expect(decreasedStat.length).toBe(1);