mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 15:03:24 +02:00
Reworked STARTING_WAVE_OVERRIDE
to use null
as a default value + fixed startingWave
jank
This commit is contained in:
parent
a49cc74916
commit
17c13115dd
@ -21,10 +21,10 @@ import { FieldSpritePipeline } from "#app/pipelines/field-sprite";
|
||||
import { InvertPostFX } from "#app/pipelines/invert";
|
||||
import { SpritePipeline } from "#app/pipelines/sprite";
|
||||
import { SceneBase } from "#app/scene-base";
|
||||
import { startingWave } from "#app/starting-wave";
|
||||
import { TimedEventManager } from "#app/timed-event-manager";
|
||||
import { UiInputs } from "#app/ui-inputs";
|
||||
import { biomeDepths, getBiomeName } from "#balance/biomes";
|
||||
import { startingWave } from "#balance/misc";
|
||||
import { pokemonPrevolutions } from "#balance/pokemon-evolutions";
|
||||
import { FRIENDSHIP_GAIN_FROM_BATTLE } from "#balance/starters";
|
||||
import { initCommonAnims, initMoveAnim, loadCommonAnimAssets, loadMoveAnimAssets } from "#data/battle-anims";
|
||||
|
2
src/data/balance/misc.ts
Normal file
2
src/data/balance/misc.ts
Normal file
@ -0,0 +1,2 @@
|
||||
/** The default wave that new runs start at. */
|
||||
export const startingWave = 1;
|
@ -73,7 +73,12 @@ class DefaultOverrides {
|
||||
* If `"odd-doubles"`, follow the `"double"` rule on odd wave numbers, and follow the `"single"` rule on even wave numbers.
|
||||
*/
|
||||
readonly BATTLE_STYLE_OVERRIDE: BattleStyle | null = null;
|
||||
readonly STARTING_WAVE_OVERRIDE: number = 0;
|
||||
/**
|
||||
* If present and non-null, will override the starting wave # when starting a new run.
|
||||
* Should never be set to a negative value.
|
||||
* @defaultValue `null`
|
||||
*/
|
||||
readonly STARTING_WAVE_OVERRIDE: number | null = null;
|
||||
readonly STARTING_BIOME_OVERRIDE: BiomeId | null = null;
|
||||
readonly ARENA_TINT_OVERRIDE: TimeOfDay | null = null;
|
||||
/** Multiplies XP gained by this value including 0. Set to null to ignore the override. */
|
||||
|
@ -1,3 +0,0 @@
|
||||
import Overrides from "#app/overrides";
|
||||
|
||||
export const startingWave = Overrides.STARTING_WAVE_OVERRIDE || 1;
|
@ -62,11 +62,14 @@ export class OverridesHelper extends GameManagerHelper {
|
||||
}
|
||||
|
||||
/**
|
||||
* Override the starting wave index
|
||||
* @param wave - The wave to set. Classic: `1`-`200`
|
||||
* Override the starting wave index.
|
||||
* @param wave - The wave to set, or `null` to disable the override.
|
||||
* @returns `this`
|
||||
*/
|
||||
public startingWave(wave: number): this {
|
||||
public startingWave(wave: number | null): this {
|
||||
if (wave != null && wave <= 0) {
|
||||
throw new Error("Attempted to set invalid wave index: " + wave.toString());
|
||||
}
|
||||
vi.spyOn(Overrides, "STARTING_WAVE_OVERRIDE", "get").mockReturnValue(wave);
|
||||
this.log(`Starting wave set to ${wave}!`);
|
||||
return this;
|
||||
|
Loading…
Reference in New Issue
Block a user