* 2. Add a pointer to your new struct to the mextra struct in this
* file.
* 3. Add a referencing macro at bottom of this file after the mextra
- * struct (see MGIVENNAME, EGD, EPRI, ESHK, EMIN, or EDOG for examples).
+ * struct (see MGIVENNAME, EGD, EPRI, ESHK, EMIN, or EDOG for
+ * examples).
* 4. If your new field isn't a pointer and requires a non-zero value
* on initialization, add code to init_mextra() in src/makemon.c
* 5. Create a newXX(mtmp) function and possibly a free_XX(mtmp)
} else if (ckloc && ptr == &mons[PM_LONG_WORM]
&& g.level.monsters[mon->mx][mon->my] != mon) {
Sprintf(outbuf, "%s <%d,%d>",
- pmname(&mons[PM_LONG_WORM_TAIL], Mgender(mon)), mon->mx, mon->my);
+ pmname(&mons[PM_LONG_WORM_TAIL], Mgender(mon)),
+ mon->mx, mon->my);
} else {
Sprintf(outbuf, "%s%s <%d,%d>",
mon->mtame ? "tame " : mon->mpeaceful ? "peaceful " : "",
pmname(mon->data, Mgender(mon)), mon->mx, mon->my);
if (mon->cham != NON_PM)
- Sprintf(eos(outbuf), "{%s}", pmname(&mons[mon->cham], Mgender(mon)));
+ Sprintf(eos(outbuf), "{%s}",
+ pmname(&mons[mon->cham], Mgender(mon)));
}
return outbuf;
}
{
boolean magic = (mode & MAGICENLIGHTENMENT) ? TRUE : FALSE;
int cap;
- char buf[BUFSZ], youtoo[BUFSZ];
+ char buf[BUFSZ], youtoo[BUFSZ], heldmon[BUFSZ];
boolean Riding = (u.usteed
/* if hero dies while dismounting, u.usteed will still
be set; we want to ignore steed in that situation */
} else
you_are(predicament, "");
} /* (u.utrap) */
+ heldmon[0] = '\0'; /* lint suppression */
+ if (u.ustuck) { /* includes u.uswallow */
+ Strcpy(heldmon, a_monnam(u.ustuck));
+ if (!strcmp(heldmon, "it")
+ && (!has_mgivenname(u.ustuck)
+ || strcmp(MGIVENNAME(u.ustuck), "it") != 0))
+ Strcpy(heldmon, "an unseen createure");
+ }
if (u.uswallow) { /* implies u.ustuck is non-Null */
Sprintf(buf, "%s by %s",
is_animal(u.ustuck->data) ? "swallowed" : "engulfed",
- a_monnam(u.ustuck));
+ heldmon);
if (dmgtype(u.ustuck->data, AD_DGST)) {
/* if final, death via digestion can be deduced by u.uswallow
still being True and u.uswldtim having been decremented to 0 */
int dx = u.ustuck->mx - u.ux, dy = u.ustuck->my - u.uy;
Sprintf(buf, "%s %s (%s)", ustick ? "holding" : "held by",
- a_monnam(u.ustuck), dxdy_to_dist_descr(dx, dy, TRUE));
+ heldmon, dxdy_to_dist_descr(dx, dy, TRUE));
you_are(buf, "");
}
if (Riding) {