mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Move enums out of challenges
This commit is contained in:
parent
cad742f0a8
commit
befbfeef6d
@ -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.
|
||||
*/
|
||||
|
@ -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";
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
export enum AiType {
|
||||
RANDOM,
|
||||
SMART_RANDOM,
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
export enum ArenaTagSide {
|
||||
BOTH,
|
||||
PLAYER,
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
export enum BattlerIndex {
|
||||
ATTACKER = -1,
|
||||
PLAYER,
|
||||
|
69
src/enums/challenge-type.ts
Normal file
69
src/enums/challenge-type.ts
Normal file
@ -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
|
||||
}
|
@ -1,4 +1,3 @@
|
||||
|
||||
export enum Command {
|
||||
FIGHT = 0,
|
||||
BALL,
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
export enum LearnMoveSituation {
|
||||
MISC,
|
||||
LEVEL_UP,
|
||||
|
12
src/enums/move-source-type.ts
Normal file
12
src/enums/move-source-type.ts
Normal file
@ -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
|
||||
}
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user