diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index 6bdbb66be14..e37fe545737 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -138,7 +138,6 @@ export class SwitchSummonPhase extends SummonPhase { return; } - if (this.switchType === SwitchType.BATON_PASS) { // If switching via baton pass, update opposing tags coming from the prior pokemon (this.player ? globalScene.getEnemyField() : globalScene.getPlayerField()).forEach((enemyPokemon: Pokemon) => diff --git a/src/plugins/i18n.ts b/src/plugins/i18n.ts index 515d9aec528..8ca9005096f 100644 --- a/src/plugins/i18n.ts +++ b/src/plugins/i18n.ts @@ -174,7 +174,24 @@ export async function initI18n(): Promise { "es-MX": ["es-ES", "en"], default: ["en"], }, - supportedLngs: ["en", "es-ES", "es-MX", "fr", "it", "de", "zh-CN", "zh-TW", "pt-BR", "ko", "ja", "ca", "da", "tr", "ro", "ru"], + supportedLngs: [ + "en", + "es-ES", + "es-MX", + "fr", + "it", + "de", + "zh-CN", + "zh-TW", + "pt-BR", + "ko", + "ja", + "ca", + "da", + "tr", + "ro", + "ru", + ], backend: { loadPath(lng: string, [ns]: string[]) { let fileName: string; diff --git a/src/system/settings/settings.ts b/src/system/settings/settings.ts index 69abc669870..ca5395a5af7 100644 --- a/src/system/settings/settings.ts +++ b/src/system/settings/settings.ts @@ -959,7 +959,7 @@ export function setSetting(setting: string, value: number): boolean { }, { label: "Türkçe (Needs Help)", - handler: () => changeLocaleHandler("tr") + handler: () => changeLocaleHandler("tr"), }, { label: "Русский (Needs Help)", @@ -967,11 +967,11 @@ export function setSetting(setting: string, value: number): boolean { }, { label: "Dansk (Needs Help)", - handler: () => changeLocaleHandler("da") + handler: () => changeLocaleHandler("da"), }, { label: "Română (Needs Help)", - handler: () => changeLocaleHandler("ro") + handler: () => changeLocaleHandler("ro"), }, { label: i18next.t("settings:back"), diff --git a/test/abilities/battery.test.ts b/test/abilities/battery.test.ts index 1bfcf41b080..6aa59dc11c2 100644 --- a/test/abilities/battery.test.ts +++ b/test/abilities/battery.test.ts @@ -29,9 +29,9 @@ describe("Abilities - Battery", () => { game.override .battleStyle("double") .enemySpecies(Species.SHUCKLE) - .enemyAbility(Abilities.BALL_FETCH) - .moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]) - .enemyMoveset(Moves.SPLASH); + .enemyAbility(AbilityId.BALL_FETCH) + .moveset([MoveId.TACKLE, MoveId.BREAKING_SWIPE, MoveId.SPLASH, MoveId.DAZZLING_GLEAM]) + .enemyMoveset(MoveId.SPLASH); }); it("raises the power of allies' special moves by 30%", async () => { diff --git a/test/abilities/costar.test.ts b/test/abilities/costar.test.ts index 5d7c4a05e3f..a40d84e72f5 100644 --- a/test/abilities/costar.test.ts +++ b/test/abilities/costar.test.ts @@ -26,9 +26,9 @@ describe("Abilities - COSTAR", () => { game = new GameManager(phaserGame); game.override .battleStyle("double") - .ability(Abilities.COSTAR) - .moveset([Moves.SPLASH, Moves.NASTY_PLOT]) - .enemyMoveset(Moves.SPLASH); + .ability(AbilityId.COSTAR) + .moveset([MoveId.SPLASH, MoveId.NASTY_PLOT]) + .enemyMoveset(MoveId.SPLASH); }); test("ability copies positive stat stages", async () => { diff --git a/test/abilities/disguise.test.ts b/test/abilities/disguise.test.ts index 17667e3b88c..21b52a9141e 100644 --- a/test/abilities/disguise.test.ts +++ b/test/abilities/disguise.test.ts @@ -66,7 +66,7 @@ describe("Abilities - Disguise", () => { }); it("takes no damage from the first hit of a multihit move and transforms to Busted form, then takes damage from the second hit", async () => { - game.override.moveset([Moves.SURGING_STRIKES]).enemyLevel(5); + game.override.moveset([MoveId.SURGING_STRIKES]).enemyLevel(5); await game.classicMode.startBattle(); const mimikyu = game.scene.getEnemyPokemon()!; @@ -105,7 +105,7 @@ describe("Abilities - Disguise", () => { }); it("persists form change when switched out", async () => { - game.override.enemyMoveset([Moves.SHADOW_SNEAK]).starterSpecies(0); + game.override.enemyMoveset([MoveId.SHADOW_SNEAK]).starterSpecies(0); await game.classicMode.startBattle([SpeciesId.MIMIKYU, SpeciesId.FURRET]); @@ -205,7 +205,7 @@ describe("Abilities - Disguise", () => { }); it("activates when Aerilate circumvents immunity to the move's base type", async () => { - game.override.ability(Abilities.AERILATE).moveset([Moves.TACKLE]); + game.override.ability(AbilityId.AERILATE).moveset([MoveId.TACKLE]); await game.classicMode.startBattle(); diff --git a/test/abilities/flash_fire.test.ts b/test/abilities/flash_fire.test.ts index 7307971e675..8ac2f00052e 100644 --- a/test/abilities/flash_fire.test.ts +++ b/test/abilities/flash_fire.test.ts @@ -73,7 +73,7 @@ describe("Abilities - Flash Fire", () => { }, 20000); it("activated after being frozen", async () => { - game.override.enemyMoveset([Moves.EMBER]).moveset(Moves.SPLASH).statusEffect(StatusEffect.FREEZE); + game.override.enemyMoveset([MoveId.EMBER]).moveset(MoveId.SPLASH).statusEffect(StatusEffect.FREEZE); await game.classicMode.startBattle([Species.BLISSEY]); const blissey = game.scene.getPlayerPokemon()!; @@ -102,10 +102,10 @@ describe("Abilities - Flash Fire", () => { it("boosts Fire-type move when the ability is activated", async () => { game.override - .enemyMoveset([Moves.FIRE_PLEDGE]) - .moveset([Moves.EMBER, Moves.SPLASH]) - .enemyAbility(Abilities.FLASH_FIRE) - .ability(Abilities.NONE); + .enemyMoveset([MoveId.FIRE_PLEDGE]) + .moveset([MoveId.EMBER, MoveId.SPLASH]) + .enemyAbility(AbilityId.FLASH_FIRE) + .ability(AbilityId.NONE); await game.classicMode.startBattle([Species.BLISSEY]); const blissey = game.scene.getPlayerPokemon()!; const initialHP = 1000; @@ -130,10 +130,10 @@ describe("Abilities - Flash Fire", () => { it("still activates regardless of accuracy check", async () => { game.override - .moveset(Moves.FIRE_PLEDGE) - .enemyMoveset(Moves.EMBER) - .enemyAbility(Abilities.NONE) - .ability(Abilities.FLASH_FIRE) + .moveset(MoveId.FIRE_PLEDGE) + .enemyMoveset(MoveId.EMBER) + .enemyAbility(AbilityId.NONE) + .ability(AbilityId.FLASH_FIRE) .enemySpecies(Species.BLISSEY); await game.classicMode.startBattle([Species.RATTATA]); diff --git a/test/abilities/flower_gift.test.ts b/test/abilities/flower_gift.test.ts index f4ce1d35d1e..e1dbbc3fb7e 100644 --- a/test/abilities/flower_gift.test.ts +++ b/test/abilities/flower_gift.test.ts @@ -49,8 +49,8 @@ describe("Abilities - Flower Gift", () => { ): Promise<[number, number]> => { game.override .battleStyle("double") - .moveset([Moves.SPLASH, Moves.SUNNY_DAY, move, Moves.HEAL_PULSE]) - .enemyMoveset([Moves.SPLASH, Moves.HEAL_PULSE]); + .moveset([MoveId.SPLASH, MoveId.SUNNY_DAY, move, MoveId.HEAL_PULSE]) + .enemyMoveset([MoveId.SPLASH, MoveId.HEAL_PULSE]); const target_index = allyAttacker ? BattlerIndex.ENEMY : BattlerIndex.PLAYER_2; const attacker_index = allyAttacker ? BattlerIndex.PLAYER_2 : BattlerIndex.ENEMY; const ally_move = allyAttacker ? move : MoveId.SPLASH; diff --git a/test/abilities/good_as_gold.test.ts b/test/abilities/good_as_gold.test.ts index b9707c23a11..9a394f4fd01 100644 --- a/test/abilities/good_as_gold.test.ts +++ b/test/abilities/good_as_gold.test.ts @@ -65,8 +65,8 @@ describe("Abilities - Good As Gold", () => { it("should not block any status moves that target the field, one side, or all pokemon", async () => { game.override .battleStyle("double") - .enemyMoveset([Moves.STEALTH_ROCK, Moves.HAZE]) - .moveset([Moves.SWORDS_DANCE, Moves.SAFEGUARD]); + .enemyMoveset([MoveId.STEALTH_ROCK, MoveId.HAZE]) + .moveset([MoveId.SWORDS_DANCE, MoveId.SAFEGUARD]); await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); const [good_as_gold, ball_fetch] = game.scene.getPlayerField(); @@ -86,7 +86,7 @@ describe("Abilities - Good As Gold", () => { }); it("should not block field targeted effects in singles", async () => { - game.override.battleStyle("single").enemyMoveset([Moves.SPIKES]); + game.override.battleStyle("single").enemyMoveset([MoveId.SPIKES]); await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(MoveId.SPLASH, 0); @@ -96,7 +96,7 @@ describe("Abilities - Good As Gold", () => { }); it("should block the ally's helping hand", async () => { - game.override.battleStyle("double").moveset([Moves.HELPING_HAND, Moves.TACKLE]); + game.override.battleStyle("double").moveset([MoveId.HELPING_HAND, MoveId.TACKLE]); await game.classicMode.startBattle([Species.MAGIKARP, Species.FEEBAS]); game.move.select(MoveId.HELPING_HAND, 0); @@ -128,7 +128,7 @@ describe("Abilities - Good As Gold", () => { }); it("should not block field targeted effects like rain dance", async () => { - game.override.battleStyle("single").enemyMoveset([Moves.RAIN_DANCE]); + game.override.battleStyle("single").enemyMoveset([MoveId.RAIN_DANCE]); await game.classicMode.startBattle([Species.MAGIKARP]); game.move.use(MoveId.SPLASH, 0); diff --git a/test/abilities/ice_face.test.ts b/test/abilities/ice_face.test.ts index 2c9ec516f69..cf5dbc9889f 100644 --- a/test/abilities/ice_face.test.ts +++ b/test/abilities/ice_face.test.ts @@ -33,8 +33,8 @@ describe("Abilities - Ice Face", () => { game.override .battleStyle("single") .enemySpecies(Species.EISCUE) - .enemyAbility(Abilities.ICE_FACE) - .moveset([Moves.TACKLE, Moves.ICE_BEAM, Moves.TOXIC_THREAD, Moves.HAIL]); + .enemyAbility(AbilityId.ICE_FACE) + .moveset([MoveId.TACKLE, MoveId.ICE_BEAM, MoveId.TOXIC_THREAD, MoveId.HAIL]); }); it("takes no damage from physical move and transforms to Noice", async () => { @@ -52,7 +52,7 @@ describe("Abilities - Ice Face", () => { }); it("takes no damage from the first hit of multihit physical move and transforms to Noice", async () => { - game.override.moveset([Moves.SURGING_STRIKES]).enemyLevel(1); + game.override.moveset([MoveId.SURGING_STRIKES]).enemyLevel(1); await game.classicMode.startBattle([Species.HITMONLEE]); game.move.select(MoveId.SURGING_STRIKES); diff --git a/test/abilities/illusion.test.ts b/test/abilities/illusion.test.ts index 072fe5be708..3565f7ed8ac 100644 --- a/test/abilities/illusion.test.ts +++ b/test/abilities/illusion.test.ts @@ -117,12 +117,12 @@ describe("Abilities - Illusion", () => { }); it("should not break from indirect damage from status, weather or recoil", async () => { - game.override.enemySpecies(Species.GIGALITH).enemyAbility(Abilities.SAND_STREAM); + game.override.enemySpecies(Species.GIGALITH).enemyAbility(AbilityId.SAND_STREAM); await game.classicMode.startBattle([SpeciesId.ZOROARK, SpeciesId.AZUMARILL]); - game.move.use(Moves.FLARE_BLITZ); - await game.move.forceEnemyMove(Moves.WILL_O_WISP); + game.move.use(MoveId.FLARE_BLITZ); + await game.move.forceEnemyMove(MoveId.WILL_O_WISP); await game.toEndOfTurn(); const zoroark = game.scene.getPlayerPokemon()!; @@ -130,7 +130,7 @@ describe("Abilities - Illusion", () => { }); it("copies the the name, nickname, gender, shininess, and pokeball from the illusion source", async () => { - game.override.enemyMoveset(Moves.SPLASH); + game.override.enemyMoveset(MoveId.SPLASH); await game.classicMode.startBattle([Species.ABRA, Species.ZOROARK, Species.AXEW]); const axew = game.scene.getPlayerParty().at(2)!; diff --git a/test/abilities/imposter.test.ts b/test/abilities/imposter.test.ts index 75a993cb3b0..af29b3a0286 100644 --- a/test/abilities/imposter.test.ts +++ b/test/abilities/imposter.test.ts @@ -162,7 +162,7 @@ describe("Abilities - Imposter", () => { }); it("should stay transformed with the correct form after reload", async () => { - game.override.moveset([Moves.ABSORB]).enemySpecies(Species.UNOWN); + game.override.moveset([MoveId.ABSORB]).enemySpecies(Species.UNOWN); await game.classicMode.startBattle([Species.DITTO]); const enemy = game.scene.getEnemyPokemon()!; diff --git a/test/abilities/intimidate.test.ts b/test/abilities/intimidate.test.ts index 6333bad6639..bfef303a7e9 100644 --- a/test/abilities/intimidate.test.ts +++ b/test/abilities/intimidate.test.ts @@ -88,7 +88,7 @@ describe("Abilities - Intimidate", () => { }, 20000); it("should not activate again if there is no switch or new entry", async () => { - game.override.startingWave(2).moveset([Moves.SPLASH]); + game.override.startingWave(2).moveset([MoveId.SPLASH]); await game.classicMode.startBattle([Species.MIGHTYENA, Species.POOCHYENA]); const playerPokemon = game.scene.getPlayerPokemon()!; diff --git a/test/abilities/intrepid_sword.test.ts b/test/abilities/intrepid_sword.test.ts index 2222b7a1f73..f401ffc5784 100644 --- a/test/abilities/intrepid_sword.test.ts +++ b/test/abilities/intrepid_sword.test.ts @@ -25,8 +25,8 @@ describe("Abilities - Intrepid Sword", () => { game.override .battleStyle("single") .enemySpecies(Species.ZACIAN) - .enemyAbility(Abilities.INTREPID_SWORD) - .ability(Abilities.INTREPID_SWORD); + .enemyAbility(AbilityId.INTREPID_SWORD) + .ability(AbilityId.INTREPID_SWORD); }); it("should raise ATK stat stage by 1 on entry", async () => { diff --git a/test/abilities/libero.test.ts b/test/abilities/libero.test.ts index 3519fe17f32..fbbec73a460 100644 --- a/test/abilities/libero.test.ts +++ b/test/abilities/libero.test.ts @@ -108,7 +108,7 @@ describe("Abilities - Libero", () => { }); test("ability applies correctly even if the type has changed by another ability", async () => { - game.override.moveset([Moves.TACKLE]).passiveAbility(Abilities.REFRIGERATE); + game.override.moveset([MoveId.TACKLE]).passiveAbility(AbilityId.REFRIGERATE); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -155,7 +155,7 @@ describe("Abilities - Libero", () => { }); test("ability applies correctly even if the pokemon's move misses", async () => { - game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.SPLASH); + game.override.moveset([MoveId.TACKLE]).enemyMoveset(MoveId.SPLASH); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -186,7 +186,7 @@ describe("Abilities - Libero", () => { }); test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => { - game.override.moveset([Moves.TACKLE]).enemySpecies(Species.GASTLY); + game.override.moveset([MoveId.TACKLE]).enemySpecies(Species.GASTLY); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -259,7 +259,7 @@ describe("Abilities - Libero", () => { }); test("ability applies correctly even if the pokemon's Trick-or-Treat fails", async () => { - game.override.moveset([Moves.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY); + game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); diff --git a/test/abilities/magic_bounce.test.ts b/test/abilities/magic_bounce.test.ts index 9884ffe5dc4..7706798a6da 100644 --- a/test/abilities/magic_bounce.test.ts +++ b/test/abilities/magic_bounce.test.ts @@ -41,7 +41,7 @@ describe("Abilities - Magic Bounce", () => { it("should reflect basic status moves", async () => { await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - game.move.use(Moves.GROWL); + game.move.use(MoveId.GROWL); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getPlayerPokemon()!.getStatStage(Stat.ATK)).toBe(-1); }); @@ -49,8 +49,8 @@ describe("Abilities - Magic Bounce", () => { it("should not bounce moves while the target is in the semi-invulnerable state", async () => { await game.classicMode.startBattle([Species.MAGIKARP]); - game.move.use(Moves.GROWL); - await game.move.forceEnemyMove(Moves.FLY); + game.move.use(MoveId.GROWL); + await game.move.forceEnemyMove(MoveId.FLY); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("BerryPhase"); @@ -61,8 +61,8 @@ describe("Abilities - Magic Bounce", () => { game.override.battleStyle("double"); await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); - game.move.use(Moves.GROWL, 0); - game.move.use(Moves.SPLASH, 1); + game.move.use(MoveId.GROWL, 0); + game.move.use(MoveId.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); const user = game.scene.getPlayerField()[0]; @@ -73,7 +73,7 @@ describe("Abilities - Magic Bounce", () => { await game.classicMode.startBattle([SpeciesId.MAGIKARP]); game.scene.getEnemyPokemon()?.setStatStage(Stat.ATK, -6); - game.move.use(Moves.GROWL); + game.move.use(MoveId.GROWL); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getPlayerPokemon()!.getStatStage(Stat.ATK)).toBe(-1); @@ -103,25 +103,25 @@ describe("Abilities - Magic Bounce", () => { game.override.ability(AbilityId.MOLD_BREAKER); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); - game.move.use(Moves.GROWL); + game.move.use(MoveId.GROWL); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getEnemyPokemon()!.getStatStage(Stat.ATK)).toBe(-1); }); it("should bounce back a spread status move against both pokemon", async () => { - game.override.battleStyle("double").enemyMoveset([Moves.SPLASH]); + game.override.battleStyle("double").enemyMoveset([MoveId.SPLASH]); await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); - game.move.use(Moves.GROWL, 0); - game.move.use(Moves.SPLASH, 1); + game.move.use(MoveId.GROWL, 0); + game.move.use(MoveId.SPLASH, 1); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getPlayerField().every(p => p.getStatStage(Stat.ATK) === -2)).toBeTruthy(); }); it("should only bounce spikes back once in doubles when both targets have magic bounce", async () => { - game.override.battleStyle("double").moveset([Moves.SPIKES]); + game.override.battleStyle("double").moveset([MoveId.SPIKES]); await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(MoveId.SPIKES); @@ -132,7 +132,7 @@ describe("Abilities - Magic Bounce", () => { }); it("should bounce spikes even when the target is protected", async () => { - game.override.moveset([Moves.SPIKES]).enemyMoveset([Moves.PROTECT]); + game.override.moveset([MoveId.SPIKES]).enemyMoveset([MoveId.PROTECT]); await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(MoveId.SPIKES); @@ -141,7 +141,7 @@ describe("Abilities - Magic Bounce", () => { }); it("should not bounce spikes when the target is in the semi-invulnerable state", async () => { - game.override.moveset([Moves.SPIKES]).enemyMoveset([Moves.FLY]); + game.override.moveset([MoveId.SPIKES]).enemyMoveset([MoveId.FLY]); await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(MoveId.SPIKES); @@ -151,7 +151,7 @@ describe("Abilities - Magic Bounce", () => { }); it("should not bounce back curse", async () => { - game.override.moveset([Moves.CURSE]); + game.override.moveset([MoveId.CURSE]); await game.classicMode.startBattle([Species.GASTLY]); game.move.select(MoveId.CURSE); @@ -161,8 +161,8 @@ describe("Abilities - Magic Bounce", () => { }); it("should not cause encore to be interrupted after bouncing", async () => { - game.override.moveset([Moves.SPLASH, Moves.GROWL, Moves.ENCORE]).enemyMoveset([Moves.TACKLE, Moves.GROWL]); - // game.override.ability(Abilities.MOLD_BREAKER); + game.override.moveset([MoveId.SPLASH, MoveId.GROWL, MoveId.ENCORE]).enemyMoveset([MoveId.TACKLE, MoveId.GROWL]); + // game.override.ability(AbilityId.MOLD_BREAKER); await game.classicMode.startBattle([Species.MAGIKARP]); const playerPokemon = game.scene.getPlayerPokemon()!; const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -189,9 +189,9 @@ describe("Abilities - Magic Bounce", () => { // TODO: encore is failing if the last move was virtual. it.todo("should not cause the bounced move to count for encore", async () => { game.override - .moveset([Moves.SPLASH, Moves.GROWL, Moves.ENCORE]) - .enemyMoveset([Moves.GROWL, Moves.TACKLE]) - .enemyAbility(Abilities.MAGIC_BOUNCE); + .moveset([MoveId.SPLASH, MoveId.GROWL, MoveId.ENCORE]) + .enemyMoveset([MoveId.GROWL, MoveId.TACKLE]) + .enemyAbility(AbilityId.MAGIC_BOUNCE); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); const playerPokemon = game.scene.getPlayerPokemon()!; @@ -217,7 +217,7 @@ describe("Abilities - Magic Bounce", () => { // TODO: stomping tantrum should consider moves that were bounced. it.todo("should cause stomping tantrum to double in power when the last move was bounced", async () => { - game.override.battleStyle("single").moveset([Moves.STOMPING_TANTRUM, Moves.CHARM]); + game.override.battleStyle("single").moveset([MoveId.STOMPING_TANTRUM, MoveId.CHARM]); await game.classicMode.startBattle([Species.MAGIKARP]); const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM]; @@ -233,28 +233,28 @@ describe("Abilities - Magic Bounce", () => { // TODO: stomping tantrum should consider moves that were bounced it.todo("should boost enemy's stomping tantrum after failed bounce", async () => { - game.override.enemyMoveset([Moves.STOMPING_TANTRUM, Moves.SPLASH, Moves.CHARM]); + game.override.enemyMoveset([MoveId.STOMPING_TANTRUM, MoveId.SPLASH, MoveId.CHARM]); await game.classicMode.startBattle([Species.BULBASAUR]); - const stomping_tantrum = allMoves[Moves.STOMPING_TANTRUM]; + const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM]; const enemy = game.scene.getEnemyPokemon()!; vi.spyOn(stomping_tantrum, "calculateBattlePower"); // Spore gets reflected back onto us - game.move.select(Moves.SPORE); - await game.move.selectEnemyMove(Moves.CHARM); + game.move.select(MoveId.SPORE); + await game.move.selectEnemyMove(MoveId.CHARM); await game.toNextTurn(); expect(enemy.getLastXMoves(1)[0].result).toBe("success"); - game.move.select(Moves.SPORE); - await game.move.selectEnemyMove(Moves.STOMPING_TANTRUM); + game.move.select(MoveId.SPORE); + await game.move.selectEnemyMove(MoveId.STOMPING_TANTRUM); await game.toNextTurn(); expect(stomping_tantrum.calculateBattlePower).toHaveReturnedWith(150); }); it("should respect immunities when bouncing a move", async () => { - vi.spyOn(allMoves[Moves.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100); - game.override.moveset([Moves.THUNDER_WAVE, Moves.GROWL]).ability(Abilities.SOUNDPROOF); + vi.spyOn(allMoves[MoveId.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100); + game.override.moveset([MoveId.THUNDER_WAVE, MoveId.GROWL]).ability(AbilityId.SOUNDPROOF); await game.classicMode.startBattle([Species.PHANPY]); // Turn 1 - thunder wave immunity test @@ -292,7 +292,7 @@ describe("Abilities - Magic Bounce", () => { }); it("should always apply the leftmost available target's magic bounce when bouncing moves like sticky webs in doubles", async () => { - game.override.battleStyle("double").moveset([Moves.STICKY_WEB, Moves.SPLASH, Moves.TRICK_ROOM]); + game.override.battleStyle("double").moveset([MoveId.STICKY_WEB, MoveId.SPLASH, MoveId.TRICK_ROOM]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MAGIKARP]); const [enemy_1, enemy_2] = game.scene.getEnemyField(); @@ -325,11 +325,11 @@ describe("Abilities - Magic Bounce", () => { }); it("should not bounce back status moves that hit through semi-invulnerable states", async () => { - game.override.moveset([Moves.TOXIC, Moves.CHARM]); + game.override.moveset([MoveId.TOXIC, MoveId.CHARM]); await game.classicMode.startBattle([Species.BULBASAUR]); - game.move.select(Moves.TOXIC); - await game.move.selectEnemyMove(Moves.FLY); + game.move.select(MoveId.TOXIC); + await game.move.selectEnemyMove(MoveId.FLY); await game.setTurnOrder([BattlerIndex.ENEMY, BattlerIndex.PLAYER]); await game.phaseInterceptor.to("BerryPhase"); expect(game.scene.getEnemyPokemon()!.status?.effect).toBe(StatusEffect.TOXIC); diff --git a/test/abilities/magic_guard.test.ts b/test/abilities/magic_guard.test.ts index 71820391b4a..49df5086350 100644 --- a/test/abilities/magic_guard.test.ts +++ b/test/abilities/magic_guard.test.ts @@ -31,13 +31,13 @@ describe("Abilities - Magic Guard", () => { game.override /** Player Pokemon overrides */ - .ability(Abilities.MAGIC_GUARD) - .moveset([Moves.SPLASH]) + .ability(AbilityId.MAGIC_GUARD) + .moveset([MoveId.SPLASH]) .startingLevel(100) /** Enemy Pokemon overrides */ .enemySpecies(Species.SNORLAX) - .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset(Moves.SPLASH) + .enemyAbility(AbilityId.INSOMNIA) + .enemyMoveset(MoveId.SPLASH) .enemyLevel(100); }); @@ -89,7 +89,7 @@ describe("Abilities - Magic Guard", () => { it("ability effect should not persist when the ability is replaced", async () => { game.override - .enemyMoveset([Moves.WORRY_SEED, Moves.WORRY_SEED, Moves.WORRY_SEED, Moves.WORRY_SEED]) + .enemyMoveset([MoveId.WORRY_SEED, MoveId.WORRY_SEED, MoveId.WORRY_SEED, MoveId.WORRY_SEED]) .statusEffect(StatusEffect.POISON); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -108,7 +108,7 @@ describe("Abilities - Magic Guard", () => { }); it("Magic Guard prevents damage caused by burn but other non-damaging effects are still applied", async () => { - game.override.enemyStatusEffect(StatusEffect.BURN).enemyAbility(Abilities.MAGIC_GUARD); + game.override.enemyStatusEffect(StatusEffect.BURN).enemyAbility(AbilityId.MAGIC_GUARD); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -129,7 +129,7 @@ describe("Abilities - Magic Guard", () => { }); it("Magic Guard prevents damage caused by toxic but other non-damaging effects are still applied", async () => { - game.override.enemyStatusEffect(StatusEffect.TOXIC).enemyAbility(Abilities.MAGIC_GUARD); + game.override.enemyStatusEffect(StatusEffect.TOXIC).enemyAbility(AbilityId.MAGIC_GUARD); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -206,7 +206,7 @@ describe("Abilities - Magic Guard", () => { it("Magic Guard prevents against damage from volatile status effects", async () => { await game.classicMode.startBattle([Species.DUSKULL]); - game.override.moveset([Moves.CURSE]).enemyAbility(Abilities.MAGIC_GUARD); + game.override.moveset([MoveId.CURSE]).enemyAbility(AbilityId.MAGIC_GUARD); const leadPokemon = game.scene.getPlayerPokemon()!; @@ -328,7 +328,9 @@ describe("Abilities - Magic Guard", () => { //Tests the ability Bad Dreams game.override.statusEffect(StatusEffect.SLEEP); //enemy pokemon is given Spore just in case player pokemon somehow awakens during test - game.override.enemyMoveset([Moves.SPORE, Moves.SPORE, Moves.SPORE, Moves.SPORE]).enemyAbility(Abilities.BAD_DREAMS); + game.override + .enemyMoveset([MoveId.SPORE, MoveId.SPORE, MoveId.SPORE, MoveId.SPORE]) + .enemyAbility(AbilityId.BAD_DREAMS); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -349,7 +351,7 @@ describe("Abilities - Magic Guard", () => { it("Magic Guard prevents damage from abilities with PostFaintContactDamageAbAttr", async () => { //Tests the abilities Innards Out/Aftermath - game.override.moveset([Moves.TACKLE]).enemyAbility(Abilities.AFTERMATH); + game.override.moveset([MoveId.TACKLE]).enemyAbility(AbilityId.AFTERMATH); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -372,7 +374,7 @@ describe("Abilities - Magic Guard", () => { it("Magic Guard prevents damage from abilities with PostDefendContactDamageAbAttr", async () => { //Tests the abilities Iron Barbs/Rough Skin - game.override.moveset([Moves.TACKLE]).enemyAbility(Abilities.IRON_BARBS); + game.override.moveset([MoveId.TACKLE]).enemyAbility(AbilityId.IRON_BARBS); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -394,7 +396,7 @@ describe("Abilities - Magic Guard", () => { it("Magic Guard prevents damage from abilities with ReverseDrainAbAttr", async () => { //Tests the ability Liquid Ooze - game.override.moveset([Moves.ABSORB]).enemyAbility(Abilities.LIQUID_OOZE); + game.override.moveset([MoveId.ABSORB]).enemyAbility(AbilityId.LIQUID_OOZE); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -415,7 +417,7 @@ describe("Abilities - Magic Guard", () => { }); it("Magic Guard prevents HP loss from abilities with PostWeatherLapseDamageAbAttr", async () => { - game.override.passiveAbility(Abilities.SOLAR_POWER).weather(WeatherType.SUNNY); + game.override.passiveAbility(AbilityId.SOLAR_POWER).weather(WeatherType.SUNNY); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); const leadPokemon = game.scene.getPlayerPokemon()!; diff --git a/test/abilities/mirror_armor.test.ts b/test/abilities/mirror_armor.test.ts index 47cc251ea71..ca88b7b1a5c 100644 --- a/test/abilities/mirror_armor.test.ts +++ b/test/abilities/mirror_armor.test.ts @@ -37,7 +37,7 @@ describe("Ability - Mirror Armor", () => { }); it("Player side + single battle Intimidate - opponent loses stats", async () => { - game.override.ability(Abilities.MIRROR_ARMOR).enemyAbility(Abilities.INTIMIDATE); + game.override.ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE); await game.classicMode.startBattle([Species.BULBASAUR]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -53,7 +53,7 @@ describe("Ability - Mirror Armor", () => { }); it("Enemy side + single battle Intimidate - player loses stats", async () => { - game.override.enemyAbility(Abilities.MIRROR_ARMOR).ability(Abilities.INTIMIDATE); + game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE); await game.classicMode.startBattle([Species.BULBASAUR]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -69,7 +69,7 @@ describe("Ability - Mirror Armor", () => { }); it("Player side + double battle Intimidate - opponents each lose -2 atk", async () => { - game.override.battleStyle("double").ability(Abilities.MIRROR_ARMOR).enemyAbility(Abilities.INTIMIDATE); + game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE); await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]); const [enemy1, enemy2] = game.scene.getEnemyField(); @@ -89,7 +89,7 @@ describe("Ability - Mirror Armor", () => { }); it("Enemy side + double battle Intimidate - players each lose -2 atk", async () => { - game.override.battleStyle("double").enemyAbility(Abilities.MIRROR_ARMOR).ability(Abilities.INTIMIDATE); + game.override.battleStyle("double").enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE); await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]); const [enemy1, enemy2] = game.scene.getEnemyField(); @@ -109,7 +109,7 @@ describe("Ability - Mirror Armor", () => { }); it("Player side + single battle Intimidate + Tickle - opponent loses stats", async () => { - game.override.ability(Abilities.MIRROR_ARMOR).enemyAbility(Abilities.INTIMIDATE); + game.override.ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE); await game.classicMode.startBattle([Species.BULBASAUR]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -127,7 +127,7 @@ describe("Ability - Mirror Armor", () => { }); it("Player side + double battle Intimidate + Tickle - opponents each lose -3 atk, -1 def", async () => { - game.override.battleStyle("double").ability(Abilities.MIRROR_ARMOR).enemyAbility(Abilities.INTIMIDATE); + game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR).enemyAbility(AbilityId.INTIMIDATE); await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER]); const [enemy1, enemy2] = game.scene.getEnemyField(); @@ -150,7 +150,7 @@ describe("Ability - Mirror Armor", () => { }); it("Enemy side + single battle Intimidate + Tickle - player loses stats", async () => { - game.override.enemyAbility(Abilities.MIRROR_ARMOR).ability(Abilities.INTIMIDATE); + game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE); await game.classicMode.startBattle([Species.BULBASAUR]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -168,7 +168,7 @@ describe("Ability - Mirror Armor", () => { }); it("Player side + single battle Intimidate + oppoenent has white smoke - no one loses stats", async () => { - game.override.enemyAbility(Abilities.WHITE_SMOKE).ability(Abilities.MIRROR_ARMOR); + game.override.enemyAbility(AbilityId.WHITE_SMOKE).ability(AbilityId.MIRROR_ARMOR); await game.classicMode.startBattle([Species.BULBASAUR]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -186,7 +186,7 @@ describe("Ability - Mirror Armor", () => { }); it("Enemy side + single battle Intimidate + player has white smoke - no one loses stats", async () => { - game.override.ability(Abilities.WHITE_SMOKE).enemyAbility(Abilities.MIRROR_ARMOR); + game.override.ability(AbilityId.WHITE_SMOKE).enemyAbility(AbilityId.MIRROR_ARMOR); await game.classicMode.startBattle([Species.BULBASAUR]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -240,7 +240,7 @@ describe("Ability - Mirror Armor", () => { }); it("Both sides have mirror armor - does not loop, player loses attack", async () => { - game.override.enemyAbility(Abilities.MIRROR_ARMOR).ability(Abilities.MIRROR_ARMOR).ability(Abilities.INTIMIDATE); + game.override.enemyAbility(AbilityId.MIRROR_ARMOR).ability(AbilityId.MIRROR_ARMOR).ability(AbilityId.INTIMIDATE); await game.classicMode.startBattle([Species.BULBASAUR]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -274,7 +274,7 @@ describe("Ability - Mirror Armor", () => { }); it("Double battle + sticky web applied player side - player switches out and enemy 1 should lose -1 speed", async () => { - game.override.battleStyle("double").ability(Abilities.MIRROR_ARMOR); + game.override.battleStyle("double").ability(AbilityId.MIRROR_ARMOR); await game.classicMode.startBattle([Species.BULBASAUR, Species.CHARMANDER, Species.SQUIRTLE]); const [enemy1, enemy2] = game.scene.getEnemyField(); diff --git a/test/abilities/moxie.test.ts b/test/abilities/moxie.test.ts index b3d3227b765..77a2033edb7 100644 --- a/test/abilities/moxie.test.ts +++ b/test/abilities/moxie.test.ts @@ -26,15 +26,15 @@ describe("Abilities - Moxie", () => { beforeEach(() => { game = new GameManager(phaserGame); - const moveToUse = Moves.AERIAL_ACE; + const moveToUse = MoveId.AERIAL_ACE; game.override .battleStyle("single") .enemySpecies(Species.RATTATA) - .enemyAbility(Abilities.MOXIE) - .ability(Abilities.MOXIE) + .enemyAbility(AbilityId.MOXIE) + .ability(AbilityId.MOXIE) .startingLevel(2000) .moveset([moveToUse]) - .enemyMoveset(Moves.SPLASH); + .enemyMoveset(MoveId.SPLASH); }); it("should raise ATK stat stage by 1 when winning a battle", async () => { diff --git a/test/abilities/normalize.test.ts b/test/abilities/normalize.test.ts index bfc7e706cc5..2e000e76a27 100644 --- a/test/abilities/normalize.test.ts +++ b/test/abilities/normalize.test.ts @@ -47,7 +47,7 @@ describe("Abilities - Normalize", () => { it("should not apply the old type boost item after changing a move's type", async () => { game.override .startingHeldItems([{ name: "ATTACK_TYPE_BOOSTER", count: 1, type: PokemonType.GRASS }]) - .moveset([Moves.LEAFAGE]); + .moveset([MoveId.LEAFAGE]); const powerSpy = vi.spyOn(allMoves[MoveId.LEAFAGE], "calculateBattlePower"); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -61,7 +61,7 @@ describe("Abilities - Normalize", () => { it("should apply silk scarf's power boost after changing a move's type", async () => { game.override .startingHeldItems([{ name: "ATTACK_TYPE_BOOSTER", count: 1, type: PokemonType.NORMAL }]) - .moveset([Moves.LEAFAGE]); + .moveset([MoveId.LEAFAGE]); const powerSpy = vi.spyOn(allMoves[MoveId.LEAFAGE], "calculateBattlePower"); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); diff --git a/test/abilities/parental_bond.test.ts b/test/abilities/parental_bond.test.ts index 40eaf791fa8..f373caef644 100644 --- a/test/abilities/parental_bond.test.ts +++ b/test/abilities/parental_bond.test.ts @@ -29,10 +29,10 @@ describe("Abilities - Parental Bond", () => { game.override .battleStyle("single") .disableCrits() - .ability(Abilities.PARENTAL_BOND) + .ability(AbilityId.PARENTAL_BOND) .enemySpecies(Species.SNORLAX) - .enemyAbility(Abilities.FUR_COAT) - .enemyMoveset(Moves.SPLASH) + .enemyAbility(AbilityId.FUR_COAT) + .enemyMoveset(MoveId.SPLASH) .startingLevel(100) .enemyLevel(100); }); @@ -62,7 +62,7 @@ describe("Abilities - Parental Bond", () => { }); it("should apply secondary effects to both strikes", async () => { - game.override.moveset([Moves.POWER_UP_PUNCH]).enemySpecies(Species.AMOONGUSS); + game.override.moveset([MoveId.POWER_UP_PUNCH]).enemySpecies(Species.AMOONGUSS); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -148,7 +148,7 @@ describe("Abilities - Parental Bond", () => { }); it("should not apply multiplier to counter moves", async () => { - game.override.moveset([Moves.COUNTER]).enemyMoveset([Moves.TACKLE]); + game.override.moveset([MoveId.COUNTER]).enemyMoveset([MoveId.TACKLE]); await game.classicMode.startBattle([SpeciesId.SHUCKLE]); @@ -166,7 +166,7 @@ describe("Abilities - Parental Bond", () => { }); it("should not apply to multi-target moves", async () => { - game.override.battleStyle("double").moveset([Moves.EARTHQUAKE]).passiveAbility(Abilities.LEVITATE); + game.override.battleStyle("double").moveset([MoveId.EARTHQUAKE]).passiveAbility(AbilityId.LEVITATE); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.FEEBAS]); @@ -234,7 +234,7 @@ describe("Abilities - Parental Bond", () => { }); it("Moves boosted by this ability and Multi-Lens should strike 3 times", async () => { - game.override.moveset([Moves.TACKLE]).startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); + game.override.moveset([MoveId.TACKLE]).startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -248,7 +248,7 @@ describe("Abilities - Parental Bond", () => { }); it("Seismic Toss boosted by this ability and Multi-Lens should strike 3 times", async () => { - game.override.moveset([Moves.SEISMIC_TOSS]).startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); + game.override.moveset([MoveId.SEISMIC_TOSS]).startingHeldItems([{ name: "MULTI_LENS", count: 1 }]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -373,7 +373,7 @@ describe("Abilities - Parental Bond", () => { }); it("should not cause user to hit into King's Shield more than once", async () => { - game.override.moveset([Moves.TACKLE]).enemyMoveset([Moves.KINGS_SHIELD]); + game.override.moveset([MoveId.TACKLE]).enemyMoveset([MoveId.KINGS_SHIELD]); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -387,7 +387,7 @@ describe("Abilities - Parental Bond", () => { }); it("should not cause user to hit into Storm Drain more than once", async () => { - game.override.moveset([Moves.WATER_GUN]).enemyAbility(Abilities.STORM_DRAIN); + game.override.moveset([MoveId.WATER_GUN]).enemyAbility(AbilityId.STORM_DRAIN); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); diff --git a/test/abilities/perish_body.test.ts b/test/abilities/perish_body.test.ts index a767a75df0a..6e243761de0 100644 --- a/test/abilities/perish_body.test.ts +++ b/test/abilities/perish_body.test.ts @@ -25,11 +25,11 @@ describe("Abilities - Perish Song", () => { .battleStyle("single") .disableCrits() .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH) + .enemyAbility(AbilityId.BALL_FETCH) .starterSpecies(Species.CURSOLA) - .ability(Abilities.PERISH_BODY) - .moveset([Moves.SPLASH]) - .enemyMoveset([Moves.AQUA_JET]); + .ability(AbilityId.PERISH_BODY) + .moveset([MoveId.SPLASH]) + .enemyMoveset([MoveId.AQUA_JET]); }); it("should trigger when hit with damaging move", async () => { @@ -87,8 +87,8 @@ describe("Abilities - Perish Song", () => { it("should activate if cursola already has perish song, but not reset its counter", async () => { game.override - .enemyMoveset([Moves.PERISH_SONG, Moves.AQUA_JET, Moves.SPLASH]) - .moveset([Moves.WHIRLWIND, Moves.SPLASH]) + .enemyMoveset([MoveId.PERISH_SONG, MoveId.AQUA_JET, MoveId.SPLASH]) + .moveset([MoveId.WHIRLWIND, MoveId.SPLASH]) .startingWave(5); await game.classicMode.startBattle([Species.CURSOLA]); const cursola = game.scene.getPlayerPokemon(); diff --git a/test/abilities/power_construct.test.ts b/test/abilities/power_construct.test.ts index 53a6b7e8bee..2ea14597ef9 100644 --- a/test/abilities/power_construct.test.ts +++ b/test/abilities/power_construct.test.ts @@ -36,7 +36,7 @@ describe("Abilities - POWER CONSTRUCT", () => { const baseForm = 2, completeForm = 4; game.override.startingWave(4).starterForms({ - [Species.ZYGARDE]: completeForm, + [SpeciesId.ZYGARDE]: completeForm, }); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.ZYGARDE]); @@ -62,7 +62,7 @@ describe("Abilities - POWER CONSTRUCT", () => { const baseForm = 3, completeForm = 5; game.override.startingWave(4).starterForms({ - [Species.ZYGARDE]: completeForm, + [SpeciesId.ZYGARDE]: completeForm, }); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.ZYGARDE]); diff --git a/test/abilities/power_spot.test.ts b/test/abilities/power_spot.test.ts index e0578e2f28f..74224e0ebf3 100644 --- a/test/abilities/power_spot.test.ts +++ b/test/abilities/power_spot.test.ts @@ -28,10 +28,10 @@ describe("Abilities - Power Spot", () => { game = new GameManager(phaserGame); game.override .battleStyle("double") - .moveset([Moves.TACKLE, Moves.BREAKING_SWIPE, Moves.SPLASH, Moves.DAZZLING_GLEAM]) - .enemyMoveset(Moves.SPLASH) + .moveset([MoveId.TACKLE, MoveId.BREAKING_SWIPE, MoveId.SPLASH, MoveId.DAZZLING_GLEAM]) + .enemyMoveset(MoveId.SPLASH) .enemySpecies(Species.SHUCKLE) - .enemyAbility(Abilities.BALL_FETCH); + .enemyAbility(AbilityId.BALL_FETCH); }); it("raises the power of allies' special moves by 30%", async () => { diff --git a/test/abilities/protean.test.ts b/test/abilities/protean.test.ts index 2e99c816674..d4e8216f7fd 100644 --- a/test/abilities/protean.test.ts +++ b/test/abilities/protean.test.ts @@ -108,7 +108,7 @@ describe("Abilities - Protean", () => { }); test("ability applies correctly even if the type has changed by another ability", async () => { - game.override.moveset([Moves.TACKLE]).passiveAbility(Abilities.REFRIGERATE); + game.override.moveset([MoveId.TACKLE]).passiveAbility(AbilityId.REFRIGERATE); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -155,7 +155,7 @@ describe("Abilities - Protean", () => { }); test("ability applies correctly even if the pokemon's move misses", async () => { - game.override.moveset([Moves.TACKLE]).enemyMoveset(Moves.SPLASH); + game.override.moveset([MoveId.TACKLE]).enemyMoveset(MoveId.SPLASH); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -186,7 +186,7 @@ describe("Abilities - Protean", () => { }); test("ability applies correctly even if the pokemon's move fails because of type immunity", async () => { - game.override.moveset([Moves.TACKLE]).enemySpecies(Species.GASTLY); + game.override.moveset([MoveId.TACKLE]).enemySpecies(Species.GASTLY); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); @@ -259,7 +259,7 @@ describe("Abilities - Protean", () => { }); test("ability applies correctly even if the pokemon's Trick-or-Treat fails", async () => { - game.override.moveset([Moves.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY); + game.override.moveset([MoveId.TRICK_OR_TREAT]).enemySpecies(Species.GASTLY); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); diff --git a/test/abilities/quick_draw.test.ts b/test/abilities/quick_draw.test.ts index 0ac0b8481d3..75ee143110f 100644 --- a/test/abilities/quick_draw.test.ts +++ b/test/abilities/quick_draw.test.ts @@ -3,7 +3,6 @@ import { allAbilities } from "#app/data/data-lists"; import { FaintPhase } from "#app/phases/faint-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; @@ -27,12 +26,12 @@ describe("Abilities - Quick Draw", () => { game.override .battleStyle("single") .starterSpecies(Species.MAGIKARP) - .ability(Abilities.QUICK_DRAW) - .moveset([Moves.TACKLE, Moves.TAIL_WHIP]) + .ability(AbilityId.QUICK_DRAW) + .moveset([MoveId.TACKLE, MoveId.TAIL_WHIP]) .enemyLevel(100) .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset([Moves.TACKLE]); + .enemyAbility(AbilityId.BALL_FETCH) + .enemyMoveset([MoveId.TACKLE]); vi.spyOn(allAbilities[AbilityId.QUICK_DRAW].getAttrs(BypassSpeedChanceAbAttr)[0], "chance", "get").mockReturnValue( 100, diff --git a/test/abilities/sand_spit.test.ts b/test/abilities/sand_spit.test.ts index 0d1c09fa1b1..c701678a04c 100644 --- a/test/abilities/sand_spit.test.ts +++ b/test/abilities/sand_spit.test.ts @@ -26,10 +26,10 @@ describe("Abilities - Sand Spit", () => { .battleStyle("single") .disableCrits() .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH) + .enemyAbility(AbilityId.BALL_FETCH) .starterSpecies(Species.SILICOBRA) - .ability(Abilities.SAND_SPIT) - .moveset([Moves.SPLASH, Moves.COIL]); + .ability(AbilityId.SAND_SPIT) + .moveset([MoveId.SPLASH, MoveId.COIL]); }); it("should trigger when hit with damaging move", async () => { diff --git a/test/abilities/schooling.test.ts b/test/abilities/schooling.test.ts index acc3861fb28..646beafb80f 100644 --- a/test/abilities/schooling.test.ts +++ b/test/abilities/schooling.test.ts @@ -32,7 +32,7 @@ describe("Abilities - SCHOOLING", () => { const soloForm = 0, schoolForm = 1; game.override.startingWave(4).starterForms({ - [Species.WISHIWASHI]: schoolForm, + [SpeciesId.WISHIWASHI]: schoolForm, }); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.WISHIWASHI]); diff --git a/test/abilities/screen_cleaner.test.ts b/test/abilities/screen_cleaner.test.ts index 6603570e997..c24fd8f7a30 100644 --- a/test/abilities/screen_cleaner.test.ts +++ b/test/abilities/screen_cleaner.test.ts @@ -24,7 +24,7 @@ describe("Abilities - Screen Cleaner", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.battleStyle("single").ability(Abilities.SCREEN_CLEANER).enemySpecies(Species.SHUCKLE); + game.override.battleStyle("single").ability(AbilityId.SCREEN_CLEANER).enemySpecies(Species.SHUCKLE); }); it("removes Aurora Veil", async () => { diff --git a/test/abilities/seed_sower.test.ts b/test/abilities/seed_sower.test.ts index 86b1064dba6..b13b624a3bb 100644 --- a/test/abilities/seed_sower.test.ts +++ b/test/abilities/seed_sower.test.ts @@ -26,10 +26,10 @@ describe("Abilities - Seed Sower", () => { .battleStyle("single") .disableCrits() .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH) + .enemyAbility(AbilityId.BALL_FETCH) .starterSpecies(Species.ARBOLIVA) - .ability(Abilities.SEED_SOWER) - .moveset([Moves.SPLASH]); + .ability(AbilityId.SEED_SOWER) + .moveset([MoveId.SPLASH]); }); it("should trigger when hit with damaging move", async () => { diff --git a/test/abilities/shield_dust.test.ts b/test/abilities/shield_dust.test.ts index 783e6729e27..2ad86e8ca20 100644 --- a/test/abilities/shield_dust.test.ts +++ b/test/abilities/shield_dust.test.ts @@ -34,10 +34,10 @@ describe("Abilities - Shield Dust", () => { game.override .battleStyle("single") .enemySpecies(Species.ONIX) - .enemyAbility(Abilities.SHIELD_DUST) + .enemyAbility(AbilityId.SHIELD_DUST) .startingLevel(100) - .moveset(Moves.AIR_SLASH) - .enemyMoveset(Moves.TACKLE); + .moveset(MoveId.AIR_SLASH) + .enemyMoveset(MoveId.TACKLE); }); it("Shield Dust", async () => { diff --git a/test/abilities/shields_down.test.ts b/test/abilities/shields_down.test.ts index a9ba4319bdf..00a4a6c2330 100644 --- a/test/abilities/shields_down.test.ts +++ b/test/abilities/shields_down.test.ts @@ -25,12 +25,12 @@ describe("Abilities - SHIELDS DOWN", () => { beforeEach(() => { game = new GameManager(phaserGame); - const moveToUse = Moves.SPLASH; + const moveToUse = MoveId.SPLASH; game.override .battleStyle("single") - .ability(Abilities.SHIELDS_DOWN) + .ability(AbilityId.SHIELDS_DOWN) .moveset([moveToUse]) - .enemyMoveset([Moves.TACKLE]); + .enemyMoveset([MoveId.TACKLE]); }); test("check if fainted pokemon switched to base form on arena reset", async () => { @@ -70,7 +70,7 @@ describe("Abilities - SHIELDS DOWN", () => { }); test("should still ignore non-volatile status moves used by a pokemon with mold breaker", async () => { - game.override.enemyAbility(Abilities.MOLD_BREAKER).enemyMoveset([Moves.SPORE]); + game.override.enemyAbility(AbilityId.MOLD_BREAKER).enemyMoveset([MoveId.SPORE]); await game.classicMode.startBattle([SpeciesId.MINIOR]); @@ -93,7 +93,7 @@ describe("Abilities - SHIELDS DOWN", () => { }); test("should ignore status moves even through mold breaker", async () => { - game.override.enemyMoveset([Moves.SPORE]).enemyAbility(Abilities.MOLD_BREAKER); + game.override.enemyMoveset([MoveId.SPORE]).enemyAbility(AbilityId.MOLD_BREAKER); await game.classicMode.startBattle([SpeciesId.MINIOR]); @@ -107,8 +107,8 @@ describe("Abilities - SHIELDS DOWN", () => { // toxic spikes currently does not poison flying types when gravity is in effect test.todo("should become poisoned by toxic spikes when grounded", async () => { game.override - .enemyMoveset([Moves.GRAVITY, Moves.TOXIC_SPIKES, Moves.SPLASH]) - .moveset([Moves.GRAVITY, Moves.SPLASH]); + .enemyMoveset([MoveId.GRAVITY, MoveId.TOXIC_SPIKES, MoveId.SPLASH]) + .moveset([MoveId.GRAVITY, MoveId.SPLASH]); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.MINIOR]); @@ -154,7 +154,7 @@ describe("Abilities - SHIELDS DOWN", () => { // the `NoTransformAbilityAbAttr` attribute is not checked anywhere, so this test cannot pass. test.todo("ditto should not be immune to status after transforming", async () => { - game.override.enemySpecies(Species.DITTO).enemyAbility(Abilities.IMPOSTER).moveset([Moves.SPLASH, Moves.SPORE]); + game.override.enemySpecies(Species.DITTO).enemyAbility(AbilityId.IMPOSTER).moveset([MoveId.SPLASH, MoveId.SPORE]); await game.classicMode.startBattle([SpeciesId.MINIOR]); @@ -167,8 +167,8 @@ describe("Abilities - SHIELDS DOWN", () => { test("should not prevent minior from receiving the fainted status effect in trainer battles", async () => { game.override - .enemyMoveset([Moves.TACKLE]) - .moveset([Moves.THUNDERBOLT]) + .enemyMoveset([MoveId.TACKLE]) + .moveset([MoveId.THUNDERBOLT]) .startingLevel(100) .startingWave(5) .enemySpecies(Species.MINIOR); diff --git a/test/abilities/steely_spirit.test.ts b/test/abilities/steely_spirit.test.ts index 62eb6ed0265..7b2879e5c11 100644 --- a/test/abilities/steely_spirit.test.ts +++ b/test/abilities/steely_spirit.test.ts @@ -31,9 +31,9 @@ describe("Abilities - Steely Spirit", () => { game.override .battleStyle("double") .enemySpecies(Species.SHUCKLE) - .enemyAbility(Abilities.BALL_FETCH) - .moveset([Moves.IRON_HEAD, Moves.SPLASH]) - .enemyMoveset(Moves.SPLASH); + .enemyAbility(AbilityId.BALL_FETCH) + .moveset([MoveId.IRON_HEAD, MoveId.SPLASH]) + .enemyMoveset(MoveId.SPLASH); vi.spyOn(allMoves[moveToCheck], "calculateBattlePower"); }); diff --git a/test/abilities/sturdy.test.ts b/test/abilities/sturdy.test.ts index 8487c5d27f1..d62bf63cfaa 100644 --- a/test/abilities/sturdy.test.ts +++ b/test/abilities/sturdy.test.ts @@ -3,7 +3,6 @@ import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; @@ -28,10 +27,10 @@ describe("Abilities - Sturdy", () => { .battleStyle("single") .starterSpecies(Species.LUCARIO) .startingLevel(100) - .moveset([Moves.CLOSE_COMBAT, Moves.FISSURE]) + .moveset([MoveId.CLOSE_COMBAT, MoveId.FISSURE]) .enemySpecies(Species.ARON) .enemyLevel(5) - .enemyAbility(Abilities.STURDY); + .enemyAbility(AbilityId.STURDY); }); test("Sturdy activates when user is at full HP", async () => { diff --git a/test/abilities/sweet_veil.test.ts b/test/abilities/sweet_veil.test.ts index d51d420926e..e12d959a534 100644 --- a/test/abilities/sweet_veil.test.ts +++ b/test/abilities/sweet_veil.test.ts @@ -69,7 +69,7 @@ describe("Abilities - Sweet Veil", () => { }); it("prevents the user and its allies already drowsy due to Yawn from falling asleep.", async () => { - game.override.enemySpecies(Species.PIKACHU).enemyLevel(5).startingLevel(5).enemyMoveset(Moves.SPLASH); + game.override.enemySpecies(Species.PIKACHU).enemyLevel(5).startingLevel(5).enemyMoveset(MoveId.SPLASH); await game.classicMode.startBattle([SpeciesId.SHUCKLE, SpeciesId.SHUCKLE, SpeciesId.SWIRLIX]); diff --git a/test/abilities/unseen_fist.test.ts b/test/abilities/unseen_fist.test.ts index 53800fb2f79..26de77d4643 100644 --- a/test/abilities/unseen_fist.test.ts +++ b/test/abilities/unseen_fist.test.ts @@ -51,7 +51,7 @@ describe("Abilities - Unseen Fist", () => { await testUnseenFistHitResult(game, MoveId.BULLDOZE, MoveId.WIDE_GUARD, false)); it("should cause a contact move to ignore Protect, but not Substitute", async () => { - game.override.enemyLevel(1).moveset([Moves.TACKLE]); + game.override.enemyLevel(1).moveset([MoveId.TACKLE]); await game.classicMode.startBattle(); diff --git a/test/abilities/volt_absorb.test.ts b/test/abilities/volt_absorb.test.ts index 7c3c710496c..c9f7a7879df 100644 --- a/test/abilities/volt_absorb.test.ts +++ b/test/abilities/volt_absorb.test.ts @@ -3,7 +3,6 @@ import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; import { BattlerTagType } from "#enums/battler-tag-type"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -36,9 +35,9 @@ describe("Abilities - Volt Absorb", () => { game.override .moveset([moveToUse]) .ability(ability) - .enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]) + .enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE]) .enemySpecies(Species.DUSKULL) - .enemyAbility(Abilities.BALL_FETCH); + .enemyAbility(AbilityId.BALL_FETCH); await game.classicMode.startBattle(); @@ -55,10 +54,10 @@ describe("Abilities - Volt Absorb", () => { it("should activate regardless of accuracy checks", async () => { game.override - .moveset(Moves.THUNDERBOLT) - .enemyMoveset(Moves.SPLASH) + .moveset(MoveId.THUNDERBOLT) + .enemyMoveset(MoveId.SPLASH) .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.VOLT_ABSORB); + .enemyAbility(AbilityId.VOLT_ABSORB); await game.classicMode.startBattle(); @@ -76,10 +75,10 @@ describe("Abilities - Volt Absorb", () => { it("regardless of accuracy should not trigger on pokemon in semi invulnerable state", async () => { game.override - .moveset(Moves.THUNDERBOLT) - .enemyMoveset(Moves.DIVE) + .moveset(MoveId.THUNDERBOLT) + .enemyMoveset(MoveId.DIVE) .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.VOLT_ABSORB); + .enemyAbility(AbilityId.VOLT_ABSORB); await game.classicMode.startBattle(); diff --git a/test/abilities/wind_power.test.ts b/test/abilities/wind_power.test.ts index 29c51995d12..6c47be049a2 100644 --- a/test/abilities/wind_power.test.ts +++ b/test/abilities/wind_power.test.ts @@ -26,9 +26,9 @@ describe("Abilities - Wind Power", () => { game.override .battleStyle("single") .enemySpecies(Species.SHIFTRY) - .enemyAbility(Abilities.WIND_POWER) - .moveset([Moves.TAILWIND, Moves.SPLASH, Moves.PETAL_BLIZZARD, Moves.SANDSTORM]) - .enemyMoveset(Moves.SPLASH); + .enemyAbility(AbilityId.WIND_POWER) + .moveset([MoveId.TAILWIND, MoveId.SPLASH, MoveId.PETAL_BLIZZARD, MoveId.SANDSTORM]) + .enemyMoveset(MoveId.SPLASH); }); it("becomes charged when hit by wind moves", async () => { @@ -44,7 +44,7 @@ describe("Abilities - Wind Power", () => { }); it("becomes charged when Tailwind takes effect on its side", async () => { - game.override.ability(Abilities.WIND_POWER).enemySpecies(Species.MAGIKARP); + game.override.ability(AbilityId.WIND_POWER).enemySpecies(Species.MAGIKARP); await game.classicMode.startBattle([SpeciesId.SHIFTRY]); const shiftry = game.scene.getPlayerPokemon()!; @@ -58,7 +58,7 @@ describe("Abilities - Wind Power", () => { }); it("does not become charged when Tailwind takes effect on opposing side", async () => { - game.override.enemySpecies(Species.MAGIKARP).ability(Abilities.WIND_POWER); + game.override.enemySpecies(Species.MAGIKARP).ability(AbilityId.WIND_POWER); await game.classicMode.startBattle([SpeciesId.SHIFTRY]); const magikarp = game.scene.getEnemyPokemon()!; diff --git a/test/abilities/wonder_skin.test.ts b/test/abilities/wonder_skin.test.ts index eb37972a68d..886882ab6fd 100644 --- a/test/abilities/wonder_skin.test.ts +++ b/test/abilities/wonder_skin.test.ts @@ -25,11 +25,11 @@ describe("Abilities - Wonder Skin", () => { game = new GameManager(phaserGame); game.override .battleStyle("single") - .moveset([Moves.TACKLE, Moves.CHARM]) - .ability(Abilities.BALL_FETCH) - .enemySpecies(Species.SHUCKLE) - .enemyAbility(Abilities.WONDER_SKIN) - .enemyMoveset(Moves.SPLASH); + .moveset([MoveId.TACKLE, MoveId.CHARM]) + .ability(AbilityId.BALL_FETCH) + .enemySpecies(SpeciesId.SHUCKLE) + .enemyAbility(AbilityId.WONDER_SKIN) + .enemyMoveset(MoveId.SPLASH); }); it("lowers accuracy of status moves to 50%", async () => { diff --git a/test/abilities/zen_mode.test.ts b/test/abilities/zen_mode.test.ts index 9754a63a9ac..70d2f564218 100644 --- a/test/abilities/zen_mode.test.ts +++ b/test/abilities/zen_mode.test.ts @@ -86,7 +86,7 @@ describe("Abilities - ZEN MODE", () => { it("should switch to base form on arena reset", async () => { game.override.startingWave(4).starterForms({ - [Species.DARMANITAN]: zenForm, + [SpeciesId.DARMANITAN]: zenForm, }); await game.classicMode.startBattle([SpeciesId.MAGIKARP, SpeciesId.DARMANITAN]); diff --git a/test/abilities/zero_to_hero.test.ts b/test/abilities/zero_to_hero.test.ts index 1de2effb5d6..7d0128a4dbc 100644 --- a/test/abilities/zero_to_hero.test.ts +++ b/test/abilities/zero_to_hero.test.ts @@ -35,7 +35,7 @@ describe("Abilities - ZERO TO HERO", () => { it("should swap to base form on arena reset", async () => { game.override.startingWave(4).starterForms({ - [Species.PALAFIN]: heroForm, + [SpeciesId.PALAFIN]: heroForm, }); await game.classicMode.startBattle([SpeciesId.FEEBAS, SpeciesId.PALAFIN, SpeciesId.PALAFIN]); diff --git a/test/arena/weather_fog.test.ts b/test/arena/weather_fog.test.ts index 2022de66d54..1411a19afba 100644 --- a/test/arena/weather_fog.test.ts +++ b/test/arena/weather_fog.test.ts @@ -27,11 +27,11 @@ describe("Weather - Fog", () => { game.override .weather(WeatherType.FOG) .battleStyle("single") - .moveset([Moves.TACKLE]) - .ability(Abilities.BALL_FETCH) - .enemyAbility(Abilities.BALL_FETCH) + .moveset([MoveId.TACKLE]) + .ability(AbilityId.BALL_FETCH) + .enemyAbility(AbilityId.BALL_FETCH) .enemySpecies(Species.MAGIKARP) - .enemyMoveset([Moves.SPLASH]); + .enemyMoveset([MoveId.SPLASH]); }); it("move accuracy is multiplied by 90%", async () => { diff --git a/test/arena/weather_strong_winds.test.ts b/test/arena/weather_strong_winds.test.ts index 15e3efc0ce8..65a9e78ea40 100644 --- a/test/arena/weather_strong_winds.test.ts +++ b/test/arena/weather_strong_winds.test.ts @@ -28,8 +28,8 @@ describe("Weather - Strong Winds", () => { .battleStyle("single") .startingLevel(10) .enemySpecies(Species.TAILLOW) - .enemyAbility(Abilities.DELTA_STREAM) - .moveset([Moves.THUNDERBOLT, Moves.ICE_BEAM, Moves.ROCK_SLIDE]); + .enemyAbility(AbilityId.DELTA_STREAM) + .moveset([MoveId.THUNDERBOLT, MoveId.ICE_BEAM, MoveId.ROCK_SLIDE]); }); it("electric type move is not very effective on Rayquaza", async () => { diff --git a/test/battle/battle-order.test.ts b/test/battle/battle-order.test.ts index 3f8bea11d58..bc01e89f960 100644 --- a/test/battle/battle-order.test.ts +++ b/test/battle/battle-order.test.ts @@ -27,9 +27,9 @@ describe("Battle order", () => { game.override .battleStyle("single") .enemySpecies(Species.MEWTWO) - .enemyAbility(Abilities.INSOMNIA) - .ability(Abilities.INSOMNIA) - .moveset([Moves.TACKLE]); + .enemyAbility(AbilityId.INSOMNIA) + .ability(AbilityId.INSOMNIA) + .moveset([MoveId.TACKLE]); }); it("opponent faster than player 50 vs 150", async () => { diff --git a/test/battle/battle.test.ts b/test/battle/battle.test.ts index 087289d0a6a..aa75cd121f0 100644 --- a/test/battle/battle.test.ts +++ b/test/battle/battle.test.ts @@ -23,7 +23,6 @@ import { PlayerGender } from "#enums/player-gender"; import { SpeciesId } from "#enums/species-id"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; -import { BiomeId } from "#enums/biome-id"; describe("Test Battle Phase", () => { let phaserGame: Phaser.Game; @@ -91,7 +90,7 @@ describe("Test Battle Phase", () => { it("do attack wave 3 - single battle - regular - OHKO", async () => { game.override.enemySpecies(Species.RATTATA).startingLevel(2000).battleStyle("single"); await game.classicMode.startBattle([Species.MEWTWO]); - game.move.use(Moves.TACKLE); + game.move.use(MoveId.TACKLE); await game.phaseInterceptor.to("SelectModifierPhase"); }, 20000); @@ -100,12 +99,12 @@ describe("Test Battle Phase", () => { .enemySpecies(Species.RATTATA) .startingLevel(5) .startingWave(3) - .moveset([Moves.TACKLE]) - .enemyAbility(Abilities.HYDRATION) - .enemyMoveset([Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP, Moves.TAIL_WHIP]) + .moveset([MoveId.TACKLE]) + .enemyAbility(AbilityId.HYDRATION) + .enemyMoveset([MoveId.TAIL_WHIP, MoveId.TAIL_WHIP, MoveId.TAIL_WHIP, MoveId.TAIL_WHIP]) .battleStyle("single"); await game.classicMode.startBattle([Species.MEWTWO]); - game.move.select(Moves.TACKLE); + game.move.select(MoveId.TACKLE); await game.phaseInterceptor.runFrom(EnemyCommandPhase).to(TurnInitPhase, false); }, 20000); @@ -237,17 +236,17 @@ describe("Test Battle Phase", () => { }, 20000); it("kill opponent pokemon", async () => { - const moveToUse = Moves.SPLASH; + const moveToUse = MoveId.SPLASH; game.override .battleStyle("single") .starterSpecies(Species.MEWTWO) .enemySpecies(Species.RATTATA) - .enemyAbility(Abilities.HYDRATION) - .ability(Abilities.ZEN_MODE) + .enemyAbility(AbilityId.HYDRATION) + .ability(AbilityId.ZEN_MODE) .startingLevel(2000) .startingWave(3) .moveset([moveToUse]) - .enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + .enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]); await game.classicMode.startBattle([Species.DARMANITAN, Species.CHARIZARD]); game.move.select(moveToUse); @@ -258,16 +257,16 @@ describe("Test Battle Phase", () => { }); it("to next turn", async () => { - const moveToUse = Moves.SPLASH; + const moveToUse = MoveId.SPLASH; game.override .battleStyle("single") .enemySpecies(Species.RATTATA) - .enemyAbility(Abilities.HYDRATION) - .ability(Abilities.ZEN_MODE) + .enemyAbility(AbilityId.HYDRATION) + .ability(AbilityId.ZEN_MODE) .startingLevel(2000) .startingWave(3) .moveset([moveToUse]) - .enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + .enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]); await game.classicMode.startBattle([Species.MEWTWO]); const turn = game.scene.currentBattle.turn; game.move.select(moveToUse); @@ -287,7 +286,7 @@ describe("Test Battle Phase", () => { .startingWave(3) .startingBiome(Biome.LAKE) .moveset([moveToUse]) - .enemyMoveset([Moves.TACKLE, Moves.TACKLE, Moves.TACKLE, Moves.TACKLE]); + .enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]); await game.classicMode.startBattle(); const waveIndex = game.scene.currentBattle.waveIndex; game.move.select(moveToUse); diff --git a/test/escape-calculations.test.ts b/test/escape-calculations.test.ts index 7716b675afb..3e7414eb9a5 100644 --- a/test/escape-calculations.test.ts +++ b/test/escape-calculations.test.ts @@ -263,7 +263,7 @@ describe("Escape chance calculations", () => { it("double boss opponent", async () => { game.override.battleStyle("double").startingWave(10); - await game.classicMode.startBattle([Species.BULBASAUR, Species.ABOMASNOW]); + await game.classicMode.startBattle([SpeciesId.BULBASAUR, SpeciesId.ABOMASNOW]); const playerPokemon = game.scene.getPlayerField(); const enemyField = game.scene.getEnemyField(); diff --git a/test/evolution.test.ts b/test/evolution.test.ts index 86d95559c73..336bb0cdb51 100644 --- a/test/evolution.test.ts +++ b/test/evolution.test.ts @@ -31,7 +31,7 @@ describe("Evolution", () => { game.override .battleStyle("single") .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH) + .enemyAbility(AbilityId.BALL_FETCH) .startingLevel(60); }); diff --git a/test/field/pokemon.test.ts b/test/field/pokemon.test.ts index 25ab8993c38..774d46b18fe 100644 --- a/test/field/pokemon.test.ts +++ b/test/field/pokemon.test.ts @@ -88,7 +88,7 @@ describe("Spec - Pokemon", () => { let scene: BattleScene; beforeEach(async () => { - game.override.enemySpecies(Species.ZUBAT).starterSpecies(Species.ABRA).enableStarterFusion(); + game.override.enemySpecies(SpeciesId.ZUBAT).starterSpecies(SpeciesId.ABRA).enableStarterFusion(); scene = game.scene; }); @@ -144,7 +144,7 @@ describe("Spec - Pokemon", () => { }); it("Fusing mons with one and two types", async () => { - game.override.starterSpecies(Species.CHARMANDER).starterFusionSpecies(Species.HOUNDOUR); + game.override.starterSpecies(SpeciesId.CHARMANDER).starterFusionSpecies(SpeciesId.HOUNDOUR); await game.classicMode.startBattle(); const pokemon = scene.getPlayerParty()[0]; @@ -154,7 +154,7 @@ describe("Spec - Pokemon", () => { }); it("Fusing mons with two and one types", async () => { - game.override.starterSpecies(Species.NUMEL).starterFusionSpecies(Species.CHARMANDER); + game.override.starterSpecies(SpeciesId.NUMEL).starterFusionSpecies(SpeciesId.CHARMANDER); await game.classicMode.startBattle(); const pokemon = scene.getPlayerParty()[0]; @@ -164,7 +164,7 @@ describe("Spec - Pokemon", () => { }); it("Fusing two mons with two types", async () => { - game.override.starterSpecies(Species.NATU).starterFusionSpecies(Species.HOUNDOUR); + game.override.starterSpecies(SpeciesId.NATU).starterFusionSpecies(SpeciesId.HOUNDOUR); await game.classicMode.startBattle(); const pokemon = scene.getPlayerParty()[0]; diff --git a/test/items/exp_booster.test.ts b/test/items/exp_booster.test.ts index 477a156ff30..96a8571785e 100644 --- a/test/items/exp_booster.test.ts +++ b/test/items/exp_booster.test.ts @@ -22,7 +22,7 @@ describe("EXP Modifier Items", () => { beforeEach(() => { game = new GameManager(phaserGame); - game.override.enemyAbility(Abilities.BALL_FETCH).ability(Abilities.BALL_FETCH).battleStyle("single"); + game.override.enemyAbility(AbilityId.BALL_FETCH).ability(AbilityId.BALL_FETCH).battleStyle("single"); }); it("EXP booster items stack multiplicatively", async () => { diff --git a/test/moves/baneful_bunker.test.ts b/test/moves/baneful_bunker.test.ts index 4e78c2b44cc..5419b5a3549 100644 --- a/test/moves/baneful_bunker.test.ts +++ b/test/moves/baneful_bunker.test.ts @@ -26,10 +26,10 @@ describe("Moves - Baneful Bunker", () => { game.override .battleStyle("single") - .moveset(Moves.SLASH) + .moveset(MoveId.SLASH) .enemySpecies(Species.SNORLAX) - .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset(Moves.BANEFUL_BUNKER) + .enemyAbility(AbilityId.INSOMNIA) + .enemyMoveset(MoveId.BANEFUL_BUNKER) .startingLevel(100) .enemyLevel(100); }); diff --git a/test/moves/baton_pass.test.ts b/test/moves/baton_pass.test.ts index cd3de17dc06..bf222c366a2 100644 --- a/test/moves/baton_pass.test.ts +++ b/test/moves/baton_pass.test.ts @@ -59,17 +59,17 @@ describe("Moves - Baton Pass", () => { it("passes stat stage buffs when AI uses it", async () => { // arrange - game.override.startingWave(5).enemyMoveset([Moves.NASTY_PLOT, Moves.BATON_PASS]); + game.override.startingWave(5).enemyMoveset([MoveId.NASTY_PLOT, MoveId.BATON_PASS]); await game.classicMode.startBattle([Species.RAICHU, Species.SHUCKLE]); // round 1 - ai buffs - game.move.select(Moves.SPLASH); - await game.move.forceEnemyMove(Moves.NASTY_PLOT); + game.move.select(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.NASTY_PLOT); await game.toNextTurn(); // round 2 - baton pass - game.move.select(Moves.SPLASH); - await game.move.forceEnemyMove(Moves.BATON_PASS); + game.move.select(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.BATON_PASS); await game.phaseInterceptor.to("PostSummonPhase", false); // check buffs are still there diff --git a/test/moves/beak_blast.test.ts b/test/moves/beak_blast.test.ts index 1fed7c433a1..9a6a0ba5fcc 100644 --- a/test/moves/beak_blast.test.ts +++ b/test/moves/beak_blast.test.ts @@ -129,9 +129,9 @@ describe("Moves - Beak Blast", () => { }); it("should not burn a long reach enemy that hits the user with a contact move", async () => { - game.override.enemyAbility(Abilities.LONG_REACH).enemyMoveset([Moves.FALSE_SWIPE]).enemyLevel(100); + game.override.enemyAbility(AbilityId.LONG_REACH).enemyMoveset([MoveId.FALSE_SWIPE]).enemyLevel(100); await game.classicMode.startBattle([Species.MAGIKARP]); - game.move.select(Moves.BEAK_BLAST); + game.move.select(MoveId.BEAK_BLAST); await game.phaseInterceptor.to("BerryPhase", false); const enemyPokemon = game.scene.getEnemyPokemon()!; expect(enemyPokemon.status?.effect).not.toBe(StatusEffect.BURN); diff --git a/test/moves/beat_up.test.ts b/test/moves/beat_up.test.ts index b6c16288a64..24da1964a3f 100644 --- a/test/moves/beat_up.test.ts +++ b/test/moves/beat_up.test.ts @@ -27,10 +27,10 @@ describe("Moves - Beat Up", () => { .battleStyle("single") .enemySpecies(Species.SNORLAX) .enemyLevel(100) - .enemyMoveset([Moves.SPLASH]) - .enemyAbility(Abilities.INSOMNIA) + .enemyMoveset([MoveId.SPLASH]) + .enemyAbility(AbilityId.INSOMNIA) .startingLevel(100) - .moveset([Moves.BEAT_UP]); + .moveset([MoveId.BEAT_UP]); }); it("should hit once for each healthy player Pokemon", async () => { diff --git a/test/moves/ceaseless_edge.test.ts b/test/moves/ceaseless_edge.test.ts index 92499e3af6a..347baeb5865 100644 --- a/test/moves/ceaseless_edge.test.ts +++ b/test/moves/ceaseless_edge.test.ts @@ -29,13 +29,13 @@ describe("Moves - Ceaseless Edge", () => { game.override .battleStyle("single") .enemySpecies(Species.RATTATA) - .enemyAbility(Abilities.RUN_AWAY) - .enemyPassiveAbility(Abilities.RUN_AWAY) + .enemyAbility(AbilityId.RUN_AWAY) + .enemyPassiveAbility(AbilityId.RUN_AWAY) .startingLevel(100) .enemyLevel(100) - .moveset([Moves.CEASELESS_EDGE, Moves.SPLASH, Moves.ROAR]) - .enemyMoveset(Moves.SPLASH); - vi.spyOn(allMoves[Moves.CEASELESS_EDGE], "accuracy", "get").mockReturnValue(100); + .moveset([MoveId.CEASELESS_EDGE, MoveId.SPLASH, MoveId.ROAR]) + .enemyMoveset(MoveId.SPLASH); + vi.spyOn(allMoves[MoveId.CEASELESS_EDGE], "accuracy", "get").mockReturnValue(100); }); test("move should hit and apply spikes", async () => { diff --git a/test/moves/clangorous_soul.test.ts b/test/moves/clangorous_soul.test.ts index 3052f10d61b..f7a99f538cc 100644 --- a/test/moves/clangorous_soul.test.ts +++ b/test/moves/clangorous_soul.test.ts @@ -32,8 +32,8 @@ describe("Moves - Clangorous Soul", () => { .enemySpecies(Species.SNORLAX) .startingLevel(100) .enemyLevel(100) - .moveset([Moves.CLANGOROUS_SOUL]) - .enemyMoveset(Moves.SPLASH); + .moveset([MoveId.CLANGOROUS_SOUL]) + .enemyMoveset(MoveId.SPLASH); }); //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/Clangorous_Soul_(move) diff --git a/test/moves/crafty_shield.test.ts b/test/moves/crafty_shield.test.ts index 4e6f6adea01..4a1dbc3cb17 100644 --- a/test/moves/crafty_shield.test.ts +++ b/test/moves/crafty_shield.test.ts @@ -28,10 +28,10 @@ describe("Moves - Crafty Shield", () => { game.override .battleStyle("double") - .moveset([Moves.CRAFTY_SHIELD, Moves.SPLASH, Moves.SWORDS_DANCE]) + .moveset([MoveId.CRAFTY_SHIELD, MoveId.SPLASH, MoveId.SWORDS_DANCE]) .enemySpecies(Species.SNORLAX) - .enemyMoveset([Moves.GROWL]) - .enemyAbility(Abilities.INSOMNIA) + .enemyMoveset([MoveId.GROWL]) + .enemyAbility(AbilityId.INSOMNIA) .startingLevel(100) .enemyLevel(100); }); @@ -71,7 +71,7 @@ describe("Moves - Crafty Shield", () => { }); test("should protect the user and allies from moves that ignore other protection", async () => { - game.override.enemySpecies(Species.DUSCLOPS).enemyMoveset([Moves.CURSE]); + game.override.enemySpecies(Species.DUSCLOPS).enemyMoveset([MoveId.CURSE]); await game.classicMode.startBattle([SpeciesId.CHARIZARD, SpeciesId.BLASTOISE]); diff --git a/test/moves/dragon_rage.test.ts b/test/moves/dragon_rage.test.ts index a1b62b589a5..4621eac25de 100644 --- a/test/moves/dragon_rage.test.ts +++ b/test/moves/dragon_rage.test.ts @@ -1,6 +1,5 @@ import { Stat } from "#enums/stat"; import { PokemonType } from "#enums/pokemon-type"; -import { SpeciesId } from "#enums/species-id"; import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; @@ -34,14 +33,14 @@ describe("Moves - Dragon Rage", () => { game.override .battleStyle("single") .starterSpecies(Species.SNORLAX) - .moveset([Moves.DRAGON_RAGE]) - .ability(Abilities.BALL_FETCH) - .passiveAbility(Abilities.BALL_FETCH) + .moveset([MoveId.DRAGON_RAGE]) + .ability(AbilityId.BALL_FETCH) + .passiveAbility(AbilityId.BALL_FETCH) .startingLevel(100) .enemySpecies(Species.SNORLAX) - .enemyMoveset(Moves.SPLASH) - .enemyAbility(Abilities.BALL_FETCH) - .enemyPassiveAbility(Abilities.BALL_FETCH) + .enemyMoveset(MoveId.SPLASH) + .enemyAbility(AbilityId.BALL_FETCH) + .enemyPassiveAbility(AbilityId.BALL_FETCH) .enemyLevel(100); await game.classicMode.startBattle(); @@ -100,7 +99,7 @@ describe("Moves - Dragon Rage", () => { }); it("ignores damage modification from abilities, for example ICE_SCALES", async () => { - game.override.disableCrits().enemyAbility(Abilities.ICE_SCALES); + game.override.disableCrits().enemyAbility(AbilityId.ICE_SCALES); game.move.select(MoveId.DRAGON_RAGE); await game.phaseInterceptor.to(TurnEndPhase); diff --git a/test/moves/dynamax_cannon.test.ts b/test/moves/dynamax_cannon.test.ts index 2f6388f3b69..4329b4ca279 100644 --- a/test/moves/dynamax_cannon.test.ts +++ b/test/moves/dynamax_cannon.test.ts @@ -38,7 +38,7 @@ describe("Moves - Dynamax Cannon", () => { .enemySpecies(SpeciesId.MAGIKARP) .enemyMoveset(MoveId.SPLASH); - vi.spyOn(allMoves[Moves.DYNAMAX_CANNON], "calculateBattlePower"); + vi.spyOn(allMoves[MoveId.DYNAMAX_CANNON], "calculateBattlePower"); }); it("should return 100 power against an enemy below level cap", async () => { diff --git a/test/moves/fillet_away.test.ts b/test/moves/fillet_away.test.ts index 2aa7b149f52..e7ee142b440 100644 --- a/test/moves/fillet_away.test.ts +++ b/test/moves/fillet_away.test.ts @@ -33,8 +33,8 @@ describe("Moves - FILLET AWAY", () => { .enemySpecies(Species.SNORLAX) .startingLevel(100) .enemyLevel(100) - .moveset([Moves.FILLET_AWAY]) - .enemyMoveset(Moves.SPLASH); + .moveset([MoveId.FILLET_AWAY]) + .enemyMoveset(MoveId.SPLASH); }); //Bulbapedia Reference: https://bulbapedia.bulbagarden.net/wiki/fillet_away_(move) diff --git a/test/moves/fissure.test.ts b/test/moves/fissure.test.ts index a95f287fd89..8efc0a6d706 100644 --- a/test/moves/fissure.test.ts +++ b/test/moves/fissure.test.ts @@ -1,5 +1,4 @@ import { Stat } from "#enums/stat"; -import { SpeciesId } from "#enums/species-id"; import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import { DamageAnimPhase } from "#app/phases/damage-anim-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; @@ -32,12 +31,12 @@ describe("Moves - Fissure", () => { .battleStyle("single") .disableCrits() .starterSpecies(Species.SNORLAX) - .moveset([Moves.FISSURE]) - .passiveAbility(Abilities.BALL_FETCH) + .moveset([MoveId.FISSURE]) + .passiveAbility(AbilityId.BALL_FETCH) .startingLevel(100) .enemySpecies(Species.SNORLAX) - .enemyMoveset(Moves.SPLASH) - .enemyPassiveAbility(Abilities.BALL_FETCH) + .enemyMoveset(MoveId.SPLASH) + .enemyPassiveAbility(AbilityId.BALL_FETCH) .enemyLevel(100); await game.classicMode.startBattle(); @@ -47,7 +46,7 @@ describe("Moves - Fissure", () => { }); it("ignores damage modification from abilities, for example FUR_COAT", async () => { - game.override.ability(Abilities.NO_GUARD).enemyAbility(Abilities.FUR_COAT); + game.override.ability(AbilityId.NO_GUARD).enemyAbility(AbilityId.FUR_COAT); game.move.select(MoveId.FISSURE); await game.phaseInterceptor.to(DamageAnimPhase, true); diff --git a/test/moves/flame_burst.test.ts b/test/moves/flame_burst.test.ts index 4efbe0ab9f6..7dd38752c0a 100644 --- a/test/moves/flame_burst.test.ts +++ b/test/moves/flame_burst.test.ts @@ -37,13 +37,13 @@ describe("Moves - Flame Burst", () => { game = new GameManager(phaserGame); game.override .battleStyle("double") - .moveset([Moves.FLAME_BURST, Moves.SPLASH]) + .moveset([MoveId.FLAME_BURST, MoveId.SPLASH]) .disableCrits() - .ability(Abilities.UNNERVE) + .ability(AbilityId.UNNERVE) .startingWave(4) .enemySpecies(Species.SHUCKLE) - .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset([Moves.SPLASH]); + .enemyAbility(AbilityId.BALL_FETCH) + .enemyMoveset([MoveId.SPLASH]); }); it("inflicts damage to the target's ally equal to 1/16 of its max HP", async () => { diff --git a/test/moves/flower_shield.test.ts b/test/moves/flower_shield.test.ts index 794e2720a76..c3c5e5cf870 100644 --- a/test/moves/flower_shield.test.ts +++ b/test/moves/flower_shield.test.ts @@ -27,11 +27,11 @@ describe("Moves - Flower Shield", () => { beforeEach(() => { game = new GameManager(phaserGame); game.override - .ability(Abilities.NONE) - .enemyAbility(Abilities.NONE) + .ability(AbilityId.NONE) + .enemyAbility(AbilityId.NONE) .battleStyle("single") - .moveset([Moves.FLOWER_SHIELD, Moves.SPLASH]) - .enemyMoveset(Moves.SPLASH); + .moveset([MoveId.FLOWER_SHIELD, MoveId.SPLASH]) + .enemyMoveset(MoveId.SPLASH); }); it("raises DEF stat stage by 1 for all Grass-type Pokemon on the field by one stage - single battle", async () => { diff --git a/test/moves/follow_me.test.ts b/test/moves/follow_me.test.ts index 589c51525a7..04e96612c6f 100644 --- a/test/moves/follow_me.test.ts +++ b/test/moves/follow_me.test.ts @@ -27,12 +27,12 @@ describe("Moves - Follow Me", () => { game.override .battleStyle("double") .starterSpecies(Species.AMOONGUSS) - .ability(Abilities.BALL_FETCH) + .ability(AbilityId.BALL_FETCH) .enemySpecies(Species.SNORLAX) .startingLevel(100) .enemyLevel(100) - .moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK]) - .enemyMoveset([Moves.TACKLE, Moves.FOLLOW_ME, Moves.SPLASH]); + .moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK]) + .enemyMoveset([MoveId.TACKLE, MoveId.FOLLOW_ME, MoveId.SPLASH]); }); test("move should redirect enemy attacks to the user", async () => { @@ -74,7 +74,7 @@ describe("Moves - Follow Me", () => { }); test("move effect should be bypassed by Stalwart", async () => { - game.override.ability(Abilities.STALWART).moveset([Moves.QUICK_ATTACK]); + game.override.ability(AbilityId.STALWART).moveset([MoveId.QUICK_ATTACK]); await game.classicMode.startBattle([SpeciesId.AMOONGUSS, SpeciesId.CHARIZARD]); diff --git a/test/moves/gastro_acid.test.ts b/test/moves/gastro_acid.test.ts index 5c643b5ce72..aa20f09baff 100644 --- a/test/moves/gastro_acid.test.ts +++ b/test/moves/gastro_acid.test.ts @@ -26,11 +26,11 @@ describe("Moves - Gastro Acid", () => { .battleStyle("double") .startingLevel(1) .enemyLevel(100) - .ability(Abilities.NONE) - .moveset([Moves.GASTRO_ACID, Moves.WATER_GUN, Moves.SPLASH, Moves.CORE_ENFORCER]) + .ability(AbilityId.NONE) + .moveset([MoveId.GASTRO_ACID, MoveId.WATER_GUN, MoveId.SPLASH, MoveId.CORE_ENFORCER]) .enemySpecies(Species.BIDOOF) - .enemyMoveset(Moves.SPLASH) - .enemyAbility(Abilities.WATER_ABSORB); + .enemyMoveset(MoveId.SPLASH) + .enemyAbility(AbilityId.WATER_ABSORB); }); it("suppresses effect of ability", async () => { diff --git a/test/moves/glaive_rush.test.ts b/test/moves/glaive_rush.test.ts index 820936a924c..e42fc4cf743 100644 --- a/test/moves/glaive_rush.test.ts +++ b/test/moves/glaive_rush.test.ts @@ -1,7 +1,6 @@ import { allMoves } from "#app/data/data-lists"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -26,10 +25,10 @@ describe("Moves - Glaive Rush", () => { .battleStyle("single") .disableCrits() .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset([Moves.GLAIVE_RUSH]) - .ability(Abilities.BALL_FETCH) - .moveset([Moves.SHADOW_SNEAK, Moves.AVALANCHE, Moves.SPLASH, Moves.GLAIVE_RUSH]); + .enemyAbility(AbilityId.BALL_FETCH) + .enemyMoveset([MoveId.GLAIVE_RUSH]) + .ability(AbilityId.BALL_FETCH) + .moveset([MoveId.SHADOW_SNEAK, MoveId.AVALANCHE, MoveId.SPLASH, MoveId.GLAIVE_RUSH]); }); it("takes double damage from attacks", async () => { @@ -60,7 +59,7 @@ describe("Moves - Glaive Rush", () => { }); it("interacts properly with multi-lens", async () => { - game.override.startingHeldItems([{ name: "MULTI_LENS", count: 2 }]).enemyMoveset([Moves.AVALANCHE]); + game.override.startingHeldItems([{ name: "MULTI_LENS", count: 2 }]).enemyMoveset([MoveId.AVALANCHE]); await game.classicMode.startBattle([Species.KLINK]); const player = game.scene.getPlayerPokemon()!; @@ -80,7 +79,7 @@ describe("Moves - Glaive Rush", () => { }); it("secondary effects only last until next move", async () => { - game.override.enemyMoveset([Moves.SHADOW_SNEAK]); + game.override.enemyMoveset([MoveId.SHADOW_SNEAK]); await game.classicMode.startBattle([Species.KLINK]); const player = game.scene.getPlayerPokemon()!; @@ -105,7 +104,7 @@ describe("Moves - Glaive Rush", () => { }); it("secondary effects are removed upon switching", async () => { - game.override.enemyMoveset([Moves.SHADOW_SNEAK]); + game.override.enemyMoveset([MoveId.SHADOW_SNEAK]); await game.classicMode.startBattle([Species.KLINK, Species.FEEBAS]); const player = game.scene.getPlayerPokemon()!; @@ -127,8 +126,8 @@ describe("Moves - Glaive Rush", () => { it("secondary effects don't activate if move fails", async () => { game.override - .moveset([Moves.SHADOW_SNEAK, Moves.PROTECT, Moves.SPLASH, Moves.GLAIVE_RUSH]) - .enemyMoveset([Moves.GLAIVE_RUSH, Moves.SPLASH]); + .moveset([MoveId.SHADOW_SNEAK, MoveId.PROTECT, MoveId.SPLASH, MoveId.GLAIVE_RUSH]) + .enemyMoveset([MoveId.GLAIVE_RUSH, MoveId.SPLASH]); await game.classicMode.startBattle([Species.KLINK]); const player = game.scene.getPlayerPokemon()!; @@ -137,18 +136,18 @@ describe("Moves - Glaive Rush", () => { enemy.hp = 1000; player.hp = 1000; - game.move.select(Moves.PROTECT); - await game.move.forceEnemyMove(Moves.GLAIVE_RUSH); + game.move.select(MoveId.PROTECT); + await game.move.forceEnemyMove(MoveId.GLAIVE_RUSH); await game.phaseInterceptor.to("TurnEndPhase"); - game.move.select(Moves.SHADOW_SNEAK); - await game.move.forceEnemyMove(Moves.GLAIVE_RUSH); + game.move.select(MoveId.SHADOW_SNEAK); + await game.move.forceEnemyMove(MoveId.GLAIVE_RUSH); await game.phaseInterceptor.to("TurnEndPhase"); const damagedHP1 = 1000 - enemy.hp; enemy.hp = 1000; - game.move.select(Moves.SHADOW_SNEAK); - await game.move.forceEnemyMove(Moves.SPLASH); + game.move.select(MoveId.SHADOW_SNEAK); + await game.move.forceEnemyMove(MoveId.SPLASH); await game.phaseInterceptor.to("TurnEndPhase"); const damagedHP2 = 1000 - enemy.hp; diff --git a/test/moves/growth.test.ts b/test/moves/growth.test.ts index 7c1a3ae4047..a7078961e2a 100644 --- a/test/moves/growth.test.ts +++ b/test/moves/growth.test.ts @@ -26,10 +26,10 @@ describe("Moves - Growth", () => { game = new GameManager(phaserGame); game.override .battleStyle("single") - .enemyAbility(Abilities.MOXIE) - .ability(Abilities.INSOMNIA) - .moveset([Moves.GROWTH]) - .enemyMoveset(Moves.SPLASH); + .enemyAbility(AbilityId.MOXIE) + .ability(AbilityId.INSOMNIA) + .moveset([MoveId.GROWTH]) + .enemyMoveset(MoveId.SPLASH); }); it("should raise SPATK stat stage by 1", async () => { diff --git a/test/moves/hard_press.test.ts b/test/moves/hard_press.test.ts index c6938cee1d2..555b7087818 100644 --- a/test/moves/hard_press.test.ts +++ b/test/moves/hard_press.test.ts @@ -29,11 +29,11 @@ describe("Moves - Hard Press", () => { game = new GameManager(phaserGame); game.override .battleStyle("single") - .ability(Abilities.BALL_FETCH) + .ability(AbilityId.BALL_FETCH) .enemySpecies(Species.MUNCHLAX) - .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(Moves.SPLASH) - .moveset([Moves.HARD_PRESS]); + .enemyAbility(AbilityId.BALL_FETCH) + .enemyMoveset(MoveId.SPLASH) + .moveset([MoveId.HARD_PRESS]); vi.spyOn(moveToCheck, "calculateBattlePower"); }); diff --git a/test/moves/haze.test.ts b/test/moves/haze.test.ts index dd7aac91a56..41ecbf0aafd 100644 --- a/test/moves/haze.test.ts +++ b/test/moves/haze.test.ts @@ -27,11 +27,11 @@ describe("Moves - Haze", () => { .battleStyle("single") .enemySpecies(Species.RATTATA) .enemyLevel(100) - .enemyMoveset(Moves.SPLASH) - .enemyAbility(Abilities.BALL_FETCH) + .enemyMoveset(MoveId.SPLASH) + .enemyAbility(AbilityId.BALL_FETCH) .startingLevel(100) - .moveset([Moves.HAZE, Moves.SWORDS_DANCE, Moves.CHARM, Moves.SPLASH]) - .ability(Abilities.BALL_FETCH); + .moveset([MoveId.HAZE, MoveId.SWORDS_DANCE, MoveId.CHARM, MoveId.SPLASH]) + .ability(AbilityId.BALL_FETCH); }); it("should reset all stat changes of all Pokemon on field", async () => { diff --git a/test/moves/hyper_beam.test.ts b/test/moves/hyper_beam.test.ts index 41d9e67e051..b45a8d4452d 100644 --- a/test/moves/hyper_beam.test.ts +++ b/test/moves/hyper_beam.test.ts @@ -28,13 +28,13 @@ describe("Moves - Hyper Beam", () => { game.override .battleStyle("single") - .ability(Abilities.BALL_FETCH) + .ability(AbilityId.BALL_FETCH) .enemySpecies(Species.SNORLAX) - .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset([Moves.SPLASH]) + .enemyAbility(AbilityId.BALL_FETCH) + .enemyMoveset([MoveId.SPLASH]) .enemyLevel(100) - .moveset([Moves.HYPER_BEAM, Moves.TACKLE]); - vi.spyOn(allMoves[Moves.HYPER_BEAM], "accuracy", "get").mockReturnValue(100); + .moveset([MoveId.HYPER_BEAM, MoveId.TACKLE]); + vi.spyOn(allMoves[MoveId.HYPER_BEAM], "accuracy", "get").mockReturnValue(100); }); it("should force the user to recharge on the next turn (and only that turn)", async () => { diff --git a/test/moves/lunar_blessing.test.ts b/test/moves/lunar_blessing.test.ts index b85e85b1e88..6b35e665975 100644 --- a/test/moves/lunar_blessing.test.ts +++ b/test/moves/lunar_blessing.test.ts @@ -25,10 +25,10 @@ describe("Moves - Lunar Blessing", () => { game.override .battleStyle("double") .enemySpecies(Species.SHUCKLE) - .enemyMoveset(Moves.SPLASH) - .enemyAbility(Abilities.BALL_FETCH) - .moveset([Moves.LUNAR_BLESSING, Moves.SPLASH]) - .ability(Abilities.BALL_FETCH); + .enemyMoveset(MoveId.SPLASH) + .enemyAbility(AbilityId.BALL_FETCH) + .moveset([MoveId.LUNAR_BLESSING, MoveId.SPLASH]) + .ability(AbilityId.BALL_FETCH); }); it("should restore 25% HP of the user and its ally", async () => { diff --git a/test/moves/magic_coat.test.ts b/test/moves/magic_coat.test.ts index 1a8e3d778f7..853dd79b39c 100644 --- a/test/moves/magic_coat.test.ts +++ b/test/moves/magic_coat.test.ts @@ -56,7 +56,7 @@ describe("Moves - Magic Coat", () => { }); it("should not reflect moves used on the next turn", async () => { - game.override.moveset([Moves.GROWL, Moves.SPLASH]).enemyMoveset([Moves.MAGIC_COAT, Moves.SPLASH]); + game.override.moveset([MoveId.GROWL, MoveId.SPLASH]).enemyMoveset([MoveId.MAGIC_COAT, MoveId.SPLASH]); await game.classicMode.startBattle([Species.MAGIKARP]); // turn 1 @@ -81,7 +81,7 @@ describe("Moves - Magic Coat", () => { }); it("should individually bounce back multi-target moves when used by both targets in doubles", async () => { - game.override.battleStyle("double").moveset([Moves.GROWL, Moves.SPLASH]); + game.override.battleStyle("double").moveset([MoveId.GROWL, MoveId.SPLASH]); await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); game.move.select(MoveId.GROWL, 0); @@ -95,8 +95,8 @@ describe("Moves - Magic Coat", () => { it("should bounce back a spread status move against both pokemon", async () => { game.override .battleStyle("double") - .moveset([Moves.GROWL, Moves.SPLASH]) - .enemyMoveset([Moves.SPLASH, Moves.MAGIC_COAT]); + .moveset([MoveId.GROWL, MoveId.SPLASH]) + .enemyMoveset([MoveId.SPLASH, MoveId.MAGIC_COAT]); await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); game.move.select(MoveId.GROWL, 0); @@ -122,9 +122,9 @@ describe("Moves - Magic Coat", () => { it("should not bounce back a move that was just bounced", async () => { game.override .battleStyle("double") - .ability(Abilities.MAGIC_BOUNCE) - .moveset([Moves.GROWL, Moves.MAGIC_COAT]) - .enemyMoveset([Moves.SPLASH, Moves.MAGIC_COAT]); + .ability(AbilityId.MAGIC_BOUNCE) + .moveset([MoveId.GROWL, MoveId.MAGIC_COAT]) + .enemyMoveset([MoveId.SPLASH, MoveId.MAGIC_COAT]); await game.classicMode.startBattle([Species.MAGIKARP, Species.MAGIKARP]); game.move.select(MoveId.MAGIC_COAT, 0); @@ -147,7 +147,7 @@ describe("Moves - Magic Coat", () => { }); it("should still bounce back a move from a mold breaker user", async () => { - game.override.ability(Abilities.MOLD_BREAKER).moveset([Moves.GROWL]); + game.override.ability(AbilityId.MOLD_BREAKER).moveset([MoveId.GROWL]); await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(MoveId.GROWL); @@ -158,7 +158,7 @@ describe("Moves - Magic Coat", () => { }); it("should only bounce spikes back once when both targets use magic coat in doubles", async () => { - game.override.battleStyle("double").moveset([Moves.SPIKES]); + game.override.battleStyle("double").moveset([MoveId.SPIKES]); await game.classicMode.startBattle([Species.MAGIKARP]); game.move.select(MoveId.SPIKES); @@ -169,7 +169,7 @@ describe("Moves - Magic Coat", () => { }); it("should not bounce back curse", async () => { - game.override.moveset([Moves.CURSE]); + game.override.moveset([MoveId.CURSE]); await game.classicMode.startBattle([Species.GASTLY]); game.move.select(MoveId.CURSE); @@ -181,9 +181,9 @@ describe("Moves - Magic Coat", () => { // TODO: encore is failing if the last move was virtual. it.todo("should not cause the bounced move to count for encore", async () => { game.override - .moveset([Moves.GROWL, Moves.ENCORE]) - .enemyMoveset([Moves.MAGIC_COAT, Moves.TACKLE]) - .enemyAbility(Abilities.MAGIC_BOUNCE); + .moveset([MoveId.GROWL, MoveId.ENCORE]) + .enemyMoveset([MoveId.MAGIC_COAT, MoveId.TACKLE]) + .enemyAbility(AbilityId.MAGIC_BOUNCE); await game.classicMode.startBattle([SpeciesId.MAGIKARP]); const enemyPokemon = game.scene.getEnemyPokemon()!; @@ -204,7 +204,7 @@ describe("Moves - Magic Coat", () => { // TODO: stomping tantrum should consider moves that were bounced. it.todo("should cause stomping tantrum to double in power when the last move was bounced", async () => { - game.override.battleStyle("single").moveset([Moves.STOMPING_TANTRUM, Moves.CHARM]); + game.override.battleStyle("single").moveset([MoveId.STOMPING_TANTRUM, MoveId.CHARM]); await game.classicMode.startBattle([Species.MAGIKARP]); const stomping_tantrum = allMoves[MoveId.STOMPING_TANTRUM]; @@ -245,8 +245,8 @@ describe("Moves - Magic Coat", () => { ); it("should respect immunities when bouncing a move", async () => { - vi.spyOn(allMoves[Moves.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100); - game.override.moveset([Moves.THUNDER_WAVE, Moves.GROWL]).ability(Abilities.SOUNDPROOF); + vi.spyOn(allMoves[MoveId.THUNDER_WAVE], "accuracy", "get").mockReturnValue(100); + game.override.moveset([MoveId.THUNDER_WAVE, MoveId.GROWL]).ability(AbilityId.SOUNDPROOF); await game.classicMode.startBattle([Species.PHANPY]); // Turn 1 - thunder wave immunity test diff --git a/test/moves/make_it_rain.test.ts b/test/moves/make_it_rain.test.ts index 3ff9a319aab..4c67df0f3a6 100644 --- a/test/moves/make_it_rain.test.ts +++ b/test/moves/make_it_rain.test.ts @@ -26,10 +26,10 @@ describe("Moves - Make It Rain", () => { game = new GameManager(phaserGame); game.override .battleStyle("double") - .moveset([Moves.MAKE_IT_RAIN, Moves.SPLASH]) + .moveset([MoveId.MAKE_IT_RAIN, MoveId.SPLASH]) .enemySpecies(Species.SNORLAX) - .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset(Moves.SPLASH) + .enemyAbility(AbilityId.INSOMNIA) + .enemyMoveset(MoveId.SPLASH) .startingLevel(100) .enemyLevel(100); }); diff --git a/test/moves/mat_block.test.ts b/test/moves/mat_block.test.ts index 0cbe472913b..3adbd6ace43 100644 --- a/test/moves/mat_block.test.ts +++ b/test/moves/mat_block.test.ts @@ -28,10 +28,10 @@ describe("Moves - Mat Block", () => { game.override .battleStyle("double") - .moveset([Moves.MAT_BLOCK, Moves.SPLASH]) + .moveset([MoveId.MAT_BLOCK, MoveId.SPLASH]) .enemySpecies(Species.SNORLAX) - .enemyMoveset([Moves.TACKLE]) - .enemyAbility(Abilities.INSOMNIA) + .enemyMoveset([MoveId.TACKLE]) + .enemyAbility(AbilityId.INSOMNIA) .startingLevel(100) .enemyLevel(100); }); diff --git a/test/moves/parting_shot.test.ts b/test/moves/parting_shot.test.ts index a9f6a01c4ed..fdeab6bfc7c 100644 --- a/test/moves/parting_shot.test.ts +++ b/test/moves/parting_shot.test.ts @@ -28,8 +28,8 @@ describe("Moves - Parting Shot", () => { game = new GameManager(phaserGame); game.override .battleStyle("single") - .moveset([Moves.PARTING_SHOT, Moves.SPLASH]) - .enemyMoveset(Moves.SPLASH) + .moveset([MoveId.PARTING_SHOT, MoveId.SPLASH]) + .enemyMoveset(MoveId.SPLASH) .startingLevel(5) .enemyLevel(5); }); diff --git a/test/moves/powder.test.ts b/test/moves/powder.test.ts index 3bf92dd28ae..3ea235f536e 100644 --- a/test/moves/powder.test.ts +++ b/test/moves/powder.test.ts @@ -29,7 +29,7 @@ describe("Moves - Powder", () => { game = new GameManager(phaserGame); game.override .battleStyle("single") - .enemySpecies(Species.SNORLAX) + .enemySpecies(SpeciesId.SNORLAX) .enemyLevel(100) .enemyMoveset(MoveId.EMBER) .enemyAbility(AbilityId.INSOMNIA) diff --git a/test/moves/protect.test.ts b/test/moves/protect.test.ts index 5149c0fcb32..e922ef9b95b 100644 --- a/test/moves/protect.test.ts +++ b/test/moves/protect.test.ts @@ -29,10 +29,10 @@ describe("Moves - Protect", () => { game.override .battleStyle("single") - .moveset([Moves.PROTECT]) + .moveset([MoveId.PROTECT]) .enemySpecies(Species.SNORLAX) - .enemyAbility(Abilities.INSOMNIA) - .enemyMoveset([Moves.TACKLE]) + .enemyAbility(AbilityId.INSOMNIA) + .enemyMoveset([MoveId.TACKLE]) .startingLevel(100) .enemyLevel(100); }); diff --git a/test/moves/purify.test.ts b/test/moves/purify.test.ts index 1016f520d90..1a52d099040 100644 --- a/test/moves/purify.test.ts +++ b/test/moves/purify.test.ts @@ -3,7 +3,6 @@ import { Status } from "#app/data/status-effect"; import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import { StatusEffect } from "#enums/status-effect"; import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; @@ -29,10 +28,10 @@ describe("Moves - Purify", () => { .battleStyle("single") .starterSpecies(Species.PYUKUMUKU) .startingLevel(10) - .moveset([Moves.PURIFY, Moves.SIZZLY_SLIDE]) + .moveset([MoveId.PURIFY, MoveId.SIZZLY_SLIDE]) .enemySpecies(Species.MAGIKARP) .enemyLevel(10) - .enemyMoveset([Moves.SPLASH, Moves.NONE, Moves.NONE, Moves.NONE]); + .enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE]); }); test("Purify heals opponent status effect and restores user hp", async () => { diff --git a/test/moves/quick_guard.test.ts b/test/moves/quick_guard.test.ts index ab0c563e7a4..e0ab9f03dc5 100644 --- a/test/moves/quick_guard.test.ts +++ b/test/moves/quick_guard.test.ts @@ -27,10 +27,10 @@ describe("Moves - Quick Guard", () => { game.override .battleStyle("double") - .moveset([Moves.QUICK_GUARD, Moves.SPLASH, Moves.FOLLOW_ME]) + .moveset([MoveId.QUICK_GUARD, MoveId.SPLASH, MoveId.FOLLOW_ME]) .enemySpecies(Species.SNORLAX) - .enemyMoveset([Moves.QUICK_ATTACK]) - .enemyAbility(Abilities.INSOMNIA) + .enemyMoveset([MoveId.QUICK_ATTACK]) + .enemyAbility(AbilityId.INSOMNIA) .startingLevel(100) .enemyLevel(100); }); @@ -49,7 +49,7 @@ describe("Moves - Quick Guard", () => { }); test("should protect the user and allies from Prankster-boosted moves", async () => { - game.override.enemyAbility(Abilities.PRANKSTER).enemyMoveset([Moves.GROWL]); + game.override.enemyAbility(AbilityId.PRANKSTER).enemyMoveset([MoveId.GROWL]); await game.classicMode.startBattle([SpeciesId.CHARIZARD, SpeciesId.BLASTOISE]); @@ -81,7 +81,7 @@ describe("Moves - Quick Guard", () => { }); test("should fail if the user is the last to move in the turn", async () => { - game.override.battleStyle("single").enemyMoveset([Moves.QUICK_GUARD]); + game.override.battleStyle("single").enemyMoveset([MoveId.QUICK_GUARD]); await game.classicMode.startBattle([SpeciesId.CHARIZARD]); diff --git a/test/moves/rage_powder.test.ts b/test/moves/rage_powder.test.ts index 3d90bbc4c32..058128b72c4 100644 --- a/test/moves/rage_powder.test.ts +++ b/test/moves/rage_powder.test.ts @@ -27,8 +27,8 @@ describe("Moves - Rage Powder", () => { .enemySpecies(Species.SNORLAX) .startingLevel(100) .enemyLevel(100) - .moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK]) - .enemyMoveset([Moves.RAGE_POWDER, Moves.TACKLE, Moves.SPLASH]); + .moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK]) + .enemyMoveset([MoveId.RAGE_POWDER, MoveId.TACKLE, MoveId.SPLASH]); }); test("move effect should be bypassed by Grass type", async () => { diff --git a/test/moves/rollout.test.ts b/test/moves/rollout.test.ts index e571823e0cb..78359fe39fd 100644 --- a/test/moves/rollout.test.ts +++ b/test/moves/rollout.test.ts @@ -2,7 +2,6 @@ import { allMoves } from "#app/data/data-lists"; import { CommandPhase } from "#app/phases/command-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; @@ -27,17 +26,17 @@ describe("Moves - Rollout", () => { .disableCrits() .battleStyle("single") .starterSpecies(Species.RATTATA) - .ability(Abilities.BALL_FETCH) + .ability(AbilityId.BALL_FETCH) .enemySpecies(Species.BIDOOF) - .enemyAbility(Abilities.BALL_FETCH) + .enemyAbility(AbilityId.BALL_FETCH) .startingLevel(100) .enemyLevel(100) - .enemyMoveset(Moves.SPLASH); + .enemyMoveset(MoveId.SPLASH); }); it("should double its dmg on sequential uses but reset after 5", async () => { - game.override.moveset([Moves.ROLLOUT]); - vi.spyOn(allMoves[Moves.ROLLOUT], "accuracy", "get").mockReturnValue(100); //always hit + game.override.moveset([MoveId.ROLLOUT]); + vi.spyOn(allMoves[MoveId.ROLLOUT], "accuracy", "get").mockReturnValue(100); //always hit const variance = 5; const turns = 6; diff --git a/test/moves/roost.test.ts b/test/moves/roost.test.ts index 6308c60ec8e..7abf0871eda 100644 --- a/test/moves/roost.test.ts +++ b/test/moves/roost.test.ts @@ -30,8 +30,8 @@ describe("Moves - Roost", () => { .enemySpecies(Species.RELICANTH) .startingLevel(100) .enemyLevel(100) - .enemyMoveset(Moves.EARTHQUAKE) - .moveset([Moves.ROOST, Moves.BURN_UP, Moves.DOUBLE_SHOCK]); + .enemyMoveset(MoveId.EARTHQUAKE) + .moveset([MoveId.ROOST, MoveId.BURN_UP, MoveId.DOUBLE_SHOCK]); }); /** diff --git a/test/moves/safeguard.test.ts b/test/moves/safeguard.test.ts index 735242e36bf..b1c5799389d 100644 --- a/test/moves/safeguard.test.ts +++ b/test/moves/safeguard.test.ts @@ -1,6 +1,5 @@ import { BattlerIndex } from "#app/battle"; import { PostDefendContactApplyStatusEffectAbAttr } from "#app/data/abilities/ability"; -import { Abilities } from "#app/enums/abilities"; import { StatusEffect } from "#app/enums/status-effect"; import GameManager from "#test/testUtils/gameManager"; import { MoveId } from "#enums/move-id"; @@ -118,16 +117,16 @@ describe("Moves - Safeguard", () => { const enemyPokemon = game.scene.getEnemyPokemon()!; enemyPokemon.hp = 1; - game.move.select(Moves.SPLASH); - await game.move.forceEnemyMove(Moves.SAFEGUARD); + game.move.select(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.SAFEGUARD); await game.toNextTurn(); expect(enemyPokemon.status?.effect).toBe(StatusEffect.BURN); enemyPokemon.resetStatus(); - game.move.select(Moves.SPLASH); - await game.move.forceEnemyMove(Moves.REST); + game.move.select(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.REST); await game.toNextTurn(); expect(enemyPokemon.status?.effect).toBe(StatusEffect.SLEEP); @@ -137,19 +136,19 @@ describe("Moves - Safeguard", () => { await game.classicMode.startBattle(); const player = game.field.getPlayerPokemon(); - game.field.mockAbility(player, Abilities.STATIC); + game.field.mockAbility(player, AbilityId.STATIC); vi.spyOn( player.getAbility().getAttrs(PostDefendContactApplyStatusEffectAbAttr)[0], "chance", "get", ).mockReturnValue(100); - game.move.select(Moves.SPLASH); - await game.move.forceEnemyMove(Moves.SAFEGUARD); + game.move.select(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.SAFEGUARD); await game.toNextTurn(); - game.move.select(Moves.SPLASH); - await game.move.forceEnemyMove(Moves.TACKLE); + game.move.select(MoveId.SPLASH); + await game.move.forceEnemyMove(MoveId.TACKLE); await game.toNextTurn(); const enemyPokemon = game.field.getEnemyPokemon(); diff --git a/test/moves/spikes.test.ts b/test/moves/spikes.test.ts index fb1f2ecf338..4123d261bef 100644 --- a/test/moves/spikes.test.ts +++ b/test/moves/spikes.test.ts @@ -80,8 +80,8 @@ describe("Moves - Spikes", () => { }, 20000); it("should work when all targets fainted", async () => { - game.override.enemySpecies(Species.DIGLETT).battleStyle("double").startingLevel(50); - await game.classicMode.startBattle([Species.RAYQUAZA, Species.ROWLET]); + game.override.enemySpecies(SpeciesId.DIGLETT).battleStyle("double").startingLevel(50); + await game.classicMode.startBattle([SpeciesId.RAYQUAZA, SpeciesId.ROWLET]); game.move.select(MoveId.EARTHQUAKE); game.move.select(MoveId.SPIKES, 1); diff --git a/test/moves/spit_up.test.ts b/test/moves/spit_up.test.ts index 50e5139d361..f09434c241d 100644 --- a/test/moves/spit_up.test.ts +++ b/test/moves/spit_up.test.ts @@ -35,11 +35,11 @@ describe("Moves - Spit Up", () => { game.override .battleStyle("single") .enemySpecies(Species.RATTATA) - .enemyMoveset(Moves.SPLASH) - .enemyAbility(Abilities.NONE) + .enemyMoveset(MoveId.SPLASH) + .enemyAbility(AbilityId.NONE) .enemyLevel(2000) - .moveset(Moves.SPIT_UP) - .ability(Abilities.NONE); + .moveset(MoveId.SPIT_UP) + .ability(AbilityId.NONE); vi.spyOn(spitUp, "calculateBattlePower"); }); diff --git a/test/moves/spotlight.test.ts b/test/moves/spotlight.test.ts index 11ff49a92eb..75d1297ae86 100644 --- a/test/moves/spotlight.test.ts +++ b/test/moves/spotlight.test.ts @@ -28,8 +28,8 @@ describe("Moves - Spotlight", () => { .enemySpecies(Species.SNORLAX) .startingLevel(100) .enemyLevel(100) - .moveset([Moves.FOLLOW_ME, Moves.RAGE_POWDER, Moves.SPOTLIGHT, Moves.QUICK_ATTACK]) - .enemyMoveset([Moves.FOLLOW_ME, Moves.SPLASH]); + .moveset([MoveId.FOLLOW_ME, MoveId.RAGE_POWDER, MoveId.SPOTLIGHT, MoveId.QUICK_ATTACK]) + .enemyMoveset([MoveId.FOLLOW_ME, MoveId.SPLASH]); }); test("move should redirect attacks to the target", async () => { diff --git a/test/moves/stockpile.test.ts b/test/moves/stockpile.test.ts index a1f09369f66..cee57ebfc54 100644 --- a/test/moves/stockpile.test.ts +++ b/test/moves/stockpile.test.ts @@ -30,11 +30,11 @@ describe("Moves - Stockpile", () => { game.override .battleStyle("single") .enemySpecies(Species.RATTATA) - .enemyMoveset(Moves.SPLASH) - .enemyAbility(Abilities.NONE) + .enemyMoveset(MoveId.SPLASH) + .enemyAbility(AbilityId.NONE) .startingLevel(2000) - .moveset([Moves.STOCKPILE, Moves.SPLASH]) - .ability(Abilities.NONE); + .moveset([MoveId.STOCKPILE, MoveId.SPLASH]) + .ability(AbilityId.NONE); }); it("gains a stockpile stack and raises user's DEF and SPDEF stat stages by 1 on each use, fails at max stacks (3)", async () => { diff --git a/test/moves/substitute.test.ts b/test/moves/substitute.test.ts index ce10026cf30..e7267e67605 100644 --- a/test/moves/substitute.test.ts +++ b/test/moves/substitute.test.ts @@ -138,7 +138,7 @@ describe("Moves - Substitute", () => { }); it("should be bypassed by attackers with Infiltrator", async () => { - game.override.enemyMoveset(Moves.TACKLE).enemyAbility(Abilities.INFILTRATOR); + game.override.enemyMoveset(MoveId.TACKLE).enemyAbility(AbilityId.INFILTRATOR); await game.classicMode.startBattle([SpeciesId.BLASTOISE]); @@ -229,7 +229,7 @@ describe("Moves - Substitute", () => { }); it("should protect the user from flinching", async () => { - game.override.enemyMoveset(Moves.FAKE_OUT).startingLevel(1); // Ensures the Substitute will break + game.override.enemyMoveset(MoveId.FAKE_OUT).startingLevel(1); // Ensures the Substitute will break await game.classicMode.startBattle([SpeciesId.BLASTOISE]); @@ -296,8 +296,8 @@ describe("Moves - Substitute", () => { }); it("should prevent the user's items from being stolen", async () => { - game.override.enemyMoveset(Moves.THIEF).startingHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]); - vi.spyOn(allMoves[Moves.THIEF], "attrs", "get").mockReturnValue([new StealHeldItemChanceAttr(1.0)]); // give Thief 100% steal rate + game.override.enemyMoveset(MoveId.THIEF).startingHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]); + vi.spyOn(allMoves[MoveId.THIEF], "attrs", "get").mockReturnValue([new StealHeldItemChanceAttr(1.0)]); // give Thief 100% steal rate await game.classicMode.startBattle([SpeciesId.BLASTOISE]); @@ -313,7 +313,7 @@ describe("Moves - Substitute", () => { }); it("should prevent the user's items from being removed", async () => { - game.override.moveset([Moves.KNOCK_OFF]).enemyHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]); + game.override.moveset([MoveId.KNOCK_OFF]).enemyHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]); await game.classicMode.startBattle([SpeciesId.BLASTOISE]); @@ -330,7 +330,7 @@ describe("Moves - Substitute", () => { }); it("move effect should prevent the user's berries from being stolen and eaten", async () => { - game.override.enemyMoveset(Moves.BUG_BITE).startingHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]); + game.override.enemyMoveset(MoveId.BUG_BITE).startingHeldItems([{ name: "BERRY", type: BerryType.SITRUS }]); await game.classicMode.startBattle([SpeciesId.BLASTOISE]); @@ -407,7 +407,7 @@ describe("Moves - Substitute", () => { }); it("should prevent the source's Rough Skin from activating when hit", async () => { - game.override.enemyMoveset(Moves.TACKLE).ability(Abilities.ROUGH_SKIN); + game.override.enemyMoveset(MoveId.TACKLE).ability(AbilityId.ROUGH_SKIN); await game.classicMode.startBattle([SpeciesId.BLASTOISE]); @@ -421,7 +421,7 @@ describe("Moves - Substitute", () => { }); it("should prevent the source's Focus Punch from failing when hit", async () => { - game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.FOCUS_PUNCH]); + game.override.enemyMoveset(MoveId.TACKLE).moveset([MoveId.FOCUS_PUNCH]); // Make Focus Punch 40 power to avoid a KO vi.spyOn(allMoves[MoveId.FOCUS_PUNCH], "calculateBattlePower").mockReturnValue(40); @@ -442,7 +442,7 @@ describe("Moves - Substitute", () => { }); it("should not allow Shell Trap to activate when attacked", async () => { - game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.SHELL_TRAP]); + game.override.enemyMoveset(MoveId.TACKLE).moveset([MoveId.SHELL_TRAP]); await game.classicMode.startBattle([SpeciesId.BLASTOISE]); @@ -458,7 +458,7 @@ describe("Moves - Substitute", () => { }); it("should not allow Beak Blast to burn opponents when hit", async () => { - game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.BEAK_BLAST]); + game.override.enemyMoveset(MoveId.TACKLE).moveset([MoveId.BEAK_BLAST]); await game.classicMode.startBattle([SpeciesId.BLASTOISE]); @@ -475,7 +475,7 @@ describe("Moves - Substitute", () => { }); it("should cause incoming attacks to not activate Counter", async () => { - game.override.enemyMoveset(Moves.TACKLE).moveset([Moves.COUNTER]); + game.override.enemyMoveset(MoveId.TACKLE).moveset([MoveId.COUNTER]); await game.classicMode.startBattle([SpeciesId.BLASTOISE]); diff --git a/test/moves/tackle.test.ts b/test/moves/tackle.test.ts index facf51d505b..946d966561e 100644 --- a/test/moves/tackle.test.ts +++ b/test/moves/tackle.test.ts @@ -35,7 +35,7 @@ describe("Moves - Tackle", () => { }); it("TACKLE against ghost", async () => { - const moveToUse = Moves.TACKLE; + const moveToUse = MoveId.TACKLE; game.override.enemySpecies(Species.GENGAR); await game.classicMode.startBattle([Species.MIGHTYENA]); diff --git a/test/moves/tail_whip.test.ts b/test/moves/tail_whip.test.ts index c2d3ea2f61e..413c403db54 100644 --- a/test/moves/tail_whip.test.ts +++ b/test/moves/tail_whip.test.ts @@ -24,15 +24,15 @@ describe("Moves - Tail whip", () => { beforeEach(() => { game = new GameManager(phaserGame); - const moveToUse = Moves.TAIL_WHIP; + const moveToUse = MoveId.TAIL_WHIP; game.override .battleStyle("single") .enemySpecies(Species.RATTATA) - .enemyAbility(Abilities.INSOMNIA) - .ability(Abilities.INSOMNIA) + .enemyAbility(AbilityId.INSOMNIA) + .ability(AbilityId.INSOMNIA) .startingLevel(2000) .moveset([moveToUse]) - .enemyMoveset(Moves.SPLASH); + .enemyMoveset(MoveId.SPLASH); }); it("should lower DEF stat stage by 1", async () => { diff --git a/test/moves/thousand_arrows.test.ts b/test/moves/thousand_arrows.test.ts index 6d9e35af183..0096475d912 100644 --- a/test/moves/thousand_arrows.test.ts +++ b/test/moves/thousand_arrows.test.ts @@ -29,8 +29,8 @@ describe("Moves - Thousand Arrows", () => { .enemySpecies(Species.TOGETIC) .startingLevel(100) .enemyLevel(100) - .moveset([Moves.THOUSAND_ARROWS]) - .enemyMoveset(Moves.SPLASH); + .moveset([MoveId.THOUSAND_ARROWS]) + .enemyMoveset(MoveId.SPLASH); }); it("move should hit and ground Flying-type targets", async () => { @@ -51,7 +51,7 @@ describe("Moves - Thousand Arrows", () => { }); it("move should hit and ground targets with Levitate", async () => { - game.override.enemySpecies(Species.SNORLAX).enemyAbility(Abilities.LEVITATE); + game.override.enemySpecies(Species.SNORLAX).enemyAbility(AbilityId.LEVITATE); await game.classicMode.startBattle([SpeciesId.ILLUMISE]); diff --git a/test/moves/tidy_up.test.ts b/test/moves/tidy_up.test.ts index ac5ee504dce..80ff42c8729 100644 --- a/test/moves/tidy_up.test.ts +++ b/test/moves/tidy_up.test.ts @@ -4,7 +4,6 @@ import { MoveEndPhase } from "#app/phases/move-end-phase"; import { TurnEndPhase } from "#app/phases/turn-end-phase"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; -import { SpeciesId } from "#enums/species-id"; import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; @@ -29,11 +28,11 @@ describe("Moves - Tidy Up", () => { game.override .battleStyle("single") .enemySpecies(Species.MAGIKARP) - .enemyAbility(Abilities.BALL_FETCH) - .enemyMoveset(Moves.SPLASH) + .enemyAbility(AbilityId.BALL_FETCH) + .enemyMoveset(MoveId.SPLASH) .starterSpecies(Species.FEEBAS) - .ability(Abilities.BALL_FETCH) - .moveset([Moves.TIDY_UP]) + .ability(AbilityId.BALL_FETCH) + .moveset([MoveId.TIDY_UP]) .startingLevel(50); }); diff --git a/test/moves/toxic.test.ts b/test/moves/toxic.test.ts index 6c9d3d12fb8..2513df42c2c 100644 --- a/test/moves/toxic.test.ts +++ b/test/moves/toxic.test.ts @@ -75,7 +75,7 @@ describe("Moves - Toxic", () => { }); it("moves other than Toxic should not hit semi-invulnerable targets even if user is Poison-type", async () => { - game.override.moveset(Moves.SWIFT).enemyMoveset(Moves.FLY); + game.override.moveset(MoveId.SWIFT).enemyMoveset(MoveId.FLY); await game.classicMode.startBattle([Species.TOXAPEX]); game.move.select(MoveId.SWIFT); diff --git a/test/moves/transform.test.ts b/test/moves/transform.test.ts index aaa16f98288..1f0626fbc65 100644 --- a/test/moves/transform.test.ts +++ b/test/moves/transform.test.ts @@ -154,7 +154,7 @@ describe("Moves - Transform", () => { }); it("should stay transformed with the correct form after reload", async () => { - game.override.enemyMoveset([]).moveset([]).enemySpecies(Species.DARMANITAN); + game.override.enemyMoveset([]).moveset([]).enemySpecies(SpeciesId.DARMANITAN); await game.classicMode.startBattle([SpeciesId.DITTO]); diff --git a/test/moves/wide_guard.test.ts b/test/moves/wide_guard.test.ts index fc125bc72ce..512ffb93dfe 100644 --- a/test/moves/wide_guard.test.ts +++ b/test/moves/wide_guard.test.ts @@ -27,10 +27,10 @@ describe("Moves - Wide Guard", () => { game.override .battleStyle("double") - .moveset([Moves.WIDE_GUARD, Moves.SPLASH, Moves.SURF]) + .moveset([MoveId.WIDE_GUARD, MoveId.SPLASH, MoveId.SURF]) .enemySpecies(Species.SNORLAX) - .enemyMoveset(Moves.SWIFT) - .enemyAbility(Abilities.INSOMNIA) + .enemyMoveset(MoveId.SWIFT) + .enemyAbility(AbilityId.INSOMNIA) .startingLevel(100) .enemyLevel(100); }); diff --git a/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts b/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts index 698295bfa00..569f891f95a 100644 --- a/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts +++ b/test/mystery-encounter/encounters/absolute-avarice-encounter.test.ts @@ -138,7 +138,7 @@ describe("Absolute Avarice - Mystery Encounter", () => { expect(enemyField.length).toBe(1); expect(enemyField[0].species.speciesId).toBe(SpeciesId.GREEDENT); const moveset = enemyField[0].moveset.map(m => m.moveId); - expect(moveset).toEqual([Moves.THRASH, Moves.CRUNCH, Moves.BODY_PRESS, Moves.SLACK_OFF]); + expect(moveset).toEqual([MoveId.THRASH, MoveId.CRUNCH, MoveId.BODY_PRESS, MoveId.SLACK_OFF]); const movePhases = phaseSpy.mock.calls.filter(p => p[0] instanceof MovePhase).map(p => p[0]); expect(movePhases.length).toBe(1); diff --git a/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts b/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts index d41354a4789..68fcaccd39e 100644 --- a/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts +++ b/test/mystery-encounter/encounters/bug-type-superfan-encounter.test.ts @@ -116,25 +116,31 @@ const POOL_3_POKEMON: { species: SpeciesId; formIndex?: number }[] = [ const POOL_4_POKEMON = [SpeciesId.GENESECT, SpeciesId.SLITHER_WING, SpeciesId.BUZZWOLE, SpeciesId.PHEROMOSA]; -const PHYSICAL_TUTOR_MOVES = [Moves.MEGAHORN, Moves.ATTACK_ORDER, Moves.BUG_BITE, Moves.FIRST_IMPRESSION, Moves.LUNGE]; +const PHYSICAL_TUTOR_MOVES = [ + MoveId.MEGAHORN, + MoveId.ATTACK_ORDER, + MoveId.BUG_BITE, + MoveId.FIRST_IMPRESSION, + MoveId.LUNGE, +]; const SPECIAL_TUTOR_MOVES = [ - Moves.SILVER_WIND, - Moves.SIGNAL_BEAM, - Moves.BUG_BUZZ, - Moves.POLLEN_PUFF, - Moves.STRUGGLE_BUG, + MoveId.SILVER_WIND, + MoveId.SIGNAL_BEAM, + MoveId.BUG_BUZZ, + MoveId.POLLEN_PUFF, + MoveId.STRUGGLE_BUG, ]; const STATUS_TUTOR_MOVES = [ - Moves.STRING_SHOT, - Moves.DEFEND_ORDER, - Moves.RAGE_POWDER, - Moves.STICKY_WEB, - Moves.SILK_TRAP, + MoveId.STRING_SHOT, + MoveId.DEFEND_ORDER, + MoveId.RAGE_POWDER, + MoveId.STICKY_WEB, + MoveId.SILK_TRAP, ]; -const MISC_TUTOR_MOVES = [Moves.LEECH_LIFE, Moves.U_TURN, Moves.HEAL_ORDER, Moves.QUIVER_DANCE, Moves.INFESTATION]; +const MISC_TUTOR_MOVES = [MoveId.LEECH_LIFE, MoveId.U_TURN, MoveId.HEAL_ORDER, MoveId.QUIVER_DANCE, MoveId.INFESTATION]; describe("Bug-Type Superfan - Mystery Encounter", () => { let phaserGame: Phaser.Game; diff --git a/test/mystery-encounter/encounters/field-trip-encounter.test.ts b/test/mystery-encounter/encounters/field-trip-encounter.test.ts index f2b517463db..e059827fa17 100644 --- a/test/mystery-encounter/encounters/field-trip-encounter.test.ts +++ b/test/mystery-encounter/encounters/field-trip-encounter.test.ts @@ -38,7 +38,7 @@ describe("Field Trip - Mystery Encounter", () => { .startingWave(defaultWave) .startingBiome(defaultBiome) .disableTrainerWaves() - .moveset([Moves.TACKLE, Moves.UPROAR, Moves.SWORDS_DANCE]); + .moveset([MoveId.TACKLE, MoveId.UPROAR, MoveId.SWORDS_DANCE]); vi.spyOn(MysteryEncounters, "mysteryEncountersByBiome", "get").mockReturnValue( new Map([[BiomeId.CAVE, [MysteryEncounterType.FIELD_TRIP]]]), diff --git a/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts b/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts index a1c4e0ef5c3..bb950cf9eca 100644 --- a/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts +++ b/test/mystery-encounter/encounters/lost-at-sea-encounter.test.ts @@ -68,7 +68,7 @@ describe("Lost at Sea - Mystery Encounter", () => { }); it("should not spawn outside of sea biome", async () => { - game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(Biome.MOUNTAIN); + game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(BiomeId.MOUNTAIN); await game.runToMysteryEncounter(); expect(game.scene.currentBattle.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.LOST_AT_SEA); diff --git a/test/ui/pokedex.test.ts b/test/ui/pokedex.test.ts index 573ce3fef89..53ebe04a4ed 100644 --- a/test/ui/pokedex.test.ts +++ b/test/ui/pokedex.test.ts @@ -502,13 +502,13 @@ describe("UI - Pokedex", () => { // Nab the pokemon that is selected for comparison later. // @ts-expect-error - `lastSpecies` is private - const selectedPokemon = pokedexHandler.lastSpecies.speciesId; + const selectedPokemon = pokedexHandler.lastSpeciesId.speciesId; for (let i = 0; i < 11; i++) { pokedexHandler.processInput(Button.DOWN); } // @ts-expect-error `lastSpecies` is private - expect(selectedPokemon).toEqual(pokedexHandler.lastSpecies.speciesId); + expect(selectedPokemon).toEqual(pokedexHandler.lastSpeciesId.speciesId); }, ); diff --git a/test/ui/starter-select.test.ts b/test/ui/starter-select.test.ts index 10a804b805d..6ba0ff85d8a 100644 --- a/test/ui/starter-select.test.ts +++ b/test/ui/starter-select.test.ts @@ -579,7 +579,7 @@ describe("UI - Starter select", () => { }); }); - expect(starterSelectUiHandler?.starterSpecies.length).toBe(1); + expect(starterSelectUiHandler?.starterSpeciesId.length).toBe(1); expect(starterSelectUiHandler?.starterSpecies[0].generation).toBe(1); expect(starterSelectUiHandler?.starterSpecies[0].speciesId).toBe(32); expect(starterSelectUiHandler?.cursorObj.x).toBe(53); diff --git a/test/ui/transfer-item.test.ts b/test/ui/transfer-item.test.ts index 409fcd99d02..e69e3e49e77 100644 --- a/test/ui/transfer-item.test.ts +++ b/test/ui/transfer-item.test.ts @@ -35,9 +35,9 @@ describe("UI - Transfer Items", () => { { name: "BERRY", count: 2, type: BerryType.APICOT }, { name: "BERRY", count: 2, type: BerryType.LUM }, ]) - .moveset([Moves.DRAGON_CLAW]) + .moveset([MoveId.DRAGON_CLAW]) .enemySpecies(Species.MAGIKARP) - .enemyMoveset([Moves.SPLASH]); + .enemyMoveset([MoveId.SPLASH]); await game.classicMode.startBattle([SpeciesId.RAYQUAZA, SpeciesId.RAYQUAZA, SpeciesId.RAYQUAZA]);