pokemon-rogue-battle
    Preparing search index...
    Index

    Constructors

    Properties

    battleBgm: string
    defeatMessages: string[] = []
    doubleDefeatMessages: string[]
    doubleEncounterBgm: string
    doubleEncounterMessages: string[]
    doubleOnly: boolean = false
    doubleVictoryMessages: string[]
    encounterBgm: string
    encounterMessages: string[] = []
    eventRewardFuncs: ModifierTypeFunc[] = []
    femaleDefeatMessages: string[]
    femaleEncounterBgm: string
    femaleEncounterMessages: string[]
    femaleVictoryMessages: string[]
    genAIFuncs: GenAIFunc[] = []
    genModifiersFunc: GenModifiersFunc
    hasCharSprite: boolean = false
    hasDouble: boolean = false
    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[] = []

    Methods

    • 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.
    • Helper function to check if a specialty type is set

      Returns boolean

      true if specialtyType is defined and not Type.UNKNOWN

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

      • OptionalspecialtyType: PokemonType

        {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 an evil team leader. Temporarily hardcoding evil leader teams though.

      Parameters

      • title: string
      • signatureSpecies: (Species | Species[])[]

        The signature species for the evil team leader.

      • rematch: boolean = false
      • OptionalspecialtyType: PokemonType

        The specialty type for the evil team Leader.

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

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