From 412c6dc4e81a532b4c971e0c8088e07fb3319390 Mon Sep 17 00:00:00 2001 From: NightKev <34855794+DayKev@users.noreply.github.com> Date: Sun, 29 Sep 2024 19:45:27 -0700 Subject: [PATCH] Move E4/Champion minimum BST values to consts --- src/data/trainer-config.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/data/trainer-config.ts b/src/data/trainer-config.ts index 19333ef1082..0f4b0a98aea 100644 --- a/src/data/trainer-config.ts +++ b/src/data/trainer-config.ts @@ -18,6 +18,9 @@ import {Species} from "#enums/species"; import {TrainerType} from "#enums/trainer-type"; import {Gender} from "./gender"; +const ELITE_FOUR_MINIMUM_BST = 460; +const CHAMPION_MINIMUM_BST = 508; + export enum TrainerPoolTier { COMMON, UNCOMMON, @@ -860,10 +863,10 @@ export class TrainerConfig { // Set species filter and specialty types if provided, otherwise filter by base total. 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); } 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. @@ -914,7 +917,7 @@ export class TrainerConfig { }); // 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. const nameForCall = this.name.toLowerCase().replace(/\s/g, "_");