From: cohrs Date: Wed, 21 Aug 2002 23:36:47 +0000 (+0000) Subject: R1049 followup X-Git-Tag: MOVE2GIT~2479 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d2a20cdf025f059a55662bf20f1de4931a0c4cb;p=nethack R1049 followup This patch handles the case of angering the town watch when breaking a wand of digging damages walls or doors. --- diff --git a/src/apply.c b/src/apply.c index 6e1e645dc..39c8ce5b6 100644 --- a/src/apply.c +++ b/src/apply.c @@ -2645,8 +2645,12 @@ do_break_wand(obj) if (obj->otyp == WAN_DIGGING) { if(dig_check(BY_OBJECT, FALSE, x, y)) { - if ((IS_WALL(levl[x][y].typ) || IS_DOOR(levl[x][y].typ)) && - *in_rooms(x,y,SHOPBASE)) shop_damage = TRUE; + if (IS_WALL(levl[x][y].typ) || IS_DOOR(levl[x][y].typ)) { + /* normally, pits and holes don't anger guards, but they + * do if it's a wall or door that's being dug */ + watch_dig((struct monst *)0, x, y, TRUE); + if (*in_rooms(x,y,SHOPBASE)) shop_damage = TRUE; + } digactualhole(x, y, BY_OBJECT, (rn2(obj->spe) < 3 || !Can_dig_down(&u.uz)) ? PIT : HOLE);