From 7d440c4b55669b9c3ce7b18698d8dde99404d254 Mon Sep 17 00:00:00 2001
From: HousePet <you@example.com>
Date: Tue, 21 Feb 2017 13:52:43 +1030
Subject: [PATCH] Makes the pieces of Telos' staff into a set.

---
 .../data/general/objects/boss-artifacts-maj-eyal.lua  |  5 +++++
 .../data/general/objects/world-artifacts-maj-eyal.lua | 11 +++++++++++
 game/modules/tome/data/zones/telmur/objects.lua       |  5 +++++
 3 files changed, 21 insertions(+)

diff --git a/game/modules/tome/data/general/objects/boss-artifacts-maj-eyal.lua b/game/modules/tome/data/general/objects/boss-artifacts-maj-eyal.lua
index 5974fc88bd..5d9c28ed95 100644
--- a/game/modules/tome/data/general/objects/boss-artifacts-maj-eyal.lua
+++ b/game/modules/tome/data/general/objects/boss-artifacts-maj-eyal.lua
@@ -769,6 +769,11 @@ newEntity{ base = "BASE_STAFF",
 		inc_damage = {[DamageType.ARCANE] = 35 },
 		learn_talent = {[Talents.T_COMMAND_STAFF] = 1 },
 	},
+	set_list = { {"define_as","TELOS_BOTTOM_HALF"}, {"define_as","GEM_TELOS"} },
+	on_set_complete = function(self, who)
+	end,
+	on_set_broken = function(self, who)
+	end,
 }
 
 newEntity{ base = "BASE_AMULET",
diff --git a/game/modules/tome/data/general/objects/world-artifacts-maj-eyal.lua b/game/modules/tome/data/general/objects/world-artifacts-maj-eyal.lua
index 0b7b92aa19..3236bfa865 100644
--- a/game/modules/tome/data/general/objects/world-artifacts-maj-eyal.lua
+++ b/game/modules/tome/data/general/objects/world-artifacts-maj-eyal.lua
@@ -763,6 +763,17 @@ newEntity{ base = "BASE_GEM", define_as = "GEM_TELOS",
 		end)
 		return {id=true, used=true}
 	end },
+	set_list = { {"define_as","TELOS_BOTTOM_HALF"}, {"define_as","TELOS_TOP_HALF"} },
+	on_set_complete = function(self, who)
+		local DamageType = require "engine.DamageType"
+		self:specialSetAdd({"wielder","spell_cooldown_reduction"}, 0.1)
+		self:specialSetAdd({"wielder","all_damage_convert"}, DamageType.DRAINLIFE)
+		self:specialSetAdd({"wielder","all_damage_convert_percent"}, 10)
+		game.logSeen(game.player, "#CRIMSON#Telos's gem seems to flare and glow an unearthly colour.")
+	end,
+	on_set_broken = function(self, who)
+		game.logPlayer(game.player, "#CRIMSON#The unearthly glow fades away.")
+	end,
 }
 
 -- The staff that goes with the crystal above, it will not be generated randomly it is created by the crystal
diff --git a/game/modules/tome/data/zones/telmur/objects.lua b/game/modules/tome/data/zones/telmur/objects.lua
index 10877ad959..9d8421aae9 100644
--- a/game/modules/tome/data/zones/telmur/objects.lua
+++ b/game/modules/tome/data/zones/telmur/objects.lua
@@ -44,4 +44,9 @@ newEntity{ base = "BASE_STAFF",
 		combat_critical_power = 20,
 		confusion_immune = 0.2,
 	},
+	set_list = { {"define_as","GEM_TELOS"}, {"define_as","TELOS_TOP_HALF"} },
+	on_set_complete = function(self, who)
+	end,
+	on_set_broken = function(self, who)
+	end,
 }
-- 
GitLab