]> granicus.if.org Git - nethack/commitdiff
Prevent stairs in Mausoleum themeroom
authorPasi Kallinen <paxed@alt.org>
Tue, 21 Apr 2020 14:57:42 +0000 (17:57 +0300)
committerPasi Kallinen <paxed@alt.org>
Tue, 21 Apr 2020 14:57:49 +0000 (17:57 +0300)
... by making the mausoleum part into an unjoined subroom

dat/themerms.lua

index b06c360323c0b35ed2878dddd01f18422190e51f..04878703e7aedba450ba7adb5a17cff800cbaece 100644 (file)
@@ -190,26 +190,22 @@ themerooms = {
 
    -- Mausoleum
    function()
-      des.room({ type = "themed", w = 5,h = 5,
-                 contents = function()
-                    local pts = { {1,1}, {2,1}, {3,1},
-                                  {1,2},        {3,2},
-                                  {1,3}, {2,3}, {3,3} };
-                    for i = 1, #pts do
-                       des.terrain(pts[i], "-");
-                    end
-                    if (percent(50)) then
-                       local mons = { "M", "V", "L", "Z" };
-                       shuffle(mons);
-                       des.monster(mons[1], 2,2);
-                    else
-                       des.object({ id = "corpse", montype = "@", coord = {2,2} });
-                    end
-                    if (percent(20)) then
-                       local place = { {2,1}, {1,2}, {3,2}, {2,3} };
-                       shuffle(place);
-                       des.terrain(place[1], "S");
-                    end
+      des.room({ type = "themed", w = 5 + nh.rn2(3)*2, h = 5 + nh.rn2(3)*2,
+                 contents = function(rm)
+                    des.room({ type = "themed", x = (rm.width / 2), y = (rm.height / 2), w = 1, h = 1, joined = 0,
+                               contents = function()
+                                  if (percent(50)) then
+                                     local mons = { "M", "V", "L", "Z" };
+                                     shuffle(mons);
+                                     des.monster(mons[1], 0,0);
+                                  else
+                                     des.object({ id = "corpse", montype = "@", coord = {0,0} });
+                                  end
+                                  if (percent(20)) then
+                                     des.door({ state="secret", wall="all" });
+                                  end
+                               end
+                    });
                  end
       });
    end,