fix #H2397 - "<Mon> turns to flee" when paralyzed (trunk only)

From a bug report, a
monster incapable of moving could yield the message "<Mon> turns to flee!"
when hit by an attack which scared it.  I thought that something to fix
this had already been done, but that wasn't the case.  Now it will give
"The immobile <mon> seems to flinch" instead.  I'd rather use
  mon->data->mmove == 0 ? "immobile <mon>" :
    mon->paralyzed ? "paralyzed <mon>" : "sleeping <mon>"
but it presently isn't possible to distinguish between sleep, paralysis,
and being busy doning armor because mon->mfrozen is used for all three.
(I'm not going to worry about the busy case, even though "immobile" sounds
inaccurate for it.)

     Also, stethoscope and probing were suppressing "scared" after giving
"can't move", in order to reduce the chance of wrapping the top line.
This changes it to display both status conditions so that scared state
isn't hidden when the target is paralyzed or asleep (or busy).
This commit is contained in:
nethack.rankin
2011-08-20 00:22:20 +00:00
parent 612755bfb5
commit 8f07e5ee39
5 changed files with 30 additions and 30 deletions

View File

@@ -2622,12 +2622,8 @@ struct obj *otmp; /* source of flash */
}
if (mtmp->mhp > 0) {
if (!context.mon_moving) setmangry(mtmp);
if (tmp < 9 && !mtmp->isshk && rn2(4)) {
if (rn2(4))
monflee(mtmp, rnd(100), FALSE, TRUE);
else
monflee(mtmp, 0, FALSE, TRUE);
}
if (tmp < 9 && !mtmp->isshk && rn2(4))
monflee(mtmp, rn2(4) ? rnd(100) : 0, FALSE, TRUE);
mtmp->mcansee = 0;
mtmp->mblinded = (tmp < 3) ? 0 : rnd(1 + 50/tmp);
}