diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 1bb0acfe1..0db220b28 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 have quest guardians run away; also, quest leader only becomes angry 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 diff --git a/include/defsym.h b/include/defsym.h index f51fd96ae..3370f6d2d 100644 --- a/include/defsym.h +++ b/include/defsym.h @@ -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 */ /* NetHack may be freely redistributed. See license for details. */ - /* This header is included in multiple places to produce different code depending on its use. Its purpose is to @@ -131,6 +130,7 @@ PCHAR2(35, '\\', S_throne, "throne", "opulent throne", HI_GOLD) PCHAR( 36, '{', S_sink, "sink", CLR_WHITE) 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) PCHAR( 39, '.', S_ice, "ice", CLR_CYAN) PCHAR( 40, '}', S_lava, "molten lava", CLR_RED) @@ -145,6 +145,8 @@ "raised drawbridge", CLR_BROWN) PCHAR( 46, ' ', S_air, "air", CLR_CYAN) 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) /* end dungeon characters */ /* */ diff --git a/src/pager.c b/src/pager.c index c1536421e..05078f7a4 100644 --- a/src/pager.c +++ b/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) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -580,6 +580,8 @@ ice_descr(coordxy x, coordxy y, char *outbuf) } else { 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 */ : (time_left > 1000L) ? 1 /* sturdy */ : (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"); break; case S_pool: - case S_water: + case S_water: /* was Plane of Water, now that or "wall of water" */ case S_lava: + case S_lavawall: case S_ice: /* for hallucination; otherwise defsyms[] would be fine */ Strcpy(buf, waterbody_name(x, y)); break; @@ -1102,7 +1105,7 @@ add_cmap_descr( if (absidx == S_pool) idx = S_pool; } 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() */ schar save_ltyp = levl[cc.x][cc.y].typ; 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 */ levl[cc.x][cc.y].typ = (idx == S_water) ? WATER : (idx == S_lava) ? LAVAPOOL - : ICE; + : (idx == S_lavawall) ? LAVAWALL + : ICE; } EHalluc_resistance = 1; Strcpy(mbuf, waterbody_name(cc.x, cc.y)); EHalluc_resistance = save_prop; 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")) mbuf[4] = '\0'; else if (!strcmp(mbuf, "molten lava")) Strcpy(mbuf, "lava"); 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) || !strncmp(x_str, "ice", 3) + || !strncmp(x_str, "pool", 4) + || !strncmp(x_str, "moat", 4) || !strncmp(x_str, "lava", 4) || !strncmp(x_str, "swamp", 5) || !strncmp(x_str, "molten", 6) || !strncmp(x_str, "shallow", 7) || !strncmp(x_str, "limitless", 9) + || !strncmp(x_str, "wall of lava", 12) + || !strncmp(x_str, "wall of water", 13) /* ice while hallucinating */ || !strncmp(x_str, "frozen", 6) /* thawing ice ("solid ice", "thin ice", &c) */ @@ -1379,15 +1390,24 @@ do_screen_description( for (hit_trap = FALSE, i = 0; i < MAXPCHARS; i++) { /* * 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 - * "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. * Use 'alt_i' for the rest of the loop to behave as if their * 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 */ - : (S_water + S_lava - i)); /* swap water and lava */ + alt_i = (i == S_lava) ? S_water /* do water first (of these 3) */ + : (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; /* cmap includes beams, shield effects, swallow boundaries, and explosions; skip all of those */ @@ -1424,7 +1444,9 @@ do_screen_description( if (alt_i == S_altar || is_cmap_trap(alt_i) || (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_grave) /* 'need_to_look' to report engraving */ need_to_look = TRUE;