]> granicus.if.org Git - nethack/commitdiff
Move Orcus shopkeeper removal from fixup_special into stock_room
authorcopperwater <aosdict@gmail.com>
Fri, 22 May 2020 01:04:06 +0000 (21:04 -0400)
committerPasi Kallinen <paxed@alt.org>
Sun, 27 Sep 2020 15:54:15 +0000 (18:54 +0300)
The plan is to unify special room filling code and cause special rooms
to be filled as the very last stage of level creation. Since this will
occur after fixup_special, it was necessary to address the one remaining
piece of code in there that affects special room filling. (The Medusa
code remaining in there doesn't have to do with special rooms.)

src/mkmaze.c
src/shknam.c

index 8987cda958c82d36acdfcf67a02e64b910975ffc..16c92a8e3fd9d4575c0f584398bf6995ef7c043a 100644 (file)
@@ -574,15 +574,6 @@ fixup_special()
         g.level.flags.graveyard = 1;
     } else if (Is_stronghold(&u.uz)) {
         g.level.flags.graveyard = 1;
-    } else if (on_level(&u.uz, &orcus_level)) {
-        struct monst *mtmp, *mtmp2;
-
-        /* it's a ghost town, get rid of shopkeepers */
-        for (mtmp = fmon; mtmp; mtmp = mtmp2) {
-            mtmp2 = mtmp->nmon;
-            if (mtmp->isshk)
-                mongone(mtmp);
-        }
     } else if (on_level(&u.uz, &baalzebub_level)) {
         /* custom wallify the "beetle" potion of the level */
         baalz_fixup();
index fe9a0d989455a1e09a8fb8961b6c06ca0e54652a..69b217ffb443f00a7873582b3e02e0c789dee672 100644 (file)
@@ -774,6 +774,12 @@ register struct mkroom *sroom;
      * monsters will sit on top of objects and not the other way around.
      */
 
+    /* Hack for Orcus's level: it's a ghost town, get rid of shopkeepers */
+    if (on_level(&u.uz, &orcus_level)) {
+        struct monst* mtmp = shop_keeper(rmno);
+        mongone(mtmp);
+    }
+
     g.level.flags.has_shop = TRUE;
 }