Constructors

Properties

battleBgm: string
defeatMessages: string[] = []
doubleDefeatMessages: string[]
doubleEncounterBgm: string
doubleEncounterMessages: string[]
doubleOnly: boolean = false
doubleVictoryMessages: string[]
encounterBgm: string
encounterMessages: string[] = []
femaleDefeatMessages: string[]
femaleEncounterBgm: string
femaleEncounterMessages: string[]
femaleVictoryMessages: string[]
genModifiersFunc: GenModifiersFunc
hasCharSprite: boolean = false
hasDouble: boolean = false
hasGenders: boolean = false
hasStaticParty: boolean = false
isBoss: boolean = false
mixedBattleBgm: string
modifierRewardFuncs: ModifierTypeFunc[] = []
moneyMultiplier: number = 1
name: string
nameDouble: string
nameFemale: string
partyMemberFuncs: PartyMemberFuncs = {}
partyTemplateFunc: PartyTemplateFunc
partyTemplates: TrainerPartyTemplate[]
specialtyTypes: Type[] = []
speciesFilter: PokemonSpeciesFilter
speciesPools: TrainerTierPools
title: string
titleDouble: string
trainerType: TrainerType
trainerTypeDouble: TrainerType
useSameSeedForAllMembers: boolean = false
victoryBgm: string
victoryMessages: string[] = []

Methods

  • 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.
  • Parameters

    • Optional female: boolean
    • isDouble: boolean = false

    Returns 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.
  • 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.
  • 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.
  • 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.
  • Sets the encounter and victory messages for double trainers.

    Parameters

    • nameDouble: string

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

    Returns void

  • 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.
  • 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.