New combat code with new characters
I recently updated to latest code on github and applied all sql updates including the sql to tweak AC values of npc_types. There seems to be some issues present when new (Level 1-3) PCs attempt combat with low level (Level 1-3) NPCs. For example, I tested with a new Iksar Monk equipped with a Jade Mace vs trash mobs in the Gloomingdeep tutorialb zone.
After I advanced to level 2 or 3, my kicks did begin to apply positive damage to NPCs, However, hand to hand attacks or 1HB attacks with a jade mace still failed to produce any damage on the NPCs.
Here's some snippets from my Log:Detail of Attack and Combat (using 1HB with a Jade Mace). I think the root cause of the significant negative value of min_hit is going to be in the calculation of the DamageHitInfo struct min_ damage value, which I'm still digging into and learning more about. If anyone has come across this already, I'd be interested to hear your findings.
In MeleeMitigation:
Log.Out(Logs::Detail, Logs::Attack, "mitigation %d vs offense %d. base %d rolled %f damage %d", mitigation, hit.offense, hit.base_damage, roll, hit.damage_done);
mitigation 9 vs offense 31. base 9 rolled 2.000000 damage 18
Log.Out(Logs::Detail, Logs::Combat, "Damage calculated: base %d min damage %d skill %d", my_hit.base_damage, my_hit.min_damage, my_hit.skill);
Damage calculated: base 9 min damage -858993460 skill 0
Finally, in DoAttack:
Log.Out(Logs::Detail, Logs::Combat, "Final damage after all reductions: %d", hit.damage_done);
Final damage after all reductions: -858993442
(I would have assumed a 18 point damage attack applied against the NPC here)
Attacking a_cave_bat000 with hand 13
Attacking with weapon: Jade Mace (6612)
Weapon skill : 3
Attacking with Jade Mace in slot 13 using skill 0
Damage calculated: base 9 min damage -858993460 skill 0
Djanis::DoAttack vs a_cave_bat000 base 9 min -858993460 offense 31 tohit 75 skill 0
CheckHitChance(a_cave_bat000) attacked by Djanis
CheckHitChance accuracy(75 => 30) avoidance(11 => 1)
mitigation 9 vs offense 31. base 9 rolled 2.000000 damage 18
Final damage after all reductions: -858993442
Applying damage -858993442 done by Djanis with skill 0 and spell 65535, avoidable? yes, is not a buff tic in slot -1
Attacking a_cave_bat000 with hand 13
Attacking with weapon: Jade Mace (6612)
Weapon skill : 3
Attacking with Jade Mace in slot 13 using skill 0
Damage calculated: base 9 min damage -858993460 skill 0
Djanis::DoAttack vs a_cave_bat000 base 9 min -858993460 offense 31 tohit 75 skill 0
CheckHitChance(a_cave_bat000) attacked by Djanis
CheckHitChance accuracy(75 => 35) avoidance(11 => 1)
mitigation 9 vs offense 31. base 9 rolled 1.700000 damage 15
Final damage after all reductions: -858993445
Applying damage -858993445 done by Djanis with skill 0 and spell 65535, avoidable? yes, is not a buff tic in slot -1
*Would assume a 15 pt dmg attack applied against the NPC here
|