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

Added lore to the blighted ruins

git-svn-id: http://svn.net-core.org/repos/t-engine4@1842 51575b47-30f0-44d4-a5cc-537603b46e54
parent fe2a84b5
No related branches found
No related tags found
No related merge requests found
......@@ -77,7 +77,7 @@ function _M:learnLore(lore)
local l = self:getLore(lore)
Dialog:simpleLongPopup("Lore found: #0080FF#"..l.name, "#ANTIQUE_WHITE#"..l.lore, 400)
game.logPlayer(self, "Lore found: #0080FF#%s", l.name)
game.logPlayer(self, "#ANTIQUE_WHITE#%s", l.lore)
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.")
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
--------------------------------------------------------------------------
-- Blighted Ruins
--------------------------------------------------------------------------
newLore{
id = "blighted-ruins-note-1",
category = "blighted ruins",
name = "note from the Necromancer",
lore = [[Work on my glorious project has been delayed. This displeases me. The fools from the nearby village are starting to suspect my presence, and have begun guarding their graveyards and cemeteries closely. Whatever meagre remains I can steal away are often too rotted or insubstantial to use for my project, so I have no choice but to use them as sub-par minions instead. Perhaps they will sow enough conflict and discord so that new, fresher remains will become available...]],
}
newLore{
id = "blighted-ruins-note-2",
category = "blighted ruins",
name = "note from the Necromancer",
lore = [[The cloak of deception is complete! Truly my finest work, not counting my project of course, it allows my minions to walk amongst the living without arousing their suspicions at all. Already I have taken a stroll to a nearby town alongside a ghoulish thrall, wrapped in the cloak... hah! The fools didn't even bat an eyelid! With this item, acquisition of components for my project shall be all the more simple.]],
}
newLore{
id = "blighted-ruins-note-3",
category = "blighted ruins",
name = "note from the Necromancer",
lore = function() return [[Fate smiles upon me. What did I come across today but the body of an unfortunate ]]..game.player.descriptor.subclass..[[? Unfortunate indeed, but rather fortunate for me. The body displays next to no decomposition... it shall be perfect! With this new minion and the cloak of deception, the completion of my project is all but assured. I must prepare for the ritual... my dark menagerie shall soon have a new member.]] end,
}
newLore{
id = "blighted-ruins-note-4",
category = "blighted ruins",
name = "note from the Necromancer",
lore = [[My masterpiece walks! It is glorious, beautiful. While it remains unfinished, it is finished enough to serve in its purpose of protecting my lair. No would-be hero will be able to defeat it, and once it is complete it will be nigh invulnerable! Now all that remains is to animate my newest minion and bend it to my will... then they'll see. They'll ALL see. What can possibly stop me now, I ask? What?!]],
}
......@@ -21,6 +21,7 @@ load("/data/lore/trollshaws.lua")
load("/data/lore/daikara.lua")
load("/data/lore/old-forest.lua")
load("/data/lore/infinite-dungeon.lua")
load("/data/lore/blighted-ruins.lua")
load("/data/lore/tol-falas.lua")
load("/data/lore/fun.lua")
load("/data/lore/sunwall.lua")
......
......@@ -52,3 +52,14 @@ newEntity{ define_as = "CLOAK_DECEPTION",
who:setQuestStatus("start-undead", engine.Quest.COMPLETED, "black-cloak")
end,
}
for i = 1, 4 do
newEntity{ base = "BASE_LORE",
define_as = "NOTE"..i,
name = "journal page", lore="blighted-ruins-note-"..i,
desc = [[A paper scrap, left by the Necromancer.]],
rarity = false,
is_magic_device = false,
encumberance = 0,
}
end
......@@ -77,4 +77,22 @@ return {
}, },
},
},
on_enter = function(_, _, newzone)
if newzone and not game.zone.created_lore then
local levels = {2,3,4,5,6,7}
game.zone.created_lore = {}
for i = 1, 4 do
local lev = rng.tableRemove(levels)
game.zone.created_lore[lev] = i
print("Lore "..i.." on level "..lev)
end
end
end,
post_process = function(level)
-- Put lore near the up stairs
if game.zone.created_lore and game.zone.created_lore[level.level] then
-- Place a lore note on the level
game:placeRandomLoreObject("NOTE"..game.zone.created_lore[level.level])
end
end,
}
......@@ -63,7 +63,7 @@ function _M:generateList()
local i = 0
for id, _ in pairs(self.actor.lore_known) do
local l = self.actor:getLore(id)
list[#list+1] = { name=l.name, desc=l.lore, cat=l.category, order=l.order }
list[#list+1] = { name=l.name, desc=util.getval(l.lore), cat=l.category, order=l.order }
i = i + 1
end
-- Add known artifacts
......
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