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

New quest to create a portal back to the Far East

git-svn-id: http://svn.net-core.org/repos/t-engine4@1580 51575b47-30f0-44d4-a5cc-537603b46e54
parent bac259c4
No related branches found
No related tags found
No related merge requests found
Showing
with 756 additions and 16 deletions
......@@ -612,7 +612,7 @@ function _M:setupCommands()
self.player:learnTalent(self.player.T_HEAVY_ARMOUR_TRAINING, true) self.player:learnTalent(self.player.T_MASSIVE_ARMOUR_TRAINING, true)
-- [[
for i, e in ipairs(self.zone.object_list) do
if e.unique and e.define_as ~= "VOICE_SARUMAN" then
if e.unique and e.define_as ~= "VOICE_SARUMAN" and e.define_as ~= "ORB_MANY_WAYS_DEMON" then
local a = self.zone:finishEntity(self.level, "object", e)
a:identify(true)
self.zone:addEntity(self.level, a, "object", self.player.x, self.player.y)
......@@ -633,10 +633,8 @@ function _M:setupCommands()
end,
[{"_g","ctrl"}] = function()
if config.settings.tome.cheat then
self.player:grantQuest("lightning-overload")
self.player:setQuestStatus("lightning-overload", engine.Quest.COMPLETED, "saved-bree")
self.player:setQuestStatus("lightning-overload", engine.Quest.COMPLETED, "tempest-located")
self:changeLevel(1, "tempest-peak")
self:changeLevel(1, "town-minas-tirith")
self.player:grantQuest("east-portal")
end
end,
}
......
......@@ -129,3 +129,7 @@ newAchievement{
name = "There and back again", id = "WEST_PORTAL",
desc = [[Opened a portal to Middle-earth from the Far East.]],
}
newAchievement{
name = "Back and there again", id = "EAST_PORTAL",
desc = [[Opened a portal to the Far East from Middle-earth.]],
}
......@@ -21,6 +21,7 @@ newChat{ id="welcome",
text = [[Welcome @playername@ to Minas Tirith. Traveler, please be quick as my time is precious.]],
answers = {
{"I have found a strange staff in my travels (#LIGHT_GREEN#*describe it in detail*#LAST#) It looked very old and very powerful. I dared not use it.", jump="found_staff", cond=function(npc, player) return player:isQuestStatus("staff-absorption", engine.Quest.PENDING) end},
{"The hunt for the staff took me to a continent far to the east, accessible only by magic portal. I've recently returned by just such a portal, and I come bearing instructions on how to construct a similar portal here in Minas Tirith to make the return journey possible. I'm sure the elves there would welcome trade with the west.", jump="east_portal", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and not q:isCompleted("talked-elder") end},
{"Nothing, excuse me. Bye!"},
}
}
......@@ -73,4 +74,26 @@ I know you have been through a lot, but we need somebody to investigate and dete
}
}
newChat{ id="east_portal",
text = [[That's extraordinary! I know a number of merchant princes who will salivate at the idea of new trade routes opening. But tell me, how fares your quest for the staff?]],
answers = {
{"The staff is recovered and the culprits slain. They will trouble us no more. [tell him the whole story]", jump="east_portal_winner", cond=function(npc, player) return player:isQuestStatus("high-peak", engine.Quest.DONE) end},
{"The hunt continues. The construction of this portal will be of great assistance in the staff's recovery.", jump="east_portal_hunt", cond=function(npc, player) return not player:isQuestStatus("high-peak", engine.Quest.DONE) end},
}
}
newChat{ id="east_portal_winner",
text = [[Excellent! Well then, concerning this fascinating portal. I'm afraid that men have largely forgotten whatever they once knew about the great magics of old. I know of only one man in Gondor who might be able to help you, a wise man and recent arrival to Minas Tirith named Tannen. He claims to hail from Angolwen, a supposed haven for practitioners of magic and mysticism. He arrived just months ago with fabulous wealth and has already constructed his own tower on the north edge of the city. I know little of him, but if he is to be believed, then he is your best hope.]],
answers = {
{"Thank you.", action=function(npc, player) player:setQuestStatus("east-portal", engine.Quest.COMPLETED, "talked-elder") end},
}
}
newChat{ id="east_portal_hunt",
text = [[In that case, let us proceed as quickly as possible. Now, concerning this fascinating portal. I'm afraid that men have largely forgotten whatever they once knew about the great magics of old. I know of only one man in Gondor who might be able to help you, a wise man and recent arrival to Minas Tirith named Tannen. He claims to hail from Angolwen, a supposed haven for practitioners of magic and mysticism. He arrived just months ago with fabulous wealth and has already constructed his own tower on the north edge of the city. I know little of him, but if he is to be believed, then he is your best hope.]],
answers = {
{"Thank you.", action=function(npc, player) player:setQuestStatus("east-portal", engine.Quest.COMPLETED, "talked-elder") end},
}
}
return "welcome"
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
local function check_materials_gave_orb(npc, player)
local q = player:hasQuest("east-portal")
if not q or not q:isCompleted("gotomoria") or not q:isCompleted("gave-orb") then return false end
local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond")
local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame")
return gem_o and athame_o
end
local function check_materials_withheld_orb(npc, player)
local q = player:hasQuest("east-portal")
if not q or not q:isCompleted("gotomoria") or not q:isCompleted("withheld-orb") then return false end
local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond")
local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame")
return gem_o and athame_o
end
if game.player:hasQuest("east-portal") and game.player:hasQuest("east-portal").wait_turn and game.player:hasQuest("east-portal").wait_turn > game.turn then
newChat{ id="welcome",
text = [[#LIGHT_GREEN#*Nobody answers, Tannen is probably still busy studying the orb.*#WHITE#]],
answers = {
{"[leave]"},
}
}
else
newChat{ id="welcome",
text = [[How may I be of service, good @playerdescriptor.race@?]],
answers = {
{"[Relate to him the story of the staff and the Orb of Many Ways and the portals.]", jump="east_portal1", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("talked-elder") and not q:isCompleted("gotomoria") end},
{"I have the diamond and the athame. [Hand over the Athame and Diamond]", jump="has_material_gave_orb", cond=check_materials_gave_orb},
{"I have the diamond and the athame. [Hand over the Athame and Diamond]", jump="has_material_withheld_orb", cond=check_materials_withheld_orb},
{"Thieving, murderous wretch. Prepare to die!", jump="fake_orb_end", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("tricked-demon") end},
{"How fares your research? Are we ready to create the portal?", jump="wait_end", cond=function(npc, player) local q = player:hasQuest("east-portal"); return q and q:isCompleted("open-orthanc") end},
{"Nothing, excuse me. Bye!"},
}
}
end
---------------------------------------------------------------
-- Explain the situation and get quest going
---------------------------------------------------------------
newChat{ id="east_portal1",
text = [[Astonishing! I have heard tell of this Orb in ancient texts and legends. Might I see it?]],
answers = {
{"[Show him the Orb of Many Ways]", jump="east_portal2"},
}
}
newChat{ id="east_portal2",
text = [[Truly, it is the work of a great master. Perhaps Gandalf himself had a hand in its making. And you say you come bearing instructions in its usage?]],
answers = {
{"I do. [Show him Zemekkys's scribbled notes]", jump="east_portal3"},
}
}
newChat{ id="east_portal3",
text = [[#LIGHT_GREEN#*He spends a few minutes reading*#WHITE# Ah! I see. I did not at first grasp this Zemekkys's methods, but I see now that they are sound, and it is simply his penmanship that needs improvement. We can manage to reproduce his work here, but, as he says, we will need the Blood-Runed Athame and a Resonating Diamond. ]],
answers = {
{"Have you any idea where they might be found?", jump="east_portal4"},
}
}
newChat{ id="east_portal4",
text = [[If the orcs created a portal in the depths of Moria, they must have had access to such items. And if these items cannot pass through the portal they created, then it stands to reason that they must still be in Middle Earth. I would search Moria, starting near the portal itself. Perhaps they did not move the Athame and Diamond far after its creation.]],
answers = {
{"I'll get searching. Thank you.", jump="east_portal5"},
}
}
newChat{ id="east_portal5",
text = [[One last thing. I will need to hold onto the Orb of Many Ways while you search. I lack the expertise this Chronomancer Zemekkys possesses, and have much learning on the subject to do if I am to follow in his footsteps.]],
answers = {
{"[Hand him the Orb] ", action=function(npc, player) player:hasQuest("east-portal"):give_orb(player) end, jump="gave_orb"},
{"I still require the Orb for now.", action=function(npc, player) player:hasQuest("east-portal"):withheld_orb(player) end, jump="withheld_orb"},
}
}
newChat{ id="gave_orb",
text = [[Thank you. I will treat it with the utmost care.]],
answers = {
{"Farewell. I'll return with the Athame and Diamond.", action=function(npc, player) player:hasQuest("east-portal"):setStatus(engine.Quest.COMPLETED, "gotomoria") end},
}
}
newChat{ id="withheld_orb",
text = [[Very well. There is no hurry. But I will need to spend a number of days studying it before we can create your portal.]],
answers = {
{"I understand. I'll return with the Athame and Diamond.", action=function(npc, player) player:hasQuest("east-portal"):setStatus(engine.Quest.COMPLETED, "gotomoria") end},
}
}
---------------------------------------------------------------
-- back with materials
---------------------------------------------------------------
newChat{ id="has_material_gave_orb",
text = [[Excellent. Return in a few days, and I'll have everything prepared. Oh, take this #LIGHT_GREEN#*He hands you a key*#WHITE#. It opens the ruins of Orthanc, which the Mystics of Gondor sealed many years ago. If you happen to find a text in the ruins entitled "Inverted and Reverted Probabilistic Fields," return with it and your odds of surviving our portal attempt will go up drastically.]],
answers = {
{"Thank you, and farewell.", action=function(npc, player) player:hasQuest("east-portal"):open_orthanc(player) end},
}
}
newChat{ id="has_material_withheld_orb",
text = [[Excellent. Are you yet willing to leave the Orb in my care for a time?]],
answers = {
{"I dare not let it out of my sight. I'm sorry.", jump="no_orb_loan"},
{"Here it is. Guard it carefully. I must return to the Far East soon.", jump="orb_loan"},
}
}
newChat{ id="no_orb_loan",
text = [[#LIGHT_GREEN#*The old man sighs*#WHITE# Very well. I suppose I must make do with a cursory examination under your supervision.]],
answers = {
{"[Hand him the orb]", jump="no_orb_loan2"},
}
}
newChat{ id="no_orb_loan2",
text = [[Thank you. Give me a few minutes. #LIGHT_GREEN#*He begins to pace back and forth absently, staring at the Orb.*#WHITE#]],
answers = {
{"[Wait]", jump="no_orb_loan3"},
}
}
newChat{ id="no_orb_loan3",
text = [[[#LIGHT_GREEN#*He stops pacing and returns the Orb to you.*#WHITE# I believe I know most of what I need to. But I need a few details cleared up. You'll have to return to this elven chronomancer and ask him whether he meant an inverted probabilistic field or a reverted probabilistic field. I dare not guess, as the result could be quite unpleasant for you.]],
answers = {
{"I'll return with the answer.", action=function(npc, player) player:hasQuest("east-portal"):ask_east(player) end},
}
}
newChat{ id="orb_loan",
text = [[Fear not. Return in a few days, and I'll have everything prepared. Oh, take this #LIGHT_GREEN#*He hands you a key*#WHITE#. It opens the ruins of Orthanc, which the Mystics of Gondor sealed many years ago. If you happen to find a text in the ruins entitled "Inverted and Reverted Probabilistic Fields," return with it and your odds of surviving our portal attempt will go up drastically.]],
answers = {
{"Thank you, and farewell.", action=function(npc, player) player:hasQuest("east-portal"):open_orthanc(player) end},
}
}
---------------------------------------------------------------
-- Back to the treacherous bastard
---------------------------------------------------------------
newChat{ id="fake_orb_end",
text = [[I think not, fool. Look down.
#LIGHT_GREEN#*You notice you're standing on an etched portal.*#WHITE#]],
answers = {
{"What in the...", action=function(npc, player) player:hasQuest("east-portal"):tannen_tower(player) end},
}
}
newChat{ id="wait_end",
text = [[I am ready. You are not. Look down.
#LIGHT_GREEN#*You notice you're standing on an etched portal.*#WHITE#]],
answers = {
{"What in the...", action=function(npc, player) player:hasQuest("east-portal"):tannen_tower(player) end},
}
}
return "welcome"
......@@ -79,6 +79,7 @@ If used near a portal it could probably activate it.]],
max_power = 30, power_regen = 1,
use_power = { name = "activate a portal", power = 10,
use = function(self, who)
self:identify(true)
local g = game.level.map(who.x, who.y, game.level.map.TERRAIN)
if g and g.orb_portal then
world:gainAchievement("SLIDERS", who:resolveSource())
......@@ -97,6 +98,46 @@ If used near a portal it could probably activate it.]],
end,
}
-- The orb of many ways, allows usage of Farportals
newEntity{ define_as = "ORB_MANY_WAYS_DEMON",
unique = "Orb of Many Ways Demon", quest=true,
type = "jewelry", subtype="orb",
unided_name = "swirling orb", identified=true,
name = "Orb of Many Ways",
level_range = {30, 30},
display = "*", color=colors.VIOLET, image = "object/pearl.png",
encumber = 1,
desc = [[The orb projects images of distance places, some that seem to not be of this world, switching rapidly.
If used near a portal it could probably activate it.]],
max_power = 30, power_regen = 1,
use_power = { name = "activate a portal", power = 10,
use = function(self, who)
local g = game.level.map(who.x, who.y, game.level.map.TERRAIN)
if g and g.orb_portal then
world:gainAchievement("SLIDERS", who:resolveSource())
who:useOrbPortal{
change_level = 1,
change_zone = "demon-plane",
message = "#VIOLET#The world twists sickeningly around you and you find yourself someplace unexpected! It felt nothing like your previous uses of the Orb of Many Ways. Tannen must have switched the Orb out for a fake!",
on_use = function(self, who)
who:setQuestStatus("east-portal", engine.Quest.COMPLETED, "tricked-demon")
end,
}
else
game.logPlayer(who, "There is no portal to activate here.")
end
end
},
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,
}
-------------------- The four orbs of command
-- Rak'shor Pride
......
......@@ -28,6 +28,7 @@ quickEntity('O', {name='cobblestone road', display='.', color=colors.WHITE, imag
quickEntity(' ', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"})
quickEntity('-', {name='grass', display='.', color=colors.LIGHT_GREEN, image="terrain/grass.png"})
quickEntity('#', {name='wall', display='#', color=colors.WHITE, block_move=true, block_sight=true, image="terrain/wood_wall1.png"})
quickEntity('*', {name="Tannen's Tower", display='#', color=colors.WHITE, block_move=true, block_sight=true, image="terrain/wood_wall1.png"})
quickEntity('^', {name='hills', display='^', color=colors.SLATE, image="terrain/mountain.png", block_move=true, block_sight=true})
quickEntity(',', {name='dirt', display='.', color=colors.LIGHT_UMBER, image="terrain/sand.png"})
quickEntity('I', {name='tunneled wall', show_tooltip=true, display='#', color=colors.WHITE, image="terrain/wood_wall1.png"})
......@@ -50,6 +51,7 @@ quickEntity('d', {show_tooltip=true, name="Closed store", display='*', color=col
quickEntity('e', {show_tooltip=true, name="Rare goods", display='*', color=colors.AQUAMARINE, resolvers.store("LOST_MERCHANT"), resolvers.chatfeature("minas-tirith-lost-merchant"), image="terrain/wood_store_weapon.png"})
quickEntity('E', {show_tooltip=true, name="The Elder", display='*', color=colors.VIOLET, resolvers.chatfeature("minas-tirith-elder"), image="terrain/wood_store_closed.png"})
quickEntity('f', {show_tooltip=true, name="Tannen's Tower", display='*', color=colors.VIOLET, resolvers.chatfeature("tannen"), image="terrain/wood_store_closed.png"})
startx = 95
starty = 45
......@@ -59,10 +61,10 @@ return {
[[#^^########------------------ ]],
[[#^^^------############---------- ^ ]],
[[#^^^----------###----#######------- ^^^^^ ]],
[[#^^----ssss-----###--------####------ ^^^^^^ ]],
[[#^^^---StSS-------###--#ssss--###------- ^^^^^^^^ ]],
[[#^^----ssss----OO---##--#StSS---####------ ^^^^^^^^ ]],
[[#^^----##a#-----OOO--##--#sssss----###------ ^^^^^^^^ ]],
[[#^^-----**------###--------####------ ^^^^^^ ]],
[[#^^^---****-------###--#ssss--###------- ^^^^^^^^ ]],
[[#^^----***f----OO---##--#StSS---####------ ^^^^^^^^ ]],
[[#^^-----**------OOO--##--#sssss----###------ ^^^^^^^^ ]],
[[#^ ---------------OO--###-###7#------###----- ^^^^^^^^^^ ]],
[[#^ StSSSS-----ss---OO---##-----OOOOO---###---- ^^^^^^^^^^^ ]],
[[#^^ssssss----Ssss---OOO--##---OOOOOOOO---##---- ^^^^^^^^^ ]],
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
name = "Back and there again"
desc = function(self, who)
local desc = {}
desc[#desc+1] = "You have created a portal back to Middle-earth, you should try to talk to someone in Minas Tirith about establishing a link back."
if self:isCompleted("talked-elder") then
desc[#desc+1] = "You talked to the Elder in Minas Tirith who in turn told you to talk to Tannen, who lives in the north of the city."
end
if self:isCompleted("gave-orb") then
desc[#desc+1] = "You gave the Orb of Many Ways to Tannen for study while you look for the athame and diamond in the Moria."
end
if self:isCompleted("withheld-orb") then
desc[#desc+1] = "You kept the Orb of Many Ways despite Tannen's request to study it. You must now look for the athame and diamond in the Moria."
end
if self:isCompleted("open-orthanc") then
desc[#desc+1] = "You brought back the diamond and athame to Tannen who asked you to check the tower of Orthanc, looking for a text of portals, although he is not sure it is even there. He told you to come back in a few days."
end
if self:isCompleted("ask-east") then
desc[#desc+1] = "You brought back the diamond and athame to Tannen who asked you to check contact Zemekkys to ask some delicate questions."
end
if self:isCompleted("just-wait") then
desc[#desc+1] = "You brought back the diamond and athame to Tannen who asked you to come back in a few days."
end
if self:isCompleted("tricked-demon") then
desc[#desc+1] = "Tannen has tricked you! He swapped the orb for a false one that brought you to a demonic plane. Find the exit, get revenge!"
end
if self:isCompleted("trapped") then
desc[#desc+1] = "Tannen revealed the vile scum he really is and trapped you in his tower."
end
if self:isCompleted() then
desc[#desc+1] = ""
desc[#desc+1] = "#LIGHT_GREEN#* The portal to the Far East is now functional and can be used to go back.#WHITE#"
end
return table.concat(desc, "\n")
end
create_portal = function(self, npc, player)
-- Farportal
local g = mod.class.Grid.new{
name = "Farportal: Gates of Morning",
display = '&', color_r=255, color_g=0, color_b=220, back_color=colors.VIOLET,
notice = true,
always_remember = true,
show_tooltip = true,
desc = [[A farportal is a way to travel incredible distances in the blink of an eye. They usually require an external item to use.
This one seems to go near the Gates of Morning in the Far East.]],
orb_portal = {
change_level = 1,
change_zone = "wilderness-farest",
change_wilderness = {
x = 65, y = 35,
},
message = "#VIOLET#You enter the swirling portal and in the blink of an eye you set foot in sight of the Gates of Morning, with no trace of the portal...",
on_use = function(self, who)
end,
},
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.level, g, "terrain", 20, 36)
game.level.map:particleEmitter(20, 36, 3, "farportal_lightning")
game.level.map:particleEmitter(20, 36, 3, "farportal_lightning")
game.level.map:particleEmitter(20, 36, 3, "farportal_lightning")
player:setQuestStatus(self.id, engine.Quest.DONE)
world:gainAchievement("EAST_PORTAL", game.player)
end
give_orb = function(self, player)
player:setQuestStatus(self.id, engine.Quest.COMPLETED, "gave-orb")
local orb_o, orb_item, orb_inven_id = player:findInAllInventories("Orb of Many Ways")
player:removeObject(orb_inven_id, orb_item, true)
orb_o:removed()
end
withheld_orb = function(self, player)
player:setQuestStatus(self.id, engine.Quest.COMPLETED, "withheld-orb")
end
remove_materials = function(self, player)
local gem_o, gem_item, gem_inven_id = player:findInAllInventories("Resonating Diamond")
player:removeObject(gem_inven_id, gem_item, true)
gem_o:removed()
local athame_o, athame_item, athame_inven_id = player:findInAllInventories("Blood-Runed Athame")
player:removeObject(athame_inven_id, athame_item, true)
athame_o:removed()
end
open_orthanc = function(self, player)
self:removeMaterials(player)
-- Reveal entrances
local g = mod.class.Grid.new{
show_tooltip=true,
name="Entrance into the tower of Orthanc",
display='>', color=colors.RED,
notice = true,
change_level=1, change_zone="orthanc"
}
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.memory_levels["wilderness-1"], g, "terrain", 43, 40)
game.logPlayer(game.player, "Tannen points the location of Orthanc on your map.")
player:setQuestStatus(self.id, engine.Quest.COMPLETED, "open-orthanc")
self.wait_turn = game.turn + game.calendar.DAY * 3
end
ask_east = function(self, player)
self:removeMaterials(player)
-- Swap the orbs! Tricky bastard!
local orb_o, orb_item, orb_inven_id = player:findInAllInventories("Orb of Many Ways")
player:removeObject(orb_inven_id, orb_item, true)
orb_o:removed()
local demon_orb = game.zone:makeEntityByName(game.level, "object", "ORB_MANY_WAYS_DEMON")
player:addObject(orb_inven_id, demon_orb)
demon_orb:added()
player:setQuestStatus(self.id, engine.Quest.COMPLETED, "ask-east")
end
tannen_tower = function(self, player)
game:changeLevel(1, "tannen-tower")
player:setQuestStatus(self.id, engine.Quest.COMPLETED, "trapped")
end
......@@ -123,4 +123,5 @@ This one seems to go near the town of Minas Tirith in the West.]],
player:setQuestStatus(self.id, engine.Quest.DONE)
world:gainAchievement("WEST_PORTAL", game.player)
player:grantQuest("east-portal")
end
......@@ -21,8 +21,7 @@ load("/data/general/objects/objects.lua")
newEntity{ base = "BASE_GEM",
define_as = "RESONATING_DIAMOND",
name = "Resonating Diamond", color=colors.VIOLET, unique=true,
cost = 500,
name = "Resonating Diamond", color=colors.VIOLET, quest=true, unique=true, identified=true,
on_pickup = function(self, who)
if who == game.player then
......
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/grids/basic.lua")
newEntity{
define_as = "LAVA_FLOOR",
name = "lava floor", image = "terrain/lava_floor.png",
display = '.', color=colors.RED, back_color=colors.DARK_GREY,
shader = "lava",
}
newEntity{
define_as = "LAVA_WALL",
name = "lava wall", image = "terrain/granite_wall1.png",
display = '#', color=colors.RED, back_color=colors.DARK_GREY, tint=colors.LIGHT_RED,
always_remember = true,
does_block_move = true,
block_sight = true,
air_level = -20,
dig = "LAVA_FLOOR",
}
newEntity{
define_as = "LAVA",
name = "molten lava", image = "terrain/lava.png",
display = '%', color=colors.LIGHT_RED, back_color=colors.RED,
does_block_move = true,
shader = "lava",
}
newEntity{
define_as = "PORTAL_BACK",
name = "Demonic Portal",
display = '&', color_r=255, color_g=0, color_b=220, back_color=colors.VIOLET,
notice = true,
always_remember = true,
show_tooltip = true,
desc = [[This portal seems to be connected with Middle-earth, you could probably use it to go back.]],
on_move = function(self, x, y, who)
if who == game.player then
require("engine.ui.Dialog"):yesnoPopup("Back and there again", "Enter the portal back to Middle-earth? (Warning loot Draebor first)", function(ret)
if ret then
who.wild_x, who.wild_y = 72, 23
game:changeLevel(1, "wilderness")
game.logPlayer(who, "#VIOLET#You enter the swirling portal and in the blink of an eye you are back to Middle-earth, on the eastern side of the Mirkwood forest.")
end
end, "Enter", "Stay")
end
end,
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/npcs/ghost.lua", rarity(5))
load("/data/general/npcs/major-demon.lua", rarity(2))
load("/data/general/npcs/minor-demon.lua", rarity(0))
local Talents = require("engine.interface.ActorTalents")
newEntity{ define_as = "DRAEBOR",
type = "demon", subtype = "minor", unique = true,
name = "Draebor, the Imp",
display = "u", color=colors.VIOLET,
desc = [[An intensely irritating git of a monster.]],
level_range = {35, 75}, exp_worth = 3,
max_life = 300, life_rating = 22, fixed_rating = true,
rank = 4,
size_category = 5,
infravision = 30,
mana_regen = 100,
life_regen = 10,
stats = { str=20, dex=15, cun=35, mag=25, con=20 },
poison_immune = 1,
stun_immune = 1,
instakill_immune = 1,
no_breath = 1,
move_others=true,
demon = 1,
on_melee_hit = { [DamageType.FIRE] = 15, },
resists = { [DamageType.FIRE] = 50, [DamageType.DARKNESS] = 50, },
body = { INVEN = 10, MAINHAND=1, OFFHAND=1, BODY=1 },
resolvers.drops{chance=100, nb=4, {ego_chance=100} },
-- resolvers.drops{chance=100, nb=1, {defined="ATHAME_WEST"} },
summon = {
{type="demon", number=1, hasxp=false},
},
talent_cd_reduction={[Talents.T_FLAME]=2, [Talents.T_BLOOD_GRASP]=4, [Talents.T_PHASE_DOOR]=3, [Talents.T_SUMMON]=-10, },
resolvers.talents{
[Talents.T_SUMMON]=1,
[Talents.T_FLAME]=5,
[Talents.T_BLOOD_GRASP]=5,
[Talents.T_WILDFIRE]=5,
[Talents.T_PHASE_DOOR]=2,
[Talents.T_CURSE_OF_VULNERABILITY]=5,
[Talents.T_BONE_SHIELD]=3,
},
resolvers.sustains_at_birth(),
autolevel = "caster",
ai = "dumb_talented_simple", ai_state = { talent_in=1, ai_move="move_astar" },
on_die = function(self, who)
require("engine.ui.Dialog"):simplePopup("Back and there again", "As the annoying imp falls a portal appears under its corpse.")
local g = game.zone:makeEntityByName(game.level, "terrain", "PORTAL_BACK")
game.zone:addEntity(game.level, g, "terrain", self.x, self.y)
end,
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/objects/objects.lua")
local Stats = require "engine.interface.ActorStats"
-- Artifact, droped (and used!) by Bill the Stone Troll
newEntity{ base = "BASE_GREATMAUL",
define_as = "GREATMAUL_BILL_TRUNK",
name = "Bill's Tree Trunk", unique=true,
desc = [[This is a big nasty looking tree trunk that Bill was using as a weapon. It could still serve this purpose, should you be strong enough to wield it!]],
require = { stat = { str=25 }, },
rarity = false,
metallic = false,
cost = 5,
combat = {
dam = 30,
apr = 7,
physcrit = 1.5,
dammod = {str=1.3},
damrange = 1.7,
},
wielder = {
},
}
for i = 1, 5 do
newEntity{ base = "BASE_SCROLL",
define_as = "NOTE"..i,
name = "tattered paper scrap", lore="trollshaws-note-"..i,
desc = [[A paper scrap, left by an adventurer.]],
rarity = false,
is_magic_device = false,
encumberance = 0,
}
end
newEntity{ base = "BASE_SHIELD",
define_as = "SANGUINE_SHIELD",
unided_name = "bloody shield",
name = "Sanguine Shield", unique=true,
desc = [["Though tarnished and spattered with blood, the emblem of the sun still manages to shine through on this shield.]],
require = { stat = { str=39 }, },
cost = 120,
special_combat = {
dam = 40,
physcrit = 9,
dammod = {str=1.2},
},
wielder = {
inc_stats = { [Stats.STAT_CON] = 5, },
fatigue = 19,
resists = { [DamageType.BLIGHT] = 25, },
life_regen = 5,
},
}
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
load("/data/general/traps/natural_forest.lua")
-- ToME - Tales of Middle-Earth
-- Copyright (C) 2009, 2010 Nicolas Casalini
--
-- This program is free software: you can redistribute it and/or modify
-- it under the terms of the GNU General Public License as published by
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
--
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
return {
name = "Demon Plane",
level_range = {35, 40},
level_scheme = "player",
max_level = 1,
decay = {300, 800},
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
width = 65, height = 65,
-- all_remembered = true,
-- all_lited = true,
persistant = "zone",
no_worldport = true,
ambiant_music = "Straight Into Ambush.ogg",
generator = {
map = {
class = "engine.generator.map.Forest",
edge_entrances = {2,8},
zoom = 3,
sqrt_percent = 30,
noise = "fbm_perlin",
floor = "LAVA_FLOOR",
wall = "LAVA_WALL",
up = "LAVA_FLOOR",
down = "LAVA_FLOOR",
do_ponds = {
nb = {2, 3},
size = {w=25, h=25},
pond = {{0.6, "LAVA"}, {0.8, "LAVA"}},
},
},
actor = {
class = "engine.generator.actor.Random",
nb_npc = {40, 40},
guardian = "DRAEBOR",
},
object = {
class = "engine.generator.object.Random",
nb_object = {0, 0},
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {12, 15},
},
},
}
......@@ -92,7 +92,9 @@ newEntity{ define_as = "GOLBUG",
end,
on_die = function(self, who)
game.state:activateBackupGuardian("LITHFENGEL", 4, 40, "They say that after it has been confirmed orcs still inhabited the Moria, they found a mighty demon there.")
game.state:activateBackupGuardian("LITHFENGEL", 4, 35, "They say that after it has been confirmed orcs still inhabited the Moria, they found a mighty demon there.", function(gen)
if gen then require("engine.ui.Dialog"):simpleLongPopup("Danger...", "When last you saw it, this cavern was littered with the corpses of orcs that you had slain. Now many, many more corpses carpet the floor, all charred and reeking of sulfur. An orange glow dimly illuminates the far reaches of the cavern to the east.", 400) end
end)
world:gainAchievement("DESTROYER_BANE", game.player:resolveSource())
game.player:setQuestStatus("orc-hunt", engine.Quest.DONE)
......@@ -145,9 +147,9 @@ newEntity{ define_as = "LITHFENGEL", -- Lord of Ash; backup guardian
type = "demon", subtype = "major", unique = true,
name = "Lithfengel",
display = "U", color=colors.VIOLET,
desc = [[A terrible demon of decay and atrophy, drawn to the energy of the farportal.]],
level_range = {40, 75}, exp_worth = 3,
max_life = 500, life_rating = 30, fixed_rating = true,
desc = [[A terrible demon of decay and atrophy, drawn to the energy of the farportal. A Balrog of blight!]],
level_range = {35, 75}, exp_worth = 3,
max_life = 400, life_rating = 25, fixed_rating = true,
rank = 4,
size_category = 5,
infravision = 30,
......@@ -168,6 +170,8 @@ newEntity{ define_as = "LITHFENGEL", -- Lord of Ash; backup guardian
{type="weapon", subtype="waraxe", defined="MALEDICTION", autoreq=true},
},
resolvers.drops{chance=100, nb=4, {ego_chance=100} },
resolvers.drops{chance=100, nb=1, {defined="ATHAME_WEST"} },
resolvers.drops{chance=100, nb=1, {defined="RESONATING_DIAMOND_WEST"} },
resolvers.talents{
[Talents.T_ROTTING_DISEASE]=5,
......@@ -185,5 +189,8 @@ newEntity{ define_as = "LITHFENGEL", -- Lord of Ash; backup guardian
ai = "dumb_talented_simple", ai_state = { talent_in=2, ai_move="move_astar" },
on_die = function(self, who)
if who.resolveSource and who:resolveSource().player and who:resolveSource():hasQuest("east-portal") then
require("engine.ui.Dialog"):simpleLongPopup("Back and there again", "A careful examination of the balrog's body turns up a Blood-Runed Athame and a Resonating Diamond, both covered in soot and gore but otherwise in good condition.", 400)
end
end,
}
......@@ -48,3 +48,33 @@ newEntity{ base = "BASE_WARAXE",
melee_project={[DamageType.BLIGHT] = 20},
},
}
newEntity{ base = "BASE_GEM",
define_as = "RESONATING_DIAMOND_WEST",
name = "Resonating Diamond", color=colors.VIOLET, quest=true, unique="Resonating Diamond West", identified=true,
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,
}
newEntity{ define_as = "ATHAME_WEST",
quest=true, unique="Blood-Runed Athame West", identified=true,
type = "misc", subtype="misc",
unided_name = "athame",
name = "Blood-Runed Athame",
level_range = {50, 50},
display = "|", color=colors.VIOLET,
encumber = 1,
desc = [[An athame, covered in blood runes. It radiates power.]],
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,
}
......@@ -47,7 +47,7 @@ newEntity{ base = "BASE_GREATSWORD",
}
newEntity{ define_as = "ATHAME",
quest=true, unique=true,
quest=true, unique=true, identified=true,
type = "misc", subtype="misc",
unided_name = "athame",
name = "Blood-Runed Athame",
......
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