Fix issue with item-based evolutions

This commit is contained in:
Flashfyre 2023-04-15 22:51:33 -04:00
parent 8773f25e66
commit 0997bdf55b
1 changed files with 2 additions and 3 deletions

View File

@ -300,9 +300,8 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const evolutions = pokemonEvolutions[this.species.speciesId]; const evolutions = pokemonEvolutions[this.species.speciesId];
for (let e of evolutions) { for (let e of evolutions) {
if (this.level >= e.level) { if (!e.item && this.level >= e.level) {
// TODO: Remove string conditions if (e.condition === null || (e.condition as SpeciesEvolutionCondition).predicate(this))
if (e.condition === null || typeof e.condition === 'string' || (e.condition as SpeciesEvolutionCondition).predicate(this))
return e; return e;
} }
} }