From 84b487e719d87ddf543de2f9bfa7e3d27073ed81 Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Fri, 20 Oct 2023 16:55:46 -0400 Subject: [PATCH] Update random evolution logic --- src/data/pokemon-species.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/pokemon-species.ts b/src/data/pokemon-species.ts index 9209864b412..03bf5aec37b 100644 --- a/src/data/pokemon-species.ts +++ b/src/data/pokemon-species.ts @@ -256,9 +256,9 @@ export default class PokemonSpecies extends PokemonSpeciesForm { evolutionChance = Math.min(0.5 + easeInFunc((level - ev.level) / 40) / 2, 1); else { 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; if (prevolutionLevel > 1) evolutionLevel = prevolutionLevel;