R1049 followup

This patch handles the case of angering the town watch when breaking a wand
of digging damages walls or doors.
This commit is contained in:
cohrs
2002-08-21 23:36:47 +00:00
parent b3417655da
commit 2d2a20cdf0

View File

@@ -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);