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

quest

git-svn-id: http://svn.net-core.org/repos/t-engine4@2188 51575b47-30f0-44d4-a5cc-537603b46e54
parent 10410790
No related branches found
No related tags found
No related merge requests found
......@@ -859,6 +859,7 @@ function _M:setupCommands()
self.log("You cannot go into the wilds with the following effects: %s", table.concat(stop, ", "))
else
-- Do not unpause, the player is allowed first move on next level
if e.change_level_check and e:change_level_check(game.player) then return end
self:changeLevel(e.change_zone and e.change_level or self.level.level + e.change_level, e.change_zone, e.keep_old_lev, e.force_down)
end
else
......
......@@ -79,6 +79,7 @@ function _M:learnLore(lore)
game.logPlayer(self, "Lore found: #0080FF#%s", l.name)
game.logPlayer(self, "#ANTIQUE_WHITE#%s", util.getval(l.lore))
game.logPlayer(self, "You can read all your collected lore in the game menu, by pressing Escape.")
if l.on_learn then l.on_learn(self) end
end
self.lore_known[lore] = true
......
......@@ -79,8 +79,8 @@ newLore{
#{bold}#CHAPTER FIVE: NEEDS MUST...
#{normal}#I ...
#{italic}The note seems unfinished, blood tarnishes most of it. You find a small gem with it, it seems to be some kind of key.
#{normal}]],
#{italic}#The note seems unfinished, blood tarnishes most of it. You find a small gem with it, it seems to be some kind of key.
#{normal}#]],
on_learn = function(who)
game.player:grantQuest("shertul-fortress")
end,
......
-- ToME - Tales of Maj'Eyal
-- 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 = "Sher'Tul Fortress"
desc = function(self, who)
local desc = {}
desc[#desc+1] = "You found notes from an explorer inside the Old Forest. He spoke about Sher'Tul ruins sunken below the surface of the lake of Nur, at the forest's center."
desc[#desc+1] = "With one of the notes there was a small gem that looks like a key."
if self:isCompleted("entered") then
desc[#desc+1] = "You used the key inside the ruins of Nur and found a way into the fortress of old."
end
return table.concat(desc, "\n")
end
......@@ -38,4 +38,13 @@ newEntity{
notice = true,
always_remember = true,
change_level = 1, change_zone = "shertul-fortress",
change_level_check = function(self, who)
if who:knownLore("old-forest-note-6") then
game.logPlayer(who, "#ANTIQUE_WHITE#You notice a hole that could fit the gem key you found earlier, inserting it reveals the passage to the next level.")
who:setQuestStatus("shertul-fortress", engine.Quest.COMPLETED, "entered")
else
game.logPlayer(who, "#ANTIQUE_WHITE#The way seems closed, maybe you need a key.")
return true
end
end,
}
......@@ -19,7 +19,7 @@
load("/data/general/objects/objects.lua")
for i = 1, 5 do
for i = 1, 6 do
newEntity{ base = "BASE_LORE",
define_as = "NOTE"..i,
name = "journal page", lore="old-forest-note-"..i,
......
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