Hellfill: Fort
This commit is contained in:
@@ -135,6 +135,42 @@ xxxx.........xxxx
|
|||||||
xxxxxx.....xxxxxx
|
xxxxxx.....xxxxxx
|
||||||
]], contents = function() end });
|
]], contents = function() end });
|
||||||
end,
|
end,
|
||||||
|
function (coldhell)
|
||||||
|
des.map({ halign = rnd_halign(), valign = rnd_valign(), map = [[
|
||||||
|
xxxxxx.xxxxxx
|
||||||
|
xLLLLLLLLLLLx
|
||||||
|
xL---------Lx
|
||||||
|
xL|.......|Lx
|
||||||
|
xL|.......|Lx
|
||||||
|
.L|.......|L.
|
||||||
|
xL|.......|Lx
|
||||||
|
xL|.......|Lx
|
||||||
|
xL---------Lx
|
||||||
|
xLLLLLLLLLLLx
|
||||||
|
xxxxxx.xxxxxx
|
||||||
|
]], contents = function()
|
||||||
|
des.non_diggable(selection.area(2,2, 10,8));
|
||||||
|
des.region(selection.area(4,4, 8,6), "lit");
|
||||||
|
if (coldhell) then
|
||||||
|
des.replace_terrain({ region = {1,1, 11,9}, fromterrain="L", toterrain="P" });
|
||||||
|
end
|
||||||
|
local dblocs = {
|
||||||
|
{ x = 1, y = 5, dir="east", state="closed" },
|
||||||
|
{ x = 11, y = 5, dir="west", state="closed" },
|
||||||
|
{ x = 6, y = 1, dir="south", state="closed" },
|
||||||
|
{ x = 6, y = 9, dir="north", state="closed" }
|
||||||
|
}
|
||||||
|
shuffle(dblocs);
|
||||||
|
for i = 1, math.random(1, #dblocs) do
|
||||||
|
des.drawbridge(dblocs[i]);
|
||||||
|
end
|
||||||
|
local mons = { "H", "T", "@" };
|
||||||
|
shuffle(mons);
|
||||||
|
for i = 1, 3 + math.random(1, 5) do
|
||||||
|
des.monster(mons[1], 6, 5);
|
||||||
|
end
|
||||||
|
end });
|
||||||
|
end,
|
||||||
function ()
|
function ()
|
||||||
des.map({ halign = "center", valign = "center", map = [[
|
des.map({ halign = "center", valign = "center", map = [[
|
||||||
..............................................................
|
..............................................................
|
||||||
@@ -200,9 +236,9 @@ BBBBBBB]], contents = function()
|
|||||||
end,
|
end,
|
||||||
};
|
};
|
||||||
|
|
||||||
function rnd_hell_prefab()
|
function rnd_hell_prefab(coldhell)
|
||||||
local pf = math.random(1, #hell_prefabs);
|
local pf = math.random(1, #hell_prefabs);
|
||||||
hell_prefabs[pf]();
|
hell_prefabs[pf](coldhell);
|
||||||
end
|
end
|
||||||
|
|
||||||
hells = {
|
hells = {
|
||||||
@@ -228,7 +264,7 @@ hells = {
|
|||||||
local protected_area = selection.fillrect(bnds.lx, bnds.ly + 1, bnds.hx - 2, bnds.hy - 1);
|
local protected_area = selection.fillrect(bnds.lx, bnds.ly + 1, bnds.hx - 2, bnds.hy - 1);
|
||||||
hell_tweaks(protected_area:negate());
|
hell_tweaks(protected_area:negate());
|
||||||
if (percent(25)) then
|
if (percent(25)) then
|
||||||
rnd_hell_prefab();
|
rnd_hell_prefab(false);
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
||||||
@@ -254,7 +290,7 @@ hells = {
|
|||||||
-- replace some horizontal iron bars walls with floor
|
-- replace some horizontal iron bars walls with floor
|
||||||
des.replace_terrain({ mapfragment = ".\nF\n.", toterrain = ".", chance = 25 * math.random(4) });
|
des.replace_terrain({ mapfragment = ".\nF\n.", toterrain = ".", chance = 25 * math.random(4) });
|
||||||
elseif (percent(25)) then
|
elseif (percent(25)) then
|
||||||
rnd_hell_prefab();
|
rnd_hell_prefab(false);
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
des.terrain(outside_walls, " "); -- return the outside back to solid wall
|
des.terrain(outside_walls, " "); -- return the outside back to solid wall
|
||||||
@@ -281,9 +317,6 @@ hells = {
|
|||||||
local outside_walls = selection.match(" ");
|
local outside_walls = selection.match(" ");
|
||||||
local icey = selection.negate():percentage(10):grow():filter_mapchar(".");
|
local icey = selection.negate():percentage(10):grow():filter_mapchar(".");
|
||||||
des.terrain(icey, "I");
|
des.terrain(icey, "I");
|
||||||
if (cwid == 1 and percent(25)) then
|
|
||||||
rnd_hell_prefab();
|
|
||||||
end
|
|
||||||
if (cwid > 1) then
|
if (cwid > 1) then
|
||||||
-- turn some ice into wall of water
|
-- turn some ice into wall of water
|
||||||
des.terrain(icey:percentage(1), "W");
|
des.terrain(icey:percentage(1), "W");
|
||||||
@@ -292,6 +325,9 @@ hells = {
|
|||||||
if (percent(25)) then
|
if (percent(25)) then
|
||||||
des.terrain(selection.match("w"), "W"); -- walls of water
|
des.terrain(selection.match("w"), "W"); -- walls of water
|
||||||
end
|
end
|
||||||
|
if (cwid == 1 and percent(25)) then
|
||||||
|
rnd_hell_prefab(true);
|
||||||
|
end
|
||||||
des.terrain(outside_walls, " "); -- return the outside back to solid wall
|
des.terrain(outside_walls, " "); -- return the outside back to solid wall
|
||||||
end,
|
end,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user