enhanced look-at-self
^X reports whether you're caught in a trap, but neither looking at yourself (via '//' or ';' or other getpos autodescribe) nor looking "here" (via ':') said anything about that. Make looking at yourself do so.
This commit is contained in:
+20
-4
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 pager.c $NHDT-Date: 1578137709 2020/01/04 11:35:09 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.179 $ */
|
/* NetHack 3.6 pager.c $NHDT-Date: 1578617964 2020/01/10 00:59:24 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.180 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
/*-Copyright (c) Robert Patrick Rankin, 2018. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -91,6 +91,23 @@ char *outbuf;
|
|||||||
Sprintf(eos(outbuf), ", mounted on %s", y_monnam(u.usteed));
|
Sprintf(eos(outbuf), ", mounted on %s", y_monnam(u.usteed));
|
||||||
if (u.uundetected || (Upolyd && U_AP_TYPE))
|
if (u.uundetected || (Upolyd && U_AP_TYPE))
|
||||||
mhidden_description(&g.youmonst, FALSE, eos(outbuf));
|
mhidden_description(&g.youmonst, FALSE, eos(outbuf));
|
||||||
|
if (Punished)
|
||||||
|
Sprintf(eos(outbuf), ", chained to %s",
|
||||||
|
uball ? ansimpleoname(uball) : "nothing?");
|
||||||
|
if (u.utrap) {
|
||||||
|
if (u.utraptype == TT_BURIEDBALL) {
|
||||||
|
Strcat(outbuf, ", tethered to something buried");
|
||||||
|
} else if (u.utraptype == TT_INFLOOR || u.utraptype == TT_LAVA) {
|
||||||
|
Sprintf(eos(outbuf), ", stuck in %s", the(surface(u.ux, u.uy)));
|
||||||
|
} else { /* bear trap, [spiked] pit, or web */
|
||||||
|
struct trap *t = t_at(u.ux, u.uy);
|
||||||
|
|
||||||
|
Strcat(outbuf, ", trapped");
|
||||||
|
if (t)
|
||||||
|
Sprintf(eos(outbuf), " in %s",
|
||||||
|
an(trapname(t->ttyp, FALSE)));
|
||||||
|
}
|
||||||
|
}
|
||||||
return outbuf;
|
return outbuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +123,7 @@ char *outbuf;
|
|||||||
boolean fakeobj, isyou = (mon == &g.youmonst);
|
boolean fakeobj, isyou = (mon == &g.youmonst);
|
||||||
int x = isyou ? u.ux : mon->mx, y = isyou ? u.uy : mon->my,
|
int x = isyou ? u.ux : mon->mx, y = isyou ? u.uy : mon->my,
|
||||||
glyph = (g.level.flags.hero_memory && !isyou) ? levl[x][y].glyph
|
glyph = (g.level.flags.hero_memory && !isyou) ? levl[x][y].glyph
|
||||||
: glyph_at(x, y);
|
: glyph_at(x, y);
|
||||||
|
|
||||||
*outbuf = '\0';
|
*outbuf = '\0';
|
||||||
if (M_AP_TYPE(mon) == M_AP_FURNITURE
|
if (M_AP_TYPE(mon) == M_AP_FURNITURE
|
||||||
@@ -144,8 +161,7 @@ char *outbuf;
|
|||||||
Strcat(outbuf, something);
|
Strcat(outbuf, something);
|
||||||
} else if (is_hider(mon->data)) {
|
} else if (is_hider(mon->data)) {
|
||||||
Sprintf(eos(outbuf), " on the %s",
|
Sprintf(eos(outbuf), " on the %s",
|
||||||
(is_flyer(mon->data) || mon->data->mlet == S_PIERCER)
|
ceiling_hider(mon->data) ? "ceiling"
|
||||||
? "ceiling"
|
|
||||||
: surface(x, y)); /* trapper */
|
: surface(x, y)); /* trapper */
|
||||||
} else {
|
} else {
|
||||||
if (mon->data->mlet == S_EEL && is_pool(x, y))
|
if (mon->data->mlet == S_EEL && is_pool(x, y))
|
||||||
|
|||||||
Reference in New Issue
Block a user