Commit df693a3ba81e6e29b9c94785e30eda02cd719704

Authored by dg
1 parent 9e8585c2

Time Prison correctly stops even fast actors


git-svn-id: http://svn.net-core.org/repos/t-engine4@3362 51575b47-30f0-44d4-a5cc-537603b46e54
@@ -359,6 +359,7 @@ function _M:act() @@ -359,6 +359,7 @@ function _M:act()
359 if self:attr("stoned") then self.energy.value = 0 end 359 if self:attr("stoned") then self.energy.value = 0 end
360 if self:attr("dazed") then self.energy.value = 0 end 360 if self:attr("dazed") then self.energy.value = 0 end
361 if self:attr("time_stun") then self.energy.value = 0 end 361 if self:attr("time_stun") then self.energy.value = 0 end
  362 + if self:attr("time_prison") then self.energy.value = 0 end
362 363
363 -- Regain natural balance? 364 -- Regain natural balance?
364 local equilibrium_level = game.level.map:checkEntity(self.x, self.y, Map.TERRAIN, "equilibrium_level") 365 local equilibrium_level = game.level.map:checkEntity(self.x, self.y, Map.TERRAIN, "equilibrium_level")
@@ -842,7 +843,7 @@ function _M:onHeal(value, src) @@ -842,7 +843,7 @@ function _M:onHeal(value, src)
842 end 843 end
843 value = value * util.bound((self.healing_factor or 1), 0, 2.5) 844 value = value * util.bound((self.healing_factor or 1), 0, 2.5)
844 845
845 - if src:attr("stunned") then 846 + if self:attr("stunned") then
846 value = value / 2 847 value = value / 2
847 end 848 end
848 849
@@ -955,14 +955,13 @@ newEffect{ @@ -955,14 +955,13 @@ newEffect{
955 on_lose = function(self, err) return "#Target# is returned to normal time.", "-Out of Time" end, 955 on_lose = function(self, err) return "#Target# is returned to normal time.", "-Out of Time" end,
956 activate = function(self, eff) 956 activate = function(self, eff)
957 eff.iid = self:addTemporaryValue("invulnerable", 1) 957 eff.iid = self:addTemporaryValue("invulnerable", 1)
  958 + eff.sid = self:addTemporaryValue("time_prison", 1)
958 eff.particle = self:addParticles(Particles.new("time_prison", 1)) 959 eff.particle = self:addParticles(Particles.new("time_prison", 1))
959 self.energy.value = 0 960 self.energy.value = 0
960 end, 961 end,
961 - on_timeout = function(self, eff)  
962 - self.energy.value = 0  
963 - end,  
964 deactivate = function(self, eff) 962 deactivate = function(self, eff)
965 self:removeTemporaryValue("invulnerable", eff.iid) 963 self:removeTemporaryValue("invulnerable", eff.iid)
  964 + self:removeTemporaryValue("time_prison", eff.sid)
966 self:removeParticles(eff.particle) 965 self:removeParticles(eff.particle)
967 end, 966 end,
968 } 967 }
@@ -86,7 +86,7 @@ @@ -86,7 +86,7 @@
86 </tileset> 86 </tileset>
87 <layer name="Terrain" width="50" height="50"> 87 <layer name="Terrain" width="50" height="50">
88 <data encoding="base64" compression="zlib"> 88 <data encoding="base64" compression="zlib">
89 - eJztmMsNwyAMhnPOEhmDGboQ8/SaAfqepNu0ByxZloPABGwQh19poAF/+WNeflkWPzVlVKtA2jFz8W8CWeLBHPDbkbKNlNP/azMAx/eve7iuqOwZri+m7o3KtBmO/KBlsTqLHD3nB2ah+XGUN1bHrBgT/aY+BmLM5XGBA3zQjqmEBfzQjmVyTA5rwnmuHQu8Vzzep47/1vyYHLY4fIgndj8yh7U879UPrt8cjtg6sSUD12cqB2Wge40WLLEzjVwOiP/CsNRm2BkOyR4PM4C4+hRJOB6FbeFnIH7HsKS2KeUYwQ+L+SHloCyxNluMVyUc/qAvjfmjlCOlzRrzOfddn31O1IrjGpEWR+46sTZHq/3HqBz7IBxn+1HCPwKHtTxv6Uft+aMFh1VNDluyeO4j9QKv27VjkvgAHDfE0aMvI/iBWTTH/R71Aw163+s= 89 + eJztmMsNwyAMhnPOEhmDGboQ8/SaAfqepNu0ByxZloPABGwQh19JIQV/+WNeflkWPzVlVKtA2jFz8W8CWeLBHHDvSNlGyunz2gzA8f3rHq4rKnuG64upe6MybYYjP2hZrM4iR8/5gVlofnB58yHPaseeysR9U9ox5vK4wAH+aMdUwgJ+aMcyOSaHNeE8144F3iseM1PHUGt+TA5bHD7EE/s9Moe1PO/VD67fHI7YOrElA9dnKgdloHuNFiyxM41cDoj/wrDUZtgZDskeDzOAuPoUSTgehW3h/0D8jmFJbVPKMYIfFvNDykFZYm22GK9KOPxBXxrzRylHSps15nPuuz77rKUVxzUiLY7cdWJtjlb7j1E59kE4zvajhH8EDmt53tKP2vNHCw6rmhy2ZPHcR+oFXrdrxyTxAThuiKNHX0bwA7Nojvs96geXwt/r
90 </data> 90 </data>
91 </layer> 91 </layer>
92 </map> 92 </map>