From 2b87ef61acd8106439f15837f7b2f73142bd44ac Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Thu, 11 Aug 2011 18:28:29 +0000
Subject: [PATCH] Suppression talent actually does something now

git-svn-id: http://svn.net-core.org/repos/t-engine4@4111 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/Actor.lua  | 4 ++++
 game/modules/tome/class/Player.lua | 4 ++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/game/modules/tome/class/Actor.lua b/game/modules/tome/class/Actor.lua
index fc50d89c85..0a51833171 100644
--- a/game/modules/tome/class/Actor.lua
+++ b/game/modules/tome/class/Actor.lua
@@ -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
diff --git a/game/modules/tome/class/Player.lua b/game/modules/tome/class/Player.lua
index 9981341f42..4c1089bd65 100644
--- a/game/modules/tome/class/Player.lua
+++ b/game/modules/tome/class/Player.lua
@@ -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
-- 
GitLab