From 75564c6aff196be6a18a0366f5fe06cbad0917cc Mon Sep 17 00:00:00 2001 From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54> Date: Sat, 11 Jun 2011 12:59:42 +0000 Subject: [PATCH] Resting will stop if life regen is below 0 git-svn-id: http://svn.net-core.org/repos/t-engine4@3632 51575b47-30f0-44d4-a5cc-537603b46e54 --- game/modules/tome/class/Player.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua index 5e71ed3b4e..ad64b4c4f8 100644 --- a/game/modules/tome/class/Player.lua +++ b/game/modules/tome/class/Player.lua @@ -508,6 +508,7 @@ function _M:restCheck() -- Check resources, make sure they CAN go up, otherwise we will never stop if not self.resting.rest_turns then if self.air_regen < 0 then return false, "loosing breath!" end + if self.life_regen < 0 then return false, "loosing health!" end if self:getMana() < self:getMaxMana() and self.mana_regen > 0 then return true end if self:getStamina() < self:getMaxStamina() and self.stamina_regen > 0 then return true end if self.life < self.max_life and self.life_regen> 0 then return true end -- GitLab