mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-01 14:02:18 +02:00
Fix test
This commit is contained in:
parent
8e61d20384
commit
09866b646f
@ -182,6 +182,7 @@ export class SpeciesEvolutionCondition {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public conditionsFulfilled(pokemon: Pokemon): boolean {
|
public conditionsFulfilled(pokemon: Pokemon): boolean {
|
||||||
|
console.log(this.data);
|
||||||
const keys = Array.isArray(this.data.key) ? this.data.key : [this.data.key];
|
const keys = Array.isArray(this.data.key) ? this.data.key : [this.data.key];
|
||||||
return keys.every(cond => {
|
return keys.every(cond => {
|
||||||
switch (cond) {
|
switch (cond) {
|
||||||
@ -287,7 +288,7 @@ export class SpeciesFormEvolution {
|
|||||||
pokemon.level >= this.level &&
|
pokemon.level >= this.level &&
|
||||||
// Check form key, using the fusion's form key if we're checking the fusion
|
// 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) &&
|
(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 &&
|
pokemon.level >= this.level &&
|
||||||
// Check form key, using the fusion's form key if we're checking the fusion
|
// 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) &&
|
(isNullOrUndefined(this.preFormKey) || (forFusion ? pokemon.getFormKey() : pokemon.getFusionFormKey()) === this.preFormKey) &&
|
||||||
(this.condition === null || this.condition.conditionsFulfilled(pokemon))
|
(this.condition === null || this.condition?.conditionsFulfilled(pokemon))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user