far-look which swallowed

Change description of area outside of the swallow animation from
"interior of a monster" to "unreconnoitered".  For the animation
characters themselves, don't suppress the list of other screen
features which use the same character ('/' for wand and so on).
Add a data.base entry for "unreconnoitered" in case someone tries
to use it to look up an unfamiliar term.
This commit is contained in:
PatR
2016-05-20 17:24:18 -07:00
parent 1a47273ad5
commit 4e31180933
2 changed files with 39 additions and 29 deletions
+3
View File
@@ -5231,6 +5231,9 @@ unicorn horn
warm glow stage, then I use my horn to burn off any excess and warm glow stage, then I use my horn to burn off any excess and
keep me right there." keep me right there."
[ Unicorn Variations, by Roger Zelazny ] [ Unicorn Variations, by Roger Zelazny ]
unreconnoitered
Area of map which is beyond limited perception range when
underwater or engulfed by a monster.
valkyrie valkyrie
* valkyrie * valkyrie
The Valkyries were the thirteen choosers of the slain, the The Valkyries were the thirteen choosers of the slain, the
+36 -29
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 pager.c $NHDT-Date: 1455674291 2016/02/17 01:58:11 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.93 $ */ /* NetHack 3.6 pager.c $NHDT-Date: 1463790247 2016/05/21 00:24:07 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.98 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -363,7 +363,7 @@ char *buf, *monbuf;
(how & 4) ? "monster detection" : ""); (how & 4) ? "monster detection" : "");
} }
} else if (u.uswallow) { } else if (u.uswallow) {
/* when swallowed, all locations other than the hero are the monster, /* when swallowed, we're only called for spots adjacent to hero,
and blindness doesn't prevent hero from feeling what holds him */ and blindness doesn't prevent hero from feeling what holds him */
Sprintf(buf, "interior of %s", a_monnam(u.ustuck)); Sprintf(buf, "interior of %s", a_monnam(u.ustuck));
pm = u.ustuck->data; pm = u.ustuck->data;
@@ -648,14 +648,14 @@ int sym;
char *out_str; char *out_str;
const char **firstmatch; const char **firstmatch;
{ {
boolean need_to_look = FALSE; static const char mon_interior[] = "the interior of a monster",
int glyph = NO_GLYPH; unreconnoitered[] = "unreconnoitered";
static char look_buf[BUFSZ]; static char look_buf[BUFSZ];
char prefix[BUFSZ]; char prefix[BUFSZ];
int found = 0; /* count of matching syms found */ int i, alt_i, glyph = NO_GLYPH,
int i, alt_i; skipped_venom = 0, found = 0; /* count of matching syms found */
int skipped_venom = 0; boolean hit_trap, need_to_look = FALSE,
boolean hit_trap, submerged = (Underwater && !Is_waterlevel(&u.uz)); submerged = (Underwater && !Is_waterlevel(&u.uz));
const char *x_str; const char *x_str;
if (looked) { if (looked) {
@@ -676,27 +676,30 @@ const char **firstmatch;
*/ */
/* /*
* Special case: identifying from the screen and we're swallowed * Handle restricted vision range (limited to adjacent spots when
* or underwater and looking at something beyond radius 1 (vision * swallowed or underwater) cases first.
* limit in those circumstances) or we're swallowed and looking at *
* swallower's animation. (Note: 'self' will always be visible when * 3.6.0 listed anywhere on map, other than self, as "interior
* swallowed so we don't need special swallow handling for <ux,uy>. * of a monster" when swallowed, and non-adjacent water or
* non-water anywhere as "dark part of a room" when underwater.
* "unreconnoitered" is an attempt to convey "even if you knew
* what was there earlier, you don't know what is there in the
* current circumstance".
*
* (Note: 'self' will always be visible when swallowed so we don't
* need special swallow handling for <ux,uy>.
* Another note: for '#terrain' without monsters, u.uswallow and * Another note: for '#terrain' without monsters, u.uswallow and
* submerged will always both be False and skip this special case.) * submerged will always both be False and skip this code.)
*/ */
if (looked && (((u.uswallow || submerged) && distu(cc.x, cc.y) > 2) x_str = 0;
|| (u.uswallow && is_swallow_sym(sym)))) { if (looked && (u.uswallow || submerged) && distu(cc.x, cc.y) > 2) {
static const char mon_interior[] = "the interior of a monster", x_str = unreconnoitered;
unreconnoitered[] = "unreconnoitered"; need_to_look = FALSE;
} else if (looked && u.uswallow && is_swallow_sym(sym)) {
if (u.uswallow) { x_str = mon_interior;
x_str = mon_interior; need_to_look = TRUE; /* for specific monster type */
need_to_look = TRUE; }
} else { if (x_str) {
/* either not yet explored or suppressed due to extreme vision
limitation from being underwater; better terminology desired */
x_str = unreconnoitered;
}
/* we know 'found' is zero here, but guard against some other /* we know 'found' is zero here, but guard against some other
special case being inserted ahead of us someday */ special case being inserted ahead of us someday */
if (!found) { if (!found) {
@@ -706,7 +709,11 @@ const char **firstmatch;
} else { } else {
found += append_str(out_str, x_str); /* not 'an(x_str)' */ found += append_str(out_str, x_str); /* not 'an(x_str)' */
} }
goto didlook; /* for is_swallow_sym(), we want to list the current symbol's
other possibilities (wand for '/', throne for '\\', &c) so
don't jump to the end for the x_str==mon_interior case */
if (x_str == unreconnoitered)
goto didlook;
} }
/* Check for monsters */ /* Check for monsters */
@@ -809,7 +816,7 @@ const char **firstmatch;
} }
*firstmatch = x_str; *firstmatch = x_str;
found++; found++;
} else if (!u.uswallow && !(hit_trap && is_cmap_trap(i)) } else if (!(hit_trap && is_cmap_trap(i))
&& !(found >= 3 && is_cmap_drawbridge(i)) && !(found >= 3 && is_cmap_drawbridge(i))
/* don't mention vibrating square outside of Gehennom /* don't mention vibrating square outside of Gehennom
unless this happens to be one (hallucination?) */ unless this happens to be one (hallucination?) */