Common pregen

This commit is contained in:
AJ Fontaine 2025-06-03 15:18:49 -04:00
parent 1e66eb5256
commit 8586910a65

View File

@ -466,6 +466,11 @@ export class TrainerConfig {
return this; return this;
} }
setCommonPregenData(pregen: Partial<PokemonPregenData>): TrainerConfig {
this.partyPregen = pregen;
return this;
}
setGenModifiersFunc(genModifiersFunc: GenModifiersFunc): TrainerConfig { setGenModifiersFunc(genModifiersFunc: GenModifiersFunc): TrainerConfig {
this.genModifiersFunc = genModifiersFunc; this.genModifiersFunc = genModifiersFunc;
return this; return this;
@ -756,6 +761,9 @@ export class TrainerConfig {
// Set the party templates for the Elite Four. // Set the party templates for the Elite Four.
this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR); this.setPartyTemplates(trainerPartyTemplates.ELITE_FOUR);
if (!this.partyPregen) {
this.partyPregen = {};
}
// Set species filter and specialty type, otherwise filter by base total. // Set species filter and specialty type, otherwise filter by base total.
this.setSpeciesFilter(p => p.isOfType(specialtyType) && p.baseTotal >= ELITE_FOUR_MINIMUM_BST); this.setSpeciesFilter(p => p.isOfType(specialtyType) && p.baseTotal >= ELITE_FOUR_MINIMUM_BST);
@ -816,6 +824,10 @@ export class TrainerConfig {
if (!getIsInitialized()) { if (!getIsInitialized()) {
initI18n(); initI18n();
} }
if (!this.partyPregen) {
this.partyPregen = {};
}
// Set the party templates for the Champion. // Set the party templates for the Champion.
this.setPartyTemplates(trainerPartyTemplates.CHAMPION); this.setPartyTemplates(trainerPartyTemplates.CHAMPION);
@ -2676,6 +2688,7 @@ export const trainerConfigs: TrainerConfigs = {
.setBattleBgm("battle_johto_gym") .setBattleBgm("battle_johto_gym")
.setMixedBattleBgm("battle_johto_gym"), .setMixedBattleBgm("battle_johto_gym"),
[TrainerType.BUGSY]: new TrainerConfig(++t) [TrainerType.BUGSY]: new TrainerConfig(++t)
.setCommonPregenData({preferredGender: Gender.FEMALE})
.initForGymLeader(signatureSpecies["BUGSY"], true, PokemonType.BUG, false, -1) .initForGymLeader(signatureSpecies["BUGSY"], true, PokemonType.BUG, false, -1)
.setBattleBgm("battle_johto_gym") .setBattleBgm("battle_johto_gym")
.setMixedBattleBgm("battle_johto_gym"), .setMixedBattleBgm("battle_johto_gym"),
@ -2931,6 +2944,7 @@ export const trainerConfigs: TrainerConfigs = {
.setBattleBgm("battle_kanto_gym") .setBattleBgm("battle_kanto_gym")
.setMixedBattleBgm("battle_kanto_gym"), .setMixedBattleBgm("battle_kanto_gym"),
[TrainerType.WILL]: new TrainerConfig(++t) [TrainerType.WILL]: new TrainerConfig(++t)
.setCommonPregenData({preferredGender: Gender.FEMALE})
.initForEliteFour(true, PokemonType.PSYCHIC) .initForEliteFour(true, PokemonType.PSYCHIC)
.setBattleBgm("battle_johto_gym") .setBattleBgm("battle_johto_gym")
.setMixedBattleBgm("battle_johto_gym"), .setMixedBattleBgm("battle_johto_gym"),
@ -3119,6 +3133,7 @@ export const trainerConfigs: TrainerConfigs = {
.initForChampion(true) .initForChampion(true)
.setMixedBattleBgm("battle_galar_champion"), .setMixedBattleBgm("battle_galar_champion"),
[TrainerType.MUSTARD]: new TrainerConfig(++t) [TrainerType.MUSTARD]: new TrainerConfig(++t)
.setCommonPregenData({pokeball: PokeballType.ULTRA_BALL})
.initForChampion(true) .initForChampion(true)
.setMixedBattleBgm("battle_mustard"), .setMixedBattleBgm("battle_mustard"),
[TrainerType.GEETA]: new TrainerConfig(++t) [TrainerType.GEETA]: new TrainerConfig(++t)