Add a new bigroom variant "boulder maze"

This commit is contained in:
Pasi Kallinen
2021-07-09 18:16:48 +03:00
parent f8c20800c7
commit 29a8153170
4 changed files with 39 additions and 1 deletions

36
dat/bigrm-11.lua Normal file
View File

@@ -0,0 +1,36 @@
-- Boulder "maze" with wide corridors
function t_or_f() return percent(50) and true or false; end
des.level_flags("mazelevel", "noflip");
des.level_init({ style = "maze", corrwid = 3 + nh.rn2(3), wallthick = 1, deadends=t_or_f() });
des.region(selection.area(00,00,75,18), "lit");
des.non_diggable();
function replace_wall_boulder(x,y)
des.terrain(x, y, ".");
des.object("boulder", x, y);
end
-- replace horizontal and vertical walls
local sel = selection.match([[.w.]]) | selection.match(".\nw\n.");
sel:iterate(replace_wall_boulder);
-- replace the leftover corner walls
local sel = selection.match([[.w.]]);
sel:iterate(replace_wall_boulder);
des.stair("up");
des.stair("down");
for i = 1,15 do
des.object();
end
for i = 1,6 do
des.trap("rolling boulder");
end
for i = 1,28 do
des.monster();
end