Fixed form-based evolutions not taking form into account

pull/16/head
Flashfyre 2024-03-22 21:38:10 -04:00
parent dbe6fefac9
commit 1d39f0eeeb
1 changed files with 1 additions and 1 deletions

View File

@ -759,7 +759,7 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
const evolutions = pokemonEvolutions[this.species.speciesId];
for (let e of evolutions) {
if (!e.item && this.level >= e.level) {
if (!e.item && this.level >= e.level && (!e.preFormKey || this.getFormKey() === e.preFormKey)) {
if (e.condition === null || (e.condition as SpeciesEvolutionCondition).predicate(this))
return e;
}