]> granicus.if.org Git - nethack/commitdiff
U77 - pits in drawbridges
authorcohrs <cohrs>
Sat, 19 Oct 2002 18:42:46 +0000 (18:42 +0000)
committercohrs <cohrs>
Sat, 19 Oct 2002 18:42:46 +0000 (18:42 +0000)
dighole dealt with holes in drawbridges, but digactualhole did not

doc/fixes34.1
src/dig.c

index 972840fb69640fac8af503b5166788ee296895ee..7887f1286c303f1b1e2057572bfa6b96d3c81ca8 100644 (file)
@@ -283,6 +283,7 @@ renamed debug commands: light sources -> lightsources,
 detect attempt to swap places with big pet through narrow opening
 stinking clouds in bones files do not get their ttl set reasonably
 stinking clouds in bones files may incorrectly set player_inside
+breaking wand of digging on a drawbridge shouldn't dig/hole a pit in the bridge
 
 
 Platform- and/or Interface-Specific Fixes
index 48fa802585dacf53e7d0f1ba85e67d6ef3e8d19f..6f92a7181d17216855ff0a234727e835e5ac5cbe 100644 (file)
--- a/src/dig.c
+++ b/src/dig.c
@@ -504,6 +504,13 @@ int ttyp;
            breaksink(x, y);
            return;
 #endif
+       } else if (lev->typ == DRAWBRIDGE_DOWN ||
+                  (is_drawbridge_wall(x, y) >= 0)) {
+           int bx = x, by = y;
+           /* if under the portcullis, the bridge is adjacent */
+           (void) find_drawbridge(&bx, &by);
+           destroy_drawbridge(bx, by);
+           return;
        }
 
        if (ttyp != PIT && !Can_dig_down(&u.uz)) {