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

Fixed zero hp creatures sometimes not dying

git-svn-id: http://svn.net-core.org/repos/t-engine4@6729 51575b47-30f0-44d4-a5cc-537603b46e54
parent 7039ac82
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,7 @@ function _M:takeHit(value, src, death_note)
if self.onTakeHit then value = self:onTakeHit(value, src) end
self.life = self.life - value
self.changed = true
if self.life <= self.die_at and not self.dead then
if self.life <= self.die_at then
if self:hasEffect(self.EFF_PRECOGNITION) then
game.log("%s dies during precognition, ending the effect!", self.name:capitalize())
self:removeEffect(self.EFF_PRECOGNITION)
......
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