>>30297507>>30297554Let's do a little math here.
So to determine rarity, we'll need a scale. A good scale would be catch rate. Base rarity is equal to 256 - the catch rate, but it has modifiers based on what ball it's in (Sorry, balltists)
normal ball = x1
great ball = x0.5
ultra ball = x0.25
master ball = x0.1
And so on.
Next, you take the level and add that to the base rarity.
At this point, the calculation for, say, a Level 5 Yungoos caught in a regular ball would be...
1(256-c.r.) * 1(ball) + 5 = 7
But that's not where it ends.
Hidden Ability mons would have a multiplier of x1 2/3 (in gen 5, if the mother pokemon had a HA, it had a 1 in 1 2/3 chance to pass that down to the child.)
Legendaries would have a multiplier of x802/38
(out of the 802 species of pokemon, 38 are legends)
MYTHICALS would have a multiplier of x802/16, in addition to the multiplier for being legendary.
Shinies would have a multiplier of x4000 (1 in 4000 chance of encountering a shiny in the wild with no other mods)