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

Objects can have a "not_in_stores" field to prevent them from appearing in any stores

Added more new world artifacts
The portal to Mount Doom in Eruan is one use only


git-svn-id: http://svn.net-core.org/repos/t-engine4@1170 51575b47-30f0-44d4-a5cc-537603b46e54
parent 1584b1eb
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ function _M:loadup(level, zone)
for i = 1, rng.range(s.min_fill, s.max_fill) - #inven do
local filter = rng.table(s.filters)
local e = zone:makeEntity(level, "object", filter, nil, true)
if e then
if e and not e.not_in_stores then
if filter.id then e:identify(filter.id) end
self:addObject(inven, e)
zone:addEntity(level, e, "object")
......
......@@ -599,6 +599,8 @@ function _M:useOrbPortal(portal)
if spotHostiles(self) then game.logPlayer(self, "You can not use the Orb with foes in sight.") return end
if portal.on_preuse then portal:on_preuse(self) end
if portal.teleport_level then
local x, y = util.findFreeGrid(portal.teleport_level.x, portal.teleport_level.y, 2, true, {[Map.ACTOR]=true})
if x and y then self:move(x, y, true) end
......
......@@ -48,7 +48,9 @@ newEntity{ base = "BASE_CLOTH_ARMOR",
level_range = {20, 30},
cost = 2.5,
material_level = 3,
combat_def = 2,
wielder = {
combat_def = 2,
},
}
newEntity{ base = "BASE_CLOTH_ARMOR",
......@@ -56,7 +58,9 @@ newEntity{ base = "BASE_CLOTH_ARMOR",
level_range = {30, 40},
cost = 3.5,
material_level = 4,
combat_def = 3,
wielder = {
combat_def = 3,
},
}
newEntity{ base = "BASE_CLOTH_ARMOR",
......@@ -64,5 +68,7 @@ newEntity{ base = "BASE_CLOTH_ARMOR",
level_range = {40, 50},
cost = 5.5,
material_level = 5,
combat_def = 5,
wielder = {
combat_def = 5,
},
}
......@@ -221,6 +221,7 @@ newEntity{ base = "BASE_SCROLL", define_as = "JEWELER_TOME", subtype="tome",
level_range = {30, 40}, rarity = 120,
color = colors.VIOLET,
fire_proof = true,
not_in_stores = true,
on_pickup = function(self, who)
if who == game.player then
......
......@@ -493,6 +493,8 @@ After Frodo destroyed it, Elrond passed the knowledge to Aragorn the King of Men
["technique/dualweapon-training"] = 0.1,
["technique/shield-defense"] = 0.1,
["technique/shield-offense"] = 0.1,
["technique/warcries"] = 0.1,
["technique/superiority"] = 0.1,
},
},
}
......@@ -522,6 +524,46 @@ newEntity{ base = "BASE_GREATMAUL",
},
}
newEntity{ base = "BASE_CLOTH_ARMOR",
unique = true,
name = "Spider-Silk Robe of Torech Ungo", color = colors.DARK_GREEN,
unided_name = "spider-silk robe",
desc = [[After the fall of Mordor, teams of orcs looking for plunder found the thread of Shelob's own thick webs. They sewed the incredibly strong webbing together into a robe that was given to the head of a Pride before it was lost in a war.]],
level_range = {20, 30},
rarity = 190,
cost = 250,
material_level = 3,
wielder = {
combat_def = 10,
combat_armor = 10,
inc_stats = { [Stats.STAT_CON] = 4, [Stats.STAT_WIL] = -2, },
combat_spellresist = 10,
combat_physresist = 10,
resists={[DamageType.NATURE] = 30},
on_melee_hit={[DamageType.POISON] = 20},
},
}
newEntity{ base = "BASE_HELM",
unique = true,
name = "Dragon-helm of Dor-lómin",
unided_name = "dragon-helm",
desc = [[A visored steel helm, embossed and embellished with gold, that bears as its crest the head of Glaurung the Dragon.]],
require = { talent = { Talents.T_MASSIVE_ARMOUR_TRAINING }, stat = { str=35 }, },
level_range = {37, 45},
rarity = 280,
cost = 400,
material_level = 5,
wielder = {
inc_stats = { [Stats.STAT_STR] = 5, [Stats.STAT_CON] = 5, [Stats.STAT_LCK] = -4, },
combat_def = 5,
combat_armor = 9,
fatigue = 10,
},
max_power = 45, power_regen = 1,
use_talent = { id = Talents.T_WARSHOUT, level = 2, power = 80 },
}
--[=[
newEntity{
unique = true,
......
......@@ -34,7 +34,14 @@ This one seems to go to the west, to Mount Doom, in the land of Mordor...]],
orb_portal = {
change_level = 1,
change_zone = "mount-doom",
message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot on hellish land, the heart of a volcano...",
message = "#VIOLET#You enter the swirling portal while it fades away and in the blink of an eye you set foot on hellish land, the heart of a volcano...",
on_preuse = function(self, who)
-- Find all portals and deactivate them
for i = -4, 4 do for j = -4, 4 do if game.level.map:isBound(who.x + i, who.y + j) then
local g = game.level.map(who.x + i, who.y + j, engine.Map.TERRAIN)
if g.define_as and g.define_as == "MOUNT_DOOM_PORTAL" then g.orb_portal = nil end
end end end
end,
on_use = function(self, who)
who:setQuestStatus("pre-mount-doom", engine.Quest.DONE)
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