Im trying to make some modifications to this game. I dont fully understand some of its code, basically what this is suppose to do is generate a random shooting skill for each new soldier recruited (I think) between 28 - 49 heres the code:
Please correct me if im wrong here but what i think the first part of this is suppose to do is generate a random skill from 28 to 49, but what i cant figure out is the last part /2 + rand(21)/2 ?
Each number has the same probability of being the result of that, depending on how accurate is the RNG algorithm used.
so 10 should have a (100/11) % - about 9% -