this is something i noticed that i thought was kind of odd:
for eggs in gen 4, they do (rand() * 100) /65535 and compare it to 20/50/70 as percentages. rand stretches from 0-FFFF, so that makes a percent out of the rand return for easy comparison.
in gen 5, they do if(rand(1600) < (20/50/70)...