17.03.2014, 08:41
Random(x) generates numbers between 0 and X-1, including them both. So your possible cases are X, statistically speaking, if you want an 1/10 chance, all you need to do is
EDIT: Generated numbers by this algorithm are {0,1,2,3,4,5,6,7,8,9}
Код:
new chance = random(10); if(chance == 0) //it could be any number, but meh { blablabla }