From: Pasi Kallinen Date: Fri, 4 Aug 2017 20:15:30 +0000 (+0300) Subject: Throne room's throne is occupied by a king X-Git-Tag: NetHack-3.6.1_RC01~436 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d7d63814a99b14acf0bcc96ddf567e966064b78;p=nethack Throne room's throne is occupied by a king Based on a patch by Leon Arnott --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index c29309ad3..d2fb9b2ca 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/mkroom.c b/src/mkroom.c index c76531b52..ff074cd5c 100644 --- a/src/mkroom.c +++ b/src/mkroom.c @@ -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;