mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-24 16:29:27 +02:00
Move E4/Champion minimum BST values to consts
This commit is contained in:
parent
6189572c57
commit
412c6dc4e8
@ -18,6 +18,9 @@ import {Species} from "#enums/species";
|
|||||||
import {TrainerType} from "#enums/trainer-type";
|
import {TrainerType} from "#enums/trainer-type";
|
||||||
import {Gender} from "./gender";
|
import {Gender} from "./gender";
|
||||||
|
|
||||||
|
const ELITE_FOUR_MINIMUM_BST = 460;
|
||||||
|
const CHAMPION_MINIMUM_BST = 508;
|
||||||
|
|
||||||
export enum TrainerPoolTier {
|
export enum TrainerPoolTier {
|
||||||
COMMON,
|
COMMON,
|
||||||
UNCOMMON,
|
UNCOMMON,
|
||||||
@ -860,10 +863,10 @@ export class TrainerConfig {
|
|||||||
|
|
||||||
// Set species filter and specialty types if provided, otherwise filter by base total.
|
// Set species filter and specialty types if provided, otherwise filter by base total.
|
||||||
if (specialtyTypes.length) {
|
if (specialtyTypes.length) {
|
||||||
this.setSpeciesFilter(p => specialtyTypes.some(t => p.isOfType(t)) && p.baseTotal >= 450);
|
this.setSpeciesFilter(p => specialtyTypes.some(t => p.isOfType(t)) && p.baseTotal >= ELITE_FOUR_MINIMUM_BST);
|
||||||
this.setSpecialtyTypes(...specialtyTypes);
|
this.setSpecialtyTypes(...specialtyTypes);
|
||||||
} else {
|
} else {
|
||||||
this.setSpeciesFilter(p => p.baseTotal >= 460);
|
this.setSpeciesFilter(p => p.baseTotal >= ELITE_FOUR_MINIMUM_BST);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Localize the trainer's name by converting it to lowercase and replacing spaces with underscores.
|
// Localize the trainer's name by converting it to lowercase and replacing spaces with underscores.
|
||||||
@ -914,7 +917,7 @@ export class TrainerConfig {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Set species filter to only include species with a base total of 508 or higher.
|
// Set species filter to only include species with a base total of 508 or higher.
|
||||||
this.setSpeciesFilter(p => p.baseTotal >= 508);
|
this.setSpeciesFilter(p => p.baseTotal >= CHAMPION_MINIMUM_BST);
|
||||||
|
|
||||||
// Localize the trainer's name by converting it to lowercase and replacing spaces with underscores.
|
// Localize the trainer's name by converting it to lowercase and replacing spaces with underscores.
|
||||||
const nameForCall = this.name.toLowerCase().replace(/\s/g, "_");
|
const nameForCall = this.name.toLowerCase().replace(/\s/g, "_");
|
||||||
|
Loading…
Reference in New Issue
Block a user