diff --git a/src/data/challenge.ts b/src/data/challenge.ts index 91faf08ab06..91ec35739bb 100644 --- a/src/data/challenge.ts +++ b/src/data/challenge.ts @@ -25,93 +25,12 @@ import { ModifierTier } from "#app/modifier/modifier-tier"; import { globalScene } from "#app/global-scene"; import { pokemonFormChanges } from "./pokemon-forms"; import { pokemonEvolutions } from "./balance/pokemon-evolutions"; +import { ChallengeType } from "#enums/challenge-type"; +import type { MoveSourceType } from "#enums/move-source-type"; /** A constant for the default max cost of the starting party before a run */ const DEFAULT_PARTY_MAX_COST = 10; -/** - * An enum for all the challenge types. The parameter entries on these describe the - * parameters to use when calling the applyChallenges function. - */ -export enum ChallengeType { - /** - * Challenges which modify what starters you can choose - * @see {@link Challenge.applyStarterChoice} - */ - STARTER_CHOICE, - /** - * Challenges which modify how many starter points you have - * @see {@link Challenge.applyStarterPoints} - */ - STARTER_POINTS, - /** - * Challenges which modify how many starter points you have - * @see {@link Challenge.applyStarterPointCost} - */ - STARTER_COST, - /** - * Challenges which modify your starters in some way - * @see {@link Challenge.applyStarterModify} - */ - STARTER_MODIFY, - /** - * Challenges which limit which pokemon you can have in battle. - * @see {@link Challenge.applyPokemonInBattle} - */ - POKEMON_IN_BATTLE, - /** - * Adds or modifies the fixed battles in a run - * @see {@link Challenge.applyFixedBattle} - */ - FIXED_BATTLES, - /** - * Modifies the effectiveness of Type matchups in battle - * @see {@linkcode Challenge.applyTypeEffectiveness} - */ - TYPE_EFFECTIVENESS, - /** - * Modifies what level the AI pokemon are. UNIMPLEMENTED. - */ - AI_LEVEL, - /** - * Modifies how many move slots the AI has. UNIMPLEMENTED. - */ - AI_MOVE_SLOTS, - /** - * Modifies if a pokemon has its passive. UNIMPLEMENTED. - */ - PASSIVE_ACCESS, - /** - * Modifies the game mode settings in some way. UNIMPLEMENTED. - */ - GAME_MODE_MODIFY, - /** - * Modifies what level AI pokemon can access a move. UNIMPLEMENTED. - */ - MOVE_ACCESS, - /** - * Modifies what weight AI pokemon have when generating movesets. UNIMPLEMENTED. - */ - MOVE_WEIGHT, - /** - * Modifies what the pokemon stats for Flip Stat Mode. - */ - FLIP_STAT, -} - -/** - * Used for challenge types that modify movesets, these denote the various sources of moves for pokemon. - */ -export enum MoveSourceType { - LEVEL_UP, // Currently unimplemented for move access - RELEARNER, // Relearner moves currently unimplemented - COMMON_TM, - GREAT_TM, - ULTRA_TM, - COMMON_EGG, - RARE_EGG, -} - /** * A challenge object. Exists only to serve as a base class. */ diff --git a/src/data/moves/move.ts b/src/data/moves/move.ts index dd9c48a9d35..cb3c789f53a 100644 --- a/src/data/moves/move.ts +++ b/src/data/moves/move.ts @@ -109,7 +109,8 @@ import { SwitchPhase } from "#app/phases/switch-phase"; import { SwitchSummonPhase } from "#app/phases/switch-summon-phase"; import { SpeciesFormChangeRevertWeatherFormTrigger } from "../pokemon-forms"; import type { GameMode } from "#app/game-mode"; -import { applyChallenges, ChallengeType } from "../challenge"; +import { applyChallenges } from "../challenge"; +import { ChallengeType } from "#enums/challenge-type"; import { SwitchType } from "#enums/switch-type"; import { StatusEffect } from "#enums/status-effect"; import { globalScene } from "#app/global-scene"; diff --git a/src/enums/ai-type.ts b/src/enums/ai-type.ts index a050d6f5cef..13931172a4a 100644 --- a/src/enums/ai-type.ts +++ b/src/enums/ai-type.ts @@ -1,4 +1,3 @@ - export enum AiType { RANDOM, SMART_RANDOM, diff --git a/src/enums/arena-tag-side.ts b/src/enums/arena-tag-side.ts index e5e76e4c7b4..3e326ce158a 100644 --- a/src/enums/arena-tag-side.ts +++ b/src/enums/arena-tag-side.ts @@ -1,4 +1,3 @@ - export enum ArenaTagSide { BOTH, PLAYER, diff --git a/src/enums/battler-index.ts b/src/enums/battler-index.ts index e98028e3f6b..32b1684c86c 100644 --- a/src/enums/battler-index.ts +++ b/src/enums/battler-index.ts @@ -1,4 +1,3 @@ - export enum BattlerIndex { ATTACKER = -1, PLAYER, diff --git a/src/enums/challenge-type.ts b/src/enums/challenge-type.ts new file mode 100644 index 00000000000..d9b1fce3e6e --- /dev/null +++ b/src/enums/challenge-type.ts @@ -0,0 +1,69 @@ +/** + * An enum for all the challenge types. The parameter entries on these describe the + * parameters to use when calling the applyChallenges function. + */ +export enum ChallengeType { + /** + * Challenges which modify what starters you can choose + * @see {@link Challenge.applyStarterChoice} + */ + STARTER_CHOICE, + /** + * Challenges which modify how many starter points you have + * @see {@link Challenge.applyStarterPoints} + */ + STARTER_POINTS, + /** + * Challenges which modify how many starter points you have + * @see {@link Challenge.applyStarterPointCost} + */ + STARTER_COST, + /** + * Challenges which modify your starters in some way + * @see {@link Challenge.applyStarterModify} + */ + STARTER_MODIFY, + /** + * Challenges which limit which pokemon you can have in battle. + * @see {@link Challenge.applyPokemonInBattle} + */ + POKEMON_IN_BATTLE, + /** + * Adds or modifies the fixed battles in a run + * @see {@link Challenge.applyFixedBattle} + */ + FIXED_BATTLES, + /** + * Modifies the effectiveness of Type matchups in battle + * @see {@linkcode Challenge.applyTypeEffectiveness} + */ + TYPE_EFFECTIVENESS, + /** + * Modifies what level the AI pokemon are. UNIMPLEMENTED. + */ + AI_LEVEL, + /** + * Modifies how many move slots the AI has. UNIMPLEMENTED. + */ + AI_MOVE_SLOTS, + /** + * Modifies if a pokemon has its passive. UNIMPLEMENTED. + */ + PASSIVE_ACCESS, + /** + * Modifies the game mode settings in some way. UNIMPLEMENTED. + */ + GAME_MODE_MODIFY, + /** + * Modifies what level AI pokemon can access a move. UNIMPLEMENTED. + */ + MOVE_ACCESS, + /** + * Modifies what weight AI pokemon have when generating movesets. UNIMPLEMENTED. + */ + MOVE_WEIGHT, + /** + * Modifies what the pokemon stats for Flip Stat Mode. + */ + FLIP_STAT +} diff --git a/src/enums/command.ts b/src/enums/command.ts index 87c03a1b903..4cd626bb066 100644 --- a/src/enums/command.ts +++ b/src/enums/command.ts @@ -1,4 +1,3 @@ - export enum Command { FIGHT = 0, BALL, diff --git a/src/enums/learn-move-situation.ts b/src/enums/learn-move-situation.ts index f4000b9f100..9b329d0f3de 100644 --- a/src/enums/learn-move-situation.ts +++ b/src/enums/learn-move-situation.ts @@ -1,4 +1,3 @@ - export enum LearnMoveSituation { MISC, LEVEL_UP, diff --git a/src/enums/move-source-type.ts b/src/enums/move-source-type.ts new file mode 100644 index 00000000000..d9afb07e7f7 --- /dev/null +++ b/src/enums/move-source-type.ts @@ -0,0 +1,12 @@ +/** + * Used for challenge types that modify movesets, these denote the various sources of moves for pokemon. + */ +export enum MoveSourceType { + LEVEL_UP,// Currently unimplemented for move access + RELEARNER,// Relearner moves currently unimplemented + COMMON_TM, + GREAT_TM, + ULTRA_TM, + COMMON_EGG, + RARE_EGG +} diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 152658a6751..8e5d1cca2b1 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -221,7 +221,8 @@ import Overrides from "#app/overrides"; import i18next from "i18next"; import { speciesEggMoves } from "#app/data/balance/egg-moves"; import { ModifierTier } from "#app/modifier/modifier-tier"; -import { applyChallenges, ChallengeType } from "#app/data/challenge"; +import { applyChallenges } from "#app/data/challenge"; +import { ChallengeType } from "#enums/challenge-type"; import { AbilityId } from "#enums/ability-id"; import { ArenaTagType } from "#enums/arena-tag-type"; import { BattleSpec } from "#enums/battle-spec"; diff --git a/src/game-mode.ts b/src/game-mode.ts index 84aa0a898fa..a6fc8195175 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -2,7 +2,8 @@ import i18next from "i18next"; import type { FixedBattleConfigs } from "./battle"; import { classicFixedBattles, FixedBattleConfig } from "./battle"; import type { Challenge } from "./data/challenge"; -import { allChallenges, applyChallenges, ChallengeType, copyChallenge } from "./data/challenge"; +import { allChallenges, applyChallenges, copyChallenge } from "./data/challenge"; +import { ChallengeType } from "#enums/challenge-type"; import type PokemonSpecies from "./data/pokemon-species"; import { allSpecies } from "./data/pokemon-species"; import type { Arena } from "./field/arena"; diff --git a/src/phases/select-starter-phase.ts b/src/phases/select-starter-phase.ts index 88d4fe06a9b..0c180a6a248 100644 --- a/src/phases/select-starter-phase.ts +++ b/src/phases/select-starter-phase.ts @@ -1,5 +1,6 @@ import { globalScene } from "#app/global-scene"; -import { applyChallenges, ChallengeType } from "#app/data/challenge"; +import { applyChallenges } from "#app/data/challenge"; +import { ChallengeType } from "#enums/challenge-type"; import { Gender } from "#app/data/gender"; import { SpeciesFormChangeMoveLearnedTrigger } from "#app/data/pokemon-forms"; import { getPokemonSpecies } from "#app/data/pokemon-species"; diff --git a/src/system/game-data.ts b/src/system/game-data.ts index afe658b0d86..48d76223e96 100644 --- a/src/system/game-data.ts +++ b/src/system/game-data.ts @@ -47,7 +47,8 @@ import { GameDataType } from "#enums/game-data-type"; import type { MoveId } from "#enums/move-id"; import { PlayerGender } from "#enums/player-gender"; import { SpeciesId } from "#enums/species-id"; -import { applyChallenges, ChallengeType } from "#app/data/challenge"; +import { applyChallenges } from "#app/data/challenge"; +import { ChallengeType } from "#enums/challenge-type"; import { WeatherType } from "#enums/weather-type"; import { TerrainType } from "#app/data/terrain"; import { RUN_HISTORY_LIMIT } from "#app/ui/run-history-ui-handler"; diff --git a/src/ui/party-ui-handler.ts b/src/ui/party-ui-handler.ts index 5acf44a6f47..990dd342225 100644 --- a/src/ui/party-ui-handler.ts +++ b/src/ui/party-ui-handler.ts @@ -23,7 +23,8 @@ import { SpeciesFormChangeItemTrigger } from "#app/data/pokemon-forms"; import { FormChangeItem } from "#enums/form-change-item"; import { getVariantTint } from "#app/sprites/variant"; import { Button } from "#enums/buttons"; -import { applyChallenges, ChallengeType } from "#app/data/challenge"; +import { applyChallenges } from "#app/data/challenge"; +import { ChallengeType } from "#enums/challenge-type"; import MoveInfoOverlay from "#app/ui/move-info-overlay"; import i18next from "i18next"; import type BBCodeText from "phaser3-rex-plugins/plugins/bbcodetext"; diff --git a/src/ui/starter-select-ui-handler.ts b/src/ui/starter-select-ui-handler.ts index 7cc703f83e1..3f7fb98cefa 100644 --- a/src/ui/starter-select-ui-handler.ts +++ b/src/ui/starter-select-ui-handler.ts @@ -38,7 +38,8 @@ import { Egg } from "#app/data/egg"; import Overrides from "#app/overrides"; import { SettingKeyboard } from "#app/system/settings/settings-keyboard"; import { Passive as PassiveAttr } from "#enums/passive"; -import { applyChallenges, ChallengeType } from "#app/data/challenge"; +import { applyChallenges } from "#app/data/challenge"; +import { ChallengeType } from "#enums/challenge-type"; import MoveInfoOverlay from "#app/ui/move-info-overlay"; import { getEggTierForSpecies } from "#app/data/egg"; import { Device } from "#enums/devices";