diff --git a/src/battle-scene.ts b/src/battle-scene.ts index 6b54505b6..4253a1805 100644 --- a/src/battle-scene.ts +++ b/src/battle-scene.ts @@ -60,25 +60,10 @@ import { SceneBase } from './scene-base'; import CandyBar from './ui/candy-bar'; import { Variant, variantData } from './data/variant'; import { Localizable } from './plugins/i18n'; +import { STARTING_WAVE_OVERRIDE, OPP_SPECIES_OVERRIDE, SEED_OVERRIDE, STARTING_BIOME_OVERRIDE } from './overrides'; export const bypassLogin = import.meta.env.VITE_BYPASS_LOGIN === "1"; -export const SEED_OVERRIDE = ''; -export const STARTER_SPECIES_OVERRIDE = 0; -export const STARTER_FORM_OVERRIDE = 0; -export const STARTING_LEVEL_OVERRIDE = 0; -export const STARTING_WAVE_OVERRIDE = 0; -export const STARTING_BIOME_OVERRIDE = Biome.TOWN; -export const STARTING_MONEY_OVERRIDE = 0; - -export const ABILITY_OVERRIDE = Abilities.NONE; -export const MOVE_OVERRIDE = Moves.NONE; -export const OPP_SPECIES_OVERRIDE = 0; -export const OPP_ABILITY_OVERRIDE = Abilities.NONE; -export const OPP_MOVE_OVERRIDE = Moves.NONE; -export const OPP_SHINY_OVERRIDE = false; -export const OPP_VARIANT_OVERRIDE = 0; - const DEBUG_RNG = false; export const startingWave = STARTING_WAVE_OVERRIDE || 1; diff --git a/src/field/arena.ts b/src/field/arena.ts index 910d998d6..5b14560d4 100644 --- a/src/field/arena.ts +++ b/src/field/arena.ts @@ -18,8 +18,7 @@ import { TimeOfDay } from "../data/enums/time-of-day"; import { Terrain, TerrainType } from "../data/terrain"; import { PostTerrainChangeAbAttr, PostWeatherChangeAbAttr, applyPostTerrainChangeAbAttrs, applyPostWeatherChangeAbAttrs } from "../data/ability"; import Pokemon from "./pokemon"; - -const WEATHER_OVERRIDE = WeatherType.NONE; +import { WEATHER_OVERRIDE } from '../overrides'; export class Arena { public scene: BattleScene; diff --git a/src/field/pokemon.ts b/src/field/pokemon.ts index 4e20bad40..44573542f 100644 --- a/src/field/pokemon.ts +++ b/src/field/pokemon.ts @@ -1,5 +1,5 @@ import Phaser from 'phaser'; -import BattleScene, { ABILITY_OVERRIDE, AnySound, MOVE_OVERRIDE, OPP_ABILITY_OVERRIDE, OPP_MOVE_OVERRIDE, OPP_SHINY_OVERRIDE, OPP_VARIANT_OVERRIDE } from '../battle-scene'; +import BattleScene, { AnySound } from '../battle-scene'; import { Variant, VariantSet, variantColorCache } from '#app/data/variant'; import { variantData } from '#app/data/variant'; import BattleInfo, { PlayerBattleInfo, EnemyBattleInfo } from '../ui/battle-info'; @@ -43,6 +43,7 @@ import { Nature, getNatureStatMultiplier } from '../data/nature'; import { SpeciesFormChange, SpeciesFormChangeActiveTrigger, SpeciesFormChangeMoveLearnedTrigger, SpeciesFormChangePostMoveTrigger, SpeciesFormChangeStatusEffectTrigger } from '../data/pokemon-forms'; import { TerrainType } from '../data/terrain'; import { TrainerSlot } from '../data/trainer-config'; +import { ABILITY_OVERRIDE, MOVE_OVERRIDE, OPP_ABILITY_OVERRIDE, OPP_MOVE_OVERRIDE, OPP_SHINY_OVERRIDE, OPP_VARIANT_OVERRIDE } from '../overrides'; export enum FieldPosition { CENTER, diff --git a/src/game-mode.ts b/src/game-mode.ts index 0ac3f0503..76c97b4c9 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -1,10 +1,11 @@ import { fixedBattles } from "./battle"; -import BattleScene, { STARTING_BIOME_OVERRIDE, STARTING_LEVEL_OVERRIDE, STARTING_MONEY_OVERRIDE } from "./battle-scene"; +import BattleScene from "./battle-scene"; import { Biome } from "./data/enums/biome"; import { Species } from "./data/enums/species"; import PokemonSpecies, { allSpecies } from "./data/pokemon-species"; import { Arena } from "./field/arena"; import * as Utils from "./utils"; +import { STARTING_BIOME_OVERRIDE, STARTING_LEVEL_OVERRIDE, STARTING_MONEY_OVERRIDE } from './overrides'; export enum GameModes { CLASSIC, diff --git a/src/overrides.ts b/src/overrides.ts new file mode 100644 index 000000000..732b1a5a4 --- /dev/null +++ b/src/overrides.ts @@ -0,0 +1,23 @@ +import { Species } from './data/enums/species'; +import { Abilities } from "./data/enums/abilities"; +import { Biome } from "./data/enums/biome"; +import { Moves } from "./data/enums/moves"; +import { WeatherType } from "./data/weather"; + +export const SEED_OVERRIDE = ''; +export const STARTER_SPECIES_OVERRIDE = 0; +export const STARTER_FORM_OVERRIDE = 0; +export const STARTING_LEVEL_OVERRIDE = 0; +export const STARTING_WAVE_OVERRIDE = 0; +export const STARTING_BIOME_OVERRIDE = Biome.TOWN; +export const STARTING_MONEY_OVERRIDE = 0; +export const WEATHER_OVERRIDE = WeatherType.NONE; + +export const ABILITY_OVERRIDE = Abilities.NONE; +export const MOVE_OVERRIDE = Moves.NONE; +export const OPP_SPECIES_OVERRIDE = 0; +export const OPP_ABILITY_OVERRIDE = Abilities.NONE; +export const OPP_MOVE_OVERRIDE = Moves.NONE; + +export const OPP_SHINY_OVERRIDE = false; +export const OPP_VARIANT_OVERRIDE = 0; diff --git a/src/phases.ts b/src/phases.ts index 1393355e3..8934104ed 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -1,4 +1,4 @@ -import BattleScene, { STARTER_FORM_OVERRIDE, STARTER_SPECIES_OVERRIDE, bypassLogin, startingWave } from "./battle-scene"; +import BattleScene, { bypassLogin, startingWave } from "./battle-scene"; import { default as Pokemon, PlayerPokemon, EnemyPokemon, PokemonMove, MoveResult, DamageResult, FieldPosition, HitResult, TurnMove } from "./field/pokemon"; import * as Utils from './utils'; import { Moves } from "./data/enums/moves"; @@ -57,6 +57,7 @@ import { fetchDailyRunSeed, getDailyRunStarters } from "./data/daily-run"; import { GameModes, gameModes } from "./game-mode"; import { getPokemonSpecies, speciesStarters } from "./data/pokemon-species"; import i18next from './plugins/i18n'; +import { STARTER_FORM_OVERRIDE, STARTER_SPECIES_OVERRIDE } from './overrides'; export class LoginPhase extends Phase { private showText: boolean;