*/
#define MAGIC_COOKIE 1000
+static void probe_objchain(struct obj *);
static boolean zombie_can_dig(xchar x, xchar y);
static void polyuse(struct obj *, int, int);
static void create_polymon(struct obj *, int);
}
}
+static void
+probe_objchain(struct obj *otmp)
+{
+ for (; otmp; otmp = otmp->nobj) {
+ otmp->dknown = 1; /* treat as "seen" */
+ if (Is_container(otmp) || otmp->otyp == STATUE) {
+ otmp->lknown = 1;
+ if (!SchroedingersBox(otmp))
+ otmp->cknown = 1;
+ }
+ }
+}
+
void
probe_monster(struct monst *mtmp)
{
- struct obj *otmp;
-
mstatusline(mtmp);
if (g.notonhead)
return; /* don't show minvent for long worm tail */
if (mtmp->minvent) {
- for (otmp = mtmp->minvent; otmp; otmp = otmp->nobj) {
- otmp->dknown = 1; /* treat as "seen" */
- if (Is_container(otmp) || otmp->otyp == STATUE) {
- otmp->lknown = 1;
- if (!SchroedingersBox(otmp))
- otmp->cknown = 1;
- }
- }
+ probe_objchain(mtmp->minvent);
(void) display_minventory(mtmp, MINV_ALL | MINV_NOLET | PICK_NONE,
(char *) 0);
} else {
case SPE_DETECT_UNSEEN:
case WAN_NOTHING:
break;
- case WAN_PROBING: {
- struct obj *otmp;
-
- for (otmp = g.invent; otmp; otmp = otmp->nobj) {
- otmp->dknown = 1;
- if (Is_container(otmp) || otmp->otyp == STATUE) {
- otmp->lknown = 1;
- if (!SchroedingersBox(otmp))
- otmp->cknown = 1;
- }
- }
+ case WAN_PROBING:
+ probe_objchain(g.invent);
update_inventory();
learn_it = TRUE;
ustatusline();
break;
- }
case SPE_STONE_TO_FLESH: {
struct obj *otmp, *onxt;
boolean didmerge;