Line 1023 is this: prof += (random(30) - random(30));
Basically it's an arbitrary method of giving between -29% damage to +29% damage.
Anyone got a good explanation why its in there?
Line 1023 is this: prof += (random(30) - random(30));
Basically it's an arbitrary method of giving between -29% damage to +29% damage.
Anyone got a good explanation why its in there?
TL;DR - this basically meaningless code snippet that wastes cycles. Speculatively someone wanted more "randomness" with poor understanding of how to do that :P
Long answer -- Because nobody can accuse SG wizzes of being good at math :) The combat code is duck taped together with one-off fixes and should probably get a rewrite from scratch.
Specifically to your question:
1d6 has an average of 3.5 and a standard deviation of 1.7.
Modified with the prof += (random(30) - random(30)),... the average is 3.0 and a standard deviation of 1.8.
Why?? because when the proficiency is 70% * a roll of 1 = 0.7 which is rounded down to 0.
1d100 has an average of 50.50 and a standard deviation of 28.87
Modified with the prof += (random(30) - random(30)),... the average is 50.05 and a standard deviation of 29.74.
Suggestion -- just pull it out, it wastes cycles and doesn't accomplish anything meaningful.