I want to create a talent, which will shield the actor from damage from a specific source like cuts, so if the target is bleeding, only the bleeding damage is absorbed by the shield.
I tried to bind the Actor:takeHit hook:
Code: Select all
class:bindHook("Actor:takeHit", function(self, data)
if self:hasEffect(self.EFF_FURY_OF_BLOOD) and (data.subtype.wound or data.subtype.cut) then
local eff = self:hasEffect(self.EFF_FURY_OF_BLOOD)
data.value = self.tempeffect_def[self.EFF_FURY_OF_BLOOD].do_onTakeHit(self, eff, value)
end
end)
Cheers