stone-to-flesh vs mimics

Handle a FIXME in zap.c:  stone-to-flesh spell hitting a mimic that
is disguised as a stone object or stone furniture should bring it out
of hiding.
This commit is contained in:
PatR
2025-04-24 12:47:00 -07:00
parent c6906a78a4
commit 92255708f3
5 changed files with 89 additions and 31 deletions

View File

@@ -1624,6 +1624,8 @@ extern void costly_alteration(struct obj *, int) NONNULLARG1;
extern void clear_dknown(struct obj *);
extern void unknow_object(struct obj *);
extern struct obj *mksobj(int, boolean, boolean) NONNULL;
extern boolean stone_object_type(unsigned);
extern boolean stone_furniture_type(unsigned);
extern int bcsign(struct obj *) NONNULLARG1;
extern int weight(struct obj *) NONNULLARG1;
extern struct obj *mkgold(long, coordxy, coordxy);
@@ -3385,7 +3387,7 @@ extern boolean mhitm_knockback(struct monst *, struct monst *,struct attack *,
extern int passive(struct monst *, struct obj *, boolean, boolean, uchar,
boolean) NONNULLARG1;
extern void passive_obj(struct monst *, struct obj *, struct attack *) NONNULLARG1;
extern void that_is_a_mimic(struct monst *, boolean) NONNULLARG1;
extern void that_is_a_mimic(struct monst *, unsigned) NONNULLARG1;
extern void stumble_onto_mimic(struct monst *) NONNULLARG1;
extern int flash_hits_mon(struct monst *, struct obj *) NONNULLARG12;
extern void light_hits_gremlin(struct monst *, int) NONNULLARG1;

View File

@@ -1155,6 +1155,10 @@ typedef uint32_t mmflags_nht; /* makemon MM_ flags */
#define MHID_ALTMON 4 /* if mimicking a monster, include that */
#define MHID_REGION 8 /* include region when mon is in one */
/* flags for that_is_a_mimic() */
#define MIM_REVEAL 1 /* seemimic() */
#define MIM_OMIT_WAIT 2 /* strip beginning from "Wait! That is a <foo>" */
/* flags for make_corpse() and mkcorpstat(); 0..7 are recorded in obj->spe */
#define CORPSTAT_NONE 0x00
#define CORPSTAT_GENDER 0x03 /* 0x01 | 0x02 */