removing a ring might relearn what it is after amnesia
sleeping shopkeeper shouldn't talk to digging player
give more specific feedback when dipping unicorn horns into potions
+can see self via infravision or ESP or monster detection when invisible
Platform- and/or Interface-Specific Fixes
/*
* canseeself()
+ * senseself()
*
* This returns true if the hero can see her/himself.
*
* invisible. If not, then we don't need the check.
*/
#define canseeself() (Blind || u.uswallow || (!Invisible && !u.uundetected))
-
+#define senseself() (canseeself() || Infravision || Unblind_telepat || \
+ Detect_monsters)
/*
* random_monster()
* _if_ the hero can be seen have already been done.
*/
#ifdef STEED
-#define display_self() \
- show_glyph(u.ux, u.uy, \
- (u.usteed && mon_visible(u.usteed)) ? \
- ridden_mon_to_glyph(u.usteed) : \
- youmonst.m_ap_type == M_AP_NOTHING ? \
- hero_glyph : \
- youmonst.m_ap_type == M_AP_FURNITURE ? \
- cmap_to_glyph(youmonst.mappearance) : \
- youmonst.m_ap_type == M_AP_OBJECT ? \
- objnum_to_glyph(youmonst.mappearance) : \
- /* else M_AP_MONSTER */ monnum_to_glyph(youmonst.mappearance))
+#define maybe_display_usteed (u.usteed && mon_visible(u.usteed)) ? \
+ ridden_mon_to_glyph(u.usteed) :
#else
+#define maybe_display_usteed /* empty */
+#endif
+
#define display_self() \
show_glyph(u.ux, u.uy, \
+ maybe_display_usteed /* else */ \
youmonst.m_ap_type == M_AP_NOTHING ? \
- hero_glyph : \
+ hero_glyph : \
youmonst.m_ap_type == M_AP_FURNITURE ? \
cmap_to_glyph(youmonst.mappearance) : \
youmonst.m_ap_type == M_AP_OBJECT ? \
objnum_to_glyph(youmonst.mappearance) : \
/* else M_AP_MONSTER */ monnum_to_glyph(youmonst.mappearance))
-#endif
/*
* A glyph is an abstraction that represents a _unique_ monster, object,
-/* SCCS Id: @(#)display.c 3.4 2000/07/27 */
+/* SCCS Id: @(#)display.c 3.4 2002/10/03 */
/* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */
/* and Dave Cohrs, 1990. */
/* NetHack may be freely redistributed. See license for details. */
return;
}
if (x == u.ux && y == u.uy) {
- if (canseeself()) {
+ if (senseself()) {
_map_location(x,y,0); /* map *under* self */
display_self();
} else
if (x == u.ux && y == u.uy) {
feel_location(u.ux, u.uy); /* forces an update */
- if (canseeself()) display_self();
+ if (senseself()) display_self();
}
else if ((mon = m_at(x,y))
&& ((see_it = (tp_sensemon(mon) || MATCH_WARN_OF_MON(mon)
see_monsters()
{
register struct monst *mon;
+
for (mon = fmon; mon; mon = mon->nmon) {
if (DEADMONSTER(mon)) continue;
newsym(mon->mx,mon->my);
if (mon->wormno) see_wsegs(mon);
}
+#ifdef STEED
+ /* when mounted, hero's location gets caught by monster loop */
+ if (!u.usteed)
+#endif
+ newsym(u.ux, u.uy);
}
/*
set_mimic_blocking()
{
register struct monst *mon;
- for (mon = fmon; mon; mon = mon->nmon)
- if(!DEADMONSTER(mon) && mon->minvis &&
+
+ for (mon = fmon; mon; mon = mon->nmon) {
+ if (DEADMONSTER(mon)) continue;
+ if (mon->minvis &&
((mon->m_ap_type == M_AP_FURNITURE &&
- (mon->mappearance == S_vcdoor || mon->mappearance == S_hcdoor))||
+ (mon->mappearance == S_vcdoor || mon->mappearance == S_hcdoor)) ||
(mon->m_ap_type == M_AP_OBJECT && mon->mappearance == BOULDER))) {
if(See_invisible)
block_point(mon->mx, mon->my);
else
unblock_point(mon->mx, mon->my);
}
+ }
}
/*
-/* SCCS Id: @(#)pager.c 3.4 2002/07/25 */
+/* SCCS Id: @(#)pager.c 3.4 2002/10/03 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
buf[0] = monbuf[0] = 0;
glyph = glyph_at(x,y);
- if (u.ux == x && u.uy == y && canseeself()) {
+ if (u.ux == x && u.uy == y && senseself()) {
char race[QBUFSZ];
/* if not polymorphed, show both the role and the race */
Strcat(buf, steedbuf);
}
#endif
+ /* When you see yourself normally, no explanation is appended
+ (even if you could also see yourself via other means).
+ Sensing self while blind or swallowed is treated as if it
+ were by normal vision (cf canseeself()). */
+ if ((Invisible || u.uundetected) && !Blind && !u.uswallow) {
+ unsigned how = 0;
+
+ if (Infravision) how |= 1;
+ if (Unblind_telepat) how |= 2;
+ if (Detect_monsters) how |= 4;
+
+ if (how)
+ Sprintf(eos(buf), " [seen: %s%s%s%s%s]",
+ (how & 1) ? "infravision" : "",
+ /* add comma if telep and infrav */
+ ((how & 3) > 2) ? ", " : "",
+ (how & 2) ? "telepathy" : "",
+ /* add comma if detect and (infrav or telep or both) */
+ ((how & 7) > 4) ? ", " : "",
+ (how & 4) ? "monster detection" : "");
+ }
} else if (u.uswallow) {
/* all locations when swallowed other than the hero are the monster */
Sprintf(buf, "interior of %s",