From 0997bdf55b1763c310069b33881556373a614e1c Mon Sep 17 00:00:00 2001 From: Flashfyre Date: Sat, 15 Apr 2023 22:51:33 -0400 Subject: [PATCH] Fix issue with item-based evolutions --- src/pokemon.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/pokemon.ts b/src/pokemon.ts index 68de983bb..fddef5393 100644 --- a/src/pokemon.ts +++ b/src/pokemon.ts @@ -300,9 +300,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container { const evolutions = pokemonEvolutions[this.species.speciesId]; for (let e of evolutions) { - if (this.level >= e.level) { - // TODO: Remove string conditions - if (e.condition === null || typeof e.condition === 'string' || (e.condition as SpeciesEvolutionCondition).predicate(this)) + if (!e.item && this.level >= e.level) { + if (e.condition === null || (e.condition as SpeciesEvolutionCondition).predicate(this)) return e; } }