Replace > with != for specialtytype, unknown

This commit is contained in:
AJ Fontaine 2025-02-26 10:42:33 -05:00
parent 394acf0005
commit f8045872fa
2 changed files with 5 additions and 5 deletions

View File

@ -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 {

View File

@ -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;