From 09866b646ff87a90fb395dab95f8b09eb8e8cb7c Mon Sep 17 00:00:00 2001 From: AJ Fontaine Date: Fri, 18 Apr 2025 16:20:48 -0400 Subject: [PATCH] Fix test --- src/data/balance/pokemon-evolutions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/data/balance/pokemon-evolutions.ts b/src/data/balance/pokemon-evolutions.ts index f09f25096b3..cde0ce052f5 100644 --- a/src/data/balance/pokemon-evolutions.ts +++ b/src/data/balance/pokemon-evolutions.ts @@ -182,6 +182,7 @@ export class SpeciesEvolutionCondition { } public conditionsFulfilled(pokemon: Pokemon): boolean { + console.log(this.data); const keys = Array.isArray(this.data.key) ? this.data.key : [this.data.key]; return keys.every(cond => { switch (cond) { @@ -287,7 +288,7 @@ export class SpeciesFormEvolution { pokemon.level >= this.level && // Check form key, using the fusion's form key if we're checking the fusion (isNullOrUndefined(this.preFormKey) || (forFusion ? pokemon.getFormKey() : pokemon.getFusionFormKey()) === this.preFormKey) && - (this.condition === null || this.condition.conditionsFulfilled(pokemon)) + (this.condition === null || this.condition?.conditionsFulfilled(pokemon)) ); } @@ -298,7 +299,7 @@ export class SpeciesFormEvolution { pokemon.level >= this.level && // Check form key, using the fusion's form key if we're checking the fusion (isNullOrUndefined(this.preFormKey) || (forFusion ? pokemon.getFormKey() : pokemon.getFusionFormKey()) === this.preFormKey) && - (this.condition === null || this.condition.conditionsFulfilled(pokemon)) + (this.condition === null || this.condition?.conditionsFulfilled(pokemon)) ); }