Code: Select all
Index: game/engines/default/engine/interface/ActorLife.lua
===================================================================
--- game/engines/default/engine/interface/ActorLife.lua (revision 6387)
+++ game/engines/default/engine/interface/ActorLife.lua (working copy)
@@ -66,7 +66,7 @@
if self.onTakeHit then value = self:onTakeHit(value, src) end
self.life = self.life - value
self.changed = true
- if self.life <= self.die_at then
+ if self.life <= self.die_at and not self.dead then
if src.on_kill and src:on_kill(self) then return false, value end
game.logSeen(self, "#{bold}#%s killed %s!#{normal}#", src.name:capitalize(), self.name)
return self:die(src, death_note), value
Index: game/modules/tome/class/interface/ActorLife.lua
===================================================================
--- game/modules/tome/class/interface/ActorLife.lua (revision 6387)
+++ game/modules/tome/class/interface/ActorLife.lua (working copy)
@@ -31,7 +31,7 @@
if self.onTakeHit then value = self:onTakeHit(value, src) end
self.life = self.life - value
self.changed = true
- if self.life <= self.die_at then
+ if self.life <= self.die_at and not self.dead 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)
Edit: Rearranged checks for efficiency.