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,
* rate is the catch rate of the Pokémon,
* bonusball is the multiplier for the Poké Ball used, and
* bonusstatus is the multiplier for any status ailment the Pokémon has (2 for sleep and freeze, 1.5 for paralyze, poison and burn).
Given this formula, the maximum value for a (if the Pokémon could have 0 HP) would be catch rate × bonusball × bonusstatus. The minimum value for a (for a Pokémon with full health) would be ⅓ × catch rate.
Calculate b as follows:
Then generate 4 random numbers between 0 and 65535, inclusive. For each number, check whether it's less than b; if so, the ball shakes once. If any number is greater than or equal to b, the Pokémon immediately breaks free. If all four of the numbers are less than b, then the Pokémon is caught. Note that if a is 255 or greater, then b is 65535 or greater, and then the Pokémon is guaranteed to be caught.
Therefore, the probability p of catching a Pokémon, given the values a and b calculated above, is:
The second expression for p may be expanded as follows:
Since (216 - 1)4 ≈ 264, we can approximate p with the following expression:
The percentage error in this approximation approaches 0 as a approaches 255, and does not exceed 21.2%.
For a constant probability p, the probability P that a player can capture the Pokémon with no more than r tries is:
Note that this is the cumulative probability function for a geometric distribution. The expected value of r is 1/p, that is to say, on average, a Pokémon that can be caught with probability p will be caught with 1/p tries.
The inverse problem, the number of tries, r, needed to have a probability P of capturing a Pokémon is:
Thu Jan 16, 2020 5:33 am by Naruhi
» Oh look, a forum I haven't been on in 7 centuries.
Tue Jul 30, 2013 12:17 am by Narry
» Apology
Mon Jul 08, 2013 5:54 am by BloodRose no. Takashi
» Bianco Drago Della Leggenda
Mon Jun 03, 2013 4:43 pm by Naruhi
» Anime Alliance Unite
Tue May 28, 2013 11:33 am by Senkokura
» :D
Fri May 24, 2013 9:40 pm by Narry
» [Zanpakuto]-[Araragi, Narora] Akashiya, Moka
Fri May 24, 2013 9:26 pm by Narry
» The Phenomenon Returns
Thu May 02, 2013 4:20 am by Naruhi
» Senkokura Reiken [W.I.P]
Mon Apr 29, 2013 11:41 am by Senkokura