Commit 5eaa66af1688174658df9245bac5e1f0ab88f011
1 parent
4164785a
Fixed unarmed display of combat speed on gloves/gauntlets
Showing
1 changed file
with
3 additions
and
3 deletions
... | ... | @@ -484,7 +484,7 @@ function _M:getTextualDesc(compare_with, use_actor) |
484 | 484 | end |
485 | 485 | end |
486 | 486 | |
487 | - local desc_combat = function(combat, compare_with, field, add_table) | |
487 | + local desc_combat = function(combat, compare_with, field, add_table, is_fake_add) | |
488 | 488 | add_table = add_table or {} |
489 | 489 | add_table.dammod = add_table.dammod or {} |
490 | 490 | combat = combat[field] or {} |
... | ... | @@ -539,7 +539,7 @@ function _M:getTextualDesc(compare_with, use_actor) |
539 | 539 | compare_fields(combat, compare_with, field, "atk", "%+d", "Accuracy: ", 1, false, false, add_table) |
540 | 540 | compare_fields(combat, compare_with, field, "apr", "%+d", "Armour Penetration: ", 1, false, false, add_table) |
541 | 541 | compare_fields(combat, compare_with, field, "physcrit", "%+.1f%%", "Physical crit. chance: ", 1, false, false, add_table) |
542 | - compare_fields(combat, compare_with, field, "physspeed", function() return ("%.0f%%"):format(100/(combat.physspeed or 1)) end, "Attack speed: ", 100, false, true, add_table) | |
542 | + compare_fields(combat, compare_with, field, "physspeed", function() return ("%.0f%%"):format(100/((is_fake_add and 1 or 0) + (combat.physspeed or 1))) end, "Attack speed: ", 100, false, true, add_table) | |
543 | 543 | |
544 | 544 | compare_fields(combat, compare_with, field, "block", "%+d", "Block value: ", 1, false, false, add_table) |
545 | 545 | |
... | ... | @@ -1140,7 +1140,7 @@ function _M:getTextualDesc(compare_with, use_actor) |
1140 | 1140 | 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 |
1141 | 1141 | desc:add({"color","YELLOW"}, "When used to modify unarmed attacks:", {"color", "LAST"}, true) |
1142 | 1142 | compare_tab = { dam=1, atk=1, apr=0, physcrit=0, physspeed =0.6, dammod={str=1}, damrange=1.1 } |
1143 | - desc_combat(w, compare_unarmed, "combat", compare_tab) | |
1143 | + desc_combat(w, compare_unarmed, "combat", compare_tab, true) | |
1144 | 1144 | end |
1145 | 1145 | end |
1146 | 1146 | local can_combat = false | ... | ... |
-
Please register or login to post a comment