diff --git a/doc/fixes35.0 b/doc/fixes35.0 index fad5c600c..2a91f7bcb 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -306,6 +306,8 @@ attempting to move direction 'u' as a grid bug performed #untrap command; the other diagonals reported "unknown command" instead of "you can't" mimic posing as statue or corpse now picks and maintains particular monst type when levitating, don't show '>' as a likely direction for digging +poly'd or mimicking hero who was hidden from monsters would still be treated + as a normal target for their ranged attacks Platform- and/or Interface-Specific Fixes diff --git a/src/mthrowu.c b/src/mthrowu.c index 00e9b2d06..2854cb6a2 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)mthrowu.c 3.5 2007/12/17 */ +/* SCCS Id: @(#)mthrowu.c 3.5 2009/02/17 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -753,9 +753,16 @@ boolean lined_up(mtmp) /* is mtmp in position to use ranged attack? */ register struct monst *mtmp; { - boolean ignore_boulders = (throws_rocks(mtmp->data) || - m_carrying(mtmp, WAN_STRIKING)); + boolean ignore_boulders; + /* hero concealment usually trumps monst awareness of being lined up */ + if (Upolyd && rn2(25) && + (u.uundetected || (youmonst.m_ap_type != M_AP_NOTHING && + youmonst.m_ap_type != M_AP_MONSTER))) + return FALSE; + + ignore_boulders = (throws_rocks(mtmp->data) || + m_carrying(mtmp, WAN_STRIKING)); return linedup(mtmp->mux, mtmp->muy, mtmp->mx, mtmp->my, ignore_boulders ? 1 : 2); }