If you do it completely random, 50-200% yields a median and average damage of 125%. To get 100% as a median, you could do something more like this:
Roll floating point from 1. to 2. = A
Random bit 0 or 1 = B
Weapon power = C
Weapon damage = D
If B = 1 then:
CA = D
If B = 0 then:
C/A = D
- - - - -
You can adjust the range by changing the top value of A.
For example, if A were 1.6824431, and we have a weapon power of 60:
- If B=1 then the damage is 60*~1.68 = 101.
- If B=0 then the damage is 60/~1.68 = 36.
This equation will prevent the low value from ever going beneath 0% no matter how high the high value goes. The average won't stay at 100% but the median will, and the average will be closer to 100% than with a linear equation. In the above case, the average damage would be 112.5%.
Linear median/average: 125/125
Suggestion median/average: 100/112.5
To add another more extreme example, I'll use the same 60 power as before but a range of 10-1000% damage.
A is a random floating point from 1. to 10.. Say we roll 8.7296503
- If B=1 then the damage is 60*~8.73 = 524.
- If B=0 then the damage is 60/~8.73 = 7.
Linear median/average: 505/505
Suggestion median/average: 100/302.5