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

Time Prison correctly stops even fast actors

git-svn-id: http://svn.net-core.org/repos/t-engine4@3362 51575b47-30f0-44d4-a5cc-537603b46e54
parent 9e8585c2
No related branches found
No related tags found
No related merge requests found
......@@ -359,6 +359,7 @@ function _M:act()
if self:attr("stoned") then self.energy.value = 0 end
if self:attr("dazed") then self.energy.value = 0 end
if self:attr("time_stun") then self.energy.value = 0 end
if self:attr("time_prison") then self.energy.value = 0 end
-- Regain natural balance?
local equilibrium_level = game.level.map:checkEntity(self.x, self.y, Map.TERRAIN, "equilibrium_level")
......@@ -842,7 +843,7 @@ function _M:onHeal(value, src)
end
value = value * util.bound((self.healing_factor or 1), 0, 2.5)
if src:attr("stunned") then
if self:attr("stunned") then
value = value / 2
end
......
......@@ -955,14 +955,13 @@ newEffect{
on_lose = function(self, err) return "#Target# is returned to normal time.", "-Out of Time" end,
activate = function(self, eff)
eff.iid = self:addTemporaryValue("invulnerable", 1)
eff.sid = self:addTemporaryValue("time_prison", 1)
eff.particle = self:addParticles(Particles.new("time_prison", 1))
self.energy.value = 0
end,
on_timeout = function(self, eff)
self.energy.value = 0
end,
deactivate = function(self, eff)
self:removeTemporaryValue("invulnerable", eff.iid)
self:removeTemporaryValue("time_prison", eff.sid)
self:removeParticles(eff.particle)
end,
}
......
......@@ -86,7 +86,7 @@
</tileset>
<layer name="Terrain" width="50" height="50">
<data encoding="base64" compression="zlib">
eJztmMsNwyAMhnPOEhmDGboQ8/SaAfqepNu0ByxZloPABGwQh19poAF/+WNeflkWPzVlVKtA2jFz8W8CWeLBHPDbkbKNlNP/azMAx/eve7iuqOwZri+m7o3KtBmO/KBlsTqLHD3nB2ah+XGUN1bHrBgT/aY+BmLM5XGBA3zQjqmEBfzQjmVyTA5rwnmuHQu8Vzzep47/1vyYHLY4fIgndj8yh7U879UPrt8cjtg6sSUD12cqB2Wge40WLLEzjVwOiP/CsNRm2BkOyR4PM4C4+hRJOB6FbeFnIH7HsKS2KeUYwQ+L+SHloCyxNluMVyUc/qAvjfmjlCOlzRrzOfddn31O1IrjGpEWR+46sTZHq/3HqBz7IBxn+1HCPwKHtTxv6Uft+aMFh1VNDluyeO4j9QKv27VjkvgAHDfE0aMvI/iBWTTH/R71Aw163+s=
eJztmMsNwyAMhnPOEhmDGboQ8/SaAfqepNu0ByxZloPABGwQh19JIQV/+WNeflkWPzVlVKtA2jFz8W8CWeLBHHDvSNlGyunz2gzA8f3rHq4rKnuG64upe6MybYYjP2hZrM4iR8/5gVlofnB58yHPaseeysR9U9ox5vK4wAH+aMdUwgJ+aMcyOSaHNeE8144F3iseM1PHUGt+TA5bHD7EE/s9Moe1PO/VD67fHI7YOrElA9dnKgdloHuNFiyxM41cDoj/wrDUZtgZDskeDzOAuPoUSTgehW3h/0D8jmFJbVPKMYIfFvNDykFZYm22GK9KOPxBXxrzRylHSps15nPuuz77rKUVxzUiLY7cdWJtjlb7j1E59kE4zvajhH8EDmt53tKP2vNHCw6rmhy2ZPHcR+oFXrdrxyTxAThuiKNHX0bwA7Nojvs96geXwt/r
</data>
</layer>
</map>
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