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

# Function selectPokemonForOption

- selectPokemonForOption(
  onPokemonSelected: (pokemon: PlayerPokemon ) => void | OptionSelectItem [],
  onPokemonNotSelected?: () => void,
  selectablePokemonFilter?: PokemonSelectFilter ,
  ): Promise<boolean>

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

  #### Parameters

  - onPokemonSelected: (pokemon: PlayerPokemon ) => void | OptionSelectItem []

    Any logic that needs to be performed when Pokemon is chosen If a second option needs to be selected, onPokemonSelected should return a OptionSelectItem[] object

  - `Optional` onPokemonNotSelected: () => void

    Any logic that needs to be performed if no Pokemon is chosen

  - `Optional` selectablePokemonFilter: PokemonSelectFilter

  #### Returns Promise<boolean>

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