RNG is out of 10000 for everything, except hitting a target with Double Team clones and rolls 10000 is uneven for.
For hitting through Double Team, I roll out of 10000 * (1+number of clones). I use roll%10000 to determine if it hit, and int(roll/10000) to determine if it hit the pokemon or a clone. For Brick Break's hit, the roll was 2,468/50,000. The first number, 0, was used to determine whether or not it hit a clone (since this was a zero, it hit the pokemon). The rest (2468) would be used to determine whether or not the attack hit (which would be a hit).
For other rolls, I roll out of the smallest possible number that would work.
For hitting through Double Team, I roll out of 10000 * (1+number of clones). I use roll%10000 to determine if it hit, and int(roll/10000) to determine if it hit the pokemon or a clone. For Brick Break's hit, the roll was 2,468/50,000. The first number, 0, was used to determine whether or not it hit a clone (since this was a zero, it hit the pokemon). The rest (2468) would be used to determine whether or not the attack hit (which would be a hit).
For other rolls, I roll out of the smallest possible number that would work.
