From 0700e9313df74951928c6806f0b3b17c08b65dc6 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sun, 31 Dec 2023 01:28:40 -0500 Subject: [PATCH] Make regional forms rarer to hatch from eggs --- src/egg-hatch-phase.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/egg-hatch-phase.ts b/src/egg-hatch-phase.ts index f85e5f82427..a2d61025c9f 100644 --- a/src/egg-hatch-phase.ts +++ b/src/egg-hatch-phase.ts @@ -395,7 +395,10 @@ export class EggHatchPhase extends BattlePhase { let totalWeight = 0; const speciesWeights = []; for (let speciesId of speciesPool) { - const weight = Math.floor((((maxStarterValue - speciesStarters[speciesId]) / ((maxStarterValue - minStarterValue) + 1)) * 1.5 + 1) * 100); + let weight = Math.floor((((maxStarterValue - speciesStarters[speciesId]) / ((maxStarterValue - minStarterValue) + 1)) * 1.5 + 1) * 100); + const species = getPokemonSpecies(speciesId); + if (species.isRegional()) + weight = Math.floor(weight / (species.isRareRegional() ? 8 : 2)); speciesWeights.push(totalWeight + weight); totalWeight += weight; }