]> granicus.if.org Git - nethack/commitdiff
detected hidden monsters
authornethack.rankin <nethack.rankin>
Thu, 22 Jun 2006 05:03:48 +0000 (05:03 +0000)
committernethack.rankin <nethack.rankin>
Thu, 22 Jun 2006 05:03:48 +0000 (05:03 +0000)
     From a bug report, attempting to attack
a hidden monster who is revealed by ongoing monster detection (blessed
potion or skilled spell) gave "wait!  there's a <monster> hiding there"
response and prevented the attack.  Make it behave the same as when the
hidden monster is revealed by telepathy; the monster comes out of hiding
and the hero's attack proceeds.

doc/fixes34.4
src/uhitm.c

index 290c22c734b93c2d054d00618a20fbafff3b8682..00f581816897450ea4aabd751a4d6568b250a726 100644 (file)
@@ -235,6 +235,8 @@ display the invisible monster glyph ('I') whenever an unseen monster forces
        poly'd hero out of hiding
 escape the deleted trap after performing the invocation while trapped
 use alternate phrasing when life drain attack affects non-living creature
+bypass "wait! there's a creature hidden there" when attacking a hidden monster
+       sensed by ongoing monster detection
 
 
 Platform- and/or Interface-Specific Fixes
index 6c5245accacde6163e8ac4d567f55f03d814be97..9ac52aa2ab5fec1f7c19bd345c70d1830d444922 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)uhitm.c    3.5     2006/03/29      */
+/*     SCCS Id: @(#)uhitm.c    3.5     2006/06/21      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -172,7 +172,8 @@ struct obj *wep;    /* uwep for attack(), null for kick_monster() */
                seemimic(mtmp);
                return(FALSE);
            }
-           if (!(Blind ? Blind_telepat : Unblind_telepat)) {
+           if (!((Blind ? Blind_telepat : Unblind_telepat) ||
+                   Detect_monsters)) {
                struct obj *obj;
 
                if (Blind || (is_pool(mtmp->mx,mtmp->my) && !Underwater))