Willful combat wrong damage report

Where bugs go to lie down and rest

Moderator: Moderator

Post Reply
Message
Author
Postman
Archmage
Posts: 335
Joined: Fri Dec 03, 2010 5:34 pm

Willful combat wrong damage report

#1 Post by Postman »

On sidepanel it reports 20 damage, but on character sheet it report 10 (difference in damage with and withiout)

greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Re: Willful combat wrong damage report

#2 Post by greycat »

More detail would be helpful. What were the actual before-and-after values? What weapon are you using, what are your stats, what's your talent with that weapon, what other damage-boosting equipment do you have on, etc.

I believe the physical power bonus from Willful Combat, as with every other physical power bonus, is subject to the adjustment in _M:combatDamage (in game/modules/tome/class/interface/Combat.lua) which puts diminishing returns on damage.

Code: Select all

function _M:combatDamage(weapon)
	...
	local power = math.max(self.combat_dam + (weapon.dam or 1) + add, 1)
	power = (math.sqrt(power / 10) - 1) * 0.8 + 1
	print((...))
	return self:rescaleDamage(totstat / 1.5 * power * talented_mod)
end

...

--- Scale damage values
-- This makes low damage values equal to what they should be and puts disminishing returns to super high values
function _M:rescaleDamage(dam)
	if dam <= 0 then return dam end
	return dam * (1 - math.log10(dam * 2) / 7)
end
Let's suppose we're using a steel dagger (base weapon power 10) and have 30 Dex and 25 Cun, a belt with +3 physical power, and +40% damage with knives. "add" is 0 because that's taken from Arcane Destruction, Blood Frenzy, and brawler stuff. Before Willful Combat, we have "power" = 10 + 3 +0 = 13. Then power = (sqrt(power/10)-1)*.8+1 = 1.112. "totstat" is 45% of Dex + 45% of Cun = 24.75. So we call rescaleDamage(24.75/1.5*1.112*1.4) = rescaleDamage(25.687) = 23.007.

Now let's add 20 physical power for Willful Combat. "totstat" is the same, but "power" is 10+23+0=33 before the sqrt thing. Then power = (sqrt(33/10)-1)*.8+1 = 1.653. rescaleDamage(24.75/1.5*1.653*1.4) = rescaleDamage(38.184) = 27.913. So essentially, the +20 physical power became about +5 real damage in the end, assuming we "roll" the lowest possible value on the weapon damage range thing. It will be a bit higher on most hits.

I must admit, though, I'm still struggling to understand the combat code, and have been for quite some time. I've never seen a clear, thorough explanation of it anywhere. I may not be reading it right. I should spend some time doing Science! with the game and write it up....

greycat
Sher'Tul
Posts: 1396
Joined: Tue May 11, 2010 11:51 pm

Re: Willful combat wrong damage report

#3 Post by greycat »

I rolled up a Rogue and got him through the starter zones, and picked up Willful Combat. Now I can confirm that my math was correct -- or at least, that the damage shown on the char sheet matches what I've calculated myself from the inputs. (I haven't done actual stabbing-things science yet.)

Since Willful Combat is a physical power bonus, it essentially upgrades the material level of your weapon. Which means that if you are using a low power weapon (iron dagger), it has a huge impact. If you are using a higher power weapon, it has much less of an impact.

My actual numbers are as follows: Dex 41, Cun 35, weapon base damage 5, Knife Mastery effective talent level 6.5, physical power from equipment 3.

Without Willful Combat, this gives talent_mod 1.806 (shown as +81% on the talent screen), totstat 34.2, first power 8, second power 0.916, unrescaled damage 37.72, and rescaled damage 27.6. The character screen shows 28 damage.

With Willful Combat (showing +20 on the tooltip), first power becomes 28, second power becomes 1.539, unrescaled damage becomes 63.37, and rescaled damage becomes 44.3. The character screen shows 44 damage.

I finally feel confident enough to document this on combat damage.

Post Reply