Fixed import issues

This commit is contained in:
Bertie690 2025-06-05 08:42:17 -04:00
parent 2eb5a03eda
commit 6f2b8a43f1
25 changed files with 28 additions and 17 deletions

View File

@ -3,6 +3,7 @@ import { allAbilities } from "#app/data/data-lists";
import { FaintPhase } from "#app/phases/faint-phase"; import { FaintPhase } from "#app/phases/faint-phase";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager"; import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";

View File

@ -3,6 +3,7 @@ import { DamageAnimPhase } from "#app/phases/damage-anim-phase";
import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager"; import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, test } from "vitest";

View File

@ -7,6 +7,7 @@ import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { BattlerIndex } from "#app/battle"; import { BattlerIndex } from "#app/battle";
import { SpeciesId } from "#enums/species-id";
// See also: TypeImmunityAbAttr // See also: TypeImmunityAbAttr
describe("Abilities - Volt Absorb", () => { describe("Abilities - Volt Absorb", () => {
@ -35,7 +36,7 @@ describe("Abilities - Volt Absorb", () => {
game.override game.override
.moveset([moveToUse]) .moveset([moveToUse])
.ability(ability) .ability(ability)
.enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE]) .enemyMoveset([MoveId.SPLASH])
.enemySpecies(SpeciesId.DUSKULL) .enemySpecies(SpeciesId.DUSKULL)
.enemyAbility(AbilityId.BALL_FETCH); .enemyAbility(AbilityId.BALL_FETCH);

View File

@ -23,6 +23,7 @@ import { PlayerGender } from "#enums/player-gender";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { BiomeId } from "#enums/biome-id";
describe("Test Battle Phase", () => { describe("Test Battle Phase", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;
@ -284,7 +285,7 @@ describe("Test Battle Phase", () => {
.ability(AbilityId.ZEN_MODE) .ability(AbilityId.ZEN_MODE)
.startingLevel(2000) .startingLevel(2000)
.startingWave(3) .startingWave(3)
.startingBiome(Biome.LAKE) .startingBiome(BiomeId.LAKE)
.moveset([moveToUse]) .moveset([moveToUse])
.enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]); .enemyMoveset([MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE, MoveId.TACKLE]);
await game.classicMode.startBattle(); await game.classicMode.startBattle();

View File

@ -8,6 +8,7 @@ import { MoveId } from "#enums/move-id";
import GameManager from "#test/testUtils/gameManager"; import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SpeciesId } from "#enums/species-id";
describe("Moves - Dragon Rage", () => { describe("Moves - Dragon Rage", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -7,6 +7,7 @@ import { MoveId } from "#enums/move-id";
import GameManager from "#test/testUtils/gameManager"; import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { SpeciesId } from "#enums/species-id";
describe("Moves - Fissure", () => { describe("Moves - Fissure", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -1,6 +1,7 @@
import { allMoves } from "#app/data/data-lists"; import { allMoves } from "#app/data/data-lists";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager"; import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";

View File

@ -3,6 +3,7 @@ import { Status } from "#app/data/status-effect";
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon"; import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
import { MoveEndPhase } from "#app/phases/move-end-phase"; import { MoveEndPhase } from "#app/phases/move-end-phase";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import { StatusEffect } from "#enums/status-effect"; import { StatusEffect } from "#enums/status-effect";
import GameManager from "#test/testUtils/gameManager"; import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
@ -31,7 +32,7 @@ describe("Moves - Purify", () => {
.moveset([MoveId.PURIFY, MoveId.SIZZLY_SLIDE]) .moveset([MoveId.PURIFY, MoveId.SIZZLY_SLIDE])
.enemySpecies(SpeciesId.MAGIKARP) .enemySpecies(SpeciesId.MAGIKARP)
.enemyLevel(10) .enemyLevel(10)
.enemyMoveset([MoveId.SPLASH, MoveId.NONE, MoveId.NONE, MoveId.NONE]); .enemyMoveset([MoveId.SPLASH]);
}); });
test("Purify heals opponent status effect and restores user hp", async () => { test("Purify heals opponent status effect and restores user hp", async () => {

View File

@ -2,6 +2,7 @@ import { allMoves } from "#app/data/data-lists";
import { CommandPhase } from "#app/phases/command-phase"; import { CommandPhase } from "#app/phases/command-phase";
import { AbilityId } from "#enums/ability-id"; import { AbilityId } from "#enums/ability-id";
import { MoveId } from "#enums/move-id"; import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id";
import GameManager from "#test/testUtils/gameManager"; import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";

View File

@ -6,6 +6,7 @@ import { MoveId } from "#enums/move-id";
import { SpeciesId } from "#enums/species-id"; import { SpeciesId } from "#enums/species-id";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
import { AbilityId } from "#enums/ability-id";
describe("Moves - Safeguard", () => { describe("Moves - Safeguard", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -8,6 +8,7 @@ import GameManager from "#test/testUtils/gameManager";
import Phaser from "phaser"; import Phaser from "phaser";
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
import { SubstituteTag } from "#app/data/battler-tags"; import { SubstituteTag } from "#app/data/battler-tags";
import { SpeciesId } from "#enums/species-id";
describe("Moves - Tidy Up", () => { describe("Moves - Tidy Up", () => {
let phaserGame: Phaser.Game; let phaserGame: Phaser.Game;

View File

@ -72,7 +72,7 @@ describe("Absolute Avarice - Mystery Encounter", () => {
}); });
it("should not spawn outside of proper biomes", async () => { it("should not spawn outside of proper biomes", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(game.scene.currentBattle.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.ABSOLUTE_AVARICE); expect(game.scene.currentBattle.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.ABSOLUTE_AVARICE);

View File

@ -79,7 +79,7 @@ describe("An Offer You Can't Refuse - Mystery Encounter", () => {
}); });
it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => { it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe( expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(

View File

@ -75,7 +75,7 @@ describe("Dancing Lessons - Mystery Encounter", () => {
}); });
it("should not spawn outside of proper biomes", async () => { it("should not spawn outside of proper biomes", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(Biome.SPACE); game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(BiomeId.SPACE);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(game.scene.currentBattle.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.DANCING_LESSONS); expect(game.scene.currentBattle.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.DANCING_LESSONS);

View File

@ -75,7 +75,7 @@ describe("Department Store Sale - Mystery Encounter", () => {
}); });
it("should not spawn outside of CIVILIZATION_ENCOUNTER_BIOMES", async () => { it("should not spawn outside of CIVILIZATION_ENCOUNTER_BIOMES", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.DEPARTMENT_STORE_SALE); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.DEPARTMENT_STORE_SALE);

View File

@ -82,7 +82,7 @@ describe("Fun And Games! - Mystery Encounter", () => {
}); });
it("should not spawn outside of CIVILIZATIONN biomes", async () => { it("should not spawn outside of CIVILIZATIONN biomes", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.FUN_AND_GAMES); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.FUN_AND_GAMES);

View File

@ -86,7 +86,7 @@ describe("Global Trade System - Mystery Encounter", () => {
}); });
it("should not spawn outside of CIVILIZATION_ENCOUNTER_BIOMES", async () => { it("should not spawn outside of CIVILIZATION_ENCOUNTER_BIOMES", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.GLOBAL_TRADE_SYSTEM); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.GLOBAL_TRADE_SYSTEM);

View File

@ -80,7 +80,7 @@ describe("Mysterious Challengers - Mystery Encounter", () => {
}); });
it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => { it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.MYSTERIOUS_CHALLENGERS); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.MYSTERIOUS_CHALLENGERS);

View File

@ -77,7 +77,7 @@ describe("Part-Timer - Mystery Encounter", () => {
}); });
it("should not spawn outside of CIVILIZATION_ENCOUNTER_BIOMES", async () => { it("should not spawn outside of CIVILIZATION_ENCOUNTER_BIOMES", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.PART_TIMER); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.PART_TIMER);

View File

@ -73,7 +73,7 @@ describe("Safari Zone - Mystery Encounter", () => {
}); });
it("should not spawn outside of the forest, swamp, or jungle biomes", async () => { it("should not spawn outside of the forest, swamp, or jungle biomes", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.SAFARI_ZONE); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.SAFARI_ZONE);

View File

@ -85,7 +85,7 @@ describe("The Expert Pokémon Breeder - Mystery Encounter", () => {
}); });
it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => { it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe( expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(

View File

@ -80,7 +80,7 @@ describe("The Pokemon Salesman - Mystery Encounter", () => {
}); });
it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => { it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.ULTRA).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.ULTRA).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_POKEMON_SALESMAN); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_POKEMON_SALESMAN);

View File

@ -83,7 +83,7 @@ describe("The Strong Stuff - Mystery Encounter", () => {
}); });
it("should not spawn outside of CAVE biome", async () => { it("should not spawn outside of CAVE biome", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(Biome.MOUNTAIN); game.override.mysteryEncounterTier(MysteryEncounterTier.COMMON).startingBiome(BiomeId.MOUNTAIN);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_STRONG_STUFF); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_STRONG_STUFF);

View File

@ -87,7 +87,7 @@ describe("The Winstrate Challenge - Mystery Encounter", () => {
}); });
it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => { it("should not spawn outside of HUMAN_TRANSITABLE_BIOMES", async () => {
game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(Biome.VOLCANO); game.override.mysteryEncounterTier(MysteryEncounterTier.GREAT).startingBiome(BiomeId.VOLCANO);
await game.runToMysteryEncounter(); await game.runToMysteryEncounter();
expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_WINSTRATE_CHALLENGE); expect(scene.currentBattle?.mysteryEncounter?.encounterType).not.toBe(MysteryEncounterType.THE_WINSTRATE_CHALLENGE);

View File

@ -579,7 +579,7 @@ describe("UI - Starter select", () => {
}); });
}); });
expect(starterSelectUiHandler?.starterSpeciesId.length).toBe(1); expect(starterSelectUiHandler?.starterSpecies.length).toBe(1);
expect(starterSelectUiHandler?.starterSpecies[0].generation).toBe(1); expect(starterSelectUiHandler?.starterSpecies[0].generation).toBe(1);
expect(starterSelectUiHandler?.starterSpecies[0].speciesId).toBe(32); expect(starterSelectUiHandler?.starterSpecies[0].speciesId).toBe(32);
expect(starterSelectUiHandler?.cursorObj.x).toBe(53); expect(starterSelectUiHandler?.cursorObj.x).toBe(53);