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

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
parent 9f0ae9e3
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
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