mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
[Misc] Fix circular dep (#6361)
This commit is contained in:
parent
e63effa311
commit
3dd1948634
@ -1,4 +1,3 @@
|
|||||||
import { pokemonEvolutions } from "#balance/pokemon-evolutions";
|
|
||||||
import { SpeciesId } from "#enums/species-id";
|
import { SpeciesId } from "#enums/species-id";
|
||||||
|
|
||||||
/** The maximum size of the player's party */
|
/** The maximum size of the player's party */
|
||||||
@ -54,15 +53,6 @@ export const defaultStarterSpecies: SpeciesId[] = [
|
|||||||
SpeciesId.QUAXLY,
|
SpeciesId.QUAXLY,
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
|
||||||
* The default species and all their evolutions
|
|
||||||
*/
|
|
||||||
export const defaultStarterSpeciesAndEvolutions: SpeciesId[] = defaultStarterSpecies.flatMap(id => {
|
|
||||||
const stage2ids = pokemonEvolutions[id]?.map(e => e.speciesId) ?? [];
|
|
||||||
const stage3ids = stage2ids.flatMap(s2id => pokemonEvolutions[s2id]?.map(e => e.speciesId) ?? []);
|
|
||||||
return [id, ...stage2ids, ...stage3ids];
|
|
||||||
});
|
|
||||||
|
|
||||||
export const saveKey = "x0i2O7WRiANTqPmZ"; // Temporary; secure encryption is not yet necessary
|
export const saveKey = "x0i2O7WRiANTqPmZ"; // Temporary; secure encryption is not yet necessary
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
import { defaultStarterSpecies } from "#app/constants";
|
||||||
import { globalScene } from "#app/global-scene";
|
import { globalScene } from "#app/global-scene";
|
||||||
import { speciesStarterCosts } from "#balance/starters";
|
import { speciesStarterCosts } from "#balance/starters";
|
||||||
import { allMoves } from "#data/data-lists";
|
import { allMoves } from "#data/data-lists";
|
||||||
@ -1883,6 +1884,15 @@ export function initPokemonPrevolutions(): void {
|
|||||||
// TODO: This may cause funny business for double starters such as Pichu/Pikachu
|
// TODO: This may cause funny business for double starters such as Pichu/Pikachu
|
||||||
export const pokemonStarters: PokemonPrevolutions = {};
|
export const pokemonStarters: PokemonPrevolutions = {};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The default species and all their evolutions
|
||||||
|
*/
|
||||||
|
export const defaultStarterSpeciesAndEvolutions: SpeciesId[] = defaultStarterSpecies.flatMap(id => {
|
||||||
|
const stage2ids = pokemonEvolutions[id]?.map(e => e.speciesId) ?? [];
|
||||||
|
const stage3ids = stage2ids.flatMap(s2id => pokemonEvolutions[s2id]?.map(e => e.speciesId) ?? []);
|
||||||
|
return [id, ...stage2ids, ...stage3ids];
|
||||||
|
});
|
||||||
|
|
||||||
export function initPokemonStarters(): void {
|
export function initPokemonStarters(): void {
|
||||||
const starterKeys = Object.keys(pokemonPrevolutions);
|
const starterKeys = Object.keys(pokemonPrevolutions);
|
||||||
starterKeys.forEach(pk => {
|
starterKeys.forEach(pk => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import type { FixedBattleConfig } from "#app/battle";
|
import type { FixedBattleConfig } from "#app/battle";
|
||||||
import { getRandomTrainerFunc } from "#app/battle";
|
import { getRandomTrainerFunc } from "#app/battle";
|
||||||
import { defaultStarterSpeciesAndEvolutions } from "#app/constants";
|
import { defaultStarterSpeciesAndEvolutions } from "#balance/pokemon-evolutions";
|
||||||
import { speciesStarterCosts } from "#balance/starters";
|
import { speciesStarterCosts } from "#balance/starters";
|
||||||
import type { PokemonSpecies } from "#data/pokemon-species";
|
import type { PokemonSpecies } from "#data/pokemon-species";
|
||||||
import { AbilityAttr } from "#enums/ability-attr";
|
import { AbilityAttr } from "#enums/ability-attr";
|
||||||
|
Loading…
Reference in New Issue
Block a user