Update random evolution logic
This commit is contained in:
parent
c778ef5e36
commit
84b487e719
|
@ -256,9 +256,9 @@ export default class PokemonSpecies extends PokemonSpeciesForm {
|
||||||
evolutionChance = Math.min(0.5 + easeInFunc((level - ev.level) / 40) / 2, 1);
|
evolutionChance = Math.min(0.5 + easeInFunc((level - ev.level) / 40) / 2, 1);
|
||||||
else {
|
else {
|
||||||
let preferredMinLevel = ev.wildDelay * 10;
|
let preferredMinLevel = ev.wildDelay * 10;
|
||||||
let evolutionLevel = ev.level > 1 ? ev.level : 0;
|
let evolutionLevel = ev.level > 1 ? ev.level : Math.floor(preferredMinLevel / 2);
|
||||||
|
|
||||||
if (!evolutionLevel && pokemonPrevolutions.hasOwnProperty(this.speciesId)) {
|
if (ev.level <= 1 && pokemonPrevolutions.hasOwnProperty(this.speciesId)) {
|
||||||
const prevolutionLevel = pokemonEvolutions[pokemonPrevolutions[this.speciesId]].find(ev => ev.speciesId === this.speciesId).level;
|
const prevolutionLevel = pokemonEvolutions[pokemonPrevolutions[this.speciesId]].find(ev => ev.speciesId === this.speciesId).level;
|
||||||
if (prevolutionLevel > 1)
|
if (prevolutionLevel > 1)
|
||||||
evolutionLevel = prevolutionLevel;
|
evolutionLevel = prevolutionLevel;
|
||||||
|
|
Loading…
Reference in New Issue