instead of just the one which got split off and lit
sometimes when hero is forced to buy an unpaid shop item its price changed
monster could attack with a polearm even after attempt to wield that failed
+sometimes got "you trip over it" after intervening messages following the
+ once which described "it"
Platform- and/or Interface-Specific Fixes
* a structure of their own elsewhere some day.
*/
int in_lava_effects; /* hack for Boots_off() */
+ int last_msg; /* indicator of last message player saw */
int purge_monsters; /* # of dead monsters still on fmon list */
int override_ID; /* true to force full identification of objects */
int suppress_price; /* controls doname() for unpaid objects */
#endif
extern NEARDATA struct instance_flags iflags;
+/* last_msg values */
+#define PLNMSG_UNKNOWN 0 /* arbitrary */
+#define PLNMSG_ONE_ITEM_HERE 1 /* "you see <single item> here" */
+
/* runmode options */
#define RUN_TPORT 0 /* don't update display until movement stops */
#define RUN_LEAP 1 /* update display every 7 steps */
{
char qbuf[QBUFSZ];
+ iflags.last_msg = PLNMSG_UNKNOWN; /* most recent pline is clobbered */
+
/* maximum acceptable length is QBUFSZ-1 */
if (strlen(query) < QBUFSZ)
return (*windowprocs.win_yn_function)(query, resp, def);
if (otmp->oinvis && !See_invisible) verb = "feel";
#endif
You("%s here %s.", verb, doname(otmp));
+ iflags.last_msg = PLNMSG_ONE_ITEM_HERE;
if (otmp->otyp == CORPSE) feel_cockatrice(otmp, FALSE);
} else {
char buf[BUFSZ];
}
if (!iflags.window_inited) {
raw_print(line);
+ iflags.last_msg = PLNMSG_UNKNOWN;
return;
}
#ifndef MAC
if (vision_full_recalc) vision_recalc(0);
if (u.ux) flush_screen(1); /* %% */
putstr(WIN_MESSAGE, 0, line);
+ /* this gets cleared after every pline message */
+ iflags.last_msg = PLNMSG_UNKNOWN;
}
/*VARARGS1*/
slip_or_trip()
{
struct obj *otmp = vobj_at(u.ux, u.uy);
- const char *what, *pronoun;
+ const char *what;
char buf[BUFSZ];
boolean on_foot = TRUE;
#ifdef STEED
name; if not, look for rocks to trip over; trip over
anonymous "something" if there aren't any rocks.
*/
- pronoun = otmp->quan == 1L ? "it" : Hallucination ? "they" : "them";
- what = !otmp->nexthere ? pronoun :
+ what = (iflags.last_msg == PLNMSG_ONE_ITEM_HERE) ?
+ ((otmp->quan == 1L) ? "it" : Hallucination ? "they" : "them") :
(otmp->dknown || !Blind) ? doname(otmp) :
((otmp = sobj_at(ROCK, u.ux, u.uy)) == 0 ? something :
(otmp->quan == 1L ? "a rock" : "some rocks"));