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?
This commit is contained in:
@@ -330,6 +330,7 @@ non-moving monster are not affected by liquid
|
|||||||
'A' command behaved differently depending on menustyle when non-weapons were
|
'A' command behaved differently depending on menustyle when non-weapons were
|
||||||
present in the quiver or alternate weapon inventory slots
|
present in the quiver or alternate weapon inventory slots
|
||||||
most cases of the hero dropping things need to check for dropping on an altar
|
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
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
16
src/dig.c
16
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. */
|
/* 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. */
|
||||||
|
|
||||||
@@ -1228,6 +1228,13 @@ zap_dig()
|
|||||||
} else if (!Blind)
|
} else if (!Blind)
|
||||||
pline_The("wall glows then fades.");
|
pline_The("wall glows then fades.");
|
||||||
break;
|
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) {
|
} else if (room->typ == STONE || room->typ == SCORR) {
|
||||||
if (!(room->wall_info & W_NONDIGGABLE)) {
|
if (!(room->wall_info & W_NONDIGGABLE)) {
|
||||||
room->typ = CORR;
|
room->typ = CORR;
|
||||||
@@ -1235,13 +1242,6 @@ zap_dig()
|
|||||||
} else if (!Blind)
|
} else if (!Blind)
|
||||||
pline_The("rock glows then fades.");
|
pline_The("rock glows then fades.");
|
||||||
break;
|
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)) {
|
} else if (IS_ROCK(room->typ)) {
|
||||||
if (!may_dig(zx,zy)) break;
|
if (!may_dig(zx,zy)) break;
|
||||||
|
|||||||
Reference in New Issue
Block a user