diff --git a/src/game-mode.ts b/src/game-mode.ts index ec7171b0024..97398d2b0a9 100644 --- a/src/game-mode.ts +++ b/src/game-mode.ts @@ -7,7 +7,7 @@ import type PokemonSpecies from "./data/pokemon-species"; import { allSpecies } from "./data/pokemon-species"; import type { Arena } from "./field/arena"; 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 { Species } from "#enums/species"; import { Challenges } from "./enums/challenges"; @@ -124,16 +124,20 @@ export class GameMode implements GameModeConfig { /** * @returns either: - * - random biome for Daily mode * - override from overrides.ts + * - random biome for Daily mode * - Town */ getStartingBiome(): Biome { + if (!isNullOrUndefined(Overrides.STARTING_BIOME_OVERRIDE)) { + return Overrides.STARTING_BIOME_OVERRIDE; + } + switch (this.modeId) { case GameModes.DAILY: return getDailyStartingBiome(); default: - return Overrides.STARTING_BIOME_OVERRIDE || Biome.TOWN; + return Biome.TOWN; } } diff --git a/src/overrides.ts b/src/overrides.ts index 5bbd29b355f..95c758d7c43 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -73,7 +73,7 @@ class DefaultOverrides { */ readonly BATTLE_STYLE_OVERRIDE: BattleStyle | null = null; 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; /** Multiplies XP gained by this value including 0. Set to null to ignore the override. */ readonly XP_MULTIPLIER_OVERRIDE: number | null = null;