mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-05-12 03:14:07 +01:00
Make regional forms rarer to hatch from eggs
This commit is contained in:
parent
aa15061293
commit
0700e9313d
@ -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;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user