From 2259a6650d86f63dfb80e886434f0f7bad1a774e Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Fri, 16 Sep 2011 09:47:35 +0000
Subject: [PATCH] Reaver's Ruin talent damage is computed on the fly so that
 Bloodlust can affect it

git-svn-id: http://svn.net-core.org/repos/t-engine4@4423 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/interface/Combat.lua           | 7 +++++++
 game/modules/tome/data/talents/corruptions/scourge.lua | 8 +++-----
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua
index 1364a8184b..c1aeba37bd 100644
--- a/game/modules/tome/class/interface/Combat.lua
+++ b/game/modules/tome/class/interface/Combat.lua
@@ -310,6 +310,13 @@ function _M:attackTargetWith(target, weapon, damtype, mult, force_dam)
 		DamageType:get(DamageType.TEMPORAL).projector(self, target.x, target.y, DamageType.TEMPORAL, dam)
 	end
 
+	-- Ruin
+	if hitted and not target.dead and self:knowTalent(self.T_RUIN) and self:isTalentActive(self.T_RUIN) then
+		local t = self:getTalentFromId(self.T_RUIN)
+		local dam = t.getDamage(self, t)
+		DamageType:get(DamageType.DRAINLIFE).projector(self, target.x, target.y, DamageType.DRAINLIFE, dam)
+	end
+	
 	-- Autospell cast
 	if hitted and not target.dead and self:knowTalent(self.T_ARCANE_COMBAT) and self:isTalentActive(self.T_ARCANE_COMBAT) then
 		local t = self:getTalentFromId(self.T_ARCANE_COMBAT)
diff --git a/game/modules/tome/data/talents/corruptions/scourge.lua b/game/modules/tome/data/talents/corruptions/scourge.lua
index 8bd34b0eaf..fff40c3bd6 100644
--- a/game/modules/tome/data/talents/corruptions/scourge.lua
+++ b/game/modules/tome/data/talents/corruptions/scourge.lua
@@ -76,19 +76,17 @@ newTalent{
 	sustain_vim = 40,
 	cooldown = 30,
 	tactical = { BUFF = 2 },
+	getDamage = function(self, t) return self:combatTalentSpellDamage(t, 15, 40) end,
 	activate = function(self, t)
 		game:playSoundNear(self, "talents/slime")
-		local ret = {
-			per = self:addTemporaryValue("melee_project", {[DamageType.DRAINLIFE] = self:combatTalentSpellDamage(t, 15, 40)}),
-		}
+		local ret = {}
 		return ret
 	end,
 	deactivate = function(self, t, p)
-		self:removeTemporaryValue("melee_project", p.per)
 		return true
 	end,
 	info = function(self, t)
-		local dam = damDesc(self, DamageType.BLIGHT, self:combatTalentSpellDamage(t, 15, 40))
+		local dam = damDesc(self, DamageType.BLIGHT, t.getDamage(self, t))
 		return ([[Concentrate on the corruption you bring, enhancing each of your melee strikes with %0.2f blight damage (which also heals you for %0.2f each hit).
 		The damage will increase with your Magic stat.]]):
 		format(dam, dam * 0.4)
-- 
GitLab