fix #H12 - unseen wand of striking becoming known

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.
This commit is contained in:
nethack.rankin
2006-01-05 03:50:08 +00:00
parent ec1b3d3e6b
commit cfbc5194ae
2 changed files with 3 additions and 2 deletions

View 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 ==