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

add ancien elven ruins (not complete)

rename wilderness/main to wilderness/arda_west


git-svn-id: http://svn.net-core.org/repos/t-engine4@559 51575b47-30f0-44d4-a5cc-537603b46e54
parent 0c781bd1
No related branches found
No related tags found
No related merge requests found
Showing
with 447 additions and 203 deletions
......@@ -27,7 +27,8 @@ function _M:init(zone, map, level, data)
self.data = data
self.grid_list = zone.grid_list
self.tiles, self.raw = {}, {}
self:loadTiles(data.tileset)
if type(data.tileset) == "string" then self:loadTiles(data.tileset)
else for i, ts in ipairs(data.tileset) do self:loadTiles(ts) end end
self.matching_tiles = {}
self.block = self.raw.base
......@@ -124,11 +125,14 @@ function _M:matchTile(t1, t2)
return self.raw.matcher(t1, t2)
end
function _M:findMatchingTiles(st, dir)
local type = "room"
if rng.percent(self.data.tunnel_chance or 50) then type = "tunnel" end
function _M:findMatchingTiles(st, dir, type)
-- If no type is given choose one
if not type then
type = "room"
if rng.percent(self.data.tunnel_chance or 50) then type = "tunnel" end
end
if self.matching_tiles[st] and self.matching_tiles[st][dir] and self.matching_tiles[st][dir][type] then return self.matching_tiles[st][dir][type] end
if self.matching_tiles[st] and self.matching_tiles[st][dir] and self.matching_tiles[st][dir][type] then return self.matching_tiles[st][dir][type], type end
local m = {}
......@@ -187,7 +191,7 @@ function _M:findMatchingTiles(st, dir)
self.matching_tiles[st][dir] = self.matching_tiles[st][dir] or {}
self.matching_tiles[st][dir][type] = m
return m
return m, type
end
function _M:resolve(c)
......@@ -217,7 +221,9 @@ function _M:buildTile(tile, bx, by, rid)
local opens = {}
for i, o in ipairs(tile.openings) do
local coord = dir_to_coord[o[3]]
local mts = self:findMatchingTiles(tile, o[3])
local mts, type = self:findMatchingTiles(tile, o[3])
-- if we found no match for the given type try the other one
if #mts == 0 then mts, type = self:findMatchingTiles(tile, o[3], type == "room" and "tunnel" or "room") end
if #mts > 0 then
local mt = mts[rng.range(1, #mts)]
......
......@@ -47,7 +47,7 @@ newBirthDescriptor{
},
copy = {
type = "humanoid", subtype="dwarf",
default_wilderness = {"wilderness/main", 39, 17},
default_wilderness = {"wilderness/arda_west", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "dwarf",
......
......@@ -42,7 +42,7 @@ newBirthDescriptor{
},
copy = {
type = "humanoid", subtype="elf",
default_wilderness = {"wilderness/main", 39, 17},
default_wilderness = {"wilderness/arda_west", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "elf",
......
......@@ -44,7 +44,7 @@ newBirthDescriptor{
copy = {
type = "humanoid", subtype="hobbit",
life_rating = 12,
default_wilderness = {"wilderness/main", 39, 17},
default_wilderness = {"wilderness/arda_west", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "hobbit",
......
......@@ -55,7 +55,7 @@ newBirthDescriptor
"Humans hailing from the northen town of Bree. A common kind of man, unremarkable in all respects.",
},
copy = {
default_wilderness = {"wilderness/main", 39, 17},
default_wilderness = {"wilderness/arda_west", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "bree-man",
......@@ -77,7 +77,7 @@ newBirthDescriptor
[ActorTalents.T_DUNADAN_HEAL]=1,
},
copy = {
default_wilderness = {"wilderness/main", 39, 17},
default_wilderness = {"wilderness/arda_west", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "dunadan",
......
......@@ -45,7 +45,7 @@ newBirthDescriptor{
},
copy = {
type = "humanoid", subtype="orc",
default_wilderness = {"wilderness/east", 39, 17},
default_wilderness = {"wilderness/arda_east", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "dwarf",
......
......@@ -45,7 +45,7 @@ newBirthDescriptor{
},
copy = {
type = "humanoid", subtype="troll",
default_wilderness = {"wilderness/east", 39, 17},
default_wilderness = {"wilderness/arda_east", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "dwarf",
......
......@@ -74,7 +74,7 @@ newBirthDescriptor
},
copy = {
type = "undead", subtype="ghoul",
default_wilderness = {"wilderness/main", 39, 17},
default_wilderness = {"wilderness/arda_west", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "ghoul",
......@@ -119,7 +119,7 @@ newBirthDescriptor
},
copy = {
type = "undead", subtype="skeleton",
default_wilderness = {"wilderness/main", 39, 17},
default_wilderness = {"wilderness/arda_west", 39, 17},
starting_zone = "tower-amon-sul",
starting_quest = "start-dunadan",
starting_intro = "skeleton",
......
......@@ -17,6 +17,8 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
-- The western parts of Middle-earth on Arda
quickEntity('a', {show_tooltip=true, name='Ephel Duath', display='^', color=colors.LIGHT_DARK, image="terrain/mountain.png", block_move=true})
quickEntity('d', {show_tooltip=true, name='Haradwaith', display='.', color={r=203,g=189,b=72}, image="terrain/sand.png", block_move=true})
quickEntity('b', {show_tooltip=true, name='blue mountains', display='^', color=colors.LIGHT_BLUE, image="terrain/mountain.png", block_move=true})
......@@ -48,6 +50,7 @@ quickEntity('C', {show_tooltip=true, name="A gate into a maze", display='>',
quickEntity('D', {show_tooltip=true, name="A path into the Old Forest", display='>', color={r=0, g=255, b=155}, notice = true, change_level=1, change_zone="old-forest"})
quickEntity('E', {show_tooltip=true, name="A mysterious hole in the beach", display='>', color={r=200, g=255, b=55}, notice = true, change_level=1, change_zone="sandworm-lair"})
quickEntity('F', {show_tooltip=true, name="The entry to the old tower of Tol Falas",display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="tol-falas"})
quickEntity('G', {show_tooltip=true, name="A way into ancient elven ruins",display='>', color={r=0, g=255, b=255}, notice = true, change_level=1, change_zone="ancient-elven-ruins"})
quickEntity('1', {show_tooltip=true, name="Bree (Town)", desc="A quiet town at the crossroads of the north", display='*', color={r=255, g=255, b=255}, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-bree"})
quickEntity('2', {show_tooltip=true, name="Minas Tirith (Town)", desc="Captical city of the Reunited-Kingdom and Gondor ruled by High King Eldarion", display='*', color={r=255, g=255, b=255}, image="terrain/town1.png", notice = true, change_level=1, change_zone="town-minas-tirith"})
......@@ -65,7 +68,7 @@ return {
[[==========.......======.........hhhh..................fffffffwwwwwwww.........wwww.utuuuutuuuuuutuu]],
[[========......bb..===.........hhhhhhhh..&&&&&...&..fffffffffffff.................tuuututuututtuuuut]],
[[=======......bb..===............hhhh.......&&&&&&ff.._._...........................tttttttttttttttt]],
[[======...._.bb._..._............................m....._._uuu................ii........ttttttttttttt]],
[[======...._.bb._..._..G.........................m....._._uuu................ii........ttttttttttttt]],
[[=======.._..bb.._.._..hhhh................&....&mm~~~~.uu_uuuu..........i.....iii........tttttthhhh]],
[[======.._...bb..._._..hhh.......hhhhhh.....&&&&._mm..~.uuu_u_uu..........iiiiii..............ttthhh]],
[[=====.._..ubbb...._._..h.=....hhh.hh..........__.mm__~.uuuu_h_uu..........._.....................hh]],
......
......@@ -17,6 +17,8 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
-- This file defines the generic matchers and such for 5x5 tiles, but no tiles
base = {w=5, h=5}
is_opening = function(c)
......@@ -48,188 +50,4 @@ filler = function(c, x, y, room_map, data)
end
end
tiles =
{
{type="room",
[[##'####'##]],
[[#........#]],
[['........']],
[[#........#]],
[[#........#]],
[[#........#]],
[[#........#]],
[['........']],
[[#........#]],
[[##'####'##]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[##.##]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[...##]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[#####]],
[[#####]],
[[.....]],
[[#####]],
[[#####]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[##...]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[#####]],
[[#####]],
[[.....]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[.....]],
[[#####]],
[[#####]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[.....]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[##...]],
[[#####]],
[[#####]],
},
{type="tunnel",
[[#####]],
[[#####]],
[[...##]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[...##]],
[[#####]],
[[#####]],
},
{type="tunnel",
[[#####]],
[[#####]],
[[##...]],
[[##.##]],
[[##.##]],
},
{type="room",
[[##.##]],
[[#...#]],
[[##.##]],
[[#...#]],
[[#####]],
},
{type="room",
[[##'##]],
[[#...#]],
[['...']],
[[#...#]],
[[##'##]],
},
{type="room",
[[##.##]],
[[#....]],
[[#....]],
[[#....]],
[[#####]],
},
{type="room",
[[#####]],
[[....#]],
[[....#]],
[[....#]],
[[#####]],
},
{type="room",
[[#####]],
[[.....]],
[[.....]],
[[.....]],
[[#####]],
},
{type="room",
[[#....]],
[[#....]],
[['....]],
[[#....]],
[[#####]],
},
{type="room",
[[#####]],
[[#....]],
[[....#]],
[[#....]],
[[#####]],
},
{type="room",
[[#####]],
[[....#]],
[[#....]],
[[....#]],
[[#####]],
},
{type="room",
[[#####]],
[[.....]],
[[#+++#]],
[[.....]],
[[#####]],
},
{type="room",
[[##'##]],
[[##.##]],
[[#...#]],
[[#...#]],
[[#...#]],
},
{type="room",
[[#...#]],
[[#...#]],
[[#...#]],
[[##.##]],
[[##'##]],
},
}
tiles = {}
-- 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
tiles =
{
{type="room",
[[##'####'##]],
[[#........#]],
[['........']],
[[#........#]],
[[#........#]],
[[#........#]],
[[#........#]],
[['........']],
[[#........#]],
[[##'####'##]],
},
{type="room",
[[##.##]],
[[#...#]],
[[##.##]],
[[#...#]],
[[#####]],
},
{type="room",
[[##'##]],
[[#...#]],
[['...']],
[[#...#]],
[[##'##]],
},
{type="room",
[[##.##]],
[[#....]],
[[#....]],
[[#....]],
[[#####]],
},
{type="room",
[[#####]],
[[....#]],
[[....#]],
[[....#]],
[[#####]],
},
{type="room",
[[#####]],
[[.....]],
[[.....]],
[[.....]],
[[#####]],
},
{type="room",
[[#....]],
[[#....]],
[['....]],
[[#....]],
[[#####]],
},
{type="room",
[[#####]],
[[#....]],
[[....#]],
[[#....]],
[[#####]],
},
{type="room",
[[#####]],
[[....#]],
[[#....]],
[[....#]],
[[#####]],
},
{type="room",
[[#####]],
[[.....]],
[[#+++#]],
[[.....]],
[[#####]],
},
{type="room",
[[##'##]],
[[##.##]],
[[#...#]],
[[#...#]],
[[#...#]],
},
{type="room",
[[#...#]],
[[#...#]],
[[#...#]],
[[##.##]],
[[##'##]],
},
}
-- 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
tiles =
{
{type="tunnel",
[[##.##]],
[[##.##]],
[[##.##]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[#####]],
[[#####]],
[[.....]],
[[#####]],
[[#####]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[...##]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[##...]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[#####]],
[[#####]],
[[.....]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[.....]],
[[#####]],
[[#####]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[.....]],
[[##.##]],
[[##.##]],
},
}
-- 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
tiles =
{
{type="tunnel",
[[##.##]],
[[##.##]],
[[##...]],
[[#####]],
[[#####]],
},
{type="tunnel",
[[#####]],
[[#####]],
[[...##]],
[[##.##]],
[[##.##]],
},
{type="tunnel",
[[##.##]],
[[##.##]],
[[...##]],
[[#####]],
[[#####]],
},
{type="tunnel",
[[#####]],
[[#####]],
[[##...]],
[[##.##]],
[[##.##]],
},
}
-- 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")
-- 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/rodent.lua")
load("/data/general/npcs/vermin.lua")
load("/data/general/npcs/molds.lua")
load("/data/general/npcs/skeleton.lua")
load("/data/general/npcs/snake.lua")
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")
-- Artifact, droped (and used!) by the Shade of Angmar
newEntity{ base = "BASE_STAFF",
define_as = "STAFF_ANGMAR", rarity=false,
name = "Angmar's Fall", unique=true,
desc = [[Made from the bones of of many creatures this staff glows with power. You can feel its evilness as you touch it.]],
require = { stat = { mag=25 }, },
cost = 5,
combat = {
dam = 10,
apr = 0,
physcrit = 1.5,
dammod = {mag=1.1},
},
wielder = {
see_invisible = 2,
combat_spellpower = 15,
combat_spellcrit = 8,
},
}
-- 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/elemental.lua")
......@@ -17,27 +17,50 @@
-- Nicolas Casalini "DarkGod"
-- darkgod@te4.org
quickEntity('M', {name='misty mountains', display='^', image="terrain/mountain.png", color=colors.UMBER, block_move=true})
quickEntity('W', {name='weather hills', display='^', image="terrain/mountain.png", color=colors.UMBER, block_move=true})
quickEntity('t', {name='Trallshaws', display='#', image="terrain/tree.png", color=colors.LIGHT_GREEN, block_move=true})
quickEntity('.', {name='plains', display='.', image="terrain/grass.png", color=colors.LIGHT_GREEN})
quickEntity('&', {name='Ettenmoors', display='^', image="terrain/hills.png", color=colors.LIGHT_UMBER})
quickEntity('_', {name='river', display='~', image="terrain/river.png", color={r=0, g=80, b=255}})
quickEntity('*', {name="Dunadan's Outpost", display='*', color={r=255, g=255, b=255}})
quickEntity('1', {name="Caves below the tower of Amon Sûl", display='>', color={r=0, g=255, b=255}, change_level=1, change_zone="tower-amon-sul"})
quickEntity('2', {name="Ettenmoors's cavern", display='>', color={r=80, g=255, b=255}})
quickEntity('3', {name="Passageway into the Trollshaws", display='>', color={r=0, g=255, b=0}, change_level=1, change_zone="trollshaws"})
return {
[[W..........&&.....MM.]],
[[WW..........&&.....MM]],
[[WW...........2&&&...M]],
[[WW..............&&..M]],
[[WW1......*_________MM]],
[[WW.....___.........MM]],
[[W....._............MM]],
[[.....__..tt3t......MM]],
[[....__.ttttttt....MM.]],
[[...._....tttt....MMM.]],
name = "Elven Ruins",
level_range = {1, 5},
level_scheme = "player",
max_level = 5,
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 = 150, height = 150,
-- all_remembered = true,
-- all_lited = true,
persistant = "zone",
generator = {
map = {
class = "engine.generator.map.TileSet",
tileset = {"5x5/base", "5x5/tunnel", "5x5/windy_tunnel", "5x5/basic_rooms"},
tunnel_chance = 30,
center_room = 1,
['.'] = "FLOOR",
['#'] = "WALL",
['+'] = "DOOR",
["'"] = "DOOR",
up = "UP",
down = "DOWN",
},
actor = {
class = "engine.generator.actor.Random",
nb_npc = {20*5, 20*5},
-- guardian = "SHADE_OF_ANGMAR", -- The gardian is set in the static map
},
object = {
class = "engine.generator.object.Random",
nb_object = {6*5, 9*5},
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {6*8, 9*8},
},
},
levels =
{
[1] = {
generator = { map = {
up = "UP_WILDERNESS",
}, },
},
},
}
......@@ -32,7 +32,7 @@ return {
map = {
-- class = "engine.generator.map.Rooms",
class = "engine.generator.map.TileSet",
tileset = "dungeon",
tileset = {"5x5/base", "5x5/tunnel", "5x5/windy_tunnel"},
tunnel_chance = 60,
center_room = 1,
['.'] = "FLOOR",
......
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