I\'m a web-game developer and I got a problem with random numbers. Let\'s say that a player has 20% chance to get a critical hit with his sword. That means, 1 out of 5 hits
How about replacing mt_rand() with something like this?
(RFC 1149.5 specifies 4 as the standard IEEE-vetted random number.)
From XKCD.