diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 438f6ac6953..3a427d803f8 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -610,7 +610,7 @@ export class TrainerConfig { for (let t = 0; t < Math.min(count(), party.length); t++) { const randomIndex = partyMemberIndexes.indexOf(setPartySlot) > -1 ? setPartySlot : Utils.randSeedItem(partyMemberIndexes); partyMemberIndexes.splice(partyMemberIndexes.indexOf(randomIndex), 1); - if (this.specialtyType > Type.UNKNOWN) { + if (this.specialtyType !== Type.UNKNOWN) { party[randomIndex].teraType = this.specialtyType; } this.trainerAI.setInstantTera(randomIndex); @@ -865,7 +865,7 @@ export class TrainerConfig { } this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(speciesPool)); }); - if (specialtyType > Type.UNKNOWN) { + if (specialtyType !== Type.UNKNOWN) { this.setSpeciesFilter(p => p.isOfType(specialtyType)); this.setSpecialtyType(specialtyType); } @@ -911,7 +911,7 @@ export class TrainerConfig { }); // If specialty type is provided, set species filter and specialty type. - if (specialtyType > Type.UNKNOWN) { + if (specialtyType !== Type.UNKNOWN) { this.setSpeciesFilter(p => p.isOfType(specialtyType)); this.setSpecialtyType(specialtyType); } @@ -966,7 +966,7 @@ export class TrainerConfig { }); // Set species filter and specialty type if provided, otherwise filter by base total. - if (specialtyType > Type.UNKNOWN) { + if (specialtyType !== Type.UNKNOWN) { this.setSpeciesFilter(p => p.isOfType(specialtyType) && p.baseTotal >= ELITE_FOUR_MINIMUM_BST); this.setSpecialtyType(specialtyType); } else { diff --git a/src/field/trainer.ts b/src/field/trainer.ts index 1cfb6f89315..400f889d80e 100644 --- a/src/field/trainer.ts +++ b/src/field/trainer.ts @@ -419,7 +419,7 @@ export default class Trainer extends Phaser.GameObjects.Container { // Prompts reroll of party member species if doesn't fit specialty type. // Can be removed by adding a type parameter to getTrainerSpeciesForLevel and filtering the list of evolutions for that type. - if (!retry && this.config.specialtyType > Type.UNKNOWN && !ret.isOfType(this.config.specialtyType)) { + if (!retry && this.config.specialtyType !== Type.UNKNOWN && !ret.isOfType(this.config.specialtyType)) { retry = true; console.log("Attempting reroll of species evolution to fit specialty type..."); let evoAttempt = 0;