Skip to content
Snippets Groups Projects
Commit 893c3a21 authored by dg's avatar dg
Browse files

Fixed giving the staff of absorption in last hope even when it is cursed

git-svn-id: http://svn.net-core.org/repos/t-engine4@4689 51575b47-30f0-44d4-a5cc-537603b46e54
parent 58ca4474
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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()
......
......@@ -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
......
......@@ -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()
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment