Thread: 4.0.4 bugs
View Single Post
Old March 8, 2016, 11:49   #177
PowerWyrm
Veteran
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,075
PowerWyrm is on a distinguished road
Quote:
Originally Posted by TJS View Post
Something I noticed on my last game, magic device damage never seems to change with character device skill. For example a wand of drain life is always 150, the only difference seems to be how much it lists your device skill contributes to it.
In effect_calculate_value():

Code:
if (use_boost) final *= (100 + context->boost) / 100;
I zapped a rod of fire balls, final = 144, boost = 8%, calculation does 144 * ((100 + 8) / 100), so gives 144 due to the rounding down.

Change this to:

Code:
if (use_boost) final = final * (100 + context->boost) / 100;
Same rod zapped, calculation does (144 * (100 + 8)) / 100, which gives the proper value of 155.
__________________
PWMAngband variant maintainer - check http://www.mangband.org/forum/viewforum.php?f=9 to learn more about this new variant!
PowerWyrm is offline   Reply With Quote