diff --git a/game/engines/default/engine/interface/ActorInventory.lua b/game/engines/default/engine/interface/ActorInventory.lua index e5ca16a529433820c237d77a11cd4b49baaaa9e1..2a33e9c73f928e5dfc74515de562acb4069d371d 100644 --- a/game/engines/default/engine/interface/ActorInventory.lua +++ b/game/engines/default/engine/interface/ActorInventory.lua @@ -494,7 +494,6 @@ function _M:findInInventoryBy(inven, prop, value) end else for item, o in ipairs(inven) do - print(o.name, inven.id, item, "=====test", prop, value, o[prop]) if o[prop] == value then return o, item end end end diff --git a/game/modules/tome/data/chats/last-hope-elder.lua b/game/modules/tome/data/chats/last-hope-elder.lua index f7f22ac0fa024d277d21fa83d1230244d66cd417..2f6a76a8fa447105cda79d4cb700fc56745ceb5b 100644 --- a/game/modules/tome/data/chats/last-hope-elder.lua +++ b/game/modules/tome/data/chats/last-hope-elder.lua @@ -31,9 +31,9 @@ newChat{ id="found_staff", The staff you describe reminds me of an artifact of great power from ancient times. May I see it?]], answers = { {"Here it is. #LIGHT_GREEN#*Tell him the encounter with the orcs*#LAST# You should keep it. I can feel its power and it would be safer if it were guarded by the armies of the kingdom.", - jump="given_staff", cond=function(npc, player) return player:findInAllInventories("Staff of Absorption") and player:isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk") end}, + jump="given_staff", cond=function(npc, player) return player:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION") and player:isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "survived-ukruk") end}, {"I am afraid I lost it. #LIGHT_GREEN#*Tell him about the encounter with the orcs*", - jump="lost_staff", cond=function(npc, player) return player:findInAllInventories("Staff of Absorption") and player:isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush-finish") end}, + jump="lost_staff", cond=function(npc, player) return player:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION") and player:isQuestStatus("staff-absorption", engine.Quest.COMPLETED, "ambush-finish") end}, } } @@ -43,7 +43,7 @@ As for the orcs, it is deeply troubling. We have not seen any for eighty years. Anyway, thank you again, @playername@, for your help.]], answers = { {"Thank you, my lord.", action=function(npc, player) - local o, item, inven_id = player:findInAllInventories("Staff of Absorption") + local o, item, inven_id = player:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION") player:removeObject(inven_id, item, true) o:removed() diff --git a/game/modules/tome/data/chats/shertul-fortress-caldizar.lua b/game/modules/tome/data/chats/shertul-fortress-caldizar.lua index 06652a655a215c371bf21e436eddbccaf7c4b6eb..d507f58d84ba923178b8bfe03ed78fbb2647cc4d 100644 --- a/game/modules/tome/data/chats/shertul-fortress-caldizar.lua +++ b/game/modules/tome/data/chats/shertul-fortress-caldizar.lua @@ -18,9 +18,9 @@ -- darkgod@te4.org local has_staff = false -local o, item, inven_id = player:findInAllInventories("Staff of Absorption") +local o, item, inven_id = player:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION") if o then has_staff = true end -local o, item, inven_id = player:findInAllInventories("Awakened Staff of Absorption") +local o, item, inven_id = player:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION_AWAKENED") if o then has_staff = true end local speak diff --git a/game/modules/tome/data/quests/staff-absorption.lua b/game/modules/tome/data/quests/staff-absorption.lua index 6ea09a29c8cf413a4c190c02d0e3b28f5b7f03f9..2a88632d03f03f1683b8197622638b0c7ac25ec9 100644 --- a/game/modules/tome/data/quests/staff-absorption.lua +++ b/game/modules/tome/data/quests/staff-absorption.lua @@ -77,7 +77,7 @@ start_ambush = function(self, who) -- Protect from other hits on the same turn self:setEffect(self.EFF_DAMAGE_SHIELD, 3, {power=1000000}) - local o, item, inven_id = self:findInAllInventories("Staff of Absorption") + local o, item, inven_id = player:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION") if o then self:removeObject(inven_id, item, true) o:removed() diff --git a/game/modules/tome/data/talents/spells/arcane.lua b/game/modules/tome/data/talents/spells/arcane.lua index c77ff74520a25787ad1a35da0546381be62cb896..11ec92df4db397cbabd591ebd3349f4bbdac29ef 100644 --- a/game/modules/tome/data/talents/spells/arcane.lua +++ b/game/modules/tome/data/talents/spells/arcane.lua @@ -122,7 +122,7 @@ newTalent{ points = 5, mode = "sustained", cooldown = 30, - sustain_mana = 150, + sustain_mana = 10, tactical = { DEFEND = 2 }, getManaRatio = function(self, t) return 3 - math.max(self:combatTalentSpellDamage(t, 10, 200) / 100, 0.5) end, activate = function(self, t)