From a0d7faeba9c457bc2ceea5bbbbef5aa44c93d9e3 Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Mon, 4 Jun 2012 21:11:32 +0000
Subject: [PATCH] Necrotic Aura updates when learning Aura Mastery Fearscape
 now has a negative vim cost per turn Knife Mastery renamed Dagger Mastery
 Anorithil escorts do not provide Providence but Healing Light (you can still
 learn the tree if you need providence) Alchemist escorts do not provide Imbue
 Item (you can still learn the tree if you need imbue item)

git-svn-id: http://svn.net-core.org/repos/t-engine4@5181 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/data/chats/escort-quest.lua |  3 +-
 .../tome/data/general/traps/complex.lua       | 53 ++++++++++++++++++-
 .../data/talents/corruptions/shadowflame.lua  |  3 ++
 .../data/talents/spells/necrotic-minions.lua  |  8 +++
 .../talents/techniques/combat-training.lua    |  4 +-
 .../tome/data/timed_effects/physical.lua      |  2 +-
 6 files changed, 66 insertions(+), 7 deletions(-)

diff --git a/game/modules/tome/data/chats/escort-quest.lua b/game/modules/tome/data/chats/escort-quest.lua
index d04f0f77b0..6312677319 100644
--- a/game/modules/tome/data/chats/escort-quest.lua
+++ b/game/modules/tome/data/chats/escort-quest.lua
@@ -72,7 +72,6 @@ local reward_types = {
 			[Talents.T_CHANNEL_STAFF] = 1,
 			[Talents.T_STAFF_MASTERY] = 1,
 			[Talents.T_STONE_TOUCH] = 1,
-			[Talents.T_IMBUE_ITEM] = 1,
 		},
 		stats = {
 			[Stats.STAT_MAG] = 2,
@@ -140,7 +139,7 @@ local reward_types = {
 		},
 		talents = {
 			[Talents.T_BATHE_IN_LIGHT] = 1,
-			[Talents.T_PROVIDENCE] = 1,
+			[Talents.T_HEALING_LIGHT] = 1,
 		},
 		stats = {
 			[Stats.STAT_CUN] = 2,
diff --git a/game/modules/tome/data/general/traps/complex.lua b/game/modules/tome/data/general/traps/complex.lua
index fae62710ef..1c93b5414b 100644
--- a/game/modules/tome/data/general/traps/complex.lua
+++ b/game/modules/tome/data/general/traps/complex.lua
@@ -30,7 +30,7 @@ newEntity{ base = "TRAP_COMPLEX",
 	name = "giant boulder trap", image = "trap/trap_pressure_plate_01.png",
 	detect_power = 6, disarm_power = 6,
 	rarity = 3, level_range = {1, 30},
-	color_r=40, color_g=220, color_b=0,
+	color = colors.UMBER,
 	message = "@Target@ walks on a trap, there is a loud noise.",
 	pressure_trap = true,
 	on_added = function(self, level, x, y)
@@ -72,7 +72,7 @@ newEntity{ base = "TRAP_COMPLEX",
 	name = "spinning beam", image = "trap/trap_glyph_explosion_01_64.png",
 	detect_power = 6, disarm_power = 6,
 	rarity = 3, level_range = {1, 30},
-	color_r=40, color_g=220, color_b=0,
+	color=colors.PURPLE,
 	message = "@Target@ walks on a trap, the beam intensifies.",
 	on_added = function(self, level, x, y)
 		self.x, self.y = x, y
@@ -113,3 +113,52 @@ newEntity{ base = "TRAP_COMPLEX",
 		self:useEnergy()
 	end,
 }
+
+newEntity{ base = "TRAP_COMPLEX",
+	subtype = "nature",
+	name = "poison cloud", image = "trap/trap_acid_blast_01.png",
+	detect_power = 6, disarm_power = 6,
+	rarity = 3, level_range = {1, 30},
+	color=colors.GREEN,
+	message = "@Target@ walks on a poison spore.",
+	on_added = function(self, level, x, y)
+		self.x, self.y = x, y
+		self.rad = rng.range(2, 8)
+		game.level:addEntity(self)
+		self.on_added = nil
+	end,
+	dam = resolvers.mbonus_level(300, 15),
+	triggered = function(self, x, y, who)
+		self:firePoison()
+		return true
+	end,
+	canAct = false,
+	energy = {value=0},
+	firePoison = function(self)
+		-- Add a lasting map effect
+		game.level.map:addEffect(self,
+			self.x, self.y, 5,
+			engine.DamageType.POISON, self.dam,
+			self.rad,
+			5, nil,
+			{type="vapour"},
+			nil, 0, 0
+		)		
+		self:useEnergy(game.energy_to_act * 7)
+	end,
+	act = function(self)
+		local ok = false
+		local tg = {type="ball", radius=self.rad, friendlyfire=false}
+		self:project(tg, self.x, self.y, function(px, py)
+			local target = game.level.map(px, py, engine.Map.ACTOR)
+			if target and self:reactionToward(target) < 0 then ok = true end
+		end)
+		if not ok then
+			self:useEnergy()
+		else
+			self:firePoison()
+		end
+	end,
+}
+
+-- you do NOT want native UI widgets
\ No newline at end of file
diff --git a/game/modules/tome/data/talents/corruptions/shadowflame.lua b/game/modules/tome/data/talents/corruptions/shadowflame.lua
index d5e25fc5ae..6e74108577 100644
--- a/game/modules/tome/data/talents/corruptions/shadowflame.lua
+++ b/game/modules/tome/data/talents/corruptions/shadowflame.lua
@@ -217,12 +217,15 @@ newTalent{
 		end)
 
 		local ret = {
+			vim = self:addTemporaryValue("vim_regen", -3),
 			target = target,
 			x = self.x, y = self.y,
 		}
 		return ret
 	end,
 	deactivate = function(self, t, p)
+		self:removeTemporaryValue("vim_regen", p.vim)
+
 		game:onTickEnd(function()
 			-- Collect objects
 			local objs = {}
diff --git a/game/modules/tome/data/talents/spells/necrotic-minions.lua b/game/modules/tome/data/talents/spells/necrotic-minions.lua
index 13d7537fd8..25cb609182 100644
--- a/game/modules/tome/data/talents/spells/necrotic-minions.lua
+++ b/game/modules/tome/data/talents/spells/necrotic-minions.lua
@@ -740,6 +740,14 @@ newTalent{
 	require = spells_req2,
 	points = 5,
 	mode = "passive",
+	on_learn = function(self, t)
+		self:forceUseTalent(self.T_NECROTIC_AURA, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true})
+		self:forceUseTalent(self.T_NECROTIC_AURA, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true})
+	end,
+	on_unlearn = function(self, t)
+		self:forceUseTalent(self.T_NECROTIC_AURA, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true})
+		self:forceUseTalent(self.T_NECROTIC_AURA, {ignore_energy=true, ignore_cd=true, no_equilibrium_fail=true, no_paradox_fail=true})
+	end,
 	info = function(self, t)
 		return ([[Your dark power radiates further as you grow stronger. Increases the radius of your necrotic aura by %d and reduces the decay rate of your minions outside the aura by %d%%.]]):
 		format(self:getTalentLevelRaw(t), self:getTalentLevelRaw(t))
diff --git a/game/modules/tome/data/talents/techniques/combat-training.lua b/game/modules/tome/data/talents/techniques/combat-training.lua
index e42bc8e93e..16d614b499 100644
--- a/game/modules/tome/data/talents/techniques/combat-training.lua
+++ b/game/modules/tome/data/talents/techniques/combat-training.lua
@@ -114,7 +114,7 @@ newTalent{
 
 
 newTalent{
-	name = "Knife Mastery",
+	name = "Dagger Mastery", short_name = "KNIFE_MASTERY",
 	type = {"technique/combat-training", 1},
 	points = 5,
 	require = { stat = { dex=function(level) return 10 + level * 6 end }, },
@@ -124,7 +124,7 @@ newTalent{
 	info = function(self, t)
 		local damage = t.getDamage(self, t)
 		local inc = t.getPercentInc(self, t)
-		return ([[Increases Physical Power by %d. Also increases damage done with knives by %d%%]]):
+		return ([[Increases Physical Power by %d. Also increases damage done with daggers by %d%%]]):
 		format(damage, 100*inc)
 	end,
 }
diff --git a/game/modules/tome/data/timed_effects/physical.lua b/game/modules/tome/data/timed_effects/physical.lua
index 53539807bb..1fc93e3623 100644
--- a/game/modules/tome/data/timed_effects/physical.lua
+++ b/game/modules/tome/data/timed_effects/physical.lua
@@ -244,7 +244,7 @@ newEffect{
 	activate = function(self, eff)
 	end,
 	deactivate = function(self, eff)
-		if target:canBe("stun") and target:canBe("stone") and target:canBe("instakill") then
+		if self:canBe("stun") and self:canBe("stone") and self:canBe("instakill") then
 			self:setEffect(self.EFF_STONED, eff.stone, {})
 		end
 	end,
-- 
GitLab