From 5ce29b675496f07f3c4485b4cedf98e677db9855 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Thu, 20 May 2010 13:07:34 +0000
Subject: [PATCH] arcane combat is now sustained

git-svn-id: http://svn.net-core.org/repos/t-engine4@651 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/interface/Combat.lua             | 2 +-
 .../tome/data/talents/techniques/magical-combat.lua      | 9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/game/modules/tome/class/interface/Combat.lua b/game/modules/tome/class/interface/Combat.lua
index f2d1a99530..316eaf0a8b 100644
--- a/game/modules/tome/class/interface/Combat.lua
+++ b/game/modules/tome/class/interface/Combat.lua
@@ -297,7 +297,7 @@ function _M:attackTargetWith(target, weapon, damtype, mult)
 	end end
 
 	-- Autospell cast
-	if hitted and self:knowTalent(self.T_ARCANE_COMBAT) and rng.percent(20 + self:getTalentLevel(self.T_ARCANE_COMBAT) * (1 + self:getDex(9, true))) then
+	if hitted and self:knowTalent(self.T_ARCANE_COMBAT) and self:isTalentActive(self.T_ARCANE_COMBAT) and rng.percent(20 + self:getTalentLevel(self.T_ARCANE_COMBAT) * (1 + self:getDex(9, true))) then
 		local spells = {}
 		if self:knowTalent(self.T_FLAME) then spells[#spells+1] = self.T_FLAME end
 		if self:knowTalent(self.T_FLAMESHOCK) then spells[#spells+1] = self.T_FLAMESHOCK end
diff --git a/game/modules/tome/data/talents/techniques/magical-combat.lua b/game/modules/tome/data/talents/techniques/magical-combat.lua
index 90c83a620b..d7790ac3ca 100644
--- a/game/modules/tome/data/talents/techniques/magical-combat.lua
+++ b/game/modules/tome/data/talents/techniques/magical-combat.lua
@@ -20,9 +20,16 @@
 newTalent{
 	name = "Arcane Combat",
 	type = {"technique/magical-combat", 1},
-	mode = "passive",
+	mode = "sustained",
 	points = 5,
 	require = techs_req1,
+	sustain_stamina = 20,
+	activate = function(self, t)
+		return {}
+	end,
+	deactivate = function(self, t, p)
+		return true
+	end,
 	info = function(self, t)
 		return ([[Allows to use a melee weapon as a spell focus, granting %d%% chance per melee attacks to deliver a Flame, Flameshock, Lightning or Chain Lightning spell as a free action on their target.
 		Delivering the spell this way will not trigger a spell cooldown but only works if the spell is not on cooldown.
-- 
GitLab