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

New zone: the Slazish fens, starting zone for human and elven Sun Paladins and...

New zone: the Slazish fens, starting zone for human and elven Sun Paladins and Anorithils (it is located in the far east and explains how the player ends up in maj'eyal)


git-svn-id: http://svn.net-core.org/repos/t-engine4@4169 51575b47-30f0-44d4-a5cc-537603b46e54
parent be653e89
No related branches found
No related tags found
No related merge requests found
Showing
with 265 additions and 67 deletions
......@@ -201,7 +201,7 @@ function _M:generate(lev, old_lev)
-- Add the "requested" end room first (must be at least 66% into the level)
print("End Room:",self.end_road_room)
if self.end_road and self.end_road_room then
if self.end_road_room then
print("Trying to load",self.end_road_room)
local rroom, end_room_load
end_room_load = self:loadRoom(self.end_road_room)
......
......@@ -152,7 +152,7 @@ end
--- Place a room
function _M:roomPlace(room, id, x, y)
local is_lit = rng.percent(self.data.lite_room_chance)
local is_lit = rng.percent(self.data.lite_room_chance or 100)
-- ok alloc it using the default generator or a specific one
local cx, cy
......
......@@ -546,7 +546,7 @@ function _M:onLevelLoad(id, fct, data)
print("Registering on level load", id, fct, data)
end
function _M:changeLevel(lev, zone, keep_old_lev, force_down)
function _M:changeLevel(lev, zone, keep_old_lev, force_down, auto_zone_stair)
if not self.player.can_change_level then
self.logPlayer(self.player, "#LIGHT_RED#You may not change level without your own body!")
return
......@@ -647,12 +647,26 @@ function _M:changeLevel(lev, zone, keep_old_lev, force_down)
self.player:move(self.player.wild_x, self.player.wild_y, true)
self.player.last_wilderness = self.zone.short_name
else
local x, y
if lev > old_lev and not force_down then
x, y = self.level.default_up.x, self.level.default_up.y
else
x, y = self.level.default_down.x, self.level.default_down.y
local x, y = nil, nil
if auto_zone_stair and left_zone then
-- Dirty but quick
local list = {}
for i = 0, self.level.map.w - 1 do for j = 0, self.level.map.h - 1 do
local idx = i + j * self.level.map.w
if self.level.map.map[idx][Map.TERRAIN] and self.level.map.map[idx][Map.TERRAIN].change_zone == left_zone.short_name then
list[#list+1] = {i, j}
end
end end
if #list > 0 then x, y = unpack(rng.table(list)) end
end
-- Default to stairs
if not x then
if lev > old_lev and not force_down then x, y = self.level.default_up.x, self.level.default_up.y
else x, y = self.level.default_down.x, self.level.default_down.y
end
end
-- Check if there is already an actor at that location, if so move it
x = x or 1 y = y or 1
local blocking_actor = self.level.map(x, y, engine.Map.ACTOR)
......@@ -1231,7 +1245,7 @@ game.player:learnTalent('T_GIFT_OF_AMAKTHEL',true)
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)
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, e.change_zone_auto_stairs)
end
else
self.log("There is no way out of this level here.")
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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
newChat{ id="welcome",
text = [[#LIGHT_GREEN#*A naga steps through the portal, she seems to be a high ranked one.*#WHITE#
NO! You fool, the portal is breaking down!]],
answers = {
{"And thus my task is done, serpent!", jump="fool"},
}
}
newChat{ id="fool",
text = [[You do not understand: it will explode!]],
answers = {
{"...", action = function(npc, player)
game:onTickEnd(function()
game.level:removeEntity(npc)
game:changeLevel(2, rng.table{"trollmire","ruins-kor-pul","scintillating-caves","rhaloren-camp","norgos-lair","heart-gloom"})
local a = require("engine.Astar").new(game.level.map, player)
local sx, sy = util.findFreeGrid(player.x, player.y, 20, true, {[engine.Map.ACTOR]=true})
while not sx do
sx, sy = rng.range(0, game.level.map.w - 1), rng.range(0, game.level.map.h - 1)
if game.level.map(sx, sy, engine.Map.ACTOR) or not a:calc(player.x, player.y, sx, sy) then sx, sy = nil, nil end
end
game.zone:addEntity(game.level, npc, "actor", sx, sy)
game.level.map:particleEmitter(player.x, player.y, 1, "teleport_water")
game.level.map:particleEmitter(sx, sy, 1, "teleport_water")
local chat = require("engine.Chat").new("zoisla", npc, player)
chat:invoke("kill")
end)
end},
}
}
newChat{ id="kill",
text = [[The portal randomly teleported us before exploding.
You fool! You have doomed us, we could be #{bold}#anywhere!#{normal}#
DIE !]],
answers = {
{"..."},
}
}
return "welcome"
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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
base_size = 32
return {
base = 1000,
angle = { 0, 360 }, anglev = { 2000, 5000 }, anglea = { 20, 60 },
life = { 20, 30 },
size = { 3, 7 }, sizev = {0, 0}, sizea = {0, 0},
r = {0, 0}, rv = {0, 0}, ra = {0, 0},
g = {10, 100}, gv = {0, 0}, ga = {0, 0},
b = {100, 255}, bv = {0, 10}, ba = {0, 0},
a = {25, 255}, av = {0, 0}, aa = {0, 0},
}, function(self)
self.nb = (self.nb or 0) + 1
if self.nb < 6 then
self.ps:emit(100)
end
end
......@@ -25,6 +25,7 @@ load("/data/lore/daikara.lua")
load("/data/lore/old-forest.lua")
load("/data/lore/sandworm.lua")
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/dreadfell.lua")
......
-- ToME - Tales of Maj'Eyal
-- Copyright (C) 2009, 2010, 2011 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
--------------------------------------------------------------------------
-- Slazish fens
--------------------------------------------------------------------------
newLore{
id = "slazish-note-1",
category = "slazish fens",
name = "conch (1)",
lore = [[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a lyrical voice emanating from within:#{normal}#
"Report from Tidewarden Isimon to Tidebringer Zoisla. Alucia and I have, um, begun scouting the outer perimeter. The, uh, the terrain is proving difficult to navigate, but I'm sure we'll make, uh, quick progress. We shall, uh, we'll continue now... in the name of the Saviour!
"...Um, you think that was okay?"
#{italic}#A second, lighter voice joins in.#{normal}# "Yeah, that was fine, Isimon. We'll make a Myrmidon of you yet!"
"Heh, I wouldn't be so sure of that... Guess I'll turn this off and we'll get going."
"Hey, what's the rush? This is the first time we've been alone from the others all week. Maybe we could..."
"What? Surely you don't mean-? What if someone comes along?"
"Oh, who would catch us out here? Come on!"
"I, uh, well, I suppose... I should stop this recording."]],
}
newLore{
id = "slazish-note-2",
category = "slazish fens",
name = "conch (2)",
lore = [[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a deep voice emanating from within:#{normal}#
"Waverider Tiamel reporting. Immediate perimeter is secure, though I have sent some members to scout the surrounding areas. I will feel better when we have mapped the land and are ready to sustain a larger team. Still, we should be perfectly safe as long as the landdwellers do not know of our presence. And even if they dare come here the magics of Zoisla will put their puny star worship to shame.
"I fear that some of the team are not taking our mission seriously. Do they not know the responsibility the Saviour has laid on us? We are his arms and tails in this far land, and it is our duty to protect the farportal which will help bring us to greater strengths. We are his first line of attack against the blood relatives of those who doomed our race so long ago. And with our efforts we shall push forward our race to new boundaries, laying the path for the bright future our great Saviour has planned for us. Long live Slasul! Long live the legend of the Devourer!"]],
}
newLore{
id = "slazish-note-3",
category = "slazish fens",
name = "conch (3)",
lore = [[#{italic}#Touching the conch makes it emit a sound. As you put it to your ear you hear a charismatic and commanding voice emanating from within:#{normal}#
"My fellow nagas! I do not envy you on your journey so far from our great Temple. But you have been chosen for a glorious mission, to establish a new outpost for invasion against the landwalkers. These are the cousins and descendants of those who abandoned us and left our race for dead. Whilst we have hidden beneath the waves for centuries, they prance about worshipping the sun! Well, their nightfall comes soon, and the dawn will rise with us as rulers of land and sea.
"Do not despair that we are attacking this outpost instead of the orcs. My stratagem is carefully planned, and the Sunwall is too great a threat to my designs to be allowed to stand any longer. The orcs... will have their uses in the short term. But be assured, when our time comes there shall be none who can stand as equals against us. Our greatness cannot be quelled or submerged! Our long history of suffering will finally bring forth redemption!
"Your immediate mission is clear, my friends. Ensure the farportal is correctly set up and secured, but take care, as the Sher'Tul magics used are still experimental. Then scout out the area and begin to fortify the surroundings, but do so in secret. When your job is done well I, your humble leader Slasul, shall be honoured to join you on the front line. Until then, swim safely my brothers and sisters, and do not forget our glory."
]],
}
......@@ -26,7 +26,6 @@ return function(gen, id)
for j = 1, self.h do
gen.map.room_map[i-1+x][j-1+y].room = id
gen.map(i-1+x, j-1+y, Map.TERRAIN, gen:resolve('near_portal'))
spots[#spots+1] = {x=i-1+x, y=j-1+y}
end
end
......@@ -35,7 +34,10 @@ return function(gen, id)
gen.map(s.x, s.y, Map.TERRAIN, gen:resolve('portal'))
print("Zoisla portal at", s.x, s.y)
local s = rng.tableRemove(spots)
gen.spots[#gen.spots+1] = {x=s.x, y=s.y, type="guardian", subtype="guardian"}
for i = 1, 3 do
local s = rng.tableRemove(spots)
local e = gen.zone:makeEntity(gen.level, "actor", {subtype="naga"}, nil, true)
if e then gen:roomMapAddEntity(s.x, s.y, "actor", e) end
end
end}
end
......@@ -84,7 +84,7 @@ newTalent{
size_category = 1,
infravision = 10,
can_pass = {pass_wall=70},
resists = {all = 35, [DamageType.LIGHT] = -70, [DamageType.DARKNESS] = 65},
resists = {all = 35, [DamageType.LIGHT] = -70, [DamageType.COLD] = 65, [DamageType.DARKNESS] = 65},
no_breath = 1,
stone_immune = 1,
confusion_immune = 1,
......@@ -125,7 +125,7 @@ newTalent{
return ([[Surround yourself with undead energies, when one of your minions is destroyed while inside your necrotic aura it has %d%% chances to create a will o' the wisp.
Will o' the wisp will take a random target in sight and home on it, when they reach it they explode for %0.2f cold damage.
The damage will increase with the Magic stat]]):
format(chance, damDesc(self, DamageType.DARKNESS, dam))
format(chance, damDesc(self, DamageType.COLD, dam))
end,
}
......
......@@ -20,4 +20,4 @@
load("/data/general/grids/basic.lua")
load("/data/general/grids/underground.lua")
newEntity{ base = "UP", define_as = "IRON_COUNCIL", name="The Iron Council (Dwarven empire main city)", change_zone="town-iron-council", change_level=1 }
newEntity{ base = "UP", define_as = "IRON_COUNCIL", name="The Iron Council (Dwarven empire main city)", change_zone="town-iron-council", change_level=1, change_zone_auto_stairs = true }
......@@ -19,4 +19,4 @@
load("/data/general/grids/basic.lua")
newEntity{ base = "DOWN", define_as = "IRON_COUNCIL", name="The Iron Council (Dwarven empire main city)", change_zone="town-iron-council" }
newEntity{ base = "DOWN", define_as = "IRON_COUNCIL", name="The Iron Council (Dwarven empire main city)", change_zone="town-iron-council", change_zone_auto_stairs = true }
......@@ -52,11 +52,39 @@ for i = 1, 7 do newEntity{ base="BOGWATER_MISC", define_as = "BOGWATER_MISC"..i,
newEntity{ base="BOGWATER",
define_as = "PORTAL",
display = "&", color = colors.BLUE,
name = "coral portal",
add_displays = {class.new{z=18, image="terrain/naga_portal.png", display_h=2, display_y=-1}},
does_block_move = true,
pass_projectile = true,
block_move = function(self, x, y, who, act, couldpass)
if not who or not who.player or not act then return true end
if self.broken then
game.log("#VIOLET#The portal is already broken!")
return true
end
who:restInit(20, "destroying the portal", "destroyed the portal", function(cnt, max)
if cnt > max then
game.log("#VIOLET#The portal starts to break down, run!")
self.broken = true
game:onTickEnd(function()
local sx, sy = util.findFreeGrid(x, y, 10, true, {[engine.Map.ACTOR]=true})
local npc = game.zone:makeEntityByName(game.level, "actor", "ZOISLA")
if sx then
game.zone:addEntity(game.level, npc, "actor", sx, sy)
game.level.map:particleEmitter(sx, sy, 1, "teleport_water")
local chat = require("engine.Chat").new("zoisla", npc, who)
chat:invoke("welcome")
end
end)
end
end)
return true
end,
}
newEntity{ base = "GRASS_UP_WILDERNESS", define_as = "GATES_OF_MORNING",
change_zone = "town-gates-of-morning", change_zone_auto_stairs = true,
}
......@@ -63,7 +63,7 @@ newEntity{
end,
}
newEntity{ base = "BASE_NPC_NAGA",
newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDEWARDEN",
name = "naga tidewarden", color=colors.DARK_UMBER,
desc = [[Before you stands a tall figure, propped high by a serpent's tail in place of where his legs should rightly be. His torso is slim and muscular, and his face has an elven beauty to it, framed by locks of blonde hair. But there is a fierceness to this creature too, and his bright eyes veil a smouldering anger.]],
resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_naga_naga_tidewarden.png", display_h=2, display_y=-1}}},
......@@ -78,7 +78,7 @@ newEntity{ base = "BASE_NPC_NAGA",
},
}
newEntity{ base = "BASE_NPC_NAGA",
newEntity{ base = "BASE_NPC_NAGA", define_as = "NAGA_TIDECALLER",
name = "naga tidecaller", color=colors.BLUE,
resolvers.nice_tile{image="invis.png", add_mos = {{image="npc/humanoid_naga_naga_tidecaller.png", display_h=2, display_y=-1}}},
desc = [[A slithering noise accompanies the movement of this strange creature, whose snake-like tail gives rise to the body of a beautiful elf-like woman. As she moves her delicate hands water rises from the ground, and you feel that here is no mere monster, but a creature of awe and power.]],
......@@ -133,6 +133,7 @@ newEntity{ base="BASE_NPC_NAGA", define_as = "ZOISLA",
resolvers.equip{ {type="weapon", subtype="trident", autoreq=true, special_rarity="trident_rarity"}, },
resolvers.drops{chance=100, nb=1, {unique=true, not_properties={"lore"}} },
resolvers.drops{chance=100, nb=3, {tome_drops="boss"} },
resolvers.drops{chance=100, nb=1, {defined="SLAZISH_NOTE3"} },
resolvers.talents{
[Talents.T_SPIT_POISON]={base=2, every=10, max=5},
......
......@@ -19,22 +19,13 @@
load("/data/general/objects/objects-maj-eyal.lua")
for i = 1, 4 do
for i = 1, 3 do
newEntity{ base = "BASE_LORE",
define_as = "NOTE"..i,
name = "tattered paper scrap", lore="trollmire-note-"..i,
desc = [[A paper scrap, left by an adventurer.]],
define_as = "SLAZISH_NOTE"..i,
name = "weird conch", lore="slazish-note-"..i, image = "terrain/shell1.png",
desc = [[A conch, it seemed the naga was using it as a communication tool.]],
rarity = false,
is_magic_device = false,
encumberance = 0,
}
end
newEntity{ base = "BASE_LORE",
define_as = "PROX_NOTE",
name = "tattered paper scrap", lore="trollmire-note-5",
desc = [[A paper scrap, left by an adventurer.]],
rarity = false,
is_magic_device = false,
encumberance = 0,
}
......@@ -58,8 +58,6 @@ return {
class = "engine.generator.actor.Random",
nb_npc = {7, 10},
filters = { {max_ood=2}, },
guardian = "ZOISLA",
guardia_spot = {type="guardian", subtype="guardian"},
},
object = {
class = "engine.generator.object.Random",
......@@ -74,7 +72,7 @@ return {
{
[1] = {
generator = { map = {
up = "GRASS_UP_WILDERNESS",
up = "GATES_OF_MORNING",
}, },
},
[3] = {
......@@ -86,43 +84,32 @@ return {
down = "GRASS",
}, },
},
-- Hidden treasure level
[4] = {
ambient_music = {"Rainy Day.ogg", "weather/rain.ogg"},
generator = {
map = {
class = "engine.generator.map.Static",
map = "zones/trollmire-treasure",
},
trap = { nb_trap = {0, 0} },
object = { nb_object = {3, 4} },
actor = { nb_npc = {2, 2} },
},
},
},
post_process = function(level)
-- Place a lore note on each level
game:placeRandomLoreObjectScale("NOTE", 5, level.level)
-- Rain on bill
if level.level == 4 and config.settings.tome.weather_effects then
local Map = require "engine.Map"
level.foreground_particle = require("engine.Particles").new("raindrops", 1, {width=Map.viewport.width, height=Map.viewport.height})
end
-- Some clouds floating happily over the trollmire
game.state:makeWeather(level, 7, {max_nb=1, speed={0.5, 1.6}, shadow=true, alpha={0.23, 0.35}, particle_name="weather/grey_cloud_%02d"})
end,
foreground = function(level, x, y, nb_keyframes)
if not config.settings.tome.weather_effects or not level.foreground_particle then return end
level.foreground_particle.ps:toScreen(x, y, true, 1)
end,
if level.level == 1 then
local npc1 = game.zone:makeEntityByName(game.level, "actor", "NAGA_TIDEWARDEN")
local npc2 = game.zone:makeEntityByName(game.level, "actor", "NAGA_TIDECALLER")
local x, y = util.findFreeGrid(game.level.default_down.x, game.level.default_down.y, 20, true, {[engine.Map.ACTOR]=true})
if x then game.zone:addEntity(game.level, npc1, "actor", x, y) end
x, y = util.findFreeGrid(game.level.default_down.x, game.level.default_down.y, 20, true, {[engine.Map.ACTOR]=true})
if x then game.zone:addEntity(game.level, npc2, "actor", x, y) end
npc1.on_die = function(self)
local n = game.zone:makeEntityByName(game.level, "object", "SLAZISH_NOTE1")
if n then game.zone:addEntity(game.level, n, "object", self.x, self.y) end
end
elseif level.level == 2 then
local npc = game.zone:makeEntityByName(game.level, "actor", "NAGA_TIDEWARDEN")
local x, y = util.findFreeGrid(game.level.default_down.x, game.level.default_down.y, 20, true, {[engine.Map.ACTOR]=true})
if x then game.zone:addEntity(game.level, npc, "actor", x, y) end
on_enter = function(lev, old_lev, newzone)
if lev == 3 and game.player:hasQuest("trollmire-treasure") then
game.player:hasQuest("trollmire-treasure"):enter_level3()
npc.on_die = function(self)
local n = game.zone:makeEntityByName(game.level, "object", "SLAZISH_NOTE2")
if n then game.zone:addEntity(game.level, n, "object", self.x, self.y) end
end
end
end,
}
......@@ -36,7 +36,7 @@ newEntity{
}
end
newEntity{ base = "DOWN", define_as = "ESCAPE_REKNOR", name="Escape route from Reknor", change_zone="reknor-escape" }
newEntity{ base = "DOWN", define_as = "ESCAPE_REKNOR", name="Escape route from Reknor", change_zone="reknor-escape", change_level=3, change_zone_auto_stairs = true }
newEntity{ base = "DOWN", define_as = "DEEP_BELLOW", name="The Deep Bellow", glow=true, change_zone="deep-bellow" }
newEntity{ define_as = "STATUE",
......
......@@ -239,5 +239,4 @@ for i, t in ipairs(stype_tot) do
end
]]
------------------------------------------------------------------------
return {require "mod.class.Game", require "mod.class.World"}
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