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

New feature: 'events'. Sometimes, in certain zones, there will be a special...

New feature: 'events'. Sometimes, in certain zones, there will be a special event, this can be anything from an old graveyard to a falling meteor

git-svn-id: http://svn.net-core.org/repos/t-engine4@5208 51575b47-30f0-44d4-a5cc-537603b46e54
parent 4163baa3
No related branches found
No related tags found
No related merge requests found
Showing
with 491 additions and 33 deletions
......@@ -575,6 +575,8 @@ function _M:load(dynamic)
self._no_save_fields.object_list = true
self._no_save_fields.trap_list = true
end
self:onLoadZoneFile("/data/zones/"..self.short_name.."/")
elseif not data and dynamic then
data = dynamic
ret = false
......@@ -583,6 +585,11 @@ function _M:load(dynamic)
return ret
end
--- Called when the zone file is loaded
-- Does nothing, overload it
function _M:onLoadZoneFile(basedir)
end
local recurs = function(t)
local nt = {}
for k, e in pairs(nt) do if k ~= "__CLASSNAME" then nt[k] = e end end
......@@ -636,6 +643,7 @@ function _M:getLevel(game, lev, old_lev, no_close)
local level_data = self:getLevelData(lev)
local level
local new_level = false
-- Load persistent level?
if type(level_data.persistent) == "string" and level_data.persistent == "zone_temporary" then
local popup = Dialog:simpleWaiter("Loading level", "Please wait while loading the level...", nil, 10000)
......@@ -702,6 +710,7 @@ function _M:getLevel(game, lev, old_lev, no_close)
core.display.forceRedraw()
level = self:newLevel(level_data, lev, old_lev, game)
new_level = true
popup:done()
end
......@@ -712,7 +721,7 @@ function _M:getLevel(game, lev, old_lev, no_close)
-- Re-open the level if needed (the method does the check itself)
level.map:reopen()
return level
return level, new_level
end
function _M:getGenerator(what, level, spots)
......
......@@ -55,7 +55,10 @@ function _M:generate()
end
function _M:generateGuardian(guardian)
local m = self.zone:makeEntityByName(self.level, "actor", guardian)
local m
if type(guardian) == "string" then m = self.zone:makeEntityByName(self.level, "actor", guardian)
else m = self.zone:makeEntity(self.level, "actor", guardian, nil, true)
end
local ok = false
if m then
local x, y = nil, nil
......
......@@ -25,7 +25,7 @@ require "engine.interface.GameTargeting"
local KeyBind = require "engine.KeyBind"
local Savefile = require "engine.Savefile"
local DamageType = require "engine.DamageType"
local Zone = require "engine.Zone"
local Zone = require "mod.class.Zone"
local Tiles = require "engine.Tiles"
local Map = require "engine.Map"
local Level = require "engine.Level"
......@@ -611,6 +611,7 @@ function _M:changeLevel(lev, zone, params)
if params.keep_old_lev then old_lev = self.level.level end
local force_recreate = false
local recreate_nothing = false
local popup = nil
-- We only switch temporarily, keep the old one around
......@@ -654,7 +655,12 @@ function _M:changeLevel(lev, zone, params)
self.level = old.temp_shift_level
self.visited_zones[self.zone.short_name] = true
force_recreate = true
-- if self.level.map.closed then
force_recreate = true
-- else
-- print("Reloading back map without having it closed")
-- recreate_nothing = true
-- end
-- We move to a new zone as normal
elseif not params.temporary_zone_shift then
if self.zone and self.zone.on_leave then
......@@ -678,8 +684,12 @@ function _M:changeLevel(lev, zone, params)
end
if type(self.zone.save_per_level) == "nil" then self.zone.save_per_level = config.settings.tome.save_zone_levels and true or false end
end
self.zone:getLevel(self, lev, old_lev)
local _, new_level = self.zone:getLevel(self, lev, old_lev)
self.visited_zones[self.zone.short_name] = true
if new_level then
self.state:startEvents()
end
end
-- Post process walls
......@@ -838,9 +848,11 @@ function _M:changeLevel(lev, zone, params)
-- Day/Night cycle
if self.level.data.day_night then self.state:dayNightCycle() end
self.level.map:redisplay()
self.level.map:reopen()
if force_recreate then self.level.map:recreate() end
if recreate_nothing then
self.level.map:redisplay()
self.level.map:reopen()
if force_recreate then self.level.map:recreate() end
end
-- Anti stairscum
if self.level.last_turn and self.level.last_turn < self.turn then
......@@ -936,7 +948,11 @@ function _M:updateZoneName()
else
local lev = self.level.level
if self.level.data.reverse_level_display then lev = 1 + self.level.data.max_level - lev end
name = ("%s (%d)"):format(self.zone.name, lev)
if self.zone.max_level == 1 then
name = self.zone.name
else
name = ("%s (%d)"):format(self.zone.name, lev)
end
end
if self.zone_name_s and self.old_zone_name == name then return end
......@@ -1169,20 +1185,10 @@ function _M:setupCommands()
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
-- self:registerDialog(require("mod.dialogs.DownloadCharball").new())
-- local o = game.zone:makeEntity(game.level,"object",{random_object=true},nil,true)
-- o:identify(true)
-- game.zone:addEntity(game.level,o,"object",game.player.x,game.player.y)
-- local m = game.zone:makeEntity(game.level,"actor",{random_elite=true},nil,true)
-- game.zone:addEntity(game.level,m,"actor",game.player.x,game.player.y-1)
local mnb , nb = 0, 0
for k, e in pairs(__uids) do
if k ~= e.uid then
print("==", k, e.uid, e.name)
nb=nb+1
end
mnb = mnb+1
end
game.log("NB !!! %d / %d", nb, mnb)
local f, err = loadfile("/data/general/events/old-battle-field.lua")
print(f, err)
setfenv(f, setmetatable({level=self.level, zone=self.zone}, {__index=_G}))
print(pcall(f))
end end,
[{"_f","ctrl"}] = function() if config.settings.cheat then
self.player.quests["love-melinda"] = nil
......
......@@ -34,6 +34,7 @@ function _M:init(t, no_default)
self.world_artifacts_pool = {}
self.seen_special_farportals = {}
self.unique_death = {}
self.used_events = {}
self.boss_killed = 0
self.stores_restock = 1
self.east_orc_patrols = 4
......@@ -480,7 +481,7 @@ function _M:spawnWorldAmbush(enc, dx, dy)
local terrains = mod.class.Grid:loadList{"/data/general/grids/basic.lua", "/data/general/grids/forest.lua", "/data/general/grids/sand.lua"}
terrains[gen.up].change_level_shift_back = true
local zone = engine.Zone.new("ambush", {
local zone = mod.class.Zone.new("ambush", {
name = "Ambush!",
level_range = {game.player.level, game.player.level},
level_scheme = "player",
......@@ -1108,14 +1109,13 @@ function _M:entityFilterPost(zone, level, type, e, filter)
local base = {
nb_classes=1,
rank=3.2, ai = "tactical",
life_rating=function(v) return v * 1.3 + 2 end,
life_rating = filter.random_elite.life_rating or function(v) return v * 1.3 + 2 end,
loot_quality = "store",
loot_quantity = 0,
drop_equipment = false,
no_loot_randart = true,
resources_boost = 1.5,
class_filter = function(c)
if c.name=="Corruptor" then return true else return false end
if e.power_source then
for ps, _ in pairs(e.power_source) do if c.power_source and c.power_source[ps] then return true end end
return false
......@@ -1127,6 +1127,7 @@ function _M:entityFilterPost(zone, level, type, e, filter)
return true
end,
level = filter.random_elite.level or zone:level_adjust_level(level, zone, type),
nb_rares = filter.random_elite.nb_rares or 1,
check_talents_level = true,
post = function(b, data)
if data.level <= 20 then
......@@ -1135,9 +1136,13 @@ function _M:entityFilterPost(zone, level, type, e, filter)
end
-- Drop
local o = game.zone:makeEntity(game.level,"object", {random_object=true}, nil, true)
b:addObject(b.INVEN_INVEN, o)
game.zone:addEntity(game.level, o, "object")
for i = 1, data.nb_rares do
local o = game.zone:makeEntity(game.level,"object", {random_object=true}, nil, true)
if o then
b:addObject(b.INVEN_INVEN, o)
game.zone:addEntity(game.level, o, "object")
end
end
end,
}
e = self:createRandomBoss(e, table.merge(base, filter.random_elite, true))
......@@ -1462,7 +1467,7 @@ function _M:createRandomZone(zbase)
------------------------------------------------------------
-- Final glue
------------------------------------------------------------
local zone = engine.Zone.new(short_name, {
local zone = mod.class.Zone.new(short_name, {
name = name,
level_range = {data.min_lev, data.max_lev},
level_scheme = "player",
......@@ -1740,3 +1745,50 @@ function _M:locationRevealAround(x, y)
game.level.map.remembers(x+c[1], y+c[2], true)
end
end
function _M:doneEvent(id)
return self.used_events[id]
end
function _M:startEvents()
if not game.zone.events then print("No zone events loaded") return end
local evts = game.zone.events
if not game.zone.assigned_events then
local levels = {}
for i = 1, game.zone.max_level do levels[i] = {} end
for i, e in ipairs(evts) do
if e.always or rng.percent(e.percent) then
local lev = nil
if e.one_per_level then
local list = {}
for i = 1, #levels do if #levels[i] == 0 then list[#list+1] = i end end
if #list > 0 then
lev = rng.table(list)
end
else
lev = rng.range(1, game.zone.max_level)
end
if lev then
lev = levels[lev]
lev[#lev+1] = e.name
end
end
end
game.zone.assigned_events = levels
end
print("Assigned events list")
table.print(game.zone.assigned_events)
for i, e in ipairs(game.zone.assigned_events[game.level.level] or {}) do
local f = loadfile("/data/general/events/"..e..".lua")
setfenv(f, setmetatable({level=game.level, zone=game.zone}, {__index=_G}))
f()
end
game.zone.assigned_events[game.level.level] = {}
end
-- 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
require "engine.class"
local Zone = require "engine.Zone"
module(..., package.seeall, class.inherit(Zone))
--- Called when the zone file is loaded
function _M:onLoadZoneFile(basedir)
-- Load events if they exist
if fs.exists(basedir.."events.lua") then
local f = loadfile(basedir.."events.lua")
setfenv(f, setmetatable({self=self}, {__index=_G}))
self.events = f()
end
end
-- 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
-- Find a random spot
local x, y = rng.range(1, level.map.w - 2), rng.range(1, level.map.h - 2)
local tries = 0
while (not game.player:canMove(x, y) or level.map.attrs(x, y, "no_teleport")) and tries < 100 do
x, y = rng.range(1, level.map.w - 2), rng.range(1, level.map.h - 2)
tries = tries + 1
end
if tries >= 100 then return false end
local id = "damp-cave-"..game.turn
local changer = function(id)
local npcs = mod.class.NPC:loadList{"/data/general/npcs/thieve.lua"}
local objects = mod.class.Object:loadList("/data/general/objects/objects.lua")
local terrains = mod.class.Grid:loadList("/data/general/grids/cave.lua")
terrains.CAVE_LADDER_UP_WILDERNESS.change_level_shift_back = true
terrains.CAVE_LADDER_UP_WILDERNESS.change_zone_auto_stairs = true
local zone = mod.class.Zone.new(id, {
name = "Damp Cave",
level_range = {zone:level_adjust_level(level, zone, "actor"), zone:level_adjust_level(level, zone, "actor")},
level_scheme = "player",
max_level = 1,
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
width = 20, height = 20,
ambient_music = "Swashing the buck.ogg",
reload_lists = false,
persistent = "zone",
generator = {
map = {
class = "engine.generator.map.Cavern",
zoom = 4,
min_floor = 120,
floor = "CAVEFLOOR",
wall = "CAVEWALL",
up = "CAVE_LADDER_UP_WILDERNESS",
door = "CAVEFLOOR",
},
actor = {
class = "mod.class.generator.actor.Random",
nb_npc = {14, 14},
guardian = {random_elite={life_rating=function(v) return v * 1.5 + 4 end, nb_rares=3}},
},
object = {
class = "engine.generator.object.Random",
filters = {{type="gem"}},
nb_object = {6, 9},
},
trap = {
class = "engine.generator.trap.Random",
nb_trap = {6, 9},
},
},
-- levels = { [1] = { generator = { map = { up = "CAVEFLOOR", }, }, }, },
npc_list = npcs,
grid_list = terrains,
object_list = objects,
trap_list = mod.class.Trap:loadList("/data/general/traps/natural_forest.lua"),
})
return zone
end
local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull()
g.name = "damp cave"
g.display='>' g.color_r=0 g.color_g=0 g.color_b=255 g.notice = true
g.change_level=1 g.change_zone=id g.glow=true
g.add_displays = g.add_displays or {}
g.add_displays[#g.add_displays+1] = mod.class.Grid.new{image="terrain/crystal_ladder_down.png", z=5}
g.nice_tiler = nil
g:initGlow()
g.real_change = changer
g.change_level_check = function(self)
game:changeLevel(1, self.real_change(self.change_zone), {temporary_zone_shift=true})
self.change_level_check = nil
self.real_change = nil
return true
end
game.zone:addEntity(game.level, g, "terrain", x, y)
return true
-- 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
local function check(x, y)
local list = {}
for i = -2, 2 do for j = -2, 2 do
if not game.player:canMove(x+i, y+j) then return false end
if level.map.attrs(x+i, y+j, "no_teleport") then return false end
list[#list+1] = {x=x+i, y=y+j}
end end
if #list < 5 then return false
else return list end
end
local x, y = rng.range(3, level.map.w - 4), rng.range(3, level.map.h - 4)
local tries = 0
while not check(x, y) and tries < 100 do
x, y = rng.range(3, level.map.w - 4), rng.range(3, level.map.h - 4)
tries = tries + 1
end
if tries < 100 then
local id = "old-battle-field-"..game.turn
local changer = function(id)
local npcs = mod.class.NPC:loadList{"/data/general/npcs/skeleton.lua","/data/general/npcs/ghoul.lua","/data/general/npcs/wight.lua"}
local objects = mod.class.Object:loadList("/data/general/objects/objects.lua")
local terrains = mod.class.Grid:loadList("/data/general/grids/cave.lua")
terrains.CAVE_LADDER_UP_WILDERNESS.change_level_shift_back = true
terrains.CAVE_LADDER_UP_WILDERNESS.change_zone_auto_stairs = true
local zone = mod.class.Zone.new(id, {
name = "Cavern beneath tombstones",
level_range = {zone:level_adjust_level(level, zone, "actor"), zone:level_adjust_level(level, zone, "actor")},
level_scheme = "player",
max_level = 1,
actor_adjust_level = function(zone, level, e) return zone.base_level + e:getRankLevelAdjust() + level.level-1 + rng.range(-1,2) end,
width = 20, height = 20,
ambient_music = "Swashing the buck.ogg",
reload_lists = false,
persistent = "zone",
generator = {
map = {
class = "engine.generator.map.Static",
map = "events/old-battle-field",
},
},
npc_list = npcs,
grid_list = terrains,
object_list = objects,
trap_list = mod.class.Trap:loadList("/data/general/traps/natural_forest.lua"),
on_enter = function(lev)
game.level.turn_counter = 101 * 10
game.level.max_turn_counter = 101 * 10
game.level.nb_pop = 1
end,
on_turn = function(self)
if game.level.turn_counter then
game.level.turn_counter = game.level.turn_counter - 1
game.player.changed = true
if game.level.turn_counter < 0 then
game.level.turn_counter = nil
local spot = game.level:pickSpot{type="pop", subtype="undead"}
local g = game.zone:makeEntityByName(game.level, "terrain", "CAVE_LADDER_UP_WILDERNESS")
game.zone:addEntity(game.level, g, "terrain", spot.x, spot.y)
require("engine.ui.Dialog"):simpleLongPopup("Onslaught", "You have survived the onslaught of undeads, you notice a way to climb up you had not seen before in a wall nearby.", 400)
elseif game.level.turn_counter % 50 == 0 then
for i = 1, math.floor(game.level.nb_pop) do
local spot = game.level:pickSpot{type="pop", subtype="undead"}
if not game.level.map(spot.x, spot.y, game.level.map.ACTOR) then
local m = game.zone:makeEntity(game.level, "actor")
if m then game.zone:addEntity(game.level, m, "actor", spot.x, spot.y) m:setTarget(game.player) end
end
end
game.level.nb_pop = game.level.nb_pop + 0.15
end
end
end,
})
return zone
end
local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull()
g.name = "grave"
g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true
g.add_displays = g.add_displays or {}
g.add_displays[#g.add_displays+1] = mod.class.Grid.new{image="terrain/grave_unopened_0"..rng.range(1,3).."_64.png", display_y=-1, display_h=2}
g.nice_tiler = nil
g.block_move = function(self, x, y, who, act, couldpass)
if not who or not who.player or not act then return false end
who:runStop("grave")
require("engine.ui.Dialog"):yesnoPopup("Grave", "Do you wish to disturb the grave?", function(ret) if ret then
self.block_move = nil
self:change_level_check()
require("engine.ui.Dialog"):simplePopup("Fall...", "As you tried to dig the grave the ground fell under you. You find yourself stranded in an eerie lit cavern.")
end end)
return false
end
g.change_level=1 g.change_zone=id g.glow=true
g.real_change = changer
g.change_level_check = function(self)
game:changeLevel(1, self.real_change(self.change_zone), {temporary_zone_shift=true})
self.change_level_check = nil
self.real_change = nil
return true
end
local grids = check(x, y)
for i = 1, 5 do
local p = rng.tableRemove(grids)
game.zone:addEntity(game.level, g, "terrain", p.x, p.y)
end
end
return true
-- 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
-- Find a random spot
local nb = rng.range(3, 5)
for i = 1, nb do
local x, y = rng.range(1, level.map.w - 2), rng.range(1, level.map.h - 2)
local tries = 0
while (not game.player:canMove(x, y) or level.map.attrs(x, y, "no_teleport")) and tries < 100 do
x, y = rng.range(1, level.map.w - 2), rng.range(1, level.map.h - 2)
tries = tries + 1
end
if tries < 100 then
local g = game.level.map(x, y, engine.Map.TERRAIN):cloneFull()
g.name = "grave"
g.display='&' g.color_r=255 g.color_g=255 g.color_b=255 g.notice = true
g.add_displays = g.add_displays or {}
g.add_displays[#g.add_displays+1] = mod.class.Grid.new{image="terrain/grave_unopened_0"..rng.range(1,3).."_64.png", display_y=-1, display_h=2}
g.nice_tiler = nil
g.block_move = function(self, x, y, who, act, couldpass)
if not who or not who.player or not act then return false end
who:runStop("grave")
require("engine.ui.Dialog"):yesnoPopup("Grave", "Do you wish to disturb the grave?", function(ret) if ret then
self.block_move = nil
if rng.percent(20) then game.log("There is nothing there.") return end
local m = game.zone:makeEntity(game.level, "actor", {properties={"undead"}, add_levels=10, random_boss={nb_classes=1, rank=3, ai = "tactical", loot_quantity = 0, no_loot_randart = true}}, nil, true)
local x, y = util.findFreeGrid(who.x, who.y, 5, true, {[engine.Map.ACTOR]=true})
if m and x and y then
game.zone:addEntity(game.level, m, "actor", x, y)
game.log("You were not the first here: the corpse was turned into an undead.")
else
game.log("There is nothing there.")
end
end end)
return false
end,
game.zone:addEntity(game.level, g, "terrain", x, y)
end
end -- for
return true
-- 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
defineTile('.', "CAVEFLOOR", nil, nil, nil, {lite=true})
defineTile('&', "CAVEFLOOR", nil, nil, nil, {lite=true}, {type="pop", subtype="undead"})
defineTile('#', "CAVEWALL", nil, nil, nil, {lite=true})
return [[
##################
####..############
####&.#&.#&#######
##&..........#####
#............&####
#&............####
##..............##
###&............&#
###.............##
#&..............##
##..............&#
#&...............#
##&...........&.##
####..........####
####&.......&#####
######&.##&.######
##################]]
-- 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
return { one_per_level=true,
{name="damp-cave", percent=10},
{name="tombstones", percent=10},
{name="old-battle-field", percent=5},
}
\ No newline at end of file
......@@ -136,7 +136,7 @@ function _M:eidolonPlane()
local oldzone = game.zone
local oldlevel = game.level
local zone = engine.Zone.new("eidolon-plane")
local zone = mod.class.Zone.new("eidolon-plane")
local level = zone:getLevel(game, 1, 0)
level.data.eidolon_exit_x = self.actor.x
......
......@@ -65,7 +65,7 @@ game:onLevelLoad("wilderness-1", function(wzone, level)
end },
}
local zone = engine.Zone.new("bearscape", {
local zone = mod.class.Zone.new("bearscape", {
name = "Bearscape",
level_range = {12, 35},
level_scheme = "player",
......
......@@ -71,7 +71,7 @@ game:onLevelLoad("wilderness-1", function(wzone, level)
end },
}
local zone = engine.Zone.new("lost-land-poosh", {
local zone = mod.class.Zone.new("lost-land-poosh", {
name = "Lost land of Poosh",
level_range = {15, 35},
level_scheme = "player",
......
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