diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index 37dbc432b80244baaf059d28ac6691682d8a595c..ec4f24ea39f4c311b09eb47ef3caecb27c5584b1 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -186,7 +186,7 @@ function _M:attackTarget(target, damtype, mult, noenergy, force_unharmed) -- Barehanded ? if not speed and self.combat then print("[ATTACK] attacking with innate combat") - local combat = self:getObjectCombat(o, "barehand") + local combat = self:getObjectCombat(nil, "barehand") local s, h = self:attackTargetWith(target, combat, damtype, mult) speed = math.max(speed or 0, s) hit = hit or h diff --git a/game/modules/tome/class/interface/PlayerDumpJSON.lua b/game/modules/tome/class/interface/PlayerDumpJSON.lua index 420aba1c2d6586f3b918f9990b0e77779aca3253..7b1d6fc344cd42c02cbf66987332258c7481d123 100644 --- a/game/modules/tome/class/interface/PlayerDumpJSON.lua +++ b/game/modules/tome/class/interface/PlayerDumpJSON.lua @@ -169,7 +169,7 @@ function _M:dumpToJSON(js, bypass, nosub) if self:getInven(self.INVEN_MAINHAND) then c.mainhand = {} for i, o in ipairs(self:getInven(self.INVEN_MAINHAND)) do - local mean, dam = o.combat, o.combat + local mean, dam = self:getObjectCombat(o, "mainhand"), self:getObjectCombat(o, "mainhand") if o.archery and mean then dam = (self:getInven("QUIVER")[1] and self:getInven("QUIVER")[1].combat) end @@ -187,7 +187,7 @@ function _M:dumpToJSON(js, bypass, nosub) end --Unarmed? if self:isUnarmed() then - local mean, dam = self.combat, self.combat + local mean, dam = self:getObjectCombat(nil, "barehand"), self:getObjectCombat(nil, "barehand") local d = {} c.barehand = {} c.barehand[#c.barehand+1] = d @@ -204,7 +204,7 @@ function _M:dumpToJSON(js, bypass, nosub) c.offhand = {} for i, o in ipairs(self:getInven(self.INVEN_OFFHAND)) do local offmult = self:getOffHandMult(o.combat) - local mean, dam = o.combat, o.combat + local mean, dam = self:getObjectCombat(o, "offhand"), self:getObjectCombat(o, "offhand") if o.archery and mean then dam = (self:getInven("QUIVER")[1] and self:getInven("QUIVER")[1].combat) end diff --git a/game/modules/tome/dialogs/CharacterSheet.lua b/game/modules/tome/dialogs/CharacterSheet.lua index 91edf7e0da62836d43cbe36a72fb61d6d10becd4..c503ffd721ab355e23b68e1a3086973d964fee02 100644 --- a/game/modules/tome/dialogs/CharacterSheet.lua +++ b/game/modules/tome/dialogs/CharacterSheet.lua @@ -559,7 +559,7 @@ function _M:drawDialog(kind, actor_to_compare) WeaponTxt = WeaponTxt..":" for i, o in ipairs(player:getInven(player.INVEN_MAINHAND)) do - local mean, dam = o.combat, o.combat + local mean, dam = player:getObjectCombat(o, "mainhand"), player:getObjectCombat(o, "mainhand") if o.archery and mean then dam = (player:getInven("QUIVER") and player:getInven("QUIVER")[1] and player:getInven("QUIVER")[1].combat) end @@ -584,7 +584,7 @@ function _M:drawDialog(kind, actor_to_compare) -- Handle bare-handed combat else s:drawColorStringBlended(self.font, "#LIGHT_BLUE#Unarmed:", w, h, 255, 255, 255, true) h = h + self.font_h - local mean, dam = player.combat, player.combat + local mean, dam = player:getObjectCombat(nil, "barehand"), player:getObjectCombat(nil, "barehand") if mean and dam then text = compare_fields(player, actor_to_compare, function(actor, ...) return math.floor(actor:combatAttack(...)) end, "%3d", "%+.0f", 1, false, false, mean) dur_text = ("%d"):format(math.floor(player:combatAttack(player.combat)/5)) @@ -609,7 +609,7 @@ function _M:drawDialog(kind, actor_to_compare) if player:getInven(player.INVEN_OFFHAND) then for i, o in ipairs(player:getInven(player.INVEN_OFFHAND)) do local offmult = player:getOffHandMult(o.combat) - local mean, dam = o.combat, o.combat + local mean, dam = player:getObjectCombat(o, "offhand"), player:getObjectCombat(o, "offhand") if o.archery and mean then dam = (player:getInven("QUIVER") and player:getInven("QUIVER")[1] and player:getInven("QUIVER")[1].combat) end