Add a cold, watery gehennom filler maze

This commit is contained in:
Pasi Kallinen
2023-01-16 19:17:19 +02:00
parent b5fe7415cf
commit bd267c0c61
+23 -2
View File
@@ -160,8 +160,6 @@ function rnd_hell_prefab()
hell_prefabs[pf](); hell_prefabs[pf]();
end end
-- TODO: cold hells? (ice & water instead of lava. sometimes floor = ice)
hells = { hells = {
-- 1: "mines" style with lava -- 1: "mines" style with lava
function () function ()
@@ -228,6 +226,29 @@ hells = {
des.terrain(outside_walls, " "); -- return the outside back to solid wall des.terrain(outside_walls, " "); -- return the outside back to solid wall
end end
end, end,
-- 6: cold maze, with ice and water
function ()
local cwid = math.random(4);
des.level_init({ style = "solidfill", fg = " ", lit = 0 });
des.level_flags("mazelevel", "noflip");
des.level_init({ style = "maze", wallthick = 1, corrwid = cwid });
local outside_walls = selection.match(" ");
local icey = selection.negate():percentage(10):grow():filter_mapchar(".");
des.terrain(icey, "I");
if (cwid == 1 and percent(25)) then
rnd_hell_prefab();
end
if (cwid > 1) then
-- turn some ice into wall of water
des.terrain(icey:percentage(1), "W");
end
des.terrain(icey:percentage(5), "P");
if (percent(25)) then
des.terrain(selection.match("w"), "W"); -- walls of water
end
des.terrain(outside_walls, " "); -- return the outside back to solid wall
end,
}; };
local hellno = math.random(1, #hells); local hellno = math.random(1, #hells);