PokéRogue
    Preparing search index...
    Index
    allowEggMoves: boolean = false

    Whether this trainer's Pokémon are allowed to generate with egg moves

    false

    battleBgm: string
    defeatMessages: string[] = []
    doubleDefeatMessages: string[]
    doubleEncounterBgm: string
    doubleEncounterMessages: string[]
    doubleOnly: boolean = false

    Whether this trainer can only appear inside a double battle.

    Mutually exclusive with hasDouble.

    doubleVictoryMessages: string[]
    encounterBgm: string
    encounterMessages: string[] = []
    femaleDefeatMessages: string[]
    femaleEncounterBgm: string
    femaleEncounterMessages: string[]
    femaleVictoryMessages: string[]
    genAIFuncs: GenAIFunc[] = []
    genModifiersFunc: GenModifiersFunc
    hasCharSprite: boolean = false
    hasDouble: boolean = false

    Whether this trainer has a random chance to appear as a double battle variant instead of a single battle variant.

    Mutually exclusive with doubleOnly.

    hasGenders: boolean = false
    hasStaticParty: boolean = false
    hasVoucher: boolean = false
    isBoss: boolean = false
    mixedBattleBgm: string
    modifierRewardFuncs: ModifierTypeFunc[] = []
    moneyMultiplier: number = 1
    name: string
    nameDouble: string
    nameFemale: string
    partyMemberFuncs: PartyMemberFuncs = {}
    partyTemplateFunc: PartyTemplateFunc
    partyTemplates: TrainerPartyTemplate[]
    specialtyType: PokemonType
    speciesFilter: PokemonSpeciesFilter
    speciesPools: TrainerTierPools
    title: string
    titleDouble: string
    trainerAI: TrainerAI
    trainerType: TrainerType
    trainerTypeDouble: TrainerType
    useSameSeedForAllMembers: boolean = false
    victoryBgm: string
    victoryMessages: 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 an Elite Four member.

      Parameters

      • signatureSpecies: (SpeciesId | SpeciesId[])[]

        The signature species for the Elite Four member.

      • isMale: boolean

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

      • OptionalspecialtyType: PokemonType

        The specialty type for the Elite Four member.

      • OptionalteraSlot: number

        Optional, sets the party member in this slot to Terastallize.

      Returns TrainerConfig

      The updated TrainerConfig instance.

    • Initializes the trainer configuration for a Gym Leader.

      Parameters

      • signatureSpecies: (SpeciesId | SpeciesId[])[]

        The signature species for the Gym Leader. Added to party in reverse order.

      • isMale: boolean

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

      • specialtyType: PokemonType

        The specialty type for the Gym Leader.

      • ignoreMinTeraWave: boolean = false

        Whether the Gym Leader always uses Tera (true), or only Teras after GYM_LEADER_TERA_WAVE (false). Defaults to false.

      • OptionalteraSlot: number

        Optional, sets the party member in this slot to Terastallize. Wraps based on party size.

      Returns TrainerConfig

      The updated TrainerConfig instance.

    • Initializes the trainer configuration for a Stat Trainer, as part of the Trainer's Test Mystery Encounter.

      Parameters

      • _isMale: boolean = false

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

      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

    • Allow this trainer's Pokémon to have egg moves when generating their movesets.

      Returns this

      this for method chaining

      It is redundant to call this if setBoss is also called on the configuration.

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

      • OptionaldoubleEncounterBgm: 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

      • OptionalnameFemale: string

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

      • OptionalfemaleEncounterBgm: string | TrainerType

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

      Returns TrainerConfig

      The updated TrainerConfig instance.

    • Sets if a boss trainer will have a voucher or not.

      Parameters

      • hasVoucher: boolean

        If the boss trainer will have a voucher.

      Returns void

    • Sets a specific pokemon to instantly Tera

      Parameters

      • index: number

        The index within the team to have instant Tera.

      • Optionalcondition: () => boolean

        A condition under which the tera will occur

      Returns this

      this

    • Sets a localized name for the trainer. This should only be used for trainers that dont use a "initFor" function and are considered "named" trainers

      Parameters

      • name: string

        The name of the trainer.

      Returns TrainerConfig

      The updated TrainerConfig instance.

    • Sets random pokemon from the trainer's team to instant tera. Also sets Tera type to specialty type and checks for Shedinja as appropriate.

      Parameters

      • count: () => number

        A callback (yucky) to see how many teras should be used

      • Optionalslot: number

        Optional, a specified slot that should be terastallized. Wraps to match party size (-1 will get the last slot and so on).

      Returns TrainerConfig

      this