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

# Function selectOptionThenPokemon

- selectOptionThenPokemon(
  options: OptionSelectItem [],
  optionSelectPromptKey: string,
  selectablePokemonFilter?: PokemonSelectFilter ,
  onHoverOverCancelOption?: () => void,
  ): Promise<null | PokemonAndOptionSelected>

  This function is intended for use inside `onPreOptionPhase()` of an encounter option

  If a second option needs to be selected, `onPokemonSelected` should return a `OptionSelectItem` `[]` object

  #### Parameters

  - options: OptionSelectItem []
  - optionSelectPromptKey: string
  - `Optional` selectablePokemonFilter: PokemonSelectFilter
  - `Optional` onHoverOverCancelOption: () => void

  #### Returns Promise<null | PokemonAndOptionSelected>

  - Defined in src/data/mystery-encounters/utils/encounter-phase-utils.ts:666