Skip to content
Snippets Groups Projects
Commit 9ef76a19 authored by dg's avatar dg
Browse files

Timeless wont produce negative timed effects

git-svn-id: http://svn.net-core.org/repos/t-engine4@3237 51575b47-30f0-44d4-a5cc-537603b46e54
parent 078bac8f
No related branches found
No related tags found
No related merge requests found
......@@ -217,14 +217,19 @@ newTalent{
tactical = { DEFEND = 2 },
action = function(self, t)
local target = self
local todel = {}
for eff_id, p in pairs(target.tmp) do
local e = target.tempeffect_def[eff_id]
if e.status == "beneficial" then
p.dur = p.dur + self:getTalentLevelRaw(t)
elseif e.status == "detrimental" then
p.dur = p.dur - self:getTalentLevelRaw(t) * 2
if p.dur <= 0 then todel[#todel+1] = eff end
end
end
while #todel > 0 do
target:removeEffect(table.remove(todel))
end
game:playSoundNear(self, "talents/spell_generic")
return true
......
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