]> granicus.if.org Git - nethack/commitdiff
forcefighting an undetected monster
authorcohrs <cohrs>
Mon, 12 Aug 2002 05:57:40 +0000 (05:57 +0000)
committercohrs <cohrs>
Mon, 12 Aug 2002 05:57:40 +0000 (05:57 +0000)
Fix the case <Someone> saw, where forcefighting an undetected monster
would still leave it undetected, resulting in an odd message sequence unless
you kept forcefighting on the next turns.  This also left the monster at a
disadvantage, since it wouldn't fight back. Added a check to wakeup() for this
case, cutting off the possibilities and allowing the monster to fight back.

doc/fixes34.1
src/mon.c

index 12469a65a976fafec4b80a14312ab3a9319654a9..56bcdcf6d1127a4e19163e1e8eb5447c9f7a692f 100644 (file)
@@ -198,6 +198,7 @@ in town, watch should not allow trees to be cut down
 cancel chat direction cancels the chat
 prevent "the mimic looks better" on an unrecognized mimic hit with
        healing spell
+after forcefighting a concealed lurker, the lurker wouldn't fight back
 
 
 Platform- and/or Interface-Specific Fixes
index 5583aa743019bef4eb17c2cbef0442e867197d36..71769658ebf2e1d667ef1aba42c5dc3133a8f960 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -2065,6 +2065,10 @@ register struct monst *mtmp;
        mtmp->meating = 0;      /* assume there's no salvagable food left */
        setmangry(mtmp);
        if(mtmp->m_ap_type) seemimic(mtmp);
+       else if (flags.forcefight && !flags.mon_moving && mtmp->mundetected) {
+           mtmp->mundetected = 0;
+           newsym(mtmp->mx, mtmp->my);
+       }
 }
 
 /* Wake up nearby monsters. */