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

lore for the caldera

git-svn-id: http://svn.net-core.org/repos/t-engine4@5467 51575b47-30f0-44d4-a5cc-537603b46e54
parent 671c06e8
Branches newphantasm
No related tags found
No related merge requests found
......@@ -28,47 +28,34 @@ function _M:init(zone, map, level, data)
self.grid_list = zone.grid_list
end
function _M:makePath(sx, sy, ex, ey, wd, excentricity, points)
function _M:generate(lev, old_lev)
for i = 0, self.map.w - 1 do for j = 0, self.map.h - 1 do
self.map(i, j, Map.TERRAIN, self:resolve("#"))
end end
local ln = 0
local path = core.noise.new(1)
local wideness = core.noise.new(1)
local j = sy
local j = self.data.start
local dir = true
for i = sx, ex do
for i = 0, self.map.w - 1 do
local wd = wideness:fbm_perlin(20 * i / self.map.w, 4)
wd = math.ceil(((wd + 1) / 2) * 4)
for jj = j - wd, j + wd do if self.map:isBound(i, jj) then self.map(i, jj, Map.TERRAIN, self:resolve(".")) end end
points[#points+1] = {x=i, y=j}
if i < ex - 10 then
local n = path:fbm_perlin(150 * i / self.map.w, 4)
if ln < -excentricity or ln > excentricity then
if (ln > 0 and n < 0) or (ln < 0 and n > 0) then dir = not dir end
j = util.bound(j + (dir and -1 or 1), 0, self.map.h - 1)
end
if i < self.map.w - 10 then
local n = path:fbm_perlin(350 * i / self.map.w, 4)
if (ln > 0 and n < 0) or (ln < 0 and n > 0) then dir = not dir end
j = util.bound(j + (dir and -1 or 1), 0, self.map.h - 1)
ln = n
else
-- Close in on the exit
if j < ey then j = j + 1
elseif j > ey then j = j - 1
if j < self.data.stop then j = j + 1
elseif j > self.data.stop then j = j - 1
end
end
end
end
function _M:generate(lev, old_lev)
for i = 0, self.map.w - 1 do for j = 0, self.map.h - 1 do
self.map(i, j, Map.TERRAIN, self:resolve("#"))
end end
local points = {}
self:makePath(0, self.data.start, self.map.w - 1, self.data.stop, 1, 0.35, points)
for i = 1, 10 do
local sp, ep
repeat
sp = rng.table(points)
ep = rng.table(points)
until ep.x - sp.x > 80
self:makePath(sp.x, sp.y, ep.x, ep.y, 0, 0.25, points)
end
-- Make stairs
local spots = {}
......
......@@ -28,6 +28,7 @@ load("/data/lore/rhaloren.lua")
load("/data/lore/slazish.lua")
load("/data/lore/infinite-dungeon.lua")
load("/data/lore/blighted-ruins.lua")
load("/data/lore/noxious-caldera.lua")
load("/data/lore/dreadfell.lua")
load("/data/lore/fun.lua")
load("/data/lore/last-hope.lua")
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011, 2012 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
--------------------------------------------------------------------------
-- The Dogroth Caldera
--------------------------------------------------------------------------
newLore{
id = "noxious-caldera-note-1",
category = "dogroth caldera",
name = "tattered paper scrap",
lore = [[What wending path brought me to this place? I know not. The mists have obscured all passage, all trail. I see but the enclosing dominance of the caldera ahead. The ashen cauldron of steam lures me, yet repels me. I feel there is a force here trying to sway my thoughts.
Where are the rest of my party? Have my friends abandoned me?]],
}
newLore{
id = "noxious-caldera-note-2",
category = "dogroth caldera",
name = "tattered paper scrap",
lore = [[I fell into a trance, I know not how. Were it the rich blossoms or the oppressive heat? I swooned into the grass and the mists swirled over my face, playing out fantastic shapes before my eyes. Dancing ladies strode across the skies, and a row of dwarves stood laughing as their beards flew into the wind. Then I felt a Shadow near, and the ladies scattered and the dwarves in terror screamed, their mouths yowling and spilling black petals. I tried to move, but I couldn't, and frozen in fear I saw the Shadow above me, looking down upon my countenance. It grunted and lurched away. I passed out then, and have just recovered.
I am not sure what to make of this. I wish to leave, but I do not know the way. Only by escaping this mist shall I have a clear view of the land. Yet each path seems to wind unexpected, each step takes me closer to the centre, not further. I must make haste from this place.
]],
}
newLore{
id = "noxious-caldera-note-3",
category = "dogroth caldera",
name = "tattered paper scrap",
lore = [[I have found a body, a fellow Thaloren by the looks of things. Her face was contorted in horror, her limbs twisted into painful shapes. Yet there was no blood, and I see not how she were felled. Was it the Shadow? I have buried her as best I could.
There are strange things in this land, and I am afeared. I saw a large ant earlier, and when I tried to stomp it underfoot it screamed at me, and called me names. I crushed it, and its eyes went red and burst, and it let out a shrill death cry that still echoes round my skull, scattering my thoughts.
My head aches, and with each pounding the earth visibly shakes beneath my feet. Is this a fever? I must get out of here!]],
}
newLore{
id = "noxious-caldera-note-4",
category = "dogroth caldera",
name = "tattered paper scrap",
lore = [[Another body, if one could call it that. Mangled remains strewn about a rocky outcrop, of whom I know not. Only the armour and weapon give tell that it were once an intelligent race. The breastplate still polished and undented, the axe still clean and un-notched, yet the flesh ripped apart like shredded paper. What could do this?!
I did not even attempt to bury the remains. I ran, and as frightful thoughts filled my head the sky turned red and the earth turned black, and spiders appeared with morphing faces. They laughed at me and spun their webs. I tore through them, the strands sticking to my fingers, mucousy remnants dripping over my skin. A surge of revulsion pulsed through me and suddenly the webs evaporated and the spiders coalesced into a giant face, its mouth a red flower. I reached into the midst of the crimson petals and it exploded in a wet mess, blinding all sight and thought.
I woke up with my flesh drenched in blood. Or is it blood? Is it my flesh? The ground rumbles with my every moan, the mists swirl with my every sigh. I am closer to the heart of the caldera now. Closer to finding the truth. The truth of this place. The truth of myself...]],
}
newLore{
id = "noxious-caldera-note-5",
category = "dogroth caldera",
name = "tattered paper scrap",
lore = [[Broken land and broken thoughts. If I think clearly the land runs smooth. But my thoughts are not clear. I think.
I am here and here is me, a reflection of my will. Is it my will any more? Perhaps I am the reflection, my actions inspired by the mists about me.
My dreams follow me as I wake, and wake as I follow them. I seek them and summon them and play with them. This is my playground now. Whatever I dream shall appear, and when I am tired I discard of them, rend them away.
Others want to disturb my games. They come as hawks and moths and snakes, and their mouths spill putrescence over my blessed soil. But let them come. I will play with them. We shall have a fun game together, I think.
And what I think is what is real.]],
}
......@@ -59,6 +59,7 @@ newEntity{ define_as = "MINDWORM",
{type="jewelry", subtype="ring", autoreq=true},
{type="armor", subtype="light", autoreq=true},
},
resolvers.drops{chance=100, nb=1, {defined="NOTE5"} },
resolvers.drops{chance=100, nb=3, {tome_drops="boss"} },
resolvers.talents{
......
......@@ -18,3 +18,12 @@
-- darkgod@te4.org
load("/data/general/objects/objects-maj-eyal.lua")
for i = 1, 5 do
newEntity{ base = "BASE_LORE",
define_as = "NOTE"..i,
name = "tattered paper scrap", lore="noxious-caldera-note-"..i,
desc = [[A paper scrap, left by an adventurer.]],
rarity = false,
}
end
......@@ -37,12 +37,12 @@ return {
max_material_level = 3,
levels = {
[1] = {
width = 150, height = 30,
width = 150, height = 12,
generator = {
map = {
class = "mod.class.generator.map.GenericTunnel",
start = 15,
stop = 15,
start = 6,
stop = 6,
['#'] = "MOUNTAIN_WALL",
['.'] = "JUNGLE_GRASS",
up = "JUNGLE_GRASS_UP_WILDERNESS",
......@@ -110,6 +110,20 @@ return {
if m then game.zone:addEntity(level, m, "actor", x, y) end
end
end
-- Add lore
if level.level == 2 then
game:placeRandomLoreObject("NOTE4", game.zone)
else
for i = 1, 3 do
local x = 25 + (i - 1) * 50
local ys = {}
for y = 1, level.map.h - 2 do if not level.map:checkEntity(x, y, engine.Map.TERRAIN, "block_move") then ys[#ys+1] = y end end
local y = rng.table(ys)
local o = game.zone:makeEntityByName(level, "object", "NOTE"..i)
if o then game.zone:addEntity(level, o, "object", x, y) o:identify(true) end
end
end
end,
fumes_active = true,
......
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