Catch rate/Capture method (Generation II)/Modified catch rate

The modified catch rate a is calculated in Generation II as follows:

a = max((3 × HPmax - 2 × HPcurrent) × ratemodified / (3 × HPmax), 1) + bonusstatus

with the final value rounded down to the nearest integer, where
 * HPmax is the number of hit points the Pokémon has at full health,
 * HPcurrent is the number of hit points the Pokémon has at the moment,
 * ratemodified is the catch rate of the Pokémon modified by the ball used, but no less than 1 and no more than 255,
 * bonusstatus is the modifier for any status condition the Pokémon has (10 for sleep or freeze, 0 otherwise).
 * bonusstatus was intended to equal 5 for paralyze, poison, or burn, but due to a glitch, the game skips this check.

If 3 × HPmax > 255, then both 3 × HPmax and 2 × HPcurrent are halved twice (and rounded down after each division) for use in the formula, as the values used are unsigned 8-bit integers. If the latter product is 0, it is set to 1 instead.

If the Pokémon's HP is 342 or greater, the 3 × HPmax value will be truncated and the subtraction may underflow, giving bizarre results and even making it possible for the game to freeze; however, no such Pokémon can be legitimately encountered in-game.

a is capped at 255.