Make regional forms rarer to hatch from eggs
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…
Reference in New Issue