Skip to content
Snippets Groups Projects
Commit 2b87ef61 authored by dg's avatar dg
Browse files

Suppression talent actually does something now

git-svn-id: http://svn.net-core.org/repos/t-engine4@4111 51575b47-30f0-44d4-a5cc-537603b46e54
parent 59cec0eb
No related branches found
No related tags found
No related merge requests found
......@@ -2854,6 +2854,10 @@ function _M:on_set_temporary_effect(eff_id, e, p)
local fft = self:hasEffect(self.EFF_FADE_FROM_TIME)
p.dur = math.ceil(p.dur * (1 - (fft.power/100)))
end
if e.status == "detrimental" and e.type ~= "magical" and self:knowTalent(self.T_SUPPRESSION) then
local t = self:getTalentFromId(self.T_SUPPRESSION)
p.dur = math.ceil(p.dur * (1 - (t.getPercent(self, t)/100)))
end
if e.status == "detrimental" and self:attr("negative_status_effect_immune") then
p.dur = 0
end
......
......@@ -503,8 +503,8 @@ 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.air_regen < 0 then return false, "losing breath!" end
if self.life_regen <= 0 then return false, "losing 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:getPsi() < self:getMaxPsi() and self.psi_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