]> granicus.if.org Git - nethack/commitdiff
fix #H12 - unseen wand of striking becoming known
authornethack.rankin <nethack.rankin>
Thu, 5 Jan 2006 03:50:08 +0000 (03:50 +0000)
committernethack.rankin <nethack.rankin>
Thu, 5 Jan 2006 03:50:08 +0000 (03:50 +0000)
     From a bug report:  while hero
was blinded, monster zapped him with a not-yet-discovered wand of striking
and the wand type became discovered.  The report was slightly off; the
described case is already handled correctly.  However, if the zap happened
to hit a door, the wand would incorrectly be made known even when not seen.

doc/fixes34.4
src/muse.c

index 16f13a600b080ca80dc1cd5d02b9d005dbb3994f..91a52e92fa632cf1c0f22b4ca8a834262106ac44 100644 (file)
@@ -178,6 +178,7 @@ recognize "mindflayer" as an alternative spelling for "mind flayer"
 treat mattock as blunt object when forcing locks
 restore capability to force locks with wielded statue
 only count successful statue creations against the monster limit in sp_lev.c
+unseen wand of striking zapped by unseen monster became known if it hit a door
 
 
 Platform- and/or Interface-Specific Fixes
index 29677214a22301398bc1b607c25b78f1e52ec4a7..774b68ec8cb93c5d6c7792ade4baeaaa1d1c8419 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)muse.c     3.5     2005/12/05      */
+/*     SCCS Id: @(#)muse.c     3.5     2006/01/04      */
 /*     Copyright (C) 1990 by Ken Arromdee                         */
 /* NetHack may be freely redistributed.  See license for details.  */
 
@@ -1237,7 +1237,7 @@ struct obj *obj;                  /* 2nd arg to fhitm/fhito */
                        case WAN_LOCKING:
                        case WAN_STRIKING:
                            if (doorlock(obj, bhitpos.x, bhitpos.y)) {
-                               makeknown(obj->otyp);
+                               if (zap_oseen) makeknown(obj->otyp);
                                /* if a shop door gets broken, add it to
                                   the shk's fix list (no cost to player) */
                                if (levl[bhitpos.x][bhitpos.y].doormask ==