mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-29 21:12:45 +02:00
[Dev] Fixed biome override not working for Daily Mode (#5776)
This commit is contained in:
parent
14e01c3da1
commit
ff6f9131ae
@ -7,7 +7,7 @@ import type PokemonSpecies from "./data/pokemon-species";
|
|||||||
import { allSpecies } from "./data/pokemon-species";
|
import { allSpecies } from "./data/pokemon-species";
|
||||||
import type { Arena } from "./field/arena";
|
import type { Arena } from "./field/arena";
|
||||||
import Overrides from "#app/overrides";
|
import Overrides from "#app/overrides";
|
||||||
import { randSeedInt, randSeedItem } from "#app/utils/common";
|
import { isNullOrUndefined, randSeedInt, randSeedItem } from "#app/utils/common";
|
||||||
import { Biome } from "#enums/biome";
|
import { Biome } from "#enums/biome";
|
||||||
import { Species } from "#enums/species";
|
import { Species } from "#enums/species";
|
||||||
import { Challenges } from "./enums/challenges";
|
import { Challenges } from "./enums/challenges";
|
||||||
@ -124,16 +124,20 @@ export class GameMode implements GameModeConfig {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @returns either:
|
* @returns either:
|
||||||
* - random biome for Daily mode
|
|
||||||
* - override from overrides.ts
|
* - override from overrides.ts
|
||||||
|
* - random biome for Daily mode
|
||||||
* - Town
|
* - Town
|
||||||
*/
|
*/
|
||||||
getStartingBiome(): Biome {
|
getStartingBiome(): Biome {
|
||||||
|
if (!isNullOrUndefined(Overrides.STARTING_BIOME_OVERRIDE)) {
|
||||||
|
return Overrides.STARTING_BIOME_OVERRIDE;
|
||||||
|
}
|
||||||
|
|
||||||
switch (this.modeId) {
|
switch (this.modeId) {
|
||||||
case GameModes.DAILY:
|
case GameModes.DAILY:
|
||||||
return getDailyStartingBiome();
|
return getDailyStartingBiome();
|
||||||
default:
|
default:
|
||||||
return Overrides.STARTING_BIOME_OVERRIDE || Biome.TOWN;
|
return Biome.TOWN;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ class DefaultOverrides {
|
|||||||
*/
|
*/
|
||||||
readonly BATTLE_STYLE_OVERRIDE: BattleStyle | null = null;
|
readonly BATTLE_STYLE_OVERRIDE: BattleStyle | null = null;
|
||||||
readonly STARTING_WAVE_OVERRIDE: number = 0;
|
readonly STARTING_WAVE_OVERRIDE: number = 0;
|
||||||
readonly STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN;
|
readonly STARTING_BIOME_OVERRIDE: Biome | null = null;
|
||||||
readonly ARENA_TINT_OVERRIDE: TimeOfDay | null = null;
|
readonly ARENA_TINT_OVERRIDE: TimeOfDay | null = null;
|
||||||
/** Multiplies XP gained by this value including 0. Set to null to ignore the override. */
|
/** Multiplies XP gained by this value including 0. Set to null to ignore the override. */
|
||||||
readonly XP_MULTIPLIER_OVERRIDE: number | null = null;
|
readonly XP_MULTIPLIER_OVERRIDE: number | null = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user