From c722490f6097372fad4e71ae574cda1299ce938e Mon Sep 17 00:00:00 2001 From: Tempoanon <163687446+Tempo-anon@users.noreply.github.com> Date: Tue, 6 Aug 2024 14:05:19 -0400 Subject: [PATCH] [Feature] Allow Phione eggs to have a 1/8 chance to hatch Manaphy (#2787) * Add feature and debug DO NOT MERGE * Remove debug stuff --- src/data/egg.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/data/egg.ts b/src/data/egg.ts index a7a1b167238..cb889951488 100644 --- a/src/data/egg.ts +++ b/src/data/egg.ts @@ -205,7 +205,11 @@ export class Egg { this._species = this.rollSpecies(scene); } - const pokemonSpecies = getPokemonSpecies(this._species); + let pokemonSpecies = getPokemonSpecies(this._species); + // Special condition to have Phione eggs also have a chance of generating Manaphy + if (this._species === Species.PHIONE) { + pokemonSpecies = getPokemonSpecies(Utils.randSeedInt(MANAPHY_EGG_MANAPHY_RATE) ? Species.PHIONE : Species.MANAPHY); + } // Sets the hidden ability if a hidden ability exists and the override is set // or if the same species egg hits the chance