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

# Function getHighestLevelPlayerPokemon

- getHighestLevelPlayerPokemon(
  isAllowed?: boolean,
  isFainted?: boolean,
  ): PlayerPokemon

  Ties are broken by whatever mon is closer to the front of the party

  #### Parameters

  - isAllowed: boolean = false

    Default false. If true, only picks from legal mons.

  - isFainted: boolean = false

    Default false. If true, includes fainted mons.

  #### Returns PlayerPokemon

  - Defined in src/data/mystery-encounters/utils/encounter-pokemon-utils.ts:143