mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-21 15:52:18 +02:00
Replace > with != for specialtytype, unknown
This commit is contained in:
parent
394acf0005
commit
f8045872fa
@ -610,7 +610,7 @@ export class TrainerConfig {
|
|||||||
for (let t = 0; t < Math.min(count(), party.length); t++) {
|
for (let t = 0; t < Math.min(count(), party.length); t++) {
|
||||||
const randomIndex = partyMemberIndexes.indexOf(setPartySlot) > -1 ? setPartySlot : Utils.randSeedItem(partyMemberIndexes);
|
const randomIndex = partyMemberIndexes.indexOf(setPartySlot) > -1 ? setPartySlot : Utils.randSeedItem(partyMemberIndexes);
|
||||||
partyMemberIndexes.splice(partyMemberIndexes.indexOf(randomIndex), 1);
|
partyMemberIndexes.splice(partyMemberIndexes.indexOf(randomIndex), 1);
|
||||||
if (this.specialtyType > Type.UNKNOWN) {
|
if (this.specialtyType !== Type.UNKNOWN) {
|
||||||
party[randomIndex].teraType = this.specialtyType;
|
party[randomIndex].teraType = this.specialtyType;
|
||||||
}
|
}
|
||||||
this.trainerAI.setInstantTera(randomIndex);
|
this.trainerAI.setInstantTera(randomIndex);
|
||||||
@ -865,7 +865,7 @@ export class TrainerConfig {
|
|||||||
}
|
}
|
||||||
this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(speciesPool));
|
this.setPartyMemberFunc(-(s + 1), getRandomPartyMemberFunc(speciesPool));
|
||||||
});
|
});
|
||||||
if (specialtyType > Type.UNKNOWN) {
|
if (specialtyType !== Type.UNKNOWN) {
|
||||||
this.setSpeciesFilter(p => p.isOfType(specialtyType));
|
this.setSpeciesFilter(p => p.isOfType(specialtyType));
|
||||||
this.setSpecialtyType(specialtyType);
|
this.setSpecialtyType(specialtyType);
|
||||||
}
|
}
|
||||||
@ -911,7 +911,7 @@ export class TrainerConfig {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// If specialty type is provided, set species filter and specialty type.
|
// 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.setSpeciesFilter(p => p.isOfType(specialtyType));
|
||||||
this.setSpecialtyType(specialtyType);
|
this.setSpecialtyType(specialtyType);
|
||||||
}
|
}
|
||||||
@ -966,7 +966,7 @@ export class TrainerConfig {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Set species filter and specialty type if provided, otherwise filter by base total.
|
// 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.setSpeciesFilter(p => p.isOfType(specialtyType) && p.baseTotal >= ELITE_FOUR_MINIMUM_BST);
|
||||||
this.setSpecialtyType(specialtyType);
|
this.setSpecialtyType(specialtyType);
|
||||||
} else {
|
} else {
|
||||||
|
@ -419,7 +419,7 @@ export default class Trainer extends Phaser.GameObjects.Container {
|
|||||||
|
|
||||||
// Prompts reroll of party member species if doesn't fit specialty type.
|
// 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.
|
// 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;
|
retry = true;
|
||||||
console.log("Attempting reroll of species evolution to fit specialty type...");
|
console.log("Attempting reroll of species evolution to fit specialty type...");
|
||||||
let evoAttempt = 0;
|
let evoAttempt = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user