Bugfix/Refactor: Min-Max Damage Range Calculations
Refactors damage calculations from the format:
damage = min + rnd(max - min + 1)
to:
damage = randombetween(min, max)
Also fixes a bug in some damage calculations, where max damage in the range is 63/64th lower than it should be.
Looks like this made the demo run off the rails
This likely addresses all the uses qndel identified in https://github.com/diasurgical/devilutionX/pull/6402 except the item.cpp changes, good to keep it focused for damage rolls.
Looks like this made the demo run off the rails
Should be good now?
I think it would be nice to unify randomizing damage in the future - at the moment sometimes numbers are randomized before getting shifted, sometimes after, it's a mess - which means in some cases it's possible to get 1.5 dmg while in other places you'd get integers only - doesn't make much sense imo ;)