diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 7ed444fe6..d0a068fce 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1576 $ $NHDT-Date: 1763708572 2025/11/20 23:02:52 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1578 $ $NHDT-Date: 1764044196 2025/11/24 20:16:36 $ General Fixes and Modified Features ----------------------------------- @@ -1537,6 +1537,10 @@ travel couldn't find the vibrating square if it was covered by an object or travel would stop one step in front of known vibrating square like other traps fix bug which delayed burden changes due to monster actions (e.g. reverting to natural form due to damage, changing carry capacity) for one turn +on arboreal levels (Ranger quest) where STONE terrain is treated as TREE, an + object at a tree location would be described as "embedded in stone" +an item at an ordinary tree location, whether the level is arboreal or not, + would be described as itself with no mention of the tree Fixes to 3.7.0-x General Problems Exposed Via git Repository diff --git a/include/extern.h b/include/extern.h index a5a7a76e7..f86732ab4 100644 --- a/include/extern.h +++ b/include/extern.h @@ -1,4 +1,4 @@ -/* NetHack 3.7 extern.h $NHDT-Date: 1738638877 2025/02/03 19:14:37 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1476 $ */ +/* NetHack 3.7 extern.h $NHDT-Date: 1764044196 2025/11/24 20:16:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1509 $ */ /* Copyright (c) Steve Creps, 1988. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1657,6 +1657,7 @@ extern struct obj *mk_named_object(int, struct permonst *, coordxy, coordxy, const char *) ; extern struct obj *rnd_treefruit_at(coordxy, coordxy); +extern boolean is_treefruit(struct obj *) NONNULLARG1; extern void set_corpsenm(struct obj *, int) NONNULLARG1; extern long rider_revival_time(struct obj *, boolean) NONNULLARG1; extern void start_corpse_timeout(struct obj *) NONNULLARG1; diff --git a/src/mkobj.c b/src/mkobj.c index 77479c57b..7434981be 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mkobj.c $NHDT-Date: 1737528890 2025/01/21 22:54:50 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.315 $ */ +/* NetHack 3.7 mkobj.c $NHDT-Date: 1764044196 2025/11/24 20:16:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.326 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Derek S. Ray, 2015. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1979,6 +1979,18 @@ rnd_treefruit_at(coordxy x, coordxy y) return mksobj_at(ROLL_FROM(treefruits), x, y, TRUE, FALSE); } +/* for describing objects embedded in trees */ +boolean +is_treefruit(struct obj *otmp) +{ + int fruitidx; + + for (fruitidx = 0; fruitidx < SIZE(treefruits); ++fruitidx) + if (treefruits[fruitidx] == otmp->otyp) + return TRUE; + return FALSE; +} + /* create a stack of N gold pieces; never returns Null */ struct obj * mkgold(long amount, coordxy x, coordxy y) diff --git a/src/pager.c b/src/pager.c index 061937687..70eb1fe80 100644 --- a/src/pager.c +++ b/src/pager.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 pager.c $NHDT-Date: 1737013431 2025/01/15 23:43:51 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.287 $ */ +/* NetHack 3.7 pager.c $NHDT-Date: 1764044196 2025/11/24 20:16:36 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.292 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2018. */ /* NetHack may be freely redistributed. See license for details. */ @@ -394,11 +394,17 @@ look_at_object( otmp->where = OBJ_FREE; /* object_from_map set it to OBJ_FLOOR */ dealloc_obj(otmp), otmp = NULL; /* has no contents */ } - } else + } else { Strcpy(buf, something); /* sanity precaution */ + } if (otmp && otmp->where == OBJ_BURIED) Strcat(buf, " (buried)"); + /* check TREE before STONE due to level.flags.arboreal */ + else if (IS_TREE(levl[x][y].typ)) + /* "dangling": "hanging" could imply that it's growing on this tree */ + Snprintf(eos(buf), BUFSZ - strlen(buf), " %s in a tree", + (otmp && is_treefruit(otmp)) ? "dangling" : "stuck"); else if (levl[x][y].typ == STONE || levl[x][y].typ == SCORR) Strcat(buf, " embedded in stone"); else if (IS_WALL(levl[x][y].typ) || levl[x][y].typ == SDOOR)