# Class TrainerConfig

- Defined in src/data/trainer-config.ts:174

#####
Index

### Constructors

constructor

### Properties

battleBgm
defeatMessages
doubleDefeatMessages
doubleEncounterBgm
doubleEncounterMessages
doubleOnly
doubleVictoryMessages
encounterBgm
encounterMessages
femaleDefeatMessages
femaleEncounterBgm
femaleEncounterMessages
femaleVictoryMessages
genModifiersFunc
hasCharSprite
hasDouble
hasGenders
hasStaticParty
isBoss
modifierRewardFuncs
moneyMultiplier
name
nameDouble
nameFemale
partyMemberFuncs
partyTemplateFunc
partyTemplates
specialtyTypes
speciesFilter
speciesPools
title
titleDouble
trainerType
trainerTypeDouble
useSameSeedForAllMembers
victoryBgm
victoryMessages

### Methods

getDerivedType
getKey
getSpriteKey
getTitle
initForChampion
initForEliteFour
initForGymLeader
loadAssets
setBattleBgm
setBoss
setDoubleMessages
setDoubleOnly
setDoubleTitle
setDoubleTrainerType
setEncounterBgm
setGenModifiersFunc
setHasCharSprite
setHasDouble
setHasGenders
setModifierRewardFuncs
setMoneyMultiplier
setName
setPartyMemberFunc
setPartyTemplateFunc
setPartyTemplates
setSpecialtyTypes
setSpeciesFilter
setSpeciesPools
setStaticParty
setTitle
setUseSameSeedForAllMembers
setVictoryBgm

## Constructors

### constructor

- new TrainerConfig(trainerType, allowLegendaries?): TrainerConfig

- #### Parameters

  - trainerType: TrainerType
  - `Optional` allowLegendaries: boolean

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:216

## Properties

### battleBgm

battleBgm: string

- Defined in src/data/trainer-config.ts:190

### defeatMessages

defeatMessages: string[] = []

- Defined in src/data/trainer-config.ts:206

### doubleDefeatMessages

doubleDefeatMessages: string[]

- Defined in src/data/trainer-config.ts:214

### doubleEncounterBgm

doubleEncounterBgm: string

- Defined in src/data/trainer-config.ts:193

### doubleEncounterMessages

doubleEncounterMessages: string[]

- Defined in src/data/trainer-config.ts:212

### doubleOnly

doubleOnly: boolean = false

- Defined in src/data/trainer-config.ts:185

### doubleVictoryMessages

doubleVictoryMessages: string[]

- Defined in src/data/trainer-config.ts:213

### encounterBgm

encounterBgm: string

- Defined in src/data/trainer-config.ts:191

### encounterMessages

encounterMessages: string[] = []

- Defined in src/data/trainer-config.ts:204

### femaleDefeatMessages

femaleDefeatMessages: string[]

- Defined in src/data/trainer-config.ts:210

### femaleEncounterBgm

femaleEncounterBgm: string

- Defined in src/data/trainer-config.ts:192

### femaleEncounterMessages

femaleEncounterMessages: string[]

- Defined in src/data/trainer-config.ts:208

### femaleVictoryMessages

femaleVictoryMessages: string[]

- Defined in src/data/trainer-config.ts:209

### genModifiersFunc

genModifiersFunc: GenModifiersFunc

- Defined in src/data/trainer-config.ts:195

### hasCharSprite

hasCharSprite: boolean = false

- Defined in src/data/trainer-config.ts:184

### hasDouble

hasDouble: boolean = false

- Defined in src/data/trainer-config.ts:183

### hasGenders

hasGenders: boolean = false

- Defined in src/data/trainer-config.ts:182

### hasStaticParty

hasStaticParty: boolean = false

- Defined in src/data/trainer-config.ts:188

### isBoss

isBoss: boolean = false

- Defined in src/data/trainer-config.ts:187

### modifierRewardFuncs

modifierRewardFuncs: ModifierTypeFunc [] = []

- Defined in src/data/trainer-config.ts:196

### moneyMultiplier

moneyMultiplier: number = 1

- Defined in src/data/trainer-config.ts:186

### name

name: string

- Defined in src/data/trainer-config.ts:177

### nameDouble

nameDouble: string

- Defined in src/data/trainer-config.ts:179

### nameFemale

nameFemale: string

- Defined in src/data/trainer-config.ts:178

### partyMemberFuncs

partyMemberFuncs: PartyMemberFuncs = {}

- Defined in src/data/trainer-config.ts:199

### partyTemplateFunc

partyTemplateFunc: PartyTemplateFunc

- Defined in src/data/trainer-config.ts:198

### partyTemplates

partyTemplates: TrainerPartyTemplate []

- Defined in src/data/trainer-config.ts:197

### specialtyTypes

specialtyTypes: Type [] = []

- Defined in src/data/trainer-config.ts:202

### speciesFilter

speciesFilter: PokemonSpeciesFilter

- Defined in src/data/trainer-config.ts:201

### speciesPools

speciesPools: TrainerTierPools

- Defined in src/data/trainer-config.ts:200

### title

title: string

- Defined in src/data/trainer-config.ts:180

### titleDouble

titleDouble: string

- Defined in src/data/trainer-config.ts:181

### trainerType

trainerType: TrainerType

- Defined in src/data/trainer-config.ts:175

### trainerTypeDouble

trainerTypeDouble: TrainerType

- Defined in src/data/trainer-config.ts:176

### useSameSeedForAllMembers

useSameSeedForAllMembers: boolean = false

- Defined in src/data/trainer-config.ts:189

### victoryBgm

victoryBgm: string

- Defined in src/data/trainer-config.ts:194

### victoryMessages

victoryMessages: string[] = []

- Defined in src/data/trainer-config.ts:205

## Methods

### getDerivedType

- getDerivedType(trainerTypeToDeriveFrom?): TrainerType

- Returns the derived trainer type for a given trainer type.

  #### Parameters

  - trainerTypeToDeriveFrom: TrainerType = null

    The trainer type to derive from. (If null, the this.trainerType property will be used.)

  #### Returns TrainerType

  - The derived trainer type.
  - Defined in src/data/trainer-config.ts:280

### getKey

- getKey(): string

- #### Returns string

  - Defined in src/data/trainer-config.ts:225

### getSpriteKey

- getSpriteKey(female?, isDouble?): string

- #### Parameters

  - `Optional` female: boolean
  - isDouble: boolean = false

  #### Returns string

  - Defined in src/data/trainer-config.ts:229

### getTitle

- getTitle(trainerSlot?, variant): string

- Retrieves the title for the trainer based on the provided trainer slot and variant.

  #### Parameters

  - trainerSlot: TrainerSlot = TrainerSlot.NONE

    The slot to determine which title to use. Defaults to TrainerSlot.NONE.

  - variant: TrainerVariant

    The variant of the trainer to determine the specific title.

  #### Returns string

  - The title of the trainer.
  - Defined in src/data/trainer-config.ts:671

### initForChampion

- initForChampion(signatureSpecies, isMale): TrainerConfig

- Initializes the trainer configuration for a Champion.

  #### Parameters

  - signatureSpecies: ( Species | Species [])[]

    The signature species for the Champion.

  - isMale: boolean

    Whether the Champion is Male or Female (for localization of the title).

  #### Returns TrainerConfig

  - The updated TrainerConfig instance.
  - Defined in src/data/trainer-config.ts:621

### initForEliteFour

- initForEliteFour(signatureSpecies, isMale, ...specialtyTypes): TrainerConfig

- Initializes the trainer configuration for an Elite Four member.

  #### Parameters

  - signatureSpecies: ( Species | Species [])[]

    The signature species for the Elite Four member.

  - isMale: boolean

    Whether the Elite Four Member is Male or Female (for localization of the title).

  - `Rest` ...specialtyTypes: Type []

    The specialty types for the Elite Four member.

  #### Returns TrainerConfig

  - The updated TrainerConfig instance.
  - Defined in src/data/trainer-config.ts:567

### initForGymLeader

- initForGymLeader(signatureSpecies, isMale, ...specialtyTypes): TrainerConfig

- Initializes the trainer configuration for a Gym Leader.

  #### Parameters

  - signatureSpecies: ( Species | Species [])[]

    The signature species for the Gym Leader.

  - isMale: boolean

    Whether the Gym Leader is Male or Not (for localization of the title).

  - `Rest` ...specialtyTypes: Type []

    The specialty types for the Gym Leader.

  #### Returns TrainerConfig

  - The updated TrainerConfig instance.
  - Defined in src/data/trainer-config.ts:511

### loadAssets

- loadAssets(scene, variant): Promise<void>

- #### Parameters

  - scene: default
  - variant: TrainerVariant

  #### Returns Promise<void>

  - Defined in src/data/trainer-config.ts:707

### setBattleBgm

- setBattleBgm(battleBgm): TrainerConfig

- #### Parameters

  - battleBgm: string

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:443

### setBoss

- setBoss(): TrainerConfig

- #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:428

### setDoubleMessages

- setDoubleMessages(nameDouble): void

- Sets the encounter and victory messages for double trainers.

  #### Parameters

  - nameDouble: string

    The name of the pair (e.g. "red_blue_double").

  #### Returns void

  - Defined in src/data/trainer-config.ts:383

### setDoubleOnly

- setDoubleOnly(): TrainerConfig

- #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:418

### setDoubleTitle

- setDoubleTitle(titleDouble): TrainerConfig

- Sets the title for double trainers

  #### Parameters

  - titleDouble: string

    the key for the title in the i18n file. (e.g., "champion_double").

  #### Returns TrainerConfig

  - The updated TrainerConfig instance.
  - Defined in src/data/trainer-config.ts:398

### setDoubleTrainerType

- setDoubleTrainerType(trainerTypeDouble): TrainerConfig

- Sets the trainer type for double battles.

  #### Parameters

  - trainerTypeDouble: TrainerType

    The TrainerType of the partner in a double battle.

  #### Returns TrainerConfig

  - The updated TrainerConfig instance.
  - Defined in src/data/trainer-config.ts:373

### setEncounterBgm

- setEncounterBgm(encounterBgm): TrainerConfig

- #### Parameters

  - encounterBgm: string | TrainerType

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:448

### setGenModifiersFunc

- setGenModifiersFunc(genModifiersFunc): TrainerConfig

- #### Parameters

  - genModifiersFunc: GenModifiersFunc

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:489

### setHasCharSprite

- setHasCharSprite(): TrainerConfig

- #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:413

### setHasDouble

- setHasDouble(nameDouble, doubleEncounterBgm?): TrainerConfig

- Sets the configuration for trainers with double battles, including the name of the double trainer and the encounter BGM.

  #### Parameters

  - nameDouble: string

    The name of the double trainer (e.g., "Ace Duo" for Trainer Class Doubles or "red_blue_double" for NAMED trainer doubles).

  - `Optional` doubleEncounterBgm: string | TrainerType

    The encounter BGM for the double trainer, which can be a TrainerType or a string.

  #### Returns TrainerConfig

  - The updated TrainerConfig instance.
  - Defined in src/data/trainer-config.ts:359

### setHasGenders

- setHasGenders(nameFemale?, femaleEncounterBgm?): TrainerConfig

- Sets the configuration for trainers with genders, including the female name and encounter background music (BGM).

  #### Parameters

  - `Optional` nameFemale: string

    The name of the female trainer. If 'Ivy', a localized name will be assigned.

  - `Optional` femaleEncounterBgm: string | TrainerType

    The encounter BGM for the female trainer, which can be a TrainerType or a string.

  #### Returns TrainerConfig

  - The updated TrainerConfig instance.
  - Defined in src/data/trainer-config.ts:322

### setModifierRewardFuncs

- setModifierRewardFuncs(...modifierTypeFuncs): TrainerConfig

- #### Parameters

  - `Rest` ...modifierTypeFuncs: (() => ModifierTypeFunc )[]

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:494

### setMoneyMultiplier

- setMoneyMultiplier(moneyMultiplier): TrainerConfig

- #### Parameters

  - moneyMultiplier: number

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:423

### setName

- setName(name): TrainerConfig

- #### Parameters

  - name: string

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:242

### setPartyMemberFunc

- setPartyMemberFunc(slotIndex, partyMemberFunc): TrainerConfig

- #### Parameters

  - slotIndex: number
  - partyMemberFunc: PartyMemberFunc

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:468

### setPartyTemplateFunc

- setPartyTemplateFunc(partyTemplateFunc): TrainerConfig

- #### Parameters

  - partyTemplateFunc: PartyTemplateFunc

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:463

### setPartyTemplates

- setPartyTemplates(...partyTemplates): TrainerConfig

- #### Parameters

  - `Rest` ...partyTemplates: TrainerPartyTemplate []

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:458

### setSpecialtyTypes

- setSpecialtyTypes(...specialtyTypes): TrainerConfig

- #### Parameters

  - `Rest` ...specialtyTypes: Type []

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:484

### setSpeciesFilter

- setSpeciesFilter(speciesFilter, allowLegendaries?): TrainerConfig

- #### Parameters

  - speciesFilter: PokemonSpeciesFilter
  - `Optional` allowLegendaries: boolean

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:478

### setSpeciesPools

- setSpeciesPools(speciesPools): TrainerConfig

- #### Parameters

  - speciesPools: Species [] | TrainerTierPools

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:473

### setStaticParty

- setStaticParty(): TrainerConfig

- #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:433

### setTitle

- setTitle(title): TrainerConfig

- #### Parameters

  - title: string

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:258

### setUseSameSeedForAllMembers

- setUseSameSeedForAllMembers(): TrainerConfig

- #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:438

### setVictoryBgm

- setVictoryBgm(victoryBgm): TrainerConfig

- #### Parameters

  - victoryBgm: string

  #### Returns TrainerConfig

  - Defined in src/data/trainer-config.ts:453