From: Pasi Kallinen Date: Sat, 1 Feb 2020 18:18:56 +0000 (+0200) Subject: Dehardcode wizard1 morgue secret door X-Git-Tag: NetHack-3.7.0_WIP-2020-02-14~84 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bb1925a95720655d00c636b736dfb537f2fdfa68;p=nethack Dehardcode wizard1 morgue secret door --- diff --git a/dat/wizard1.lua b/dat/wizard1.lua index a34f20df5..26dfd5839 100644 --- a/dat/wizard1.lua +++ b/dat/wizard1.lua @@ -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") diff --git a/src/mkmaze.c b/src/mkmaze.c index b287189a9..230f8facc 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -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);