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

# Class default

Used by `MysteryEncounterOptionBuilder` class to define required/optional properties on the MysteryEncounterOption class when building.

Should ONLY contain properties that are necessary for MysteryEncounterOption construction. Post-construct and flag data properties are defined in the MysteryEncounterOption class itself.

#### Implements

- IMysteryEncounterOption

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

##### Index

### Constructors

constructor

### Properties

dialogue?
excludePrimaryFromSecondaryRequirements
hasDexProgress
onOptionPhase
onPostOptionPhase?
onPreOptionPhase?
optionMode
primaryPokemon?
primaryPokemonRequirements
requirements
secondaryPokemon?
secondaryPokemonRequirements

### Methods

hasRequirements
meetsPrimaryRequirementAndPrimaryPokemonSelected
meetsRequirements
meetsSupportingRequirementAndSupportingPokemonSelected
pokemonMeetsPrimaryRequirements

## Constructors

### constructor

- new default(option: null | IMysteryEncounterOption ): default

  #### Parameters

  - option: null | IMysteryEncounterOption

  #### Returns default

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

## Properties

### `Optional` dialogue

dialogue?: OptionTextDisplay

Dialogue object containing all the dialogue, messages, tooltips, etc. for this option Will be populated on MysteryEncounter initialization

Implementation of IMysteryEncounterOption.dialogue

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

### excludePrimaryFromSecondaryRequirements

excludePrimaryFromSecondaryRequirements: boolean

Implementation of IMysteryEncounterOption.excludePrimaryFromSecondaryRequirements

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

### hasDexProgress

hasDexProgress: boolean

Implementation of IMysteryEncounterOption.hasDexProgress

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

### onOptionPhase

onOptionPhase: OptionPhaseCallback

Business logic function for option

Implementation of IMysteryEncounterOption.onOptionPhase

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

### `Optional` onPostOptionPhase

onPostOptionPhase?: OptionPhaseCallback

Executes after the encounter is over. Usually this will be for calculating dialogueTokens or performing data updates

Implementation of IMysteryEncounterOption.onPostOptionPhase

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

### `Optional` onPreOptionPhase

onPreOptionPhase?: OptionPhaseCallback

Executes before any following dialogue or business logic from option. Usually this will be for calculating dialogueTokens or performing scene/data updates

Implementation of IMysteryEncounterOption.onPreOptionPhase

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

### optionMode

optionMode: MysteryEncounterOptionMode

Implementation of IMysteryEncounterOption.optionMode

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

### `Optional` primaryPokemon

primaryPokemon?: PlayerPokemon

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

### primaryPokemonRequirements

primaryPokemonRequirements: EncounterPokemonRequirement []

Implementation of IMysteryEncounterOption.primaryPokemonRequirements

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

### requirements

requirements: EncounterSceneRequirement []

Implementation of IMysteryEncounterOption.requirements

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

### `Optional` secondaryPokemon

secondaryPokemon?: PlayerPokemon []

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

### secondaryPokemonRequirements

secondaryPokemonRequirements: EncounterPokemonRequirement []

Implementation of IMysteryEncounterOption.secondaryPokemonRequirements

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

## Methods

### hasRequirements

- hasRequirements(): boolean

  Returns true if option contains any EncounterRequirements, false otherwise.

  #### Returns boolean

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

### meetsPrimaryRequirementAndPrimaryPokemonSelected

- meetsPrimaryRequirementAndPrimaryPokemonSelected(): boolean

  Returns true if all PRIMARY EncounterRequirements for the option are met, AND there is a valid Pokemon assigned to `primaryPokemon`. If both `primaryPokemonRequirements` and `secondaryPokemonRequirements` are defined, can cause scenarios where there are not enough Pokemon that are sufficient for all requirements.

  #### Returns boolean

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

### meetsRequirements

- meetsRequirements(): boolean

  Returns true if all EncounterRequirements for the option are met

  #### Returns boolean

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

### meetsSupportingRequirementAndSupportingPokemonSelected

- meetsSupportingRequirementAndSupportingPokemonSelected(): boolean

  Returns true if all SECONDARY EncounterRequirements for the option are met, AND there is a valid Pokemon assigned to `secondaryPokemon` (if applicable). If both `primaryPokemonRequirements` and `secondaryPokemonRequirements` are defined, can cause scenarios where there are not enough Pokemon that are sufficient for all requirements.

  #### Returns boolean

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

### pokemonMeetsPrimaryRequirements

- pokemonMeetsPrimaryRequirements(pokemon: default ): boolean

  Returns true if all PRIMARY EncounterRequirements for the option are met

  #### Parameters

  - pokemon: default

  #### Returns boolean

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