Make regional forms rarer to hatch from eggs

pull/14/head
Flashfyre 2023-12-31 01:28:40 -05:00
parent aa15061293
commit 0700e9313d
1 changed files with 4 additions and 1 deletions

View File

@ -395,7 +395,10 @@ export class EggHatchPhase extends BattlePhase {
let totalWeight = 0; let totalWeight = 0;
const speciesWeights = []; const speciesWeights = [];
for (let speciesId of speciesPool) { 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); speciesWeights.push(totalWeight + weight);
totalWeight += weight; totalWeight += weight;
} }