forcefighting an undetected monster

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.
This commit is contained in:
cohrs
2002-08-12 05:57:40 +00:00
parent 4d4444f07a
commit a8ac6f6cc6
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -198,6 +198,7 @@ in town, watch should not allow trees to be cut down
cancel chat direction cancels the chat cancel chat direction cancels the chat
prevent "the mimic looks better" on an unrecognized mimic hit with prevent "the mimic looks better" on an unrecognized mimic hit with
healing spell healing spell
after forcefighting a concealed lurker, the lurker wouldn't fight back
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+4
View File
@@ -2065,6 +2065,10 @@ register struct monst *mtmp;
mtmp->meating = 0; /* assume there's no salvagable food left */ mtmp->meating = 0; /* assume there's no salvagable food left */
setmangry(mtmp); setmangry(mtmp);
if(mtmp->m_ap_type) seemimic(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. */ /* Wake up nearby monsters. */