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

Meteor will not destroy recall portal

git-svn-id: http://svn.net-core.org/repos/t-engine4@6106 51575b47-30f0-44d4-a5cc-537603b46e54
parent 95ee1d9e
No related branches found
No related tags found
No related merge requests found
......@@ -1269,9 +1269,7 @@ function _M:setupCommands()
print("===============")
end end,
[{"_g","ctrl"}] = function() if config.settings.cheat then
game.log("Toto foo http://te4.org/ toto")
do return end
local f, err = loadfile("/data/general/events/rat-lich.lua")
local f, err = loadfile("/data/general/events/meteor.lua")
print(f, err)
setfenv(f, setmetatable({level=self.level, zone=self.zone}, {__index=_G}))
print(pcall(f))
......
......@@ -65,7 +65,8 @@ game.zone.on_turn = function()
local npcs = mod.class.NPC:loadList("/data/general/npcs/losgoroth.lua")
for i = x-2, x+2 do for j = y-2, y+2 do
if core.fov.distance(x, y, i, j) <= 1 or rng.percent(40) then
local og = game.level.map(i, j, engine.Map.TERRAIN)
if (core.fov.distance(x, y, i, j) <= 1 or rng.percent(40)) and og and not og.escort_portal then
local g = terrains.LAVA_FLOOR:clone()
g:resolve() g:resolve(nil, true)
game.zone:addEntity(game.level, g, "terrain", i, j)
......
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