mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 15:32:18 +02:00
Move game-mode to its own file
Reduces circular imports to 325
This commit is contained in:
parent
b1c50dd69f
commit
c4225e8851
@ -80,7 +80,8 @@ import type { FixedBattleConfig } from "#app/battle";
|
|||||||
import Battle from "#app/battle";
|
import Battle from "#app/battle";
|
||||||
import { BattleType } from "#enums/battle-type";
|
import { BattleType } from "#enums/battle-type";
|
||||||
import type { GameMode } from "#app/game-mode";
|
import type { GameMode } from "#app/game-mode";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import FieldSpritePipeline from "#app/pipelines/field-sprite";
|
import FieldSpritePipeline from "#app/pipelines/field-sprite";
|
||||||
import SpritePipeline from "#app/pipelines/sprite";
|
import SpritePipeline from "#app/pipelines/sprite";
|
||||||
import PartyExpBar from "#app/ui/party-exp-bar";
|
import PartyExpBar from "#app/ui/party-exp-bar";
|
||||||
|
@ -24,7 +24,7 @@ import type { BattlerIndex } from "#app/battle";
|
|||||||
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
import { MysteryEncounterTier } from "#enums/mystery-encounter-tier";
|
||||||
import { MysteryEncounterMode } from "#enums/mystery-encounter-mode";
|
import { MysteryEncounterMode } from "#enums/mystery-encounter-mode";
|
||||||
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
import { MysteryEncounterOptionMode } from "#enums/mystery-encounter-option-mode";
|
||||||
import type { GameModes } from "#app/game-mode";
|
import type { GameModes } from "#enums/game-modes";
|
||||||
import type { EncounterAnim } from "#enums/encounter-anims";
|
import type { EncounterAnim } from "#enums/encounter-anims";
|
||||||
import type { Challenges } from "#enums/challenges";
|
import type { Challenges } from "#enums/challenges";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { startingWave } from "#app/starting-wave";
|
import { startingWave } from "#app/starting-wave";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { PartyMemberStrength } from "#enums/party-member-strength";
|
import { PartyMemberStrength } from "#enums/party-member-strength";
|
||||||
import { GameModes } from "#app/game-mode";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
import { ClassicFixedBossWaves } from "#enums/fixed-boss-waves";
|
||||||
|
|
||||||
export class TrainerPartyTemplate {
|
export class TrainerPartyTemplate {
|
||||||
|
8
src/enums/game-modes.ts
Normal file
8
src/enums/game-modes.ts
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
export enum GameModes {
|
||||||
|
CLASSIC,
|
||||||
|
ENDLESS,
|
||||||
|
SPLICED_ENDLESS,
|
||||||
|
DAILY,
|
||||||
|
CHALLENGE
|
||||||
|
}
|
@ -14,14 +14,7 @@ import { Challenges } from "./enums/challenges";
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { getDailyStartingBiome } from "./data/daily-run";
|
import { getDailyStartingBiome } from "./data/daily-run";
|
||||||
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES, CHALLENGE_MODE_MYSTERY_ENCOUNTER_WAVES } from "./constants";
|
import { CLASSIC_MODE_MYSTERY_ENCOUNTER_WAVES, CHALLENGE_MODE_MYSTERY_ENCOUNTER_WAVES } from "./constants";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
export enum GameModes {
|
|
||||||
CLASSIC,
|
|
||||||
ENDLESS,
|
|
||||||
SPLICED_ENDLESS,
|
|
||||||
DAILY,
|
|
||||||
CHALLENGE,
|
|
||||||
}
|
|
||||||
|
|
||||||
interface GameModeConfig {
|
interface GameModeConfig {
|
||||||
isClassic?: boolean;
|
isClassic?: boolean;
|
||||||
|
@ -3,7 +3,8 @@ import { BattleType } from "#enums/battle-type";
|
|||||||
import { fetchDailyRunSeed, getDailyRunStarters } from "#app/data/daily-run";
|
import { fetchDailyRunSeed, getDailyRunStarters } from "#app/data/daily-run";
|
||||||
import { Gender } from "#app/data/gender";
|
import { Gender } from "#app/data/gender";
|
||||||
import { getBiomeKey } from "#app/field/arena";
|
import { getBiomeKey } from "#app/field/arena";
|
||||||
import { GameMode, GameModes, getGameMode } from "#app/game-mode";
|
import { GameMode, getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import type { Modifier } from "#app/modifier/modifier";
|
import type { Modifier } from "#app/modifier/modifier";
|
||||||
import {
|
import {
|
||||||
getDailyRunStarterModifiers,
|
getDailyRunStarterModifiers,
|
||||||
|
@ -14,7 +14,8 @@ import PokemonData from "#app/system/pokemon-data";
|
|||||||
import PersistentModifierData from "#app/system/modifier-data";
|
import PersistentModifierData from "#app/system/modifier-data";
|
||||||
import ArenaData from "#app/system/arena-data";
|
import ArenaData from "#app/system/arena-data";
|
||||||
import { Unlockables } from "#app/system/unlockables";
|
import { Unlockables } from "#app/system/unlockables";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { BattleType } from "#enums/battle-type";
|
import { BattleType } from "#enums/battle-type";
|
||||||
import TrainerData from "#app/system/trainer-data";
|
import TrainerData from "#app/system/trainer-data";
|
||||||
import { trainerConfigs } from "#app/data/trainers/trainer-config";
|
import { trainerConfigs } from "#app/data/trainers/trainer-config";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import i18next from "i18next";
|
import i18next from "i18next";
|
||||||
import { GameMode, GameModes } from "../game-mode";
|
import { GameMode } from "../game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
|
|
||||||
export enum Unlockables {
|
export enum Unlockables {
|
||||||
ENDLESS_MODE,
|
ENDLESS_MODE,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { GameModes } from "../game-mode";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { TextStyle, addTextObject } from "./text";
|
import { TextStyle, addTextObject } from "./text";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
import { addWindow } from "./ui-theme";
|
import { addWindow } from "./ui-theme";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { GameModes } from "../game-mode";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import UiHandler from "./ui-handler";
|
import UiHandler from "./ui-handler";
|
||||||
import type { SessionSaveData } from "../system/game-data";
|
import type { SessionSaveData } from "../system/game-data";
|
||||||
import { TextStyle, addTextObject, addBBCodeTextObject, getTextColor } from "./text";
|
import { TextStyle, addTextObject, addBBCodeTextObject, getTextColor } from "./text";
|
||||||
|
@ -22,7 +22,7 @@ import type PokemonSpecies from "#app/data/pokemon-species";
|
|||||||
import { allSpecies, getPokemonSpeciesForm, getPokerusStarters } from "#app/data/pokemon-species";
|
import { allSpecies, getPokemonSpeciesForm, getPokerusStarters } from "#app/data/pokemon-species";
|
||||||
import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters";
|
import { getStarterValueFriendshipCap, speciesStarterCosts, POKERUS_STARTER_COUNT } from "#app/data/balance/starters";
|
||||||
import { PokemonType } from "#enums/pokemon-type";
|
import { PokemonType } from "#enums/pokemon-type";
|
||||||
import { GameModes } from "#app/game-mode";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import type { DexAttrProps, StarterMoveset, StarterAttributes, StarterPreferences } from "#app/system/game-data";
|
import type { DexAttrProps, StarterMoveset, StarterAttributes, StarterPreferences } from "#app/system/game-data";
|
||||||
import type { DexEntry } from "#app/@types/dex-data";
|
import type { DexEntry } from "#app/@types/dex-data";
|
||||||
import { AbilityAttr, DexAttr, loadStarterPreferences, saveStarterPreferences } from "#app/system/game-data";
|
import { AbilityAttr, DexAttr, loadStarterPreferences, saveStarterPreferences } from "#app/system/game-data";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { allSpecies } from "#app/data/pokemon-species";
|
import { allSpecies } from "#app/data/pokemon-species";
|
||||||
import { Stat } from "#enums/stat";
|
import { Stat } from "#enums/stat";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { BattleEndPhase } from "#app/phases/battle-end-phase";
|
import { BattleEndPhase } from "#app/phases/battle-end-phase";
|
||||||
import { CommandPhase } from "#app/phases/command-phase";
|
import { CommandPhase } from "#app/phases/command-phase";
|
||||||
import { DamageAnimPhase } from "#app/phases/damage-anim-phase";
|
import { DamageAnimPhase } from "#app/phases/damage-anim-phase";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { Status } from "#app/data/status-effect";
|
import { Status } from "#app/data/status-effect";
|
||||||
import { AbilityId } from "#enums/ability-id";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { BattleEndPhase } from "#app/phases/battle-end-phase";
|
import { BattleEndPhase } from "#app/phases/battle-end-phase";
|
||||||
import { TurnInitPhase } from "#app/phases/turn-init-phase";
|
import { TurnInitPhase } from "#app/phases/turn-init-phase";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { BiomeId } from "#enums/biome-id";
|
import { BiomeId } from "#enums/biome-id";
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
import { GameModes } from "#app/game-mode";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it } from "vitest";
|
||||||
import GameManager from "#test/testUtils/gameManager";
|
import GameManager from "#test/testUtils/gameManager";
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { GameModes } from "#app/game-mode";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { TurnHeldItemTransferModifier } from "#app/modifier/modifier";
|
import { TurnHeldItemTransferModifier } from "#app/modifier/modifier";
|
||||||
import { AbilityId } from "#enums/ability-id";
|
import { AbilityId } from "#enums/ability-id";
|
||||||
import { BiomeId } from "#enums/biome-id";
|
import { BiomeId } from "#enums/biome-id";
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
import type { GameMode } from "#app/game-mode";
|
import type { GameMode } from "#app/game-mode";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
|
||||||
import * as Utils from "#app/utils/common";
|
import * as Utils from "#app/utils/common";
|
||||||
import GameManager from "#test/testUtils/gameManager";
|
import GameManager from "#test/testUtils/gameManager";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { GameModes } from "#app/game-mode";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { pokerogueApi } from "#app/plugins/api/pokerogue-api";
|
import { pokerogueApi } from "#app/plugins/api/pokerogue-api";
|
||||||
import type OptionSelectUiHandler from "#app/ui/settings/option-select-ui-handler";
|
import type OptionSelectUiHandler from "#app/ui/settings/option-select-ui-handler";
|
||||||
import { UiMode } from "#enums/ui-mode";
|
import { UiMode } from "#enums/ui-mode";
|
||||||
|
@ -3,7 +3,8 @@ import { BattlerIndex } from "#app/battle";
|
|||||||
import BattleScene from "#app/battle-scene";
|
import BattleScene from "#app/battle-scene";
|
||||||
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
|
import type { EnemyPokemon, PlayerPokemon } from "#app/field/pokemon";
|
||||||
import Trainer from "#app/field/trainer";
|
import Trainer from "#app/field/trainer";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { ModifierTypeOption, modifierTypes } from "#app/modifier/modifier-type";
|
import { ModifierTypeOption, modifierTypes } from "#app/modifier/modifier-type";
|
||||||
import overrides from "#app/overrides";
|
import overrides from "#app/overrides";
|
||||||
|
@ -5,7 +5,8 @@ import { getDailyRunStarters } from "#app/data/daily-run";
|
|||||||
import { Gender } from "#app/data/gender";
|
import { Gender } from "#app/data/gender";
|
||||||
import { getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-species";
|
import { getPokemonSpecies, getPokemonSpeciesForm } from "#app/data/pokemon-species";
|
||||||
import { PlayerPokemon } from "#app/field/pokemon";
|
import { PlayerPokemon } from "#app/field/pokemon";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import type { StarterMoveset } from "#app/system/game-data";
|
import type { StarterMoveset } from "#app/system/game-data";
|
||||||
import type { Starter } from "#app/ui/starter-select-ui-handler";
|
import type { Starter } from "#app/ui/starter-select-ui-handler";
|
||||||
import { MoveId } from "#enums/move-id";
|
import { MoveId } from "#enums/move-id";
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import { BattleStyle } from "#app/enums/battle-style";
|
import { BattleStyle } from "#app/enums/battle-style";
|
||||||
import type { SpeciesId } from "#enums/species-id";
|
import type { SpeciesId } from "#enums/species-id";
|
||||||
import { GameModes, getGameMode } from "#app/game-mode";
|
import { getGameMode } from "#app/game-mode";
|
||||||
|
import { GameModes } from "#enums/game-modes";
|
||||||
import overrides from "#app/overrides";
|
import overrides from "#app/overrides";
|
||||||
import { CommandPhase } from "#app/phases/command-phase";
|
import { CommandPhase } from "#app/phases/command-phase";
|
||||||
import { EncounterPhase } from "#app/phases/encounter-phase";
|
import { EncounterPhase } from "#app/phases/encounter-phase";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Gender } from "#app/data/gender";
|
import { Gender } from "#app/data/gender";
|
||||||
import { Nature } from "#enums/nature";
|
import { Nature } from "#enums/nature";
|
||||||
import { allSpecies } from "#app/data/pokemon-species";
|
import { allSpecies } from "#app/data/pokemon-species";
|
||||||
import { GameModes } from "#app/game-mode";
|
import { GameModes } from "#enums/game-modes";
|
||||||
import { EncounterPhase } from "#app/phases/encounter-phase";
|
import { EncounterPhase } from "#app/phases/encounter-phase";
|
||||||
import { SelectStarterPhase } from "#app/phases/select-starter-phase";
|
import { SelectStarterPhase } from "#app/phases/select-starter-phase";
|
||||||
import type { TitlePhase } from "#app/phases/title-phase";
|
import type { TitlePhase } from "#app/phases/title-phase";
|
||||||
|
Loading…
Reference in New Issue
Block a user