mimicking slime molds

Mimic-as-slime_mold needs to keep track of the fruit index the same
way that mimic-as-corpse keeps track of corpse's monster type.  The
mimic description was changing (for '/' and ';' feedback) whenever
the player assiged a new fruit name.

That wasn't noticeable when applying a stethoscope because
mimic-as-slime_mold always yielded "that fruit is really a mimic".
Change it to report the fruit's type instead of generic "fruit".
This commit is contained in:
PatR
2019-10-19 17:38:27 -07:00
parent c099e0a1ff
commit bf7e955645
6 changed files with 49 additions and 17 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 mextra.h $NHDT-Date: 1547428759 2019/01/14 01:19:19 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.22 $ */
/* NetHack 3.6 mextra.h $NHDT-Date: 1571531885 2019/10/20 00:38:05 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.23 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Michael Allison, 2006. */
/* NetHack may be freely redistributed. See license for details. */
@@ -179,7 +179,8 @@ struct mextra {
struct eshk *eshk;
struct emin *emin;
struct edog *edog;
int mcorpsenm; /* obj->corpsenm for mimic posing as statue or corpse */
int mcorpsenm; /* obj->corpsenm for mimic posing as statue or corpse, or
* obj->spe (fruit index) for one posing as a slime mold */
};
#define MNAME(mon) ((mon)->mextra->mname)