Skip to content
Snippets Groups Projects
Commit 3c43e258 authored by DarkGod's avatar DarkGod
Browse files

Orcs will search your buddies for the staff too

parent 458f50e5
No related branches found
No related tags found
No related merge requests found
......@@ -431,3 +431,4 @@ function _M:findInAllPartyInventoriesBy(prop, value)
if o then return mem, o, item, inven_id end
end
end
_M.findInAllInventoriesBy = _M.findInAllPartyInventoriesBy
......@@ -18,9 +18,9 @@
-- darkgod@te4.org
local has_staff = false
local o, item, inven_id = player:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION")
local carry, o, item, inven_id = game.party:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION")
if o then has_staff = true end
local o, item, inven_id = player:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION_AWAKENED")
local carry, o, item, inven_id = game.party:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION_AWAKENED")
if o then has_staff = true end
local speak
......
......@@ -42,11 +42,11 @@ newEntity{ base = "BASE_SCROLL", define_as = "JEWELER_TOME", subtype="tome", no_
newEntity{ base = "BASE_GEM", define_as = "ANCIENT_STORM_SAPHIR",
power_source = {unknown=true},
unique = true,
unided_name = "strange saphir",
name = "Ancient Storm Saphir", subtype = "blue", image = "object/ancient_storm_saphir.png",
unided_name = "strange sapphire",
name = "Ancient Storm Sapphire", subtype = "blue", image = "object/ancient_storm_saphir.png",
color = colors.ROYAL_BLUE,
level_range = {30, 50},
desc = [[This seemingly normal saphir seems to be charged with the destructive power of a raging storm.]],
desc = [[This seemingly normal sapphire seems to be charged with the destructive power of a raging storm.]],
rarity = 300,
cost = 0,
material_level = 4,
......
......@@ -259,9 +259,9 @@ on_berethh_death = function(self, who, berethh)
who:setQuestStatus("keepsake", engine.Quest.DONE)
local o, item, inven_id = who:findInAllInventoriesBy("define_as", "IRON_ACORN_BASIC")
if o then
who:removeObject(inven_id, item, true)
local carry, o, item, inven_id = game.party:findInAllInventoriesBy("define_as", "IRON_ACORN_BASIC")
if carry and o then
carry:removeObject(inven_id, item, true)
o:removed()
local o
......@@ -272,9 +272,9 @@ on_berethh_death = function(self, who, berethh)
end
if o then
game.zone:addEntity(game.level, o, "object")
who:addObject(who.INVEN_INVEN, o)
carry:addObject(carry.INVEN_INVEN, o)
o:added()
who:sortInven()
carry:sortInven()
end
end
end
......
......@@ -60,7 +60,7 @@ desc = function(self, who)
if self:isCompleted("flight-done") then
desc[#desc+1] = "#LIGHT_GREEN#* You have re-enabled the fortress flight systems. You can now fly around in your fortress!#WHITE#"
else
desc[#desc+1] = "#SLATE#* The fortress shadow has asked that you find an Ancient Storm Saphir, along with at least 250 energy, to re-enable the fortress flight systems.#WHITE#"
desc[#desc+1] = "#SLATE#* The fortress shadow has asked that you find an Ancient Storm Sapphire, along with at least 250 energy, to re-enable the fortress flight systems.#WHITE#"
end
end
if self.shertul_energy > 0 then
......@@ -117,7 +117,7 @@ gain_energy = function(self, energy)
-- if self.shertul_energy >= 250 and not self:isCompleted("flight") then
-- game.player:setQuestStatus(self.id, self.COMPLETED, "flight")
-- local Dialog = require "engine.ui.Dialog"
-- Dialog:simpleLongPopup("Fortress Shadow", "Master, you have sent enough energy to activate the flight systems.\nHowever, one control crystal is broken. You need to find an #GOLD#Ancient Storm Saphir#WHITE#.", 400)
-- Dialog:simpleLongPopup("Fortress Shadow", "Master, you have sent enough energy to activate the flight systems.\nHowever, one control crystal is broken. You need to find an #GOLD#Ancient Storm Sapphire#WHITE#.", 400)
-- end
end
......
......@@ -76,10 +76,11 @@ start_ambush = function(self, who)
-- Protect from other hits on the same turn
self:setEffect(self.EFF_DAMAGE_SHIELD, 3, {power=1000000})
self:removeEffectsFilter{status="detrimental"}
local o, item, inven_id = self:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION")
if o then
self:removeObject(inven_id, item, true)
local carry, o, item, inven_id = game.party:findInAllInventoriesBy("define_as", "STAFF_ABSORPTION")
if carry and o then
carry:removeObject(inven_id, item, true)
o:removed()
end
......
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