Preventing minions from debuffing their summoner
Moderator: Moderator
Preventing minions from debuffing their summoner
For Necromancers, the Dark Empathy effect causes minions to deal 0 damage to their summoner with attacks. However, this doesn't affect stuff like a Lich shooting you with Congeal Time and the like. I saw someone make mention of using on_set_temporary_effect to make them no longer apply debuffs to you, but I'm unclear how this would work in the load file?
-
- Spiderkin
- Posts: 543
- Joined: Sat Feb 11, 2012 1:12 am
Re: Preventing minions from debuffing their summoner
Try adding this to superload/mod/class/Actor.lua (warning: completely untested)
Code: Select all
local baseon_set_temporary_effect = _M.on_set_temporary_effect
function _M:on_set_temporary_effect(eff_id, e, p)
return baseon_set_temporary_effect(self, eff_id, e, p)
if e.status == "detrimental" and e.src and e.src.necrotic_minion and e.src.summoner == self then
p.dur = 0
end
end
-
- Uruivellas
- Posts: 708
- Joined: Wed Apr 30, 2008 5:55 pm
Re: Preventing minions from debuffing their summoner
That won't work. The very first line in the function is a return.
Code: Select all
local baseon_set_temporary_effect = _M.on_set_temporary_effect
function _M:on_set_temporary_effect(eff_id, e, p)
if e.status == "detrimental" and e.src and e.src.necrotic_minion and e.src.summoner == self then
p.dur = 0
end
return baseon_set_temporary_effect(self, eff_id, e, p)
end
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated.
Currently working on Elementals. It's a big project, so any help would be appreciated.

-
- Uruivellas
- Posts: 708
- Joined: Wed Apr 30, 2008 5:55 pm
Re: Preventing minions from debuffing their summoner
Actually, looking at this again, this'll be quite hard to pull off. Generally, most status effects don't know what their source is, unless it was specifically passed in.
You could probably get around this by changing each spell that the minions use to specifically pass in the source.
The way I've done this in the past is to superload Actor:act, making it set game.current_actor when it's called. That way, if an effect doesn't have a source, you can assume it's game.current_actor.
You could probably get around this by changing each spell that the minions use to specifically pass in the source.
The way I've done this in the past is to superload Actor:act, making it set game.current_actor when it's called. That way, if an effect doesn't have a source, you can assume it's game.current_actor.
Addons: Arcane Blade Tweaks, Fallen Race, Monk Class, Weapons Pack
Currently working on Elementals. It's a big project, so any help would be appreciated.
Currently working on Elementals. It's a big project, so any help would be appreciated.

Re: Preventing minions from debuffing their summoner
Yeah, sounds like that's the best way then. Thanks for the help.