Fix issue with item-based evolutions

pull/1/head
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];
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;
}
}