Skip to content
Snippets Groups Projects
Commit cd5b3171 authored by Alex Ksandra's avatar Alex Ksandra
Browse files

The idea was right but the execution could've been a lot better! It is now!

parent 0e005e46
No related branches found
No related tags found
No related merge requests found
......@@ -665,11 +665,11 @@ function _M:getTextualDesc(compare_with, use_actor)
local desc_combat = function(combat, compare_with, field, add_table, is_fake_add)
add_table = add_table or {}
add_table.dammod = add_table.dammod or {}
combat = combat[field] or {}
combat = table.clone(combat[field] or {})
compare_with = compare_with or {}
local dm = {}
local dammod = {}
if next(combat.dammod or {}) then dammod = use_actor:getDammod(combat) end
combat.dammod = table.mergeAdd(table.clone(combat.dammod or {}), add_table.dammod)
local dammod = use_actor:getDammod(combat)
for stat, i in pairs(dammod) do
local name = Stats.stats_def[stat].short_name:capitalize()
if use_actor:knowTalent(use_actor.T_STRENGTH_OF_PURPOSE) then
......@@ -678,7 +678,7 @@ function _M:getTextualDesc(compare_with, use_actor)
if self.subtype == "dagger" and use_actor:knowTalent(use_actor.T_LETHALITY) then
if name == "Str" then name = "Cun" end
end
dm[#dm+1] = ("%d%% %s"):format((i + (add_table.dammod[stat] or 0)) * 100, name)
dm[#dm+1] = ("%d%% %s"):format(i * 100, name)
end
if #dm > 0 or combat.dam then
local diff_count = 0
......@@ -1542,7 +1542,7 @@ function _M:getTextualDesc(compare_with, use_actor)
if (w and w.combat or can_combat_unarmed) and (use_actor:knowTalent(use_actor.T_EMPTY_HAND) or use_actor:attr("show_gloves_combat")) then
desc:add({"color","YELLOW"}, "When used to modify unarmed attacks:", {"color", "LAST"}, true)
compare_tab = { dam=1, atk=1, apr=0, physcrit=0, physspeed =(use_actor:knowTalent(use_actor.T_EMPTY_HAND) and 0.6 or 1), dammod=use_actor:getDammod({dammod={str=1}}), damrange=1.1 }
compare_tab = { dam=1, atk=1, apr=0, physcrit=0, physspeed =(use_actor:knowTalent(use_actor.T_EMPTY_HAND) and 0.6 or 1), dammod={str=1}, damrange=1.1 }
desc_combat(w, compare_unarmed, "combat", compare_tab, true)
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment