Fix some imports

This commit is contained in:
NightKev 2025-07-13 02:52:02 -07:00
parent 882c256933
commit ff5d891c6e
43 changed files with 89 additions and 92 deletions

View File

@ -1,8 +1,7 @@
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants";
import { allTrainerItems } from "#app/data/data-lists";
import { globalScene } from "#app/global-scene";
import { speciesStarterCosts } from "#balance/starters";
import { modifierTypes } from "#data/data-lists";
import { allTrainerItems, modifierTypes } from "#data/data-lists";
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
import { MysteryEncounterType } from "#enums/mystery-encounter-type";

View File

@ -1,6 +1,6 @@
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES } from "#app/constants";
import { allHeldItems } from "#app/data/data-lists";
import { globalScene } from "#app/global-scene";
import { allHeldItems } from "#data/data-lists";
import { getNatureName } from "#data/nature";
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";

View File

@ -1,13 +1,12 @@
import { allHeldItems } from "#app/data/data-lists";
import { allHeldItems } from "#data/data-lists";
import type { FormChangeItem } from "#enums/form-change-item";
import {
type HeldItemCategoryId,
type HeldItemId,
isCategoryId,
isItemInCategory,
isItemInRequested,
} from "#app/enums/held-item-id";
import { getTypedEntries, getTypedKeys } from "#app/utils/common";
import type { FormChangeItem } from "#enums/form-change-item";
} from "#enums/held-item-id";
import {
type FormChangeItemPropertyMap,
type FormChangeItemSpecs,
@ -17,6 +16,7 @@ import {
type HeldItemSpecs,
isHeldItemSpecs,
} from "#items/held-item-data-types";
import { getTypedEntries, getTypedKeys } from "#utils/common";
export class PokemonItemManager {
public heldItems: HeldItemDataMap;

View File

@ -1,11 +1,11 @@
import { allHeldItems } from "#app/data/data-lists";
import { getEnumValues } from "#app/utils/common";
import { allHeldItems } from "#data/data-lists";
import { BerryType } from "#enums/berry-type";
import { HeldItemId } from "#enums/held-item-id";
import type { PokemonType } from "#enums/pokemon-type";
import { SpeciesId } from "#enums/species-id";
import { type PermanentStat, Stat } from "#enums/stat";
import { StatusEffect } from "#enums/status-effect";
import { getEnumValues } from "#utils/common";
import { HeldItemEffect } from "./held-item";
import { AccuracyBoosterHeldItem, type AccuracyBoostParams } from "./held-items/accuracy-booster";
import {

View File

@ -1,4 +1,4 @@
import { allTrainerItems } from "#app/data/data-lists";
import { allTrainerItems } from "#data/data-lists";
import { Stat, type TempBattleStat } from "#enums/stat";
import { StatusEffect } from "#enums/status-effect";
import { TrainerItemId } from "#enums/trainer-item-id";

View File

@ -1,4 +1,4 @@
import { allTrainerItems } from "#app/data/data-lists";
import { allTrainerItems } from "#data/data-lists";
import {
type BooleanHolderParams,
type NumberHolderParams,

View File

@ -1,8 +1,9 @@
// TODO: move to `src/@types/`
import type Pokemon from "#app/field/pokemon";
import type { FormChangeItem } from "#enums/form-change-item";
import type { HeldItemCategoryId, HeldItemId } from "#enums/held-item-id";
import type { RewardTier } from "#enums/reward-tier";
import type { Pokemon } from "#field/pokemon";
export type HeldItemData = {
stack: number;

View File

@ -1,13 +1,12 @@
import { allHeldItems } from "#app/data/data-lists";
import type Pokemon from "#app/field/pokemon";
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
import { coerceArray, getEnumValues, isNullOrUndefined, pickWeightedIndex, randSeedInt } from "#app/utils/common";
import { allHeldItems } from "#data/data-lists";
import { BerryType } from "#enums/berry-type";
import { HeldItemCategoryId, HeldItemId, HeldItemNames, isCategoryId } from "#enums/held-item-id";
import { HeldItemPoolType } from "#enums/modifier-pool-type";
import type { PokemonType } from "#enums/pokemon-type";
import { RewardTier } from "#enums/reward-tier";
import { PERMANENT_STATS } from "#enums/stat";
import type { EnemyPokemon, PlayerPokemon, Pokemon } from "#field/pokemon";
import { coerceArray, getEnumValues, isNullOrUndefined, pickWeightedIndex, randSeedInt } from "#utils/common";
import {
type HeldItemConfiguration,
type HeldItemPool,

View File

@ -1,7 +1,7 @@
import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs";
import type Pokemon from "#app/field/pokemon";
import { applyAbAttrs } from "#abilities/apply-ab-attrs";
import { globalScene } from "#app/global-scene";
import { type HeldItemId, HeldItemNames } from "#enums/held-item-id";
import type { Pokemon } from "#field/pokemon";
import i18next from "i18next";
// TODO: this should be moved to its own file

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id";
import type { Pokemon } from "#field/pokemon";
import type { NumberHolder } from "#utils/common";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface AccuracyBoostParams {

View File

@ -1,8 +1,8 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import { HeldItemId, HeldItemNames } from "#enums/held-item-id";
import { PokemonType } from "#enums/pokemon-type";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
import type { NumberHolder } from "#utils/common";
import i18next from "i18next";
export interface AttackTypeBoostParams {

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon";
import { HeldItemId } from "#enums/held-item-id";
import { getStatKey, type PermanentStat, Stat } from "#enums/stat";
import type { Pokemon } from "#field/pokemon";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,5 +1,5 @@
import type Pokemon from "#app/field/pokemon";
import { Stat } from "#enums/stat";
import type { Pokemon } from "#field/pokemon";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,5 +1,5 @@
import type Pokemon from "#app/field/pokemon";
import type { HeldItemId } from "#enums/held-item-id";
import type { Pokemon } from "#field/pokemon";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,5 +1,5 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import type { NumberHolder } from "#utils/common";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface BatonParams {

View File

@ -1,11 +1,11 @@
import { getBerryEffectDescription, getBerryEffectFunc, getBerryName, getBerryPredicate } from "#app/data/berry";
import { BerryUsedEvent } from "#app/events/battle-scene";
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { BooleanHolder } from "#app/utils/common";
import { getBerryEffectDescription, getBerryEffectFunc, getBerryName, getBerryPredicate } from "#data/berry";
import { BerryType } from "#enums/berry-type";
import { HeldItemId } from "#enums/held-item-id";
import { BerryUsedEvent } from "#events/battle-scene";
import type { Pokemon } from "#field/pokemon";
import { ConsumableHeldItem, HeldItemEffect } from "#items/held-item";
import { BooleanHolder } from "#utils/common";
import { TrainerItemEffect } from "../trainer-item";
interface BerryTypeToHeldItemMap {

View File

@ -1,9 +1,9 @@
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import type { BooleanHolder } from "#app/utils/common";
import { Command } from "#enums/command";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
import type { BooleanHolder } from "#utils/common";
import i18next from "i18next";
export interface BypassSpeedChanceParams {

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id";
import type { SpeciesId } from "#enums/species-id";
import type { Pokemon } from "#field/pokemon";
import type { NumberHolder } from "#utils/common";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface CritBoostParams {

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { NumberHolder } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import { NumberHolder } from "#utils/common";
import { HeldItem, HeldItemEffect } from "../held-item";
import { TrainerItemEffect } from "../trainer-item";

View File

@ -1,8 +1,8 @@
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { HeldItemId } from "#enums/held-item-id";
import type { SpeciesId } from "#enums/species-id";
import { TrainerItemId } from "#enums/trainer-item-id";
import type { Pokemon } from "#field/pokemon";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id";
import type { Pokemon } from "#field/pokemon";
import type { NumberHolder } from "#utils/common";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
import type { NumberHolder } from "#utils/common";
export interface FieldEffectParams {
pokemon: Pokemon;

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon";
import type { BooleanHolder } from "#app/utils/common";
import type { HeldItemId } from "#enums/held-item-id";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
import type { BooleanHolder } from "#utils/common";
export interface FlinchChanceParams {
/** The pokemon with the item */

View File

@ -1,5 +1,5 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import type { NumberHolder } from "#utils/common";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,9 +1,9 @@
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
import { toDmgValue } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
import { PokemonHealPhase } from "#phases/pokemon-heal-phase";
import { toDmgValue } from "#utils/common";
import i18next from "i18next";
export interface HitHealParams {
@ -36,7 +36,7 @@ export class HitHealHeldItem extends HeldItem {
const stackCount = pokemon.heldItemManager.getStack(this.type);
if (pokemon.turnData.totalDamageDealt > 0 && !pokemon.isFullHp()) {
// TODO: this shouldn't be undefined AFAIK
globalScene.unshiftPhase(
globalScene.phaseManager.unshiftPhase(
new PokemonHealPhase(
pokemon.getBattlerIndex(),
toDmgValue(pokemon.turnData.totalDamageDealt / 8) * stackCount,

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import { Stat } from "#enums/stat";
import type { Pokemon } from "#field/pokemon";
import type { NumberHolder } from "#utils/common";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,9 +1,9 @@
import { applyAbAttrs } from "#app/data/abilities/apply-ab-attrs";
import type Pokemon from "#app/field/pokemon";
import { applyAbAttrs } from "#abilities/apply-ab-attrs";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
import { toDmgValue } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import { PokemonHealPhase } from "#phases/pokemon-heal-phase";
import { toDmgValue } from "#utils/common";
import i18next from "i18next";
import { ConsumableHeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,9 +1,9 @@
import { allHeldItems } from "#app/data/data-lists";
import Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import { randSeedFloat } from "#app/utils/common";
import { allHeldItems } from "#data/data-lists";
import type { HeldItemId } from "#enums/held-item-id";
import { Pokemon } from "#field/pokemon";
import { randSeedFloat } from "#utils/common";
import i18next from "i18next";
import { HeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,8 +1,8 @@
import { allMoves } from "#app/data/data-lists";
import type Pokemon from "#app/field/pokemon";
import { isNullOrUndefined, type NumberHolder } from "#app/utils/common";
import { allMoves } from "#data/data-lists";
import type { MoveId } from "#enums/move-id";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
import { isNullOrUndefined, type NumberHolder } from "#utils/common";
import i18next from "i18next";
export interface MultiHitParams {

View File

@ -1,5 +1,5 @@
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import type { NumberHolder } from "#utils/common";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface NatureWeightBoostParams {

View File

@ -1,7 +1,7 @@
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import { BATTLE_STATS } from "#enums/stat";
import type { Pokemon } from "#field/pokemon";
import i18next from "i18next";
import { ConsumableHeldItem, HeldItemEffect } from "../held-item";

View File

@ -1,9 +1,9 @@
import { pokemonEvolutions } from "#app/data/balance/pokemon-evolutions";
import type Pokemon from "#app/field/pokemon";
import type { NumberHolder } from "#app/utils/common";
import { pokemonEvolutions } from "#balance/pokemon-evolutions";
import { HeldItemId } from "#enums/held-item-id";
import type { SpeciesId } from "#enums/species-id";
import type { Stat } from "#enums/stat";
import type { Pokemon } from "#field/pokemon";
import type { NumberHolder } from "#utils/common";
import { HeldItem, HeldItemEffect } from "../held-item";
export interface StatBoostParams {

View File

@ -1,8 +1,8 @@
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import type { BooleanHolder } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
import type { BooleanHolder } from "#utils/common";
import i18next from "i18next";
export interface SurviveChanceParams {

View File

@ -1,9 +1,9 @@
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import { PokemonHealPhase } from "#app/phases/pokemon-heal-phase";
import { toDmgValue } from "#app/utils/common";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
import { PokemonHealPhase } from "#phases/pokemon-heal-phase";
import { toDmgValue } from "#utils/common";
import i18next from "i18next";
export interface TurnEndHealParams {

View File

@ -1,6 +1,6 @@
import type Pokemon from "#app/field/pokemon";
import type { HeldItemId } from "#enums/held-item-id";
import type { StatusEffect } from "#enums/status-effect";
import type { Pokemon } from "#field/pokemon";
import { HeldItem, HeldItemEffect } from "#items/held-item";
export interface TurnEndStatusParams {

View File

@ -1,5 +1,4 @@
import { allHeldItems, allTrainerItems } from "#app/data/data-lists";
import { formChangeItemName } from "#app/data/pokemon-forms";
import { allHeldItems, allTrainerItems } from "#data/data-lists";
import type { FormChangeItem } from "#enums/form-change-item";
import type { HeldItemId } from "#enums/held-item-id";
import type { TrainerItemId } from "#enums/trainer-item-id";

View File

@ -1,4 +1,3 @@
import type ModifierData from "#app/system/modifier-data";
import type { BerryType } from "#enums/berry-type";
import { HeldItemId } from "#enums/held-item-id";
import type { PokemonType } from "#enums/pokemon-type";

View File

@ -1,6 +1,5 @@
import { allTrainerItems } from "#app/data/data-lists";
import type { TrainerItemId } from "#app/enums/trainer-item-id";
import { getTypedEntries, getTypedKeys } from "#app/utils/common";
import { allTrainerItems } from "#data/data-lists";
import type { TrainerItemId } from "#enums/trainer-item-id";
import {
isTrainerItemSpecs,
type TrainerItemConfiguration,
@ -8,6 +7,7 @@ import {
type TrainerItemSaveData,
type TrainerItemSpecs,
} from "#items/trainer-item-data-types";
import { getTypedEntries, getTypedKeys } from "#utils/common";
export class TrainerItemManager {
public trainerItems: TrainerItemDataMap;

View File

@ -1,8 +1,8 @@
import { allTrainerItems } from "#app/data/data-lists";
import { globalScene } from "#app/global-scene";
import { isNullOrUndefined, pickWeightedIndex } from "#app/utils/common";
import { allTrainerItems } from "#data/data-lists";
import { RewardTier } from "#enums/reward-tier";
import type { TrainerItemId } from "#enums/trainer-item-id";
import { isNullOrUndefined, pickWeightedIndex } from "#utils/common";
import type { TrainerItemPool, TrainerItemTieredPool } from "./trainer-item-data-types";
import type { TrainerItemManager } from "./trainer-item-manager";

View File

@ -1,13 +1,13 @@
import { getStatusEffectDescriptor, getStatusEffectHealText } from "#app/data/status-effect";
import type Pokemon from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { getPokemonNameWithAffix } from "#app/messages";
import { addTextObject, TextStyle } from "#app/ui/text";
import { type BooleanHolder, hslToHex, type NumberHolder, randSeedFloat, toDmgValue } from "#app/utils/common";
import { getStatusEffectDescriptor, getStatusEffectHealText } from "#data/status-effect";
import { BattlerTagType } from "#enums/battler-tag-type";
import { getStatKey, Stat, type TempBattleStat } from "#enums/stat";
import { StatusEffect } from "#enums/status-effect";
import { TrainerItemId, TrainerItemNames } from "#enums/trainer-item-id";
import type { Pokemon } from "#field/pokemon";
import { addTextObject, TextStyle } from "#ui/text";
import { type BooleanHolder, hslToHex, type NumberHolder, randSeedFloat, toDmgValue } from "#utils/common";
import i18next from "i18next";
import type { TrainerItemManager } from "./trainer-item-manager";

View File

@ -1,7 +1,7 @@
import type { ModifierTypeFunc } from "#app/@types/modifier-types";
import { globalScene } from "#app/global-scene";
import { type ModifierType, TrainerItemReward } from "#app/modifier/modifier-type";
import { getModifierType } from "#app/utils/modifier-utils";
import { type ModifierType, TrainerItemReward } from "#modifiers/modifier-type";
import type { ModifierTypeFunc } from "#types/modifier-types";
import { getModifierType } from "#utils/modifier-utils";
import i18next from "i18next";
import { BattlePhase } from "./battle-phase";

View File

@ -1,6 +1,6 @@
import { allHeldItems, allTrainerItems } from "#app/data/data-lists";
import type { Pokemon } from "#app/field/pokemon";
import { globalScene } from "#app/global-scene";
import { allHeldItems, allTrainerItems } from "#data/data-lists";
import type { Pokemon } from "#field/pokemon";
import { heldItemSortFunc, trainerItemSortFunc } from "#items/item-utility";
import type { TrainerItemManager } from "#items/trainer-item-manager";

View File

@ -1,5 +1,4 @@
import type { BattleScene } from "#app/battle-scene";
import { randSeedInt } from "#app/utils/common";
import * as BattleAnims from "#data/battle-anims";
import { BiomeId } from "#enums/biome-id";
import { HeldItemCategoryId, HeldItemId } from "#enums/held-item-id";
@ -27,6 +26,7 @@ import { GameManager } from "#test/testUtils/gameManager";
import { initSceneWithoutEncounterPhase } from "#test/testUtils/gameManagerUtils";
import { RewardSelectUiHandler } from "#ui/reward-select-ui-handler";
import * as Utils from "#utils/common";
import { randSeedInt } from "#utils/common";
import { getPokemonSpecies } from "#utils/pokemon-utils";
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";