detected hidden monsters

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.
This commit is contained in:
nethack.rankin
2006-06-22 05:03:48 +00:00
parent 8f92715098
commit c374583632
2 changed files with 5 additions and 2 deletions
+3 -2
View 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))