From ecc1ceb58164d9493f23459e08f4b1f6bb599fbd Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sun, 12 Apr 2020 22:06:42 +0300 Subject: [PATCH] Allow random mimics to mimic more furniture In addition to stairs, allow altar, grave, throne, and sink. --- doc/fixes37.0 | 1 + src/makemon.c | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 62ba55bb8..355c3708c 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -127,6 +127,7 @@ it's possible to wish for tins of the Riders in wizard mode; eating one is revival via undead turning of corpse carried by hero said "your corpse comes alive" even when revived monster was undead prevent searching or waiting next to a hostile monster - override with 'm' +allow random mimics to show up mimicing more furniture than just stairs Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/makemon.c b/src/makemon.c index 90b553ffd..b4da8f5ad 100644 --- a/src/makemon.c +++ b/src/makemon.c @@ -2130,7 +2130,7 @@ struct monst *mtmp; } static const NEARDATA char syms[] = { - MAXOCLASSES, MAXOCLASSES + 1, RING_CLASS, WAND_CLASS, WEAPON_CLASS, + MAXOCLASSES, MAXOCLASSES, RING_CLASS, WAND_CLASS, WEAPON_CLASS, FOOD_CLASS, COIN_CLASS, SCROLL_CLASS, POTION_CLASS, ARMOR_CLASS, AMULET_CLASS, TOOL_CLASS, ROCK_CLASS, GEM_CLASS, SPBOOK_CLASS, S_MIMIC_DEF, S_MIMIC_DEF, @@ -2223,9 +2223,10 @@ register struct monst *mtmp; } else { s_sym = syms[rn2((int) sizeof(syms))]; assign_sym: - if (s_sym == MAXOCLASSES || s_sym == MAXOCLASSES + 1) { + if (s_sym == MAXOCLASSES) { + const int furnsyms[] = { S_upstair, S_dnstair, S_altar, S_grave, S_throne, S_sink }; ap_type = M_AP_FURNITURE; - appear = (s_sym == MAXOCLASSES) ? S_upstair : S_dnstair; + appear = furnsyms[rn2(SIZE(furnsyms))]; } else { ap_type = M_AP_OBJECT; if (s_sym == S_MIMIC_DEF) {