pokemon-rogue-battle
    Preparing search index...

    Builder class for creating a MysteryEncounter must call build() at the end after specifying all params for the MysteryEncounter

    Implements

    Index

    Constructors

    Properties

    autoHideIntroVisuals: boolean = true
    catchAllowed: boolean = false
    continuousEncounter: boolean = false
    dialogue: default = {}
    dialogueTokens: Record<string, string> = {}
    enemyPartyConfigs: EnemyPartyConfig[] = []
    enterIntroVisualsFromRight: boolean = false
    excludePrimaryFromSupportRequirements: boolean = true
    expMultiplier: number = 1
    fleeAllowed: boolean = true
    hasBattleAnimationsWithoutTargets: boolean = false
    hideBattleIntroMessage: boolean = false
    localizationKey: string = ""
    lockEncounterRewardTiers: boolean = false
    maxAllowedEncounters: number = 3
    options: [default, default, ...default[]]
    preventGameStatsUpdates: boolean = false
    primaryPokemonRequirements: EncounterPokemonRequirement[] = []
    requirements: EncounterSceneRequirement[] = []
    secondaryPokemonRequirements: EncounterPokemonRequirement[] = []
    skipEnemyBattleTurns: boolean = false
    skipToFightInput: boolean = false
    startOfBattleEffectsComplete: boolean = false

    Methods

    • If true, encounter will not animate the target Pokemon as part of battle animations Used for encounters where it is not a "real" battle, but still uses battle animations and commands (see FunAndGamesEncounter for an example) Default false

      Parameters

      • hasBattleAnimationsWithoutTargets: boolean

      Returns MysteryEncounterBuilder & Required<
          Pick<IMysteryEncounter, "hasBattleAnimationsWithoutTargets">,
      >

    • Can set custom encounter exp via this callback function If exp always deterministic for an encounter, this is a good way to set them

      NOTE: If rewards are dependent on options selected, runtime data, etc., It may be better to programmatically set doEncounterExp elsewhere. There is a helper function in mystery-encounter utils, setEncounterExp(), which can be called programmatically to set rewards

      Parameters

      • doEncounterExp: () => boolean

        Synchronous callback function to perform during rewards phase of the encounter

      Returns MysteryEncounterBuilder & Required<Pick<IMysteryEncounter, "doEncounterExp">>

    • Add a primary pokemon health ratio requirement

      Parameters

      • requiredHealthRange: [number, number]

        the health range to check

      • minNumberOfPokemon: number = 1

        minimum number of pokemon to have the health range

      • invertQuery: boolean = false

        if true will invert the query

      Returns MysteryEncounterBuilder & Required<
          Pick<IMysteryEncounter, "primaryPokemonRequirements">,
      >

    • Can set custom encounter rewards via this callback function If rewards are always deterministic for an encounter, this is a good way to set them

      NOTE: If rewards are dependent on options selected, runtime data, etc., It may be better to programmatically set doEncounterRewards elsewhere. There is a helper function in mystery-encounter utils, setEncounterRewards(), which can be called programmatically to set rewards

      Parameters

      • doEncounterRewards: () => boolean

        Synchronous callback function to perform during rewards phase of the encounter

      Returns MysteryEncounterBuilder & Required<
          Pick<IMysteryEncounter, "doEncounterRewards">,
      >