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

Static map generator can use getMap() function inside maps to access the Map...

Static map generator can use getMap() function inside maps to access the Map object and change it directly
the far east map central mountain is under a particle shield, where the High Peek will be located


git-svn-id: http://svn.net-core.org/repos/t-engine4@732 51575b47-30f0-44d4-a5cc-537603b46e54
parent 71f72347
No related branches found
No related tags found
No related merge requests found
......@@ -69,6 +69,9 @@ function _M:loadMap(file)
addData = function(t)
table.merge(self.level.data, t, true)
end,
getMap = function(t)
return self.map
end,
checkConnectivity = function(dst, src, type, subtype)
self.spots[#self.spots+1] = {x=dst[1], y=dst[2], check_connectivity=src, type=type or "static", subtype=subtype or "static"}
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
return { generator = function()
local ad = rng.range(0, 360)
local a = math.rad(ad)
local dir = math.rad(ad + (rng.chance(2) and 90 or -90))
local r = rng.range(1, 60)
local dirv = math.rad(1)
return {
trail = 1,
life = 30,
size = rng.range(4, 7), sizev = -0.1, sizea = 0,
x = r * math.cos(a), xv = 0, xa = 0,
y = r * math.sin(a), yv = 0, ya = 0,
dir = dir, dirv = dirv, dira = 0,
vel = 1 / (61 - r), velv = 0, vela = 0,
r = rng.range(10, 20)/255, rv = 0, ra = 0,
g = rng.range(30, 120)/255, gv = 0, ga = 0,
b = rng.range(220, 255)/255, bv = 0, ba = 0,
a = rng.range(75, 220)/255, av = 0, aa = 0,
}
end, },
function(self)
self.ps:emit(30)
end,
900
......@@ -35,6 +35,9 @@ quickEntity('C', {always_remember = true, show_tooltip=true, name="Gorbat Pride"
quickEntity('1', {always_remember = true, show_tooltip=true, name="Gates of Morning", desc="A massive hole in the Sun Wall", display='*', color=colors.GOLD, back_color=colors.CRIMSON, image="terrain/gate-morning.png", tint=colors.GOLD, notice = true, change_level=1, change_zone="town-gates-of-morning"})
-- The shield protecting the istari hideout
local p = getMap():particleEmitter(43, 25, 3, "istari_shield_map")
-- Load encounters for this map
prepareEntitiesList("encounters", "mod.class.Encounter", "/data/general/encounters/arda-fareast.lua")
addData{ encounters = {
......@@ -44,7 +47,8 @@ addData{ encounters = {
if rng.percent(hostile_chance) then return "hostile"
elseif rng.percent(harmless_chance) then return "harmless"
end
end}
end},
istari_shield = p,
}
return [[
......
......@@ -19,7 +19,7 @@
return {
name = "Mines of Moria",
level_range = {20, 30},
level_range = {21, 30},
level_scheme = "player",
max_level = 4,
decay = {300, 800},
......
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