mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Move command to own file
This commit is contained in:
parent
98b72b8795
commit
2745a1b9d5
@ -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,
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
8
src/enums/command.ts
Normal file
8
src/enums/command.ts
Normal file
@ -0,0 +1,8 @@
|
||||
|
||||
export enum Command {
|
||||
FIGHT = 0,
|
||||
BALL,
|
||||
POKEMON,
|
||||
RUN,
|
||||
TERA
|
||||
}
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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", () => {
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user