Make regional forms rarer to hatch from eggs

This commit is contained in:
Flashfyre committed 2023-12-31 01:28:40 -05:00
1 parent aa15061293
commit 0700e9313d
1 file changed
+4 -1
+4 -1
View File
@@ -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;
}