Skip to content
Snippets Groups Projects
Commit e32005b7 authored by DarkGod's avatar DarkGod
Browse files

stuff

parent 40399e81
No related branches found
No related tags found
No related merge requests found
......@@ -1108,7 +1108,7 @@ function _M:getTextualDesc(compare_with, use_actor)
nil,
true)
self:triggerHook{"Object:descCombat", compare_with=compare_with, compare_fields=compare_fields, compare_table_fields=compare_table_fields, desc=desc, combat=combat}
self:triggerHook{"Object:descCombat", compare_with=compare_with, compare_fields=compare_fields, compare_scaled=compare_scaled, compare_scaled=compare_scaled, compare_table_fields=compare_table_fields, desc=desc, combat=combat}
end
local desc_wielder = function(w, compare_with, field)
......@@ -1620,7 +1620,7 @@ function _M:getTextualDesc(compare_with, use_actor)
desc:add("Allows you to speak and read the old Sher'Tul language.", true)
end
self:triggerHook{"Object:descWielder", compare_with=compare_with, compare_fields=compare_fields, compare_table_fields=compare_table_fields, desc=desc, w=w, field=field}
self:triggerHook{"Object:descWielder", compare_with=compare_with, compare_fields=compare_fields, compare_scaled=compare_scaled, compare_table_fields=compare_table_fields, desc=desc, w=w, field=field}
-- Do not show "general effect" if nothing to show
-- if desc[#desc-2] == "General effects: " then table.remove(desc) table.remove(desc) table.remove(desc) table.remove(desc) end
......@@ -1858,7 +1858,7 @@ function _M:getTextualDesc(compare_with, use_actor)
end
end
self:triggerHook{"Object:descMisc", compare_with=compare_with, compare_fields=compare_fields, compare_table_fields=compare_table_fields, desc=desc, object=self}
self:triggerHook{"Object:descMisc", compare_with=compare_with, compare_fields=compare_fields, compare_scaled=compare_scaled, compare_table_fields=compare_table_fields, desc=desc, object=self}
local use_desc = self:getUseDesc(use_actor)
if use_desc then desc:merge(use_desc:toTString()) end
......
......@@ -323,8 +323,20 @@ local function archery_projectile(tx, ty, tg, self, tmp)
print("[ATTACK] after counterstrike", dam)
end
if weapon and weapon.inc_damage_type then
local inc = 0
for k, v in pairs(weapon.inc_damage_type) do
if target:checkClassification(tostring(k)) then inc = math.max(inc, v) end
end
dam = dam + dam * inc / 100
print("[ATTACK] after inc by type (weapon)", dam)
end
if ammo and ammo.inc_damage_type then
local inc = 0
local inc = 0
for k, v in pairs(ammo.inc_damage_type) do
if target:checkClassification(tostring(k)) then inc = math.max(inc, v) end
......@@ -332,7 +344,7 @@ local function archery_projectile(tx, ty, tg, self, tmp)
dam = dam + dam * inc / 100
print("[ATTACK] after inc by type", dam)
print("[ATTACK] after inc by type (ammo)", dam)
end
dam, crit = self:physicalCrit(dam, ammo, target, atk, def, tg.archery.crit_chance or 0, tg.archery.crit_power or 0)
......
No preview for this file type
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