]> granicus.if.org Git - nethack/commitdiff
Dehardcode wizard1 morgue secret door
authorPasi Kallinen <paxed@alt.org>
Sat, 1 Feb 2020 18:18:56 +0000 (20:18 +0200)
committerPasi Kallinen <paxed@alt.org>
Sat, 1 Feb 2020 18:20:25 +0000 (20:20 +0200)
dat/wizard1.lua
src/mkmaze.c

index a34f20df590dcf6cd1540e77e72ec62f208bb73f..26dfd5839c891f5a697ef0544919f03d2782c445 100644 (file)
@@ -28,9 +28,10 @@ des.levregion({ type="stair-up", region={01,00,79,20}, region_islev=1, exclude={
 des.levregion({ type="stair-down", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} })
 des.levregion({ type="branch", region={01,00,79,20}, region_islev=1, exclude={0,0,28,12} })
 des.teleport_region({ region={01,00,79,20}, region_islev=1, exclude={0,0,27,12} })
--- Make it a morgue for rm id in mkmaze.c
--- for the purpose of random sdoor placement
-des.region({ region={12,01, 20,09}, lit=0, type="morgue", prefilled=1 })
+des.region({ region={12,01, 20,09}, lit=0, type="morgue", prefilled=1, contents=function()
+                local sdwall = { "south", "west", "east" };
+                des.door({ wall = sdwall[math.random(1, #sdwall)], state = "secret" });
+end })
 -- another region to constrain monster arrival
 des.region({ region={01,01, 10,11}, lit=0, type="ordinary", prefilled=0 })
 des.mazewalk(28,05,"east")
index b287189a9089bfe7dc0dc8f2540052b7329c0691..230f8facc197867c1634f6a2262e9e84f277adf6 100644 (file)
@@ -565,10 +565,6 @@ fixup_special()
                 set_corpsenm(otmp, rndmonnum());
             }
         }
-    } else if (Is_wiz1_level(&u.uz)) {
-        croom = search_special(MORGUE);
-
-        create_secret_door(croom, W_SOUTH | W_EAST | W_WEST);
     } else if (Is_knox(&u.uz)) {
         /* using an unfilled morgue for rm id */
         croom = search_special(MORGUE);