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

Players start with the Orb of Knwoledge when doing the infinite dungeon

git-svn-id: http://svn.net-core.org/repos/t-engine4@1797 51575b47-30f0-44d4-a5cc-537603b46e54
parent 03abf777
No related branches found
No related tags found
No related merge requests found
......@@ -130,8 +130,13 @@ newBirthDescriptor{
},
},
copy = {
-- Give the orb of knowledge
resolvers.inventory{ id=true, {defined="ORB_KNOWLEDGE"}},
resolvers.generic(function(e) e.hotkey[12] = {"inventory", "Orb of Knowledge"} end),
-- Override normal stuff
before_starting_zone = function(self)
self.starting_level = 1
self.starting_level_force_down = nil
self.starting_zone = "infinite-dungeon"
self.starting_quest = "infinite-dungeon"
self.starting_intro = "infinite-dungeon"
......
......@@ -18,3 +18,39 @@
-- darkgod@te4.org
load("/data/general/objects/objects.lua")
-- Id stuff
newEntity{ define_as = "ORB_KNOWLEDGE",
unique = true, quest=true,
type = "jewelry", subtype="orb",
unided_name = "orb", no_unique_lore = true,
name = "Orb of Knowledge", identified = true,
display = "*", color=colors.VIOLET, image = "object/ruby.png",
encumber = 1,
desc = [[This orb was given to you by Elisa the halfling scryer, it will automatically identify normal and rare items for you and can be activated to identify all others.]],
on_drop = function(self, who)
if who == game.player then
game.logPlayer(who, "You cannot bring yourself to drop the %s", self:getName())
return true
end
end,
max_power = 1, power_regen = 1,
use_power = { name = "use the orb", power = 1,
use = function(self, who)
for inven_id, inven in pairs(who.inven) do
for item, o in ipairs(inven) do
if not o:isIdentified() then
o:identify(true)
game.logPlayer(who, "You have: %s", o:getName{do_colour=true})
end
end
end
end
},
carrier = {
auto_id_mundane = 1,
},
}
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