]> granicus.if.org Git - nethack/commitdiff
Throne room's throne is occupied by a king
authorPasi Kallinen <paxed@alt.org>
Fri, 4 Aug 2017 20:15:30 +0000 (23:15 +0300)
committerPasi Kallinen <paxed@alt.org>
Fri, 4 Aug 2017 20:15:30 +0000 (23:15 +0300)
Based on a patch by Leon Arnott

doc/fixes36.1
src/mkroom.c

index c29309ad383165872f8acd4b7a3c52a09f96dc98..d2fb9b2caa1d915548da16b0b4abb574316231ce 100644 (file)
@@ -406,6 +406,7 @@ fix the 'A' command to have the 'D' command's fix for C331-1 (quirk for
        followup menu asking to choose specific items)
 eating 1 tin from stack of N (for N >= 2) on shop's floor forced hero to buy 2
 using a cursed whistle in a vault will summon the guard immediately
+throne room's throne is occupied by a king
 
 
 Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository
index c76531b52d403f6cc9983bd4d28bad4cbfe882f4..ff074cd5c2863d739e3e90c9abee50f2ba92e9a2 100644 (file)
@@ -239,6 +239,26 @@ int type;
     }
 }
 
+void
+mk_zoo_thronemon(x,y)
+int x,y;
+{
+    int i = rnd(level_difficulty());
+    int pm = (i > 9) ? PM_OGRE_KING
+        : (i > 5) ? PM_ELVENKING
+        : (i > 2) ? PM_DWARF_KING
+        : PM_GNOME_KING;
+    struct monst *mon = makemon(&mons[pm], x, y, NO_MM_FLAGS);
+
+    if (mon) {
+        mon->msleeping = 1;
+        mon->mpeaceful = 0;
+        set_malign(mon);
+        /* Give him a sceptre to pound in judgment */
+        (void) mongets(mon, MACE);
+    }
+}
+
 void
 fill_zoo(sroom)
 struct mkroom *sroom;
@@ -265,7 +285,7 @@ struct mkroom *sroom;
             ty = mm.y;
         } while (occupied((xchar) tx, (xchar) ty) && --i > 0);
     throne_placed:
-        /* TODO: try to ensure the enthroned monster is an M2_PRINCE */
+        mk_zoo_thronemon(tx, ty);
         break;
     case BEEHIVE:
         tx = sroom->lx + (sroom->hx - sroom->lx + 1) / 2;