Fix crash with normal type gym leaders

This commit is contained in:
Flashfyre 2024-01-08 00:35:41 -05:00
parent 111f9c9af8
commit 12295d7680

View File

@ -530,7 +530,7 @@ export class TrainerConfig {
this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(speciesPool)); this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(speciesPool));
}); });
if (specialtyTypes.length) { if (specialtyTypes.length) {
this.setSpeciesFilter(p => !!specialtyTypes.find(t => p.isOfType(t))); this.setSpeciesFilter(p => specialtyTypes.find(t => p.isOfType(t)) !== undefined);
this.setSpecialtyTypes(...specialtyTypes); this.setSpecialtyTypes(...specialtyTypes);
} }
this.setMoneyMultiplier(2.5); this.setMoneyMultiplier(2.5);