diff --git a/src/battle.ts b/src/battle.ts index 1814e0a1bf8..0cf01a0873d 100644 --- a/src/battle.ts +++ b/src/battle.ts @@ -1,5 +1,5 @@ import { globalScene } from "#app/global-scene"; -import type { Command } from "./ui/command-ui-handler"; +import type { Command } from "#enums/command"; import { randomString, getEnumValues, diff --git a/src/data/abilities/ability.ts b/src/data/abilities/ability.ts index c6e75900740..6d6235b1ec2 100644 --- a/src/data/abilities/ability.ts +++ b/src/data/abilities/ability.ts @@ -44,7 +44,7 @@ import { SpeciesFormChangeWeatherTrigger, } from "#app/data/pokemon-forms"; import i18next from "i18next"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { BerryModifierType } from "#app/modifier/modifier-type"; import { getPokeballName } from "#app/data/pokeball"; import { BattleType } from "#enums/battle-type"; diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index 1e609a65b94..81ba7b19592 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -80,7 +80,7 @@ import type { BattlerIndex } from "#enums/battler-index"; import { BattleType } from "#enums/battle-type"; import { TerrainType } from "../terrain"; import { ModifierPoolType } from "#app/modifier/modifier-type"; -import { Command } from "../../ui/command-ui-handler"; +import { Command } from "#enums/command"; import i18next from "i18next"; import type { Localizable } from "#app/@types/locales"; import { getBerryEffectFunc } from "../berry"; diff --git a/src/enums/command.ts b/src/enums/command.ts new file mode 100644 index 00000000000..87c03a1b903 --- /dev/null +++ b/src/enums/command.ts @@ -0,0 +1,8 @@ + +export enum Command { + FIGHT = 0, + BALL, + POKEMON, + RUN, + TERA +} diff --git a/src/modifier/modifier.ts b/src/modifier/modifier.ts index b6f96db751a..297a67dd162 100644 --- a/src/modifier/modifier.ts +++ b/src/modifier/modifier.ts @@ -10,7 +10,7 @@ import { getPokemonNameWithAffix } from "#app/messages"; import Overrides from "#app/overrides"; import { LearnMoveType } from "#app/phases/learn-move-phase"; import type { VoucherType } from "#app/system/voucher"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { addTextObject, TextStyle } from "#app/ui/text"; import { BooleanHolder, hslToHex, isNullOrUndefined, NumberHolder, randSeedFloat, toDmgValue } from "#app/utils/common"; import { BattlerTagType } from "#enums/battler-tag-type"; diff --git a/src/phases/command-phase.ts b/src/phases/command-phase.ts index a5e47b754e7..f3fd96840fd 100644 --- a/src/phases/command-phase.ts +++ b/src/phases/command-phase.ts @@ -14,7 +14,7 @@ import { PokeballType } from "#enums/pokeball"; import type { PlayerPokemon, TurnMove } from "#app/field/pokemon"; import { FieldPosition } from "#enums/field-position"; import { getPokemonNameWithAffix } from "#app/messages"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { UiMode } from "#enums/ui-mode"; import i18next from "i18next"; import { FieldPhase } from "./field-phase"; diff --git a/src/phases/enemy-command-phase.ts b/src/phases/enemy-command-phase.ts index 3cda333ddc0..0dc41a592e0 100644 --- a/src/phases/enemy-command-phase.ts +++ b/src/phases/enemy-command-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; import { BattlerIndex } from "#enums/battler-index"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { FieldPhase } from "./field-phase"; import { AbilityId } from "#enums/ability-id"; import { BattlerTagType } from "#enums/battler-tag-type"; diff --git a/src/phases/select-target-phase.ts b/src/phases/select-target-phase.ts index 19fb72ced29..6d47ac18021 100644 --- a/src/phases/select-target-phase.ts +++ b/src/phases/select-target-phase.ts @@ -1,6 +1,6 @@ import { globalScene } from "#app/global-scene"; import type { BattlerIndex } from "#enums/battler-index"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { UiMode } from "#enums/ui-mode"; import { PokemonPhase } from "./pokemon-phase"; import i18next from "#app/plugins/i18n"; diff --git a/src/phases/switch-summon-phase.ts b/src/phases/switch-summon-phase.ts index 103af3db275..8cd106ea6b7 100644 --- a/src/phases/switch-summon-phase.ts +++ b/src/phases/switch-summon-phase.ts @@ -14,7 +14,7 @@ import { TrainerSlot } from "#enums/trainer-slot"; import type Pokemon from "#app/field/pokemon"; import { getPokemonNameWithAffix } from "#app/messages"; import { SwitchEffectTransferModifier } from "#app/modifier/modifier"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import i18next from "i18next"; import { SummonPhase } from "./summon-phase"; import { SubstituteTag } from "#app/data/battler-tags"; diff --git a/src/phases/turn-start-phase.ts b/src/phases/turn-start-phase.ts index bc31eb9dddf..f67bb7956e3 100644 --- a/src/phases/turn-start-phase.ts +++ b/src/phases/turn-start-phase.ts @@ -6,7 +6,7 @@ import { Stat } from "#app/enums/stat"; import type Pokemon from "#app/field/pokemon"; import { PokemonMove } from "#app/data/moves/pokemon-move"; import { BypassSpeedChanceModifier } from "#app/modifier/modifier"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { randSeedShuffle, BooleanHolder } from "#app/utils/common"; import { FieldPhase } from "./field-phase"; import { BattlerIndex } from "#enums/battler-index"; diff --git a/src/ui/ball-ui-handler.ts b/src/ui/ball-ui-handler.ts index bb1e8d0e85e..11fb485164a 100644 --- a/src/ui/ball-ui-handler.ts +++ b/src/ui/ball-ui-handler.ts @@ -1,6 +1,6 @@ import { getPokeballName } from "../data/pokeball"; import { addTextObject, getTextStyleOptions, TextStyle } from "./text"; -import { Command } from "./command-ui-handler"; +import { Command } from "#enums/command"; import { UiMode } from "#enums/ui-mode"; import UiHandler from "./ui-handler"; import { addWindow } from "./ui-theme"; diff --git a/src/ui/command-ui-handler.ts b/src/ui/command-ui-handler.ts index 0d38672323a..8df399b6d9b 100644 --- a/src/ui/command-ui-handler.ts +++ b/src/ui/command-ui-handler.ts @@ -11,14 +11,7 @@ import { TerastallizeAccessModifier } from "#app/modifier/modifier"; import { PokemonType } from "#enums/pokemon-type"; import { getTypeRgb } from "#app/data/type"; import { SpeciesId } from "#enums/species-id"; - -export enum Command { - FIGHT = 0, - BALL, - POKEMON, - RUN, - TERA, -} +import { Command } from "#enums/command"; export default class CommandUiHandler extends UiHandler { private commandsContainer: Phaser.GameObjects.Container; diff --git a/src/ui/fight-ui-handler.ts b/src/ui/fight-ui-handler.ts index 51120907a64..f30c7a4935c 100644 --- a/src/ui/fight-ui-handler.ts +++ b/src/ui/fight-ui-handler.ts @@ -3,7 +3,7 @@ import { globalScene } from "#app/global-scene"; import { addTextObject, TextStyle } from "./text"; import { getTypeDamageMultiplierColor } from "#app/data/type"; import { PokemonType } from "#enums/pokemon-type"; -import { Command } from "./command-ui-handler"; +import { Command } from "#enums/command"; import { UiMode } from "#enums/ui-mode"; import UiHandler from "./ui-handler"; import { getLocalizedSpriteKey, fixedInt, padInt } from "#app/utils/common"; diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index c9e23377fae..92ae2f483b5 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -3,7 +3,7 @@ import type { PokemonMove } from "#app/data/moves/pokemon-move"; import type Pokemon from "#app/field/pokemon"; import { MoveResult } from "#enums/move-result"; import { addBBCodeTextObject, addTextObject, getTextColor, TextStyle } from "#app/ui/text"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import MessageUiHandler from "#app/ui/message-ui-handler"; import { UiMode } from "#enums/ui-mode"; import { BooleanHolder, toReadableString, randInt, getLocalizedSpriteKey } from "#app/utils/common"; diff --git a/test/abilities/desolate-land.test.ts b/test/abilities/desolate-land.test.ts index bcd980187ac..90565d9caf8 100644 --- a/test/abilities/desolate-land.test.ts +++ b/test/abilities/desolate-land.test.ts @@ -1,7 +1,7 @@ import { PokeballType } from "#app/enums/pokeball"; import { WeatherType } from "#app/enums/weather-type"; import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; diff --git a/test/abilities/honey_gather.test.ts b/test/abilities/honey_gather.test.ts index a069654ae21..06d351b2a61 100644 --- a/test/abilities/honey_gather.test.ts +++ b/test/abilities/honey_gather.test.ts @@ -1,5 +1,5 @@ import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { AbilityId } from "#enums/ability-id"; import { MoveId } from "#enums/move-id"; import { SpeciesId } from "#enums/species-id"; diff --git a/test/abilities/neutralizing_gas.test.ts b/test/abilities/neutralizing_gas.test.ts index 59dfa05af51..067d164e835 100644 --- a/test/abilities/neutralizing_gas.test.ts +++ b/test/abilities/neutralizing_gas.test.ts @@ -1,6 +1,6 @@ import { BattlerIndex } from "#enums/battler-index"; import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { PostSummonWeatherChangeAbAttr } from "#app/data/abilities/ability"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; diff --git a/test/abilities/speed_boost.test.ts b/test/abilities/speed_boost.test.ts index 245bf22345d..a4445d085f3 100644 --- a/test/abilities/speed_boost.test.ts +++ b/test/abilities/speed_boost.test.ts @@ -6,7 +6,7 @@ import GameManager from "#test/testUtils/gameManager"; import Phaser from "phaser"; import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest"; import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { AttemptRunPhase } from "#app/phases/attempt-run-phase"; describe("Abilities - Speed Boost", () => { diff --git a/test/escape-calculations.test.ts b/test/escape-calculations.test.ts index fd1e411e786..ca51f40a509 100644 --- a/test/escape-calculations.test.ts +++ b/test/escape-calculations.test.ts @@ -1,6 +1,6 @@ import { AttemptRunPhase } from "#app/phases/attempt-run-phase"; import type { CommandPhase } from "#app/phases/command-phase"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { NumberHolder } from "#app/utils/common"; import { AbilityId } from "#enums/ability-id"; import { SpeciesId } from "#enums/species-id"; diff --git a/test/moves/substitute.test.ts b/test/moves/substitute.test.ts index 6cfa45f09e8..857f20c7fa0 100644 --- a/test/moves/substitute.test.ts +++ b/test/moves/substitute.test.ts @@ -6,7 +6,7 @@ import { allMoves } from "#app/data/data-lists"; import { MoveResult } from "#enums/move-result"; import type { CommandPhase } from "#app/phases/command-phase"; import GameManager from "#test/testUtils/gameManager"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { UiMode } from "#enums/ui-mode"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; diff --git a/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts b/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts index 4eaf2cef1da..e31a3a5cc3c 100644 --- a/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts +++ b/test/mystery-encounter/encounters/fun-and-games-encounter.test.ts @@ -22,7 +22,7 @@ import { CommandPhase } from "#app/phases/command-phase"; import { SelectModifierPhase } from "#app/phases/select-modifier-phase"; import { FunAndGamesEncounter } from "#app/data/mystery-encounters/encounters/fun-and-games-encounter"; import { MoveId } from "#enums/move-id"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import * as EncounterPhaseUtils from "#app/data/mystery-encounters/utils/encounter-phase-utils"; const namespace = "mysteryEncounters/funAndGames"; diff --git a/test/testUtils/helpers/moveHelper.ts b/test/testUtils/helpers/moveHelper.ts index 1bb2aff27e2..b0a74e76bdb 100644 --- a/test/testUtils/helpers/moveHelper.ts +++ b/test/testUtils/helpers/moveHelper.ts @@ -6,7 +6,7 @@ import Overrides from "#app/overrides"; import type { CommandPhase } from "#app/phases/command-phase"; import type { EnemyCommandPhase } from "#app/phases/enemy-command-phase"; import { MoveEffectPhase } from "#app/phases/move-effect-phase"; -import { Command } from "#app/ui/command-ui-handler"; +import { Command } from "#enums/command"; import { MoveId } from "#enums/move-id"; import { UiMode } from "#enums/ui-mode"; import { getMovePosition } from "#test/testUtils/gameManagerUtils";