From 4c443e77606ef954906b4b5c848202dde9c51fc8 Mon Sep 17 00:00:00 2001 From: hayuna Date: Mon, 27 May 2024 12:49:49 +0200 Subject: [PATCH] Add flag for immediate hatching eggs (#1424) * Add flag for immediate hatching eggs * Change time to hatch based on flag in Overrides --- src/overrides.ts | 1 + src/phases.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/overrides.ts b/src/overrides.ts index e07a31ec201..030b5d81de3 100644 --- a/src/overrides.ts +++ b/src/overrides.ts @@ -32,6 +32,7 @@ export const STARTING_BIOME_OVERRIDE: Biome = Biome.TOWN; export const ARENA_TINT_OVERRIDE: TimeOfDay = null; // Multiplies XP gained by this value including 0. Set to null to ignore the override export const XP_MULTIPLIER_OVERRIDE: number = null; +export const IMMEDIATE_HATCH_EGGS_OVERRIDE: boolean = false; // default 1000 export const STARTING_MONEY_OVERRIDE: integer = 0; export const POKEBALL_OVERRIDE: { active: boolean, pokeballs: PokeballCounts } = { diff --git a/src/phases.ts b/src/phases.ts index 84985332b14..b1c8453d24c 100644 --- a/src/phases.ts +++ b/src/phases.ts @@ -5008,7 +5008,7 @@ export class EggLapsePhase extends Phase { super.start(); const eggsToHatch: Egg[] = this.scene.gameData.eggs.filter((egg: Egg) => { - return --egg.hatchWaves < 1; + return Overrides.IMMEDIATE_HATCH_EGGS_OVERRIDE ? true : --egg.hatchWaves < 1; }); if (eggsToHatch.length) {