diff --git a/game/modules/tome/class/Game.lua b/game/modules/tome/class/Game.lua index a8be69bec940e34a5600fc029650a9bb7aa93aed..e6e3380568edfe255e5a36e2d8d528366948aeb4 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 1a190778ccaccab65575cd32bbd6ccfa5627cf2c..47493324939c6fac3655feadb6a1205dea5948c4 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 85ca53ab83df5b9c9d268fac9421fc5774967325..6efba9c69e2d29a5addca47f8fae2c8d58f510a3 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 23775b1bce0e47f89f62b9e3fc76303a22ccc10c..30ab05622bd1e64f0249999c1bec14c68aa9d443 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