/* uhitm.c */
boolean override_confirmation; /* Used to flag attacks caused by
* Stormbringer's maliciousness. */
+ short corpsenm_digested; /* monster type being digested, set by gulpum */
/* vision.c */
seenV **viz_array; /* used in cansee() and couldsee() macros */
extern int tin_variety_txt(char *, int *);
extern void tin_details(struct obj *, int, char *);
extern boolean Popeye(int);
+extern int Finish_digestion(void);
/* ### end.c ### */
/* uhitm.c */
FALSE, /* override_confirmation */
+ NON_PM, /* corpsenm_digested */
/* vision.c */
UNDEFINED_PTR, /* viz_array */
return FALSE;
}
+/* the hero has swallowed a monster whole as a purple worm or similar, and has
+ finished digesting its corpse (called via g.afternmv) */
+int
+Finish_digestion(void)
+{
+ if (g.corpsenm_digested != NON_PM) {
+ cpostfx(g.corpsenm_digested);
+ g.corpsenm_digested = NON_PM;
+ }
+ return 0;
+}
+
/*eat.c*/
&& !(g.mvitals[monsndx(pd)].mvflags & G_NOCORPSE)) {
/* nutrition only if there can be a corpse */
u.uhunger += (pd->cnutrit + 1) / 2;
- } else
+ } else {
tmp = 0;
+ }
Sprintf(msgbuf, "You totally digest %s.", mon_nam(mdef));
if (tmp != 0) {
/* setting afternmv = end_engulf is tempting,
nomul(-tmp);
g.multi_reason = "digesting something";
g.nomovemsg = msgbuf;
+ /* possible intrinsic once totally digested */
+ g.corpsenm_digested = monsndx(pd);
+ g.afternmv = Finish_digestion;
} else
pline1(msgbuf);
if (pd == &mons[PM_GREEN_SLIME]) {