diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua index 4ef6bade86487f44144b9e1692db8b5e32e695a3..325ff798374bdf33452fd73d8c1b6612ba79a1d2 100644 --- a/game/modules/tome/class/Actor.lua +++ b/game/modules/tome/class/Actor.lua @@ -2249,7 +2249,7 @@ function _M:onTakeHit(value, src, death_note) if self:fireTalentCheck("callbackOnHit", cb, src, death_note) then value = cb.value end - + local hd = {"Actor:takeHit", value=value, src=src, death_note=death_note} if self:triggerHook(hd) then value = hd.value end @@ -2289,8 +2289,11 @@ function _M:takeHit(value, src, death_note) end end + local dead, val = mod.class.interface.ActorLife.takeHit(self, value, src, death_note) + if src.fireTalentCheck then src:fireTalentCheck("callbackOnDealDamage", val, self, dead, death_note) end + if dead and src and src.attr and src:attr("overkill") and src.project and not src.turn_procs.overkill then src.turn_procs.overkill = true local dam = (self.die_at - self.life) * src:attr("overkill") / 100 @@ -4072,6 +4075,7 @@ function _M:preUseTalent(ab, silent, fake) end local sustainCallbackCheck = { + callbackOnDealDamage = "talents_on_deal_damage", callbackOnHit = "talents_on_hit", callbackOnAct = "talents_on_act", callbackOnActBase = "talents_on_act_base", diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua index cf74fe0afb0a32078b0b574ec68b8acff367b7db..45cab167ed87eba27357f59277e7fee58150c0ea 100644 --- a/game/modules/tome/class/interface/Combat.lua +++ b/game/modules/tome/class/interface/Combat.lua @@ -235,6 +235,7 @@ end --- Determines the combat field to use for this item function _M:getObjectCombat(o, kind) if kind == "barehand" then return self.combat end + if not o then return nil end if kind == "mainhand" then return o.combat end if kind == "offhand" then return o.combat end return nil diff --git a/game/modules/tome/resolvers.lua b/game/modules/tome/resolvers.lua index 26e94c1d14fd05f25ccfd4bc7d84474c3c2e0cb6..dae548d47f77fd5778a5fc7355a19f06f1e81726 100644 --- a/game/modules/tome/resolvers.lua +++ b/game/modules/tome/resolvers.lua @@ -658,12 +658,13 @@ local racials = { T_RETCH = {last=30, base=0, every=4, max=5}, }, } +resolvers.racials_defs = racials function resolvers.racial(race) return {__resolver="racial", race} end function resolvers.calc.racial(t, e) - if e.type ~= "humanoid" and e.type ~= "undead" then return end + if e.type ~= "humanoid" and e.type ~= "giant" and e.type ~= "undead" then return end local race = t[1] or e.subtype if not racials[race] then return end