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

# Function getRandomEncounterSpecies

- getRandomEncounterSpecies(
  level: number,
  isBoss?: boolean,
  rerollHidden?: boolean,
  ): EnemyPokemon

  Helper function for encounters such as UncommonBreedEncounter which call for a random species including event encounters. If the mon is from the event encounter list, it will do an extra shiny roll.

  #### Parameters

  - level: number

    the level of the mon, which differs between MEs

  - isBoss: boolean = false

    whether the mon should be a Boss

  - rerollHidden: boolean = false

    whether the mon should get an extra roll for Hidden Ability

  #### Returns EnemyPokemon

  EnemyPokemon for the requested encounter

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