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

New zone: the Slime Tunnels

Updated quests, the awy into the High Peak is now open !


git-svn-id: http://svn.net-core.org/repos/t-engine4@1030 51575b47-30f0-44d4-a5cc-537603b46e54
parent 389f5ae2
No related branches found
No related tags found
No related merge requests found
Showing
with 542 additions and 11 deletions
......@@ -573,6 +573,22 @@ function _M:onTakeHit(value, src)
game.logSeen(self, "%s shatters into pieces!", self.name:capitalize())
end
-- Split ?
if self.clone_on_hit and value >= self.clone_on_hit.min_dam_pct * self.max_life / 100 and rng.percent(self.clone_on_hit.chance) then
-- Find space
local x, y = util.findFreeGrid(self.x, self.y, 1, true, {[Map.ACTOR]=true})
if x then
-- Find a place around to clone
local a = self:clone()
a.energy.val = 0
a.exp_worth = 0.1
a.inven = {}
a.x, a.y = nil, nil
game.zone:addEntity(game.level, a, "actor", x, y)
game.logSeen(self, "%s is split in two!", self.name:capitalize())
end
end
return value
end
......
......@@ -501,6 +501,11 @@ function _M:setupCommands()
self.logPlayer(self.player, "All world artifacts created.")
end
end,
[{"_g","ctrl"}] = function()
if config.settings.tome.cheat then
self:changeLevel(1, "slime-tunnels")
end
end,
}
self.key:addBinds
{
......
......@@ -555,6 +555,20 @@ function _M:useOrbPortal(portal)
if portal.on_use then portal:on_use(self) end
end
--- Use the orbs of command
function _M:useCommandOrb(o)
local g = game.level.map(self.x, self.y, Map.TERRAIN)
if not g then return end
if not g.define_as or not o.define_as or o.define_as ~= g.define_as then
game.logPlayer(self, "This does not seem to have any effect.")
return
end
game.logPlayer(self, "You use the %s on the pedestral. There is a distant 'clonk' sound.", o:getName{do_colour=true})
self:grantQuest("orb-command")
self:setQuestStatus("orb-command", engine.Quest.COMPLETED, o.define_as)
end
--- Tell us when we are targetted
function _M:on_targeted(act)
if self:attr("invisible") or self:attr("stealth") then
......
-- TE4 - T-Engine 4
-- 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
require "engine.class"
local Map = require "engine.Map"
require "engine.Generator"
module(..., package.seeall, class.inherit(engine.Generator))
function _M:init(zone, map, level, data)
engine.Generator.init(self, zone, map, level)
self.data = data
self.grid_list = zone.grid_list
end
function _M:makePath(sx, sy, ex, ey, wd, excentricity, points)
local ln = 0
local path = core.noise.new(1)
local j = sy
local dir = true
for i = sx, ex do
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
ln = n
else
-- Close in on the exit
if j < ey then j = j + 1
elseif j > ey 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
-- Place pedestrals
local orbs = {"ORB_UNDEATH", "ORB_DRAGON", "ORB_ELEMENTS", "ORB_DESTRUCTION"}
for i = 1, 4 do
local orb = rng.tableRemove(orbs)
local p = rng.tableRemove(points)
self.map(p.x, p.y, Map.TERRAIN, self:resolve(orb, nil, true))
end
self.level.slime_points = points
-- Make stairs
local spots = {}
return 1,1,1,1, spots
end
......@@ -25,10 +25,12 @@ But enough talk, take this message, now I must go.
answers = {
{"Thank you for your courrage.", action=function(npc, player)
local o, item, inven_id = npc:findInAllInventories("Sealed Scroll of Minas Tirith")
npc:removeObject(inven_id, item, true)
player:addObject(player.INVEN_INVEN, o)
player:sortInven()
game.logPlayer(player, "The herald gives you %s.", o:getName{do_color=true})
if o then
npc:removeObject(inven_id, item, true)
player:addObject(player.INVEN_INVEN, o)
player:sortInven()
game.logPlayer(player, "The herald gives you %s.", o:getName{do_color=true})
end
if game.level:hasEntity(npc) then game.level:removeEntity(npc) 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
newEntity{
define_as = "SLIME_FLOOR",
name = "slimy floor", image = "terrain/slime_floor.png",
display = '.', color=colors.LIGHT_GREEN, back_color=colors.GREEN,
}
newEntity{
define_as = "SLIME_WALL",
name = "slimy wall", image = "terrain/slime_wall.png",
display = '#', color=colors.LIGHT_GREEN, back_color=colors.GREEN,
always_remember = true,
does_block_move = true,
can_pass = {pass_wall=1},
block_sight = true,
air_level = -20,
dig = "FLOOR",
}
......@@ -36,10 +36,12 @@ newEntity{
size_category = 3,
infravision = 20,
clone_on_hit = {min_dam_pct=15, chance=30},
resolvers.drops{chance=90, nb=1, {} },
resolvers.drops{chance=60, nb=1, {type="money"} },
resists = { [DamageType.LIGHT] = -50 },
resists = { [DamageType.LIGHT] = -50, [DamageType.COLD] = -50 },
fear_immune = 1,
}
......@@ -104,6 +106,69 @@ Through its transparent jelly structure you can see treasures it has engulfed, a
level_range = {12, nil}, exp_worth = 1,
rarity = 3,
max_life = resolvers.rngavg(50,100),
combat = { dam=7, atk=15, apr=6, damtype=DamageType.ACID },
combat = { dam=resolvers.mbonus(80, 15), atk=15, apr=6, damtype=DamageType.ACID },
drops = resolvers.drops{chance=90, nb=3, {} },
}
\ No newline at end of file
}
newEntity{ base = "BASE_NPC_OOZE",
name = "crimson ooze", color=colors.CRIMSON,
desc = "It's reddish and it's oozing.",
level_range = {25, nil}, exp_worth = 1,
rarity = 1,
rank = 2,
max_life = resolvers.rngavg(80,90), life_rating = 11,
combat = { dam=resolvers.mbonus(110, 15), atk=15, apr=5, damtype=DamageType.FIREBURN },
clone_on_hit = {min_dam_pct=15, chance=50},
}
newEntity{ base = "BASE_NPC_OOZE",
name = "brittle clear ooze", color=colors.WHITE,
desc = "It's translucent and it's oozing.",
level_range = {25, nil}, exp_worth = 1,
rarity = 1,
rank = 2,
max_life = resolvers.rngavg(80,90), life_rating = 8,
combat = { dam=resolvers.mbonus(40, 15), atk=15, apr=5, },
clone_on_hit = {min_dam_pct=1, chance=50},
}
newEntity{ base = "BASE_NPC_OOZE",
name = "slimy ooze", color=colors.GREEN,
desc = "It's very slimy and it's oozing.",
level_range = {25, nil}, exp_worth = 1,
rarity = 1,
rank = 2,
max_life = resolvers.rngavg(80,90), life_rating = 11,
combat = { dam=resolvers.mbonus(110, 15), atk=15, apr=5, damtype=DamageType.SLIME },
clone_on_hit = {min_dam_pct=15, chance=50},
resolvers.talents{ [Talents.T_SLIME_SPIT]=5 },
}
newEntity{ base = "BASE_NPC_OOZE",
name = "poison ooze", color=colors.LIGHT_GREEN,
desc = "It's very slimy and it's oozing.",
level_range = {25, nil}, exp_worth = 1,
rarity = 1,
rank = 2,
max_life = resolvers.rngavg(80,90), life_rating = 11,
combat = { dam=resolvers.mbonus(110, 15), atk=15, apr=5, damtype=DamageType.POISON },
clone_on_hit = {min_dam_pct=15, chance=50},
resolvers.talents{ [Talents.T_POISONOUS_SPORES]=5 },
}
--[[
newEntity{ base = "BASE_NPC_OOZE",
name = "morphic ooze", color=colors.GREY,
desc = "Its shape change every few seconds.",
level_range = {25, nil}, exp_worth = 1,
rarity = 1,
rank = 3,
max_life = resolvers.rngavg(140,170), life_rating = 11,
combat = { dam=resolvers.mbonus(110, 15), atk=15, apr=5, damtype=DamageType.ACID },
clone_on_hit = {min_dam_pct=40, chance=100},
resolvers.talents{ [Talents.T_OOZE_MERGE]=5 },
}
]]
......@@ -117,6 +117,11 @@ newEntity{ define_as = "ORB_UNDEATH",
end
end,
max_power = 1, power_regen = 1,
use_power = { name = "use the orb", power = 1,
use = function(self, who) who:useCommandOrb(self) end
},
carrier = {
inc_stats = { [Stats.STAT_DEX] = 6, },
},
......@@ -140,6 +145,11 @@ newEntity{ define_as = "ORB_DRAGON",
end
end,
max_power = 1, power_regen = 1,
use_power = { name = "use the orb", power = 1,
use = function(self, who) who:useCommandOrb(self) end
},
carrier = {
inc_stats = { [Stats.STAT_CUN] = 6, },
},
......@@ -163,6 +173,11 @@ newEntity{ define_as = "ORB_ELEMENTS",
end
end,
max_power = 1, power_regen = 1,
use_power = { name = "use the orb", power = 1,
use = function(self, who) who:useCommandOrb(self) end
},
carrier = {
inc_stats = { [Stats.STAT_MAG] = 6, },
},
......@@ -186,6 +201,11 @@ newEntity{ define_as = "ORB_DESTRUCTION",
end
end,
max_power = 1, power_regen = 1,
use_power = { name = "use the orb", power = 1,
use = function(self, who) who:useCommandOrb(self) end
},
carrier = {
inc_stats = { [Stats.STAT_STR] = 6, },
},
......
game/modules/tome/data/gfx/terrain/slime_floor.png

1.17 KiB

game/modules/tome/data/gfx/terrain/slime_wall.png

1.34 KiB

-- 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
defineTile('#', "SLIME_WALL")
defineTile('.', "SLIME_FLOOR")
defineTile('<', "UP_WILDERNESS_FAR_EAST")
defineTile('+', "PEAK_DOOR")
subGenerator{
x = 2, y = 0, w = 241, h = 30,
generator = "mod.class.generator.map.SlimeTunnels",
data = {
start = 15,
stop = 15,
['.'] = "SLIME_FLOOR",
['#'] = "SLIME_WALL",
},
}
startx = 0
starty = 15
return [[
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
####################################################################################################################################################################################################################################################.....+
###################################################################################################################################################################################################################################################......+
##.################################################################################################################################################################################################################################################......+
...################################################################################################################################################################################################################################################......+
<..################################################################################################################################################################################################################################################......+
...################################################################################################################################################################################################################################################......+
##.################################################################################################################################################################################################################################################......+
####################################################################################################################################################################################################################################################.....+
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################
##########################################################################################################################################################################################################################################################]]
......@@ -20,7 +20,27 @@
name = "The Orbs of Command"
desc = function(self, who)
local desc = {}
desc[#desc+1] = "You have found an orb of command that seems to be used to open the shield protecting the High Peek."
desc[#desc+1] = "You have found an orb of command that seems to be used to open the shield protecting the High Peak."
desc[#desc+1] = "There seems to be a total of four of them, the more you have the weaker the shield will be."
return table.concat(desc, "\n")
end
on_status_change = function(self, who, status, sub)
if sub then
if self:isCompleted("ORB_DESTRUCTION") and
self:isCompleted("ORB_UNDEATH") and
self:isCompleted("ORB_DRAGON") and
self:isCompleted("ORB_ELEMENTS") then
who:setQuestStatus(self.id, engine.Quest.DONE)
self:open_high_peak(who)
end
end
end
open_high_peak = function(self, who)
local g = game.zone:makeEntityByName(game.level, "terrain", "PEAK_STAIR")
for j = 11, 18 do
game.level.map(249, j, engine.Map.TERRAIN, g)
end
game.logPlayer(who, "#LIGHT_BLUE#There is a loud crack. The way is open.")
end
......@@ -72,7 +72,7 @@ newTalent{
cooldown = 10,
stamina = 30,
action = function(self, t)
local tg = {type="ball", range=0, friendlyfire=true, radius=2 + self:getTalentLevel(t), talent=t}
local tg = {type="ball", range=0, friendlyfire=false, radius=2 + self:getTalentLevel(t), talent=t}
self:project(tg, self.x, self.y, function(px, py)
local target = game.level.map(px, py, Map.ACTOR)
if not target then return end
......@@ -84,7 +84,7 @@ newTalent{
end)
return true
end,
info = function(self, t)
info = function(self, t)
return ([[Call all foes in a radius of %d around you into battle, getting them into melee range in an instant.]]):format(2+self:getTalentLevel(t))
end,
}
......
......@@ -26,7 +26,7 @@ This place is Angolwen, the City of Magic, and for over one hundred years has ta
You have uncovered the secrets of the ice magic and can now create new characters with the #LIGHT_GREEN#Cryomancer class#WHITE#.
Pyromancers are specialized archmages, attuned to the magical properties of ice.
Cryomancers are specialized archmages, attuned to the magical properties of ice.
Class features:#YELLOW#
- Cast potent ice spells to freeze your foes.
- Freeze your foes and make them shatter into pieces.
......
-- 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")
load("/data/general/grids/water.lua")
load("/data/general/grids/slime.lua")
newEntity{
define_as = "ORB_DRAGON",
name = "orb pedestral (dragon)", image = "terrain/orb_pedestral.png",
display = '_', color_r=255, color_g=255, color_b=255, back_color=colors.LIGHT_RED,
}
newEntity{
define_as = "ORB_UNDEATH",
name = "orb pedestral (undeath)", image = "terrain/orb_pedestral.png",
display = '_', color_r=255, color_g=255, color_b=255, back_color=colors.LIGHT_RED,
}
newEntity{
define_as = "ORB_ELEMENTS",
name = "orb pedestral (elements)", image = "terrain/orb_pedestral.png",
display = '_', color_r=255, color_g=255, color_b=255, back_color=colors.LIGHT_RED,
}
newEntity{
define_as = "ORB_DESTRUCTION",
name = "orb pedestral (destruction)", image = "terrain/orb_pedestral.png",
display = '_', color_r=255, color_g=255, color_b=255, back_color=colors.LIGHT_RED,
}
newEntity{
define_as = "PEAK_DOOR",
name = "sealed door", image = "terrain/granite_door1.png",
display = '+', color_r=238, color_g=154, color_b=77, back_color=colors.DARK_UMBER,
notice = true,
always_remember = true,
does_block_move = true,
block_sight = true,
}
newEntity{
define_as = "PEAK_STAIR",
always_remember = true,
show_tooltip=true,
name="Entrance to the High Peak",
display='>', color=colors.VIOLET,
notice = true,
change_level=1, change_zone="high-peak",
}
-- 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/jelly.lua", rarity(0))
load("/data/general/npcs/ooze.lua", rarity(0))
local Talents = require("engine.interface.ActorTalents")
-- 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")
newEntity{ base = "BASE_WAND",
define_as = "ROD_SPYDRIC_POISON",
name = "Rod of Spydric Poison", color=colors.LIGHT_GREEN, unique=true,
cost = 50,
elec_proof = true,
max_power = 75, power_regen = 1,
use_power = { name = "shoot a bolt of spyric poison", power = 25,
use = function(self, who)
local tg = {type="bolt", range=12, talent=t}
local x, y = who:getTarget(tg)
if not x or not y then return nil end
who:project(tg, x, y, engine.DamageType.SPYDRIC_POISON, {dam=200 + who:getMag() * 4, dur=6}, {type="slime"})
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/traps/water.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 = "Slime Tunnels",
level_range = {45, 50},
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 = 250, height = 30,
all_remembered = true,
all_lited = true,
persistant = "zone",
no_level_connectivity = true,
generator = {
map = {
class = "engine.generator.map.Static",
map = "zones/slime-tunnels",
},
actor = {
class = "engine.generator.actor.Random",
-- area = {x1=0, x2=11, y1=30, y2=410},
nb_npc = {20, 30},
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {0, 0},
},
},
levels =
{
[1] = {
generator = { map = {
up = "UP_WILDERNESS_FAR_EAST",
}, },
},
},
}
No preview for this file type
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