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

The endgame boss zone has been put in its own level, things should not teleport out

git-svn-id: http://svn.net-core.org/repos/t-engine4@2629 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2e876d74
No related branches found
No related tags found
No related merge requests found
......@@ -805,7 +805,8 @@ function _M:useOrbPortal(portal)
if portal.on_preuse then portal:on_preuse(self) end
if portal.teleport_level then
if portal.nothing then -- nothing
elseif portal.teleport_level then
local x, y = util.findFreeGrid(portal.teleport_level.x, portal.teleport_level.y, 2, true, {[Map.ACTOR]=true})
if x and y then self:move(x, y, true) end
else
......
......@@ -36,28 +36,16 @@ defineTile('U', "ORB_UNDEATH", nil, nil, nil, {lite=true, no_teleport=true})
defineTile('A', "FLOOR", nil, "ELANDAR", nil, {lite=true, no_teleport=true})
defineTile('P', "FLOOR", nil, "ARGONIEL", nil, {lite=true, no_teleport=true})
subGenerator{
x = 0, y = 23, w = 50, h = 52,
generator = "engine.generator.map.Roomer",
data = {
nb_rooms = 7,
rooms = {"random_room"},
['.'] = "FLOOR",
['#'] = "WALL",
up = "FLOOR",
down = "PORTAL_BOSS",
door = "DOOR",
force_last_stair = true,
},
define_up = true,
define_down = true,
}
addSpot({16, 4}, "portal", "demon")
addSpot({33, 4}, "portal", "dragon")
addSpot({33, 18}, "portal", "undead")
addSpot({16, 18}, "portal", "elemental")
startx = 25
starty = 8
endx = 25
endy = 8
return [[
**************************************************
******************..............******************
......@@ -81,56 +69,4 @@ return [[
***********..............#.............***********
************..........................************
******************..............******************
**************************************************
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,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,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,]]
**************************************************]]
......@@ -66,17 +66,6 @@ end
function start_end_combat(self)
local p = game.party:findMember{main=true}
p.entered_level = {x=25, y= 8}
-- Allow teleporting inside
for i = 11, 38 do for j = 1, 21 do
game.level.map.lites(i, j, true)
game.level.map.attrs(i, j, "no_teleport", false)
end end
-- Forbid teleporting outside
for i = 0, game.level.map.w - 1 do for j = 22, game.level.map.h - 1 do
game.level.map.attrs(i, j, "no_teleport", true)
end end
game.level.allow_portals = true
end
......
......@@ -158,12 +158,15 @@ newEntity{
show_tooltip = true,
desc = [[This portal seems to connect to an other part of this level.]],
orb_portal = {
teleport_level = {x=25, y=8},
nothing = true,
message = "#VIOLET#You enter the swirling portal and appear in a large room with other portals and the two wizards.",
on_use = function()
game:changeLevel(16) -- Special level, can not get to it any other way
if game.player:hasQuest("high-peak"):isCompleted("sanctum-chat") then return end
local Chat = require "engine.Chat"
local chat = Chat.new("sorcerer-fight", {name="Elandar"}, game.player)
chat:invoke()
game.player:hasQuest("high-peak"):setStatus(engine.Quest.COMPLETED, "sanctum-chat")
game.player:hasQuest("high-peak"):start_end_combat()
end,
},
......
......@@ -19,6 +19,10 @@
return {
name = "High Peak",
display_name = function(x, y)
if game.level.level == 16 then return "High Peak: The Sanctum" end
return "High Peak ("..game.level.level..")"
end,
level_range = {55, 80},
level_scheme = "player",
max_level = 15,
......@@ -78,14 +82,21 @@ return {
{
[15] = {
generator = {
map = {
class = "engine.generator.map.Static",
map = "zones/high-peak-last",
},
actor = {
nb_npc = {30, 40},
area = {x1=0, x2=49, y1=23, y2=23+50},
},
map = {
down = "PORTAL_BOSS",
force_last_stair = true,
}
}
},
[16] = {
generator = {
map = {
class = "engine.generator.map.Static",
map = "zones/high-peak-last",
},
actor = {
nb_npc = {0, 0},
},
},
},
},
......
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