Skip to content
Snippets Groups Projects
Commit 720e3dd4 authored by dg's avatar dg
Browse files

Time Prison now prevents the application of any timed effects

git-svn-id: http://svn.net-core.org/repos/t-engine4@4747 51575b47-30f0-44d4-a5cc-537603b46e54
parent 63b02bfc
No related branches found
No related tags found
No related merge requests found
......@@ -3171,6 +3171,9 @@ function _M:on_set_temporary_effect(eff_id, e, p)
if e.status == "detrimental" and self:attr("negative_status_effect_immune") then
p.dur = 0
end
if self:attr("status_effect_immune") then
p.dur = 0
end
end
--- Called when we are the target of a projection
......
......@@ -87,6 +87,7 @@ newEffect{
eff.iid = self:addTemporaryValue("invulnerable", 1)
eff.sid = self:addTemporaryValue("time_prison", 1)
eff.tid = self:addTemporaryValue("no_timeflow", 1)
eff.imid = self:addTemporaryValue("status_effect_immune", 1)
eff.particle = self:addParticles(Particles.new("time_prison", 1))
self.energy.value = 0
end,
......@@ -94,6 +95,7 @@ newEffect{
self:removeTemporaryValue("invulnerable", eff.iid)
self:removeTemporaryValue("time_prison", eff.sid)
self:removeTemporaryValue("no_timeflow", eff.tid)
self:removeTemporaryValue("status_effect_immune", eff.imid)
self:removeParticles(eff.particle)
end,
}
......
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