<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff -Ndru nethack-3.4.3/include/extern.h nethack-patched/include/extern.h
--- nethack-3.4.3/include/extern.h	2006-12-04 21:58:58.000000000 +0000
+++ nethack-patched/include/extern.h	2006-12-04 23:05:14.000000000 +0000
@@ -563,6 +563,7 @@
 E boolean NDECL(can_reach_floor);
 E const char *FDECL(surface, (int,int));
 E const char *FDECL(ceiling, (int,int));
+E const char *FDECL(surroundings, (int,int));
 E struct engr *FDECL(engr_at, (XCHAR_P,XCHAR_P));
 #ifdef ELBERETH
 E int FDECL(sengr_at, (const char *,XCHAR_P,XCHAR_P));
diff -Ndru nethack-3.4.3/src/dig.c nethack-patched/src/dig.c
--- nethack-3.4.3/src/dig.c	2006-12-04 21:59:02.000000000 +0000
+++ nethack-patched/src/dig.c	2006-12-07 22:12:46.000000000 +0000
@@ -262,6 +262,8 @@
 	    case 1:
 		pline("Bang!  You hit with the broad side of %s!",
 		      the(xname(uwep)));
+		if (digging.down)
+		    wipe_engr_at(u.ux, u.uy, 3);
 		break;
 	    default: Your("swing misses its mark.");
 		break;
@@ -282,6 +284,9 @@
 		    return(0);	/* done with digging */
 		}
 
+		/* Just trying to dig will erase engravings. */
+		wipe_engr_at(u.ux, u.uy, 5);
+
 		if (digging.effort &lt;= 50 ||
 		    ((ttmp = t_at(dpx,dpy)) != 0 &amp;&amp;
 			(ttmp-&gt;ttyp == PIT || ttmp-&gt;ttyp == SPIKED_PIT ||
diff -Ndru nethack-3.4.3/src/engrave.c nethack-patched/src/engrave.c
--- nethack-3.4.3/src/engrave.c	2006-12-04 21:59:02.000000000 +0000
+++ nethack-patched/src/engrave.c	2006-12-04 23:12:04.000000000 +0000
@@ -205,6 +205,39 @@
 	return what;
 }
 
+const char *
+surroundings(x, y)
+register int x, y;
+{
+	register struct rm *lev = &amp;levl[x][y];
+        int is_you = ((x == u.ux) &amp;&amp; (y == u.uy));
+
+	if (is_you &amp;&amp; u.uswallow) {
+	    if (u.ustuck-&gt;data == &amp;mons[PM_FOG_CLOUD])
+		return "fog";
+	    else if (u.ustuck-&gt;data == &amp;mons[PM_DUST_VORTEX])
+		return "whirling dust";
+	    else if (u.ustuck-&gt;data == &amp;mons[PM_ICE_VORTEX])
+		return "hail of ice";
+	    else if (u.ustuck-&gt;data == &amp;mons[PM_ENERGY_VORTEX])
+		return "raw energy";
+	    else if (u.ustuck-&gt;data == &amp;mons[PM_STEAM_VORTEX])
+		return "steam";
+	    else if (u.ustuck-&gt;data == &amp;mons[PM_FIRE_VORTEX])
+		return "flame";
+	    else return "space";
+	}
+	else if (IS_AIR(lev-&gt;typ) &amp;&amp; Is_airlevel(&amp;u.uz))
+	    return "air";
+	else if (Is_waterlevel(&amp;u.uz) ||
+                 (is_you &amp;&amp; u.uinwater))
+	    return "water";
+	else if (Is_earthlevel(&amp;u.uz) || (IS_ROCK(lev-&gt;typ)) ||
+		 (is_you &amp;&amp; u.utrap &amp;&amp; u.utraptype == TT_INFLOOR))
+	    return "rock";
+        else return "air";
+}
+
 struct engr *
 engr_at(x, y)
 xchar x, y;
@@ -483,6 +516,9 @@
 	} else if (is_lava(u.ux, u.uy)) {
 		You_cant("write on the lava!");
 		return(0);
+	} else if (Underwater) {
+		You_cant("write underwater!");
+		return(0);
 	} else if (is_pool(u.ux,u.uy) || IS_FOUNTAIN(levl[u.ux][u.uy].typ)) {
 		You_cant("write on the water!");
 		return(0);
@@ -491,6 +527,10 @@
 		You_cant("write in thin air!");
 		return(0);
 	}
+	if (IS_ROCK(levl[u.ux][u.uy].typ)) {
+		You_cant("write in solid rock!");
+		return(0);
+	}
 	if (cantwield(youmonst.data)) {
 		You_cant("even hold anything!");
 		return(0);
diff -Ndru nethack-3.4.3/src/spell.c nethack-patched/src/spell.c
--- nethack-3.4.3/src/spell.c	2006-12-04 21:59:04.000000000 +0000
+++ nethack-patched/src/spell.c	2006-12-04 23:04:42.000000000 +0000
@@ -665,9 +665,7 @@
 			      hgolden);
 		else
 		    pline_The("%s around you begins to shimmer with %s haze.",
-			/*[ what about being inside solid rock while polyd? ]*/
-			(Underwater || Is_waterlevel(&amp;u.uz)) ? "water" : "air",
-			      an(hgolden));
+			      surroundings(u.ux, u.uy), an(hgolden));
 	    }
 	    u.uspellprot += gain;
 	    u.uspmtime =
</pre></body></html>