fix can-learn-move-requirement getAllPokemonMoves

This commit is contained in:
Felix Staud 2024-07-16 15:31:42 -07:00
parent 7a15a0f81e
commit 944197330c

View File

@ -77,15 +77,15 @@ export class CanLearnMoveRequirement extends EncounterPokemonRequirement {
const allPokemonMoves: Moves[] = [];
if (!this.excludeLevelMoves) {
allPokemonMoves.push(...this.getPokemonLevelMoves(pkm));
allPokemonMoves.push(...(this.getPokemonLevelMoves(pkm) ?? []));
}
if (!this.excludeTmMoves) {
allPokemonMoves.push(...pkm.compatibleTms);
allPokemonMoves.push(...(pkm.compatibleTms ?? []));
}
if (!this.excludeEggMoves) {
allPokemonMoves.push(...pkm.getEggMoves());
allPokemonMoves.push(...(pkm.getEggMoves() ?? []));
}
return allPokemonMoves;