farlook vs "wall of lava"
Implement a couple of missing bits for wall of lava terrain. It was immune to being distorted by hallucination, unlike molten lava and wall of water. And the presence of wall of lava made molten lava, after being shortened to "lava", no longer be listed as something represented by the "}" character. I started to renumber S_water, which would eliminate some hackery from farlook's do_screen_description(), but that will require an EDITLEVEL increment and make it necessary to reorder/renumber the corresponding tiles so I stopped short. This adds NHDT tags to the first line of defsym.h.
This commit is contained in:
@@ -1987,6 +1987,9 @@ sometimes a repeat count from the preceding command carried over to most
|
|||||||
if peaceful monsters react when seeing hero attack a peaceful monster, don't
|
if peaceful monsters react when seeing hero attack a peaceful monster, don't
|
||||||
have quest guardians run away; also, quest leader only becomes angry
|
have quest guardians run away; also, quest leader only becomes angry
|
||||||
if the monster being attacked is a quest guardian
|
if the monster being attacked is a quest guardian
|
||||||
|
farlook of water/lava location listed wall of lava before molten lava; because
|
||||||
|
of that, lava was omitted ("molten" suppressed to reduce vebosity,
|
||||||
|
resulting in "lava" which got skipped as substring of "wall of lava")
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository
|
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
/* NetHack 3.7 defsym.h */
|
/* NetHack 3.7 defsym.h $NHDT-Date: 1720565306 2024/07/09 22:48:26 $ $NHDT-Branch: NetHack-3.7 $ $NHDT-Revision: 1.24 $ */
|
||||||
/* Copyright (c) 2016 by Pasi Kallinen */
|
/* Copyright (c) 2016 by Pasi Kallinen */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
This header is included in multiple places to produce
|
This header is included in multiple places to produce
|
||||||
different code depending on its use. Its purpose is to
|
different code depending on its use. Its purpose is to
|
||||||
@@ -131,6 +130,7 @@
|
|||||||
PCHAR2(35, '\\', S_throne, "throne", "opulent throne", HI_GOLD)
|
PCHAR2(35, '\\', S_throne, "throne", "opulent throne", HI_GOLD)
|
||||||
PCHAR( 36, '{', S_sink, "sink", CLR_WHITE)
|
PCHAR( 36, '{', S_sink, "sink", CLR_WHITE)
|
||||||
PCHAR( 37, '{', S_fountain, "fountain", CLR_BRIGHT_BLUE)
|
PCHAR( 37, '{', S_fountain, "fountain", CLR_BRIGHT_BLUE)
|
||||||
|
/* the S_pool symbol is used for both POOL terrain and MOAT terrain */
|
||||||
PCHAR2(38, '}', S_pool, "pool", "water", CLR_BLUE)
|
PCHAR2(38, '}', S_pool, "pool", "water", CLR_BLUE)
|
||||||
PCHAR( 39, '.', S_ice, "ice", CLR_CYAN)
|
PCHAR( 39, '.', S_ice, "ice", CLR_CYAN)
|
||||||
PCHAR( 40, '}', S_lava, "molten lava", CLR_RED)
|
PCHAR( 40, '}', S_lava, "molten lava", CLR_RED)
|
||||||
@@ -145,6 +145,8 @@
|
|||||||
"raised drawbridge", CLR_BROWN)
|
"raised drawbridge", CLR_BROWN)
|
||||||
PCHAR( 46, ' ', S_air, "air", CLR_CYAN)
|
PCHAR( 46, ' ', S_air, "air", CLR_CYAN)
|
||||||
PCHAR( 47, '#', S_cloud, "cloud", CLR_GRAY)
|
PCHAR( 47, '#', S_cloud, "cloud", CLR_GRAY)
|
||||||
|
/* the S_water symbol is used for WATER terrain: wall of water in the
|
||||||
|
dungeon and Plane of Water in the endgame */
|
||||||
PCHAR( 48, '}', S_water, "water", CLR_BRIGHT_BLUE)
|
PCHAR( 48, '}', S_water, "water", CLR_BRIGHT_BLUE)
|
||||||
/* end dungeon characters */
|
/* end dungeon characters */
|
||||||
/* */
|
/* */
|
||||||
|
|||||||
42
src/pager.c
42
src/pager.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 pager.c $NHDT-Date: 1713334816 2024/04/17 06:20:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.274 $ */
|
/* NetHack 3.7 pager.c $NHDT-Date: 1720565361 2024/07/09 22:49:21 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.275 $ */
|
||||||
/* 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. */
|
||||||
@@ -580,6 +580,8 @@ ice_descr(coordxy x, coordxy y, char *outbuf)
|
|||||||
} else {
|
} else {
|
||||||
long time_left = spot_time_left(x, y, MELT_ICE_AWAY);
|
long time_left = spot_time_left(x, y, MELT_ICE_AWAY);
|
||||||
|
|
||||||
|
/* other, real ice thickness/strength terminology exists but seems
|
||||||
|
to be too unfamiliar for nethack's use */
|
||||||
iflags.ice_rating = !time_left ? 0 /* solid */
|
iflags.ice_rating = !time_left ? 0 /* solid */
|
||||||
: (time_left > 1000L) ? 1 /* sturdy */
|
: (time_left > 1000L) ? 1 /* sturdy */
|
||||||
: (time_left > 100L) ? 2 /* steady */
|
: (time_left > 100L) ? 2 /* steady */
|
||||||
@@ -713,8 +715,9 @@ lookat(coordxy x, coordxy y, char *buf, char *monbuf)
|
|||||||
Is_airlevel(&u.uz) ? "cloudy area" : "fog/vapor cloud");
|
Is_airlevel(&u.uz) ? "cloudy area" : "fog/vapor cloud");
|
||||||
break;
|
break;
|
||||||
case S_pool:
|
case S_pool:
|
||||||
case S_water:
|
case S_water: /* was Plane of Water, now that or "wall of water" */
|
||||||
case S_lava:
|
case S_lava:
|
||||||
|
case S_lavawall:
|
||||||
case S_ice: /* for hallucination; otherwise defsyms[] would be fine */
|
case S_ice: /* for hallucination; otherwise defsyms[] would be fine */
|
||||||
Strcpy(buf, waterbody_name(x, y));
|
Strcpy(buf, waterbody_name(x, y));
|
||||||
break;
|
break;
|
||||||
@@ -1102,7 +1105,7 @@ add_cmap_descr(
|
|||||||
if (absidx == S_pool)
|
if (absidx == S_pool)
|
||||||
idx = S_pool;
|
idx = S_pool;
|
||||||
} else if (absidx == S_pool || idx == S_water
|
} else if (absidx == S_pool || idx == S_water
|
||||||
|| idx == S_lava || idx == S_ice) {
|
|| idx == S_lava || idx == S_lavawall || idx == S_ice) {
|
||||||
/* replace some descriptions (x_str) with waterbody_name() */
|
/* replace some descriptions (x_str) with waterbody_name() */
|
||||||
schar save_ltyp = levl[cc.x][cc.y].typ;
|
schar save_ltyp = levl[cc.x][cc.y].typ;
|
||||||
long save_prop = EHalluc_resistance;
|
long save_prop = EHalluc_resistance;
|
||||||
@@ -1121,26 +1124,34 @@ add_cmap_descr(
|
|||||||
it's not pool so must be one of water/lava/ice to get here */
|
it's not pool so must be one of water/lava/ice to get here */
|
||||||
levl[cc.x][cc.y].typ = (idx == S_water) ? WATER
|
levl[cc.x][cc.y].typ = (idx == S_water) ? WATER
|
||||||
: (idx == S_lava) ? LAVAPOOL
|
: (idx == S_lava) ? LAVAPOOL
|
||||||
: ICE;
|
: (idx == S_lavawall) ? LAVAWALL
|
||||||
|
: ICE;
|
||||||
}
|
}
|
||||||
EHalluc_resistance = 1;
|
EHalluc_resistance = 1;
|
||||||
Strcpy(mbuf, waterbody_name(cc.x, cc.y));
|
Strcpy(mbuf, waterbody_name(cc.x, cc.y));
|
||||||
EHalluc_resistance = save_prop;
|
EHalluc_resistance = save_prop;
|
||||||
levl[cc.x][cc.y].typ = save_ltyp;
|
levl[cc.x][cc.y].typ = save_ltyp;
|
||||||
|
|
||||||
/* shorten the feedback for farlook/quicklook: "a pool or ..." */
|
/* shorten the feedback for farlook/quicklook: "pool or ..." */
|
||||||
if (!strcmp(mbuf, "pool of water"))
|
if (!strcmp(mbuf, "pool of water"))
|
||||||
mbuf[4] = '\0';
|
mbuf[4] = '\0';
|
||||||
else if (!strcmp(mbuf, "molten lava"))
|
else if (!strcmp(mbuf, "molten lava"))
|
||||||
Strcpy(mbuf, "lava");
|
Strcpy(mbuf, "lava");
|
||||||
x_str = mbuf;
|
x_str = mbuf;
|
||||||
|
/* avoid "an ice" and so forth; "a pool", "a moat", and
|
||||||
|
"a wall of ..." are grammatically correct but make
|
||||||
|
"a pool or a moat or a wall of water" become too verbose */
|
||||||
article = !(!strncmp(x_str, "water", 5)
|
article = !(!strncmp(x_str, "water", 5)
|
||||||
|| !strncmp(x_str, "ice", 3)
|
|| !strncmp(x_str, "ice", 3)
|
||||||
|
|| !strncmp(x_str, "pool", 4)
|
||||||
|
|| !strncmp(x_str, "moat", 4)
|
||||||
|| !strncmp(x_str, "lava", 4)
|
|| !strncmp(x_str, "lava", 4)
|
||||||
|| !strncmp(x_str, "swamp", 5)
|
|| !strncmp(x_str, "swamp", 5)
|
||||||
|| !strncmp(x_str, "molten", 6)
|
|| !strncmp(x_str, "molten", 6)
|
||||||
|| !strncmp(x_str, "shallow", 7)
|
|| !strncmp(x_str, "shallow", 7)
|
||||||
|| !strncmp(x_str, "limitless", 9)
|
|| !strncmp(x_str, "limitless", 9)
|
||||||
|
|| !strncmp(x_str, "wall of lava", 12)
|
||||||
|
|| !strncmp(x_str, "wall of water", 13)
|
||||||
/* ice while hallucinating */
|
/* ice while hallucinating */
|
||||||
|| !strncmp(x_str, "frozen", 6)
|
|| !strncmp(x_str, "frozen", 6)
|
||||||
/* thawing ice ("solid ice", "thin ice", &c) */
|
/* thawing ice ("solid ice", "thin ice", &c) */
|
||||||
@@ -1379,15 +1390,24 @@ do_screen_description(
|
|||||||
for (hit_trap = FALSE, i = 0; i < MAXPCHARS; i++) {
|
for (hit_trap = FALSE, i = 0; i < MAXPCHARS; i++) {
|
||||||
/*
|
/*
|
||||||
* Index hackery: we want
|
* Index hackery: we want
|
||||||
* "a pool or a moat or a wall of water or lava"
|
* "pool or moat or wall of water or lava or wall of lava"
|
||||||
* rather than
|
* rather than
|
||||||
* "a pool or a moat or lava or a wall of water"
|
* "pool or moat or lava or wall of lava or wall of water"
|
||||||
* but S_lava comes before S_water so 'i' reaches it sooner.
|
* but S_lava comes before S_water so 'i' reaches it sooner.
|
||||||
* Use 'alt_i' for the rest of the loop to behave as if their
|
* Use 'alt_i' for the rest of the loop to behave as if their
|
||||||
* places were swapped.
|
* places were swapped.
|
||||||
|
* This was much simpler when it just exchanged water and lava.
|
||||||
|
* Now it rotates water to the first of (lava, lavawall, water)
|
||||||
|
* lava to the middle of (lava, lavawall, water), and lavawall
|
||||||
|
* to last of (lava, lavawall, water); other values are used
|
||||||
|
* as-is.
|
||||||
|
* If S_water (and corresponding tile) were renumbered, this
|
||||||
|
* hackery could go away.
|
||||||
*/
|
*/
|
||||||
alt_i = ((i != S_water && i != S_lava) ? i /* as-is */
|
alt_i = (i == S_lava) ? S_water /* do water first (of these 3) */
|
||||||
: (S_water + S_lava - i)); /* swap water and lava */
|
: (i == S_lavawall) ? S_lava /* process lava second */
|
||||||
|
: (i == S_water) ? S_lavawall /* and wall of lava third */
|
||||||
|
: i; /* other; handle in defsyms[] order */
|
||||||
x_str = defsyms[alt_i].explanation;
|
x_str = defsyms[alt_i].explanation;
|
||||||
/* cmap includes beams, shield effects, swallow boundaries, and
|
/* cmap includes beams, shield effects, swallow boundaries, and
|
||||||
explosions; skip all of those */
|
explosions; skip all of those */
|
||||||
@@ -1424,7 +1444,9 @@ do_screen_description(
|
|||||||
|
|
||||||
if (alt_i == S_altar || is_cmap_trap(alt_i)
|
if (alt_i == S_altar || is_cmap_trap(alt_i)
|
||||||
|| (hallucinate && (alt_i == S_water /* S_pool already done */
|
|| (hallucinate && (alt_i == S_water /* S_pool already done */
|
||||||
|| alt_i == S_lava || alt_i == S_ice))
|
|| alt_i == S_lava
|
||||||
|
|| alt_i == S_lavawall
|
||||||
|
|| alt_i == S_ice))
|
||||||
|| alt_i == S_engroom || alt_i == S_engrcorr
|
|| alt_i == S_engroom || alt_i == S_engrcorr
|
||||||
|| alt_i == S_grave) /* 'need_to_look' to report engraving */
|
|| alt_i == S_grave) /* 'need_to_look' to report engraving */
|
||||||
need_to_look = TRUE;
|
need_to_look = TRUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user