Skip to content
Snippets Groups Projects
zone.lua 2.47 KiB
Newer Older
  • Learn to ignore specific revisions
  • dg's avatar
    dg committed
    -- ToME - Tales of Maj'Eyal
    
    dg's avatar
    dg committed
    -- 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
    
    
    dg's avatar
    dg committed
    return {
    
    dg's avatar
    dg committed
    	name = "Trollmire",
    
    dg's avatar
    dg committed
    	level_range = {1, 5},
    	level_scheme = "player",
    	max_level = 5,
    
    dg's avatar
    dg committed
    	decay = {300, 800},
    
    	actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
    
    dg's avatar
    dg committed
    	width = 50, height = 50,
    
    dg's avatar
    dg committed
    --	all_remembered = true,
    
    dg's avatar
    dg committed
    	all_lited = true,
    
    dg's avatar
    dg committed
    	persistent = "zone",
    	ambient_music = "Rainy Day.ogg",
    
    dg's avatar
    dg committed
    	generator =  {
    		map = {
    
    dg's avatar
    dg committed
    			class = "engine.generator.map.Forest",
    
    			edge_entrances = {4,6},
    
    dg's avatar
    dg committed
    			zoom = 4,
    			sqrt_percent = 30,
    
    dg's avatar
    dg committed
    			noise = "fbm_perlin",
    
    			floor = function() if rng.chance(20) then return "FLOWER" else return "GRASS" end end,
    
    dg's avatar
    dg committed
    			wall = {"TREE","TREE2","TREE3","TREE4","TREE5","TREE6","TREE7","TREE8","TREE9","TREE10","TREE11","TREE12","TREE13","TREE14","TREE15","TREE16","TREE17","TREE18","TREE19","TREE20",},
    
    			up = "GRASS_UP4",
    			down = "GRASS_DOWN6",
    
    			do_ponds =  {
    
    dg's avatar
    dg committed
    				nb = {1, 2},
    
    				size = {w=25, h=25},
    
    dg's avatar
    dg committed
    				pond = {{0.6, "DEEP_WATER"}, {0.8, "DEEP_WATER"}},
    
    dg's avatar
    dg committed
    			nb_rooms = {0,0,0,1},
    
    dg's avatar
    dg committed
    			lesser_vaults_list = {"honey_glade", "forest-ruined-building1", "forest-ruined-building2", "forest-ruined-building3", "forest-snake-pit", "mage-hideout-dark"},
    
    dg's avatar
    dg committed
    		},
    		actor = {
    			class = "engine.generator.actor.Random",
    			nb_npc = {20, 30},
    
    			filters = { {max_ood=2}, },
    
    dg's avatar
    dg committed
    			guardian = "TROLL_BILL",
    		},
    		object = {
    			class = "engine.generator.object.Random",
    
    dg's avatar
    dg committed
    			nb_object = {6, 9},
    
    dg's avatar
    dg committed
    		},
    
    dg's avatar
    dg committed
    		trap = {
    			class = "engine.generator.trap.Random",
    			nb_trap = {6, 9},
    		},
    
    dg's avatar
    dg committed
    	},
    
    	post_process = function(level)
    		-- Place a lore note on each level
    		game:placeRandomLoreObject("NOTE"..level.level)
    	end,
    
    dg's avatar
    dg committed
    	levels =
    	{
    		[1] = {
    			generator = { map = {
    
    dg's avatar
    dg committed
    			}, },
    		},
    	},
    }