From 58521bf1eadde084d802509b21c450eb272b009e Mon Sep 17 00:00:00 2001
From: dg <dg@51575b47-30f0-44d4-a5cc-537603b46e54>
Date: Tue, 2 Nov 2010 23:09:45 +0000
Subject: [PATCH] Artifact lore will only be learnt once per game Fixed
 Hurricane

git-svn-id: http://svn.net-core.org/repos/t-engine4@1764 51575b47-30f0-44d4-a5cc-537603b46e54
---
 game/modules/tome/class/Game.lua                 | 2 +-
 game/modules/tome/class/Object.lua               | 4 ++--
 game/modules/tome/class/interface/PlayerLore.lua | 6 +++---
 game/modules/tome/data/timed_effects.lua         | 2 +-
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua
index a8be69bec9..e6e3380568 100644
--- a/game/modules/tome/class/Game.lua
+++ b/game/modules/tome/class/Game.lua
@@ -649,7 +649,7 @@ function _M:setupCommands()
 				for i, e in ipairs(self.zone.object_list) do
 					if e.unique and e.define_as ~= "VOICE_SARUMAN" and e.define_as ~= "ORB_MANY_WAYS_DEMON" then
 						local a = self.zone:finishEntity(self.level, "object", e)
-						a.no_unique_lore = true -- to not spam
+--						a.no_unique_lore = true -- to not spam
 						a:identify(true)
 						self.zone:addEntity(self.level, a, "object", self.player.x, self.player.y)
 					end
diff --git a/game/modules/tome/class/Object.lua b/game/modules/tome/class/Object.lua
index 1a190778cc..4749332493 100644
--- a/game/modules/tome/class/Object.lua
+++ b/game/modules/tome/class/Object.lua
@@ -503,7 +503,7 @@ end
 --- On identification, add to lore
 function _M:on_identify()
 	if self.unique and self.desc and not self.no_unique_lore then
-		game.player:additionalLore(self:getName(), "artifacts", self.desc)
-		game.player:learnLore(self:getName())
+		game.player:additionalLore(self.unique, self:getName(), "artifacts", self.desc)
+		game.player:learnLore(self.unique)
 	end
 end
diff --git a/game/modules/tome/class/interface/PlayerLore.lua b/game/modules/tome/class/interface/PlayerLore.lua
index 85ca53ab83..6efba9c69e 100644
--- a/game/modules/tome/class/interface/PlayerLore.lua
+++ b/game/modules/tome/class/interface/PlayerLore.lua
@@ -65,11 +65,11 @@ function _M:getLore(lore)
 	return self.lore_defs[lore] or self.additional_lore[lore]
 end
 
-function _M:additionalLore(name, category, lore)
+function _M:additionalLore(id, name, category, lore)
 	self.additional_lore = self.additional_lore or {}
-	if self.additional_lore[name] then return end
+	if self.additional_lore[id] then return end
 	self.additional_lore_nb = self.additional_lore_nb + 1
-	self.additional_lore[name] = {id=name, name=name, category=category, lore=lore, order=self.additional_lore_nb + #self.lore_defs}
+	self.additional_lore[id] = {id=id, name=name, category=category, lore=lore, order=self.additional_lore_nb + #self.lore_defs}
 end
 
 function _M:learnLore(lore)
diff --git a/game/modules/tome/data/timed_effects.lua b/game/modules/tome/data/timed_effects.lua
index 23775b1bce..30ab05622b 100644
--- a/game/modules/tome/data/timed_effects.lua
+++ b/game/modules/tome/data/timed_effects.lua
@@ -1795,7 +1795,7 @@ newEffect{
 	on_gain = function(self, err) return "#Target# is caught inside a Hurricane.", "+Hurricane" end,
 	on_lose = function(self, err) return "The Hurricane arround #Target# dissipates.", "-Hurricane" end,
 	on_timeout = function(self, eff)
-		local tg = {type="ball", range=0, radius=eff.radius, friendlyfire=false}
+		local tg = {type="ball", x=self.x, y=self.y, radius=eff.radius, friendlyfire=false}
 		local dam = eff.dam
 		eff.src:project(tg, self.x, self.y, DamageType.LIGHTNING, rng.avg(dam / 3, dam, 3))
 		local x, y = self.x, self.y
-- 
GitLab