27
edits
(Simplify range of possible values for a) |
m (grammar fix; and is it supposed to say "greater"? otherwise it doesn't make sense) |
||
Line 13: | Line 13: | ||
If ''a'' is greater than or equal to 255, then the Pokémon is caught. If not, then calculate ''b'' as follows: | If ''a'' is greater than or equal to 255, then the Pokémon is caught. If not, then calculate ''b'' as follows: | ||
: [[Image:Catch formula 2.png]] | : [[Image:Catch formula 2.png]] | ||
Then generate 4 random numbers between 0 and 65535, inclusive. If the random numbers are | Then generate 4 random numbers between 0 and 65535, inclusive. If the random numbers are greater than or equal to ''b'', then the Pokémon is caught; otherwise the ball shakes ''n'' times, where ''n'' is the number of random numbers that are less than ''b''. Note that ''b'' ≥ 65535 if ''a'' ≥ 255. | ||
Therefore, the probability ''p'' of catching a Pokémon, given the values ''a'' and ''b'' calculated above, is: | Therefore, the probability ''p'' of catching a Pokémon, given the values ''a'' and ''b'' calculated above, is: |
edits