From eba488996fe236b1d2c7be67331bd6db6037b9fe Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Wed, 18 Dec 2002 17:38:57 +0000 Subject: [PATCH] fix U193 - digging feedback for undiggable trees > Zapping a wand of digging at trees in ranger's quest gives a message > "rock glows then fades". There was code to handle this, but it didn't work due to the definition of IS_TREE making checks for STONE be sensitive to code ordering (STONE was checked first in this case). #define IS_TREE(typ) ((typ) == TREE || \ (level.flags.arboreal && (typ) == STONE)) Why is it defined this way? Shouldn't STONE simply be converted into TREE when arboreal levels get created? --- doc/fixes34.1 | 1 + src/dig.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 4e272586a..84ceaff6a 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -330,6 +330,7 @@ non-moving monster are not affected by liquid 'A' command behaved differently depending on menustyle when non-weapons were present in the quiver or alternate weapon inventory slots most cases of the hero dropping things need to check for dropping on an altar +zapping undiggable trees with wand or spell of dig gave feedback about rock Platform- and/or Interface-Specific Fixes diff --git a/src/dig.c b/src/dig.c index 90dab741e..1070d91e0 100644 --- a/src/dig.c +++ b/src/dig.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)dig.c 3.4 2002/04/06 */ +/* SCCS Id: @(#)dig.c 3.4 2002/12/18 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1228,6 +1228,13 @@ zap_dig() } else if (!Blind) pline_The("wall glows then fades."); break; + } else if (IS_TREE(room->typ)) { /* check trees before stone */ + if (!(room->wall_info & W_NONDIGGABLE)) { + room->typ = ROOM; + unblock_point(zx,zy); /* vision */ + } else if (!Blind) + pline_The("tree shudders but is unharmed."); + break; } else if (room->typ == STONE || room->typ == SCORR) { if (!(room->wall_info & W_NONDIGGABLE)) { room->typ = CORR; @@ -1235,13 +1242,6 @@ zap_dig() } else if (!Blind) pline_The("rock glows then fades."); break; - } else if (IS_TREE(room->typ)) { - if (!(room->wall_info & W_NONDIGGABLE)) { - room->typ = ROOM; - unblock_point(zx,zy); /* vision */ - } else if (!Blind) - pline_The("tree glows then fades."); - break; } } else if (IS_ROCK(room->typ)) { if (!may_dig(zx,zy)) break;