I'm working on my first addon ever.
At one point i have to superload the damage_types.lua file to get an effect similar to elemental_harmony (when damaged, get a buff)
Code: Select all
local _M = loadPrevious(...)
local base_setDefaultProjector = _M.setDefaultProjector
function _M:setDefaultProjector(src, x, y, type, dam, tmp, no_martyr)
-- Do stuff "before" loading the original file
base_setDefaultProjector(self, src, x, y, type, dam, tmp, no_martyr)
-- Do stuff "after" loading the original file
if not target.dead and dam > 0 and target:attr("might_in_pain") and not target:hasEffect(target.EFF_MIGHT_IN_PAIN) and type == "BLEED"
then
target:setEffect(target.EFF_MIGHT_IN_PAIN, target:callTalent(target.T_MIGHT_IN_PAIN, "getDuration"), {power=target:attr("might_in_pain"), type=type, no_ct_effect=true})
end
-- if not target.dead and dam > 0 then
-- target:setEffect(target.EFF_MIGHT_IN_PAIN, target:callTalent(target.T_MIGHT_IN_PAIN, "getDuration"), {power=target:attr("might_in_pain"), type=type, no_ct_effect=true})
-- target:setEffect(target.EFF_CUT, 5, power=1000)
-- end
end
return _M
I'm grateful for every suggestion.
Cheers.