mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-04 07:22:19 +02:00
Init modifier types and pools in loading-scene
This commit is contained in:
parent
570c89a7a2
commit
db1c968c8b
@ -22,6 +22,7 @@ import { BiomeId } from "#enums/biome-id";
|
||||
import { initMysteryEncounters } from "#app/data/mystery-encounters/mystery-encounters";
|
||||
import { timedEventManager } from "./global-event-manager";
|
||||
import { initModifierPools } from "./modifier/init-modifier-pools";
|
||||
import { initModifierTypes } from "./modifier/modifier-type";
|
||||
|
||||
export class LoadingScene extends SceneBase {
|
||||
public static readonly KEY = "loading";
|
||||
@ -364,6 +365,7 @@ export class LoadingScene extends SceneBase {
|
||||
|
||||
this.loadLoadingScreen();
|
||||
|
||||
initModifierTypes();
|
||||
initModifierPools();
|
||||
|
||||
initAchievements();
|
||||
|
@ -24,6 +24,8 @@ import { MoveId } from "#enums/move-id";
|
||||
import { StatusEffect } from "#enums/status-effect";
|
||||
import { AbilityId } from "#enums/ability-id";
|
||||
import { MAX_PER_TYPE_POKEBALLS } from "#app/data/pokeball";
|
||||
// biome-ignore lint/correctness/noUnusedImports: This is used in a tsdoc comment
|
||||
import type { initModifierTypes } from "./modifier-type";
|
||||
|
||||
/**
|
||||
* Initialize the wild modifier pool
|
||||
@ -780,6 +782,10 @@ function initDailyStarterModifierPool() {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize {@linkcode modifierPool} with the initial set of modifier types.
|
||||
* {@linkcode initModifierTypes} MUST be called before this function.
|
||||
*/
|
||||
export function initModifierPools() {
|
||||
// The modifier pools the player chooses from during modifier selection
|
||||
initCommonModifierPool();
|
||||
|
@ -126,13 +126,9 @@ import i18next from "i18next";
|
||||
import { timedEventManager } from "#app/global-event-manager";
|
||||
import { TYPE_BOOST_ITEM_BOOST_PERCENT } from "#app/constants";
|
||||
import { ModifierPoolType } from "#enums/modifier-pool-type";
|
||||
|
||||
import { getModifierPoolForType, getModifierType } from "#app/utils/modifier-utils";
|
||||
import type { ModifierTypeFunc, WeightedModifierTypeWeightFunc } from "#app/@types/modifier-types";
|
||||
|
||||
// biome-ignore lint/correctness/noUnusedImports: This import is used in a
|
||||
import type { initModifierPools } from "./init-modifier-pools";
|
||||
|
||||
const outputModifierData = false;
|
||||
const useMaxWeightForOutput = false;
|
||||
|
||||
@ -2993,10 +2989,6 @@ export function getLuckTextTint(luckValue: number): number {
|
||||
return getModifierTierTextTint(modifierTier);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the modifier types object with the initial set of modifier types.
|
||||
* {@linkcode initModifierPools} MUST be called before this function.
|
||||
*/
|
||||
export function initModifierTypes() {
|
||||
for (const [key, value] of Object.entries(modifierTypeInitObj)) {
|
||||
modifierTypes[key] = value;
|
||||
|
Loading…
Reference in New Issue
Block a user