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

# Function trainerThrowPokeball

- trainerThrowPokeball(
  pokemon: EnemyPokemon ,
  pokeballType: PokeballType ,
  ballTwitchRate?: number,
  ): Promise<boolean>

  Alternative to using AttemptCapturePhase Assumes player sprite is visible on the screen (this is intended for non-combat uses)

  Can await returned promise to wait for throw animation completion before continuing

  #### Parameters

  - pokemon: EnemyPokemon
  - pokeballType: PokeballType
  - `Optional` ballTwitchRate: number

    can pass custom ball catch rates (for special events, like safari)

  #### Returns Promise<boolean>

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