]> granicus.if.org Git - nethack/commitdiff
engraving vs drawbridge
authornethack.rankin <nethack.rankin>
Fri, 15 Dec 2006 03:11:14 +0000 (03:11 +0000)
committernethack.rankin <nethack.rankin>
Fri, 15 Dec 2006 03:11:14 +0000 (03:11 +0000)
     From the newsgroup:  ``Something is engraved here on the water.''
An engraving written on a lowered drawbridge would be transfered to the
underlying terrain when the bridge was raised.  The coverse was also true;
if you plugged the moat and then engraved on the ground, that engraving
would remain visible--and touchable if blind--when the bridge was lowered
to cover its spot.  Rather than try to handle two different engravings at
the same coordinates (with one of those two changing locations when the
bridge is raised or lowered), this just wipes out any engraving at both
span and portcullis locations whenever the bridge state changes, like is
done for traps.

doc/fixes34.4
src/dbridge.c

index e9bad346256462ce76c6c0eab20d1fde7438a86e..6bddaaafbbef12212dc280eb169897db840ba546 100644 (file)
@@ -287,6 +287,7 @@ don't give erroneous "<mon> disppears" message for hero poly'd into quantum
        mechanic who hits engulfer while swallowed and blinded
 feedback from casting spell of protection was wrong in some situations
 can't engrave on floor while inside solid rock, wall, or closed door
+remove engravings at drawbridge location when it is opened, closed, or wrecked
 
 
 Platform- and/or Interface-Specific Fixes
index 48d421beccca1f1513ffa74c755fb7e484fc135b..3949e4d6d864969c5de6b6df8d183f949308b8ab 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)dbridge.c  3.5     2005/12/05      */
+/*     SCCS Id: @(#)dbridge.c  3.5     2006/12/13      */
 /*     Copyright (c) 1989 by Jean-Christophe Collet              */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -8,6 +8,13 @@
  *
  * Added comprehensive monster-handling, and the "entity" structure to
  * deal with players as well. - 11/89
+ *
+ * Any traps and/or engravings at either the portcullis or span location
+ * are destroyed whenever the bridge is lowered, raised, or destroyed.
+ * (Engraving handling could be extended to flag whether an engraving on
+ * the DB_UNDER surface is hidden by the lowered bridge, or one on the
+ * bridge itself is hidden because the bridge has been raised, but that
+ * seems like an awful lot of effort for very little gain.)
  */
 
 #include "hack.h"
@@ -778,6 +785,8 @@ int x,y;
        delallobj(x2, y2);
        if ((t = t_at(x, y)) != 0) deltrap(t);
        if ((t = t_at(x2, y2)) != 0) deltrap(t);
+       del_engr_at(x, y);
+       del_engr_at(x2, y2);
        newsym(x, y);
        newsym(x2, y2);
        block_point(x2,y2);     /* vision */
@@ -817,6 +826,8 @@ int x,y;
        delallobj(x, y);
        if ((t = t_at(x, y)) != 0) deltrap(t);
        if ((t = t_at(x2, y2)) != 0) deltrap(t);
+       del_engr_at(x, y);
+       del_engr_at(x2, y2);
        newsym(x, y);
        newsym(x2, y2);
        unblock_point(x2,y2);   /* vision */
@@ -882,6 +893,8 @@ int x,y;
        lev2->doormask = D_NODOOR;
        if ((t = t_at(x, y)) != 0) deltrap(t);
        if ((t = t_at(x2, y2)) != 0) deltrap(t);
+       del_engr_at(x, y);
+       del_engr_at(x2, y2);
        for (i = rn2(6); i > 0; --i) {  /* scatter some debris */
            /* doesn't matter if we happen to pick <x,y2> or <x2,y>;
               since drawbridges are never placed diagonally, those