# MysteryEncounterBuilder | pokemon-rogue-battle
Documentation for pokemon-rogue-battle

# Class MysteryEncounterBuilder

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

#### Implements

- Partial< IMysteryEncounter >

- Defined in src/data/mystery-encounters/mystery-encounter.ts:547

##### Index

### Constructors

constructor

### Properties

autoHideIntroVisuals
catchAllowed
continuousEncounter
dialogue
dialogueTokens
enemyPartyConfigs
enterIntroVisualsFromRight
excludePrimaryFromSupportRequirements
expMultiplier
fleeAllowed
hasBattleAnimationsWithoutTargets
hideBattleIntroMessage
localizationKey
lockEncounterRewardTiers
maxAllowedEncounters
options
preventGameStatsUpdates
primaryPokemonRequirements
requirements
secondaryPokemonRequirements
skipEnemyBattleTurns
skipToFightInput
startOfBattleEffectsComplete

### Methods

build
setLocalizationKey
withAnimations
withAutoHideIntroVisuals
withBattleAnimationsWithoutTargets
withCatchAllowed
withContinuousEncounter
withDescription
withDisallowedChallenges
withDisallowedGameModes
withEncounterTier
withEnterIntroVisualsFromRight
withExp
withFleeAllowed
withHideWildIntroMessage
withIntro
withIntroDialogue
withIntroSpriteConfigs
withMaxAllowedEncounters
withOnInit
withOnVisualsStart
withOption
withOutroDialogue
withPreventGameStatsUpdates
withPrimaryPokemonHealthRatioRequirement
withPrimaryPokemonRequirement
withPrimaryPokemonStatusEffectRequirement
withQuery
withRewards
withScenePartySizeRequirement
withSceneRequirement
withSceneWaveRangeRequirement
withSecondaryPokemonRequirement
withSimpleDexProgressOption
withSimpleOption
withSkipEnemyBattleTurns
withSkipToFightInput
withTitle
withEncounterType

## Constructors

### constructor

- new MysteryEncounterBuilder(): MysteryEncounterBuilder

  #### Returns MysteryEncounterBuilder

## Properties

### autoHideIntroVisuals

autoHideIntroVisuals: boolean = true

Implementation of Partial.autoHideIntroVisuals

- Defined in src/data/mystery-encounters/mystery-encounter.ts:560

### catchAllowed

catchAllowed: boolean = false

Implementation of Partial.catchAllowed

- Defined in src/data/mystery-encounters/mystery-encounter.ts:563

### continuousEncounter

continuousEncounter: boolean = false

Implementation of Partial.continuousEncounter

- Defined in src/data/mystery-encounters/mystery-encounter.ts:562

### dialogue

dialogue: default = {}

Implementation of Partial.dialogue

- Defined in src/data/mystery-encounters/mystery-encounter.ts:552

### dialogueTokens

dialogueTokens: Record<string, string> = {}

Implementation of Partial.dialogueTokens

- Defined in src/data/mystery-encounters/mystery-encounter.ts:557

### enemyPartyConfigs

enemyPartyConfigs: EnemyPartyConfig [] = []

Implementation of Partial.enemyPartyConfigs

- Defined in src/data/mystery-encounters/mystery-encounter.ts:549

### enterIntroVisualsFromRight

enterIntroVisualsFromRight: boolean = false

Implementation of Partial.enterIntroVisualsFromRight

- Defined in src/data/mystery-encounters/mystery-encounter.ts:561

### excludePrimaryFromSupportRequirements

excludePrimaryFromSupportRequirements: boolean = true

Implementation of Partial.excludePrimaryFromSupportRequirements

- Defined in src/data/mystery-encounters/mystery-encounter.ts:556

### expMultiplier

expMultiplier: number = 1

Implementation of Partial.expMultiplier

- Defined in src/data/mystery-encounters/mystery-encounter.ts:572

### fleeAllowed

fleeAllowed: boolean = true

Implementation of Partial.fleeAllowed

- Defined in src/data/mystery-encounters/mystery-encounter.ts:564

### hasBattleAnimationsWithoutTargets

hasBattleAnimationsWithoutTargets: boolean = false

Implementation of Partial.hasBattleAnimationsWithoutTargets

- Defined in src/data/mystery-encounters/mystery-encounter.ts:567

### hideBattleIntroMessage

hideBattleIntroMessage: boolean = false

Implementation of Partial.hideBattleIntroMessage

- Defined in src/data/mystery-encounters/mystery-encounter.ts:559

### localizationKey

localizationKey: string = ""

- Defined in src/data/mystery-encounters/mystery-encounter.ts:551

### lockEncounterRewardTiers

lockEncounterRewardTiers: boolean = false

- Defined in src/data/mystery-encounters/mystery-encounter.ts:565

### maxAllowedEncounters

maxAllowedEncounters: number = 3

Implementation of Partial.maxAllowedEncounters

- Defined in src/data/mystery-encounters/mystery-encounter.ts:571

### options

options: [ default , default , ... default []]

Implementation of Partial.options

- Defined in src/data/mystery-encounters/mystery-encounter.ts:548

### preventGameStatsUpdates

preventGameStatsUpdates: boolean = false

Implementation of Partial.preventGameStatsUpdates

- Defined in src/data/mystery-encounters/mystery-encounter.ts:570

### primaryPokemonRequirements

primaryPokemonRequirements: EncounterPokemonRequirement [] = []

Implementation of Partial.primaryPokemonRequirements

- Defined in src/data/mystery-encounters/mystery-encounter.ts:554

### requirements

requirements: EncounterSceneRequirement [] = []

Implementation of Partial.requirements

- Defined in src/data/mystery-encounters/mystery-encounter.ts:553

### secondaryPokemonRequirements

secondaryPokemonRequirements: EncounterPokemonRequirement [] = []

Implementation of Partial.secondaryPokemonRequirements

- Defined in src/data/mystery-encounters/mystery-encounter.ts:555

### skipEnemyBattleTurns

skipEnemyBattleTurns: boolean = false

Implementation of Partial.skipEnemyBattleTurns

- Defined in src/data/mystery-encounters/mystery-encounter.ts:568

### skipToFightInput

skipToFightInput: boolean = false

Implementation of Partial.skipToFightInput

- Defined in src/data/mystery-encounters/mystery-encounter.ts:569

### startOfBattleEffectsComplete

startOfBattleEffectsComplete: boolean = false

- Defined in src/data/mystery-encounters/mystery-encounter.ts:566

## Methods

### build

- build(this: IMysteryEncounter ): default

  Builds the mystery encounter

  #### Parameters

  - this: IMysteryEncounter

  #### Returns default

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:1110

### setLocalizationKey

- setLocalizationKey(localizationKey: string): this

  Sets the localization key used by the encounter

  #### Parameters

  - localizationKey: string

    the string used as the key

  #### Returns this

  `this`

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:684

### withAnimations

- withAnimations(
  ...encounterAnimations: EncounterAnim [],
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "encounterAnimations">,
  >

  Defines any EncounterAnim animations that are intended to be used during the encounter EncounterAnims are custom battle animations (think Ice Beam) that can be played at any point during an encounter or callback They just need to be specified here so that resources are loaded on encounter init

  #### Parameters

  - ...encounterAnimations: EncounterAnim []

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "encounterAnimations">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:716

### withAutoHideIntroVisuals

- withAutoHideIntroVisuals(
  autoHideIntroVisuals: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "autoHideIntroVisuals">,
  >

  #### Parameters

  - autoHideIntroVisuals: boolean

    If `false`, will not hide the intro visuals that are displayed at the beginning of encounter

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "autoHideIntroVisuals">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:1015

### withBattleAnimationsWithoutTargets

- withBattleAnimationsWithoutTargets(
  hasBattleAnimationsWithoutTargets: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "hasBattleAnimationsWithoutTargets">,
  >

  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">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:765

### withCatchAllowed

- withCatchAllowed(
  catchAllowed: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "catchAllowed">,
  >

  Can set whether catching is allowed or not on the encounter This flag can also be programmatically set inside option event functions or elsewhere

  #### Parameters

  - catchAllowed: boolean

    If `true`, allows enemy pokemon to be caught during the encounter

  #### Returns MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "catchAllowed">>

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:986

### withContinuousEncounter

- withContinuousEncounter(
  continuousEncounter: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "continuousEncounter">,
  >

  If true, encounter will continuously run through multiple battles/puzzles/etc. instead of going to next wave MUST EVENTUALLY BE DISABLED TO CONTINUE TO NEXT WAVE Default false

  #### Parameters

  - continuousEncounter: boolean

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "continuousEncounter">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:753

### withDescription

- withDescription(description: string): this

  Add a description of the encounter

  #### Parameters

  - description: string

    Description of the encounter

  #### Returns this

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:1060

### withDisallowedChallenges

- withDisallowedChallenges(
  ...disallowedChallenges: Challenges [],
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "disallowedChallenges">,
  >

  Defines any challenges (from Challenge game mode) where the Mystery Encounter should NOT spawn

  #### Parameters

  - ...disallowedChallenges: Challenges []

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "disallowedChallenges">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:740

### withDisallowedGameModes

- withDisallowedGameModes(
  ...disallowedGameModes: GameModes [],
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "disallowedGameModes">,
  >

  Defines any game modes where the Mystery Encounter should NOT spawn

  #### Parameters

  - ...disallowedGameModes: GameModes []

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "disallowedGameModes">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:728

### withEncounterTier

- withEncounterTier(
  encounterTier: MysteryEncounterTier ,
  ): MysteryEncounterBuilder & Pick< IMysteryEncounter , "encounterTier">

  Sets the rarity tier for an encounter If not specified, defaults to COMMON Tiers are: COMMON 32/64 odds GREAT 16/64 odds ULTRA 10/64 odds ROGUE 6/64 odds ULTRA_RARE Not currently used

  #### Parameters

  - encounterTier: MysteryEncounterTier

  #### Returns MysteryEncounterBuilder & Pick< IMysteryEncounter , "encounterTier">

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:705

### withEnterIntroVisualsFromRight

- withEnterIntroVisualsFromRight(
  enterIntroVisualsFromRight: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "enterIntroVisualsFromRight">,
  >

  #### Parameters

  - enterIntroVisualsFromRight: boolean

    If `true`, will slide in intro visuals from the right side of the screen. If false, slides in from left, as normal Default false

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "enterIntroVisualsFromRight">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:1026

### withExp

- withExp(
  doEncounterExp: () => boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "doEncounterExp">,
  >

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

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:955

### withFleeAllowed

- withFleeAllowed(
  fleeAllowed: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "fleeAllowed">,
  >

  Can set whether fleeing is allowed or not on the encounter

  #### Parameters

  - fleeAllowed: boolean

    If `false`, prevents fleeing from a wild battle (trainer battle MEs already have flee disabled)

  #### Returns MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "fleeAllowed">>

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:995

### withHideWildIntroMessage

- withHideWildIntroMessage(
  hideBattleIntroMessage: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "hideBattleIntroMessage">,
  >

  #### Parameters

  - hideBattleIntroMessage: boolean

    If `true`, will not show the trainerAppeared/wildAppeared/bossAppeared message for an encounter

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "hideBattleIntroMessage">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:1003

### withIntro

- withIntro(
  __namedParameters: {
  dialogue?: TextDisplay [];
  spriteConfigs: MysteryEncounterSpriteConfig [];
  },
  ): MysteryEncounterBuilder

  #### Parameters

  - __namedParameters: { dialogue?: TextDisplay []; spriteConfigs: MysteryEncounterSpriteConfig [] }

  #### Returns MysteryEncounterBuilder

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:669

### withIntroDialogue

- withIntroDialogue(dialogue?: undefined | TextDisplay []): this

  #### Parameters

  - dialogue: undefined | TextDisplay [] = []

  #### Returns this

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:664

### withIntroSpriteConfigs

- withIntroSpriteConfigs(
  spriteConfigs: MysteryEncounterSpriteConfig [],
  ): MysteryEncounterBuilder & Pick< IMysteryEncounter , "spriteConfigs">

  Defines the sprites that will be shown on the enemy field when the encounter spawns Can be one or more sprites, recommended not to exceed 4

  #### Parameters

  - spriteConfigs: MysteryEncounterSpriteConfig []

  #### Returns MysteryEncounterBuilder & Pick< IMysteryEncounter , "spriteConfigs">

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:658

### withMaxAllowedEncounters

- withMaxAllowedEncounters(
  maxAllowedEncounters: number,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "maxAllowedEncounters">,
  >

  Sets the maximum number of times that an encounter can spawn in a given Classic run

  #### Parameters

  - maxAllowedEncounters: number

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "maxAllowedEncounters">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:807

### withOnInit

- withOnInit(
  onInit: () => boolean,
  ): MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "onInit">>

  Can be used to perform init logic before intro visuals are shown and before the MysteryEncounterPhase begins Useful for performing things like procedural generation of intro sprites, etc.

  #### Parameters

  - onInit: () => boolean

    Synchronous callback function to perform as soon as the encounter is selected for the next phase

  #### Returns MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "onInit">>

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:966

### withOnVisualsStart

- withOnVisualsStart(
  onVisualsStart: () => boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "onVisualsStart">,
  >

  Can be used to perform some extra logic (usually animations) when the enemy field is finished sliding in

  #### Parameters

  - onVisualsStart: () => boolean

    Synchronous callback function to perform as soon as the enemy field finishes sliding in

  #### Returns MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "onVisualsStart">>

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:976

### withOption

- withOption(
  option: default ,
  ): MysteryEncounterBuilder & Pick< IMysteryEncounter , "options">

  Defines an option for the encounter. Use for complex options. There should be at least 2 options defined and no more than 4.

  #### Parameters

  - option: default

    MysteryEncounterOption to add, can use MysteryEncounterOptionBuilder to create instance

  #### Returns MysteryEncounterBuilder & Pick< IMysteryEncounter , "options">

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:598

### withOutroDialogue

- withOutroDialogue(dialogue?: undefined | TextDisplay []): this

  Add outro dialogue/s for the encounter

  #### Parameters

  - dialogue: undefined | TextDisplay [] = []

    Outro dialogue(s)

  #### Returns this

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:1100

### withPreventGameStatsUpdates

- withPreventGameStatsUpdates(
  preventGameStatsUpdates: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "preventGameStatsUpdates">,
  >

  If true, will prevent updating GameStats for encountering and/or defeating Pokemon Default `false`

  #### Parameters

  - preventGameStatsUpdates: boolean

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "preventGameStatsUpdates">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:796

### withPrimaryPokemonHealthRatioRequirement

- withPrimaryPokemonHealthRatioRequirement(
  requiredHealthRange: [number, number],
  minNumberOfPokemon?: number,
  invertQuery?: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "primaryPokemonRequirements">,
  >

  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">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:902

### withPrimaryPokemonRequirement

- withPrimaryPokemonRequirement(
  requirement: EncounterPokemonRequirement ,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "primaryPokemonRequirements">,
  >

  Add a primary pokemon requirement

  #### Parameters

  - requirement: EncounterPokemonRequirement

    `EncounterPokemonRequirement`

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

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:863

### withPrimaryPokemonStatusEffectRequirement

- withPrimaryPokemonStatusEffectRequirement(
  statusEffect: StatusEffect | StatusEffect [],
  minNumberOfPokemon?: number,
  invertQuery?: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "primaryPokemonRequirements">,
  >

  Add a primary pokemon status effect requirement

  #### Parameters

  - statusEffect: StatusEffect | StatusEffect []

    the status effect/s to check

  - minNumberOfPokemon: number = 1

    minimum number of pokemon to have the effect

  - invertQuery: boolean = false

    if true will invert the query

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

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:884

### withQuery

- withQuery(query: string): this

  Add a query for the encounter

  #### Parameters

  - query: string

    Query to use for the encounter

  #### Returns this

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:1080

### withRewards

- withRewards(
  doEncounterRewards: () => boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "doEncounterRewards">,
  >

  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">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:941

### withScenePartySizeRequirement

- withScenePartySizeRequirement(
  min: number,
  max?: number,
  excludeDisallowedPokemon?: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "requirements">,
  >

  Specifies a party size requirement for an encounter.

  #### Parameters

  - min: number

    min wave (or exact size if only min is given)

  - `Optional` max: number

    optional max size. If not given, defaults to min => exact wave

  - excludeDisallowedPokemon: boolean = false

    if true, only counts allowed (legal in Challenge/unfainted) mons

  #### Returns MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "requirements">>

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:849

### withSceneRequirement

- withSceneRequirement(
  requirement: EncounterSceneRequirement ,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "requirements">,
  >

  Specifies a requirement for an encounter For example, passing requirement as "new WaveCountRequirement([2, 180])" would create a requirement that the encounter can only be spawned between waves 2 and 180 Existing Requirement objects are defined in mystery-encounter-requirements.ts, and more can always be created to meet a requirement need

  #### Parameters

  - requirement: EncounterSceneRequirement

  #### Returns MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "requirements">>

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:820

### withSceneWaveRangeRequirement

- withSceneWaveRangeRequirement(
  min: number,
  max?: number,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "requirements">,
  >

  Specifies a wave range requirement for an encounter.

  #### Parameters

  - min: number

    min wave (or exact wave if only min is given)

  - `Optional` max: number

    optional max wave. If not given, defaults to min => exact wave

  #### Returns MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "requirements">>

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:837

### withSecondaryPokemonRequirement

- withSecondaryPokemonRequirement(
  requirement: EncounterPokemonRequirement ,
  excludePrimaryFromSecondaryRequirements?: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "secondaryPokemonRequirements">,
  >

  #### Parameters

  - requirement: EncounterPokemonRequirement
  - excludePrimaryFromSecondaryRequirements: boolean = false

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "secondaryPokemonRequirements">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:915

### withSimpleDexProgressOption

- withSimpleDexProgressOption(
  dialogue: OptionTextDisplay ,
  callback: OptionPhaseCallback ,
  ): MysteryEncounterBuilder & Pick< IMysteryEncounter , "options">

  Defines an option + phasefor the encounter. Use for easy/streamlined options. There should be at least 2 options defined and no more than 4. If complex use `MysteryEncounterBuilder.withOption`

  #### Parameters

  - dialogue: OptionTextDisplay

    `OptionTextDisplay`

  - callback: OptionPhaseCallback

    `OptionPhaseCallback`

  #### Returns MysteryEncounterBuilder & Pick< IMysteryEncounter , "options">

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:639

### withSimpleOption

- withSimpleOption(
  dialogue: OptionTextDisplay ,
  callback: OptionPhaseCallback ,
  ): MysteryEncounterBuilder & Pick< IMysteryEncounter , "options">

  Defines an option + phasefor the encounter. Use for easy/streamlined options. There should be at least 2 options defined and no more than 4. If complex use `MysteryEncounterBuilder.withOption`

  #### Parameters

  - dialogue: OptionTextDisplay

    `OptionTextDisplay`

  - callback: OptionPhaseCallback

    `OptionPhaseCallback`

  #### Returns MysteryEncounterBuilder & Pick< IMysteryEncounter , "options">

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:617

### withSkipEnemyBattleTurns

- withSkipEnemyBattleTurns(
  skipEnemyBattleTurns: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "skipEnemyBattleTurns">,
  >

  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

  - skipEnemyBattleTurns: boolean

  #### Returns MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "skipEnemyBattleTurns">,
  >

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:777

### withSkipToFightInput

- withSkipToFightInput(
  skipToFightInput: boolean,
  ): MysteryEncounterBuilder & Required<
  Pick< IMysteryEncounter , "skipToFightInput">,
  >

  If true, will skip COMMAND input and go straight to FIGHT (move select) input menu Default false

  #### Parameters

  - skipToFightInput: boolean

  #### Returns MysteryEncounterBuilder & Required<Pick< IMysteryEncounter , "skipToFightInput">>

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:788

### withTitle

- withTitle(title: string): this

  Add a title for the encounter

  #### Parameters

  - title: string

    Title of the encounter

  #### Returns this

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:1040

### `Static` withEncounterType

- withEncounterType(
  encounterType: MysteryEncounterType ,
  ): MysteryEncounterBuilder & Pick< IMysteryEncounter , "encounterType">

  #### Parameters

  - encounterType: MysteryEncounterType

  #### Returns MysteryEncounterBuilder & Pick< IMysteryEncounter , "encounterType">

  this

  #### Statif

  Defines the type of encounter which is used as an identifier, should be tied to a unique MysteryEncounterType NOTE: if new functions are added to `MysteryEncounter` class

  - Defined in src/data/mystery-encounters/mystery-encounter.ts:584