Skip to content
Snippets Groups Projects
Commit 3f2181fd authored by dg's avatar dg
Browse files

Meditation can not lower equilibrium bellow the sustain values

git-svn-id: http://svn.net-core.org/repos/t-engine4@5007 51575b47-30f0-44d4-a5cc-537603b46e54
parent a91fb8aa
No related branches found
No related tags found
No related merge requests found
......@@ -114,7 +114,7 @@ function _M:regenResources()
for i = 1, #_M.resources_def do
r = _M.resources_def[i]
if r.regen_prop then
self[r.short_name] = util.bound(self[r.short_name] + self[r.regen_prop], 0, self[r.maxname])
self[r.short_name] = util.bound(self[r.short_name] + self[r.regen_prop], self[r.minname], self[r.maxname])
end
end
end
......@@ -647,7 +647,7 @@ function _M:restCheck()
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:getPsi() < self:getMaxPsi() and self.psi_regen > 0 then return true end
if self:getEquilibrium() > 0 and self.equilibrium_regen < 0 then return true end
if self:getEquilibrium() > self:getMinEquilibrium() and self.equilibrium_regen < 0 then return true end
if self:getParadox() > 0 and self:getParadox() > self.min_paradox and self:isTalentActive(self.T_SPACETIME_TUNING) then return true end
if self.life < self.max_life and self.life_regen> 0 then return true end
for act, def in pairs(game.party.members) do if game.level:hasEntity(act) and not act.dead then
......
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