From: nhmall Date: Sat, 22 Sep 2018 03:34:00 +0000 (-0400) Subject: fix C343-331 mirrors & sleeping mon X-Git-Tag: NetHack-3.6.2_Released~194^2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e4ce066c90ded17ba0b03c5a0e9124570be45ee;p=nethack fix C343-331 mirrors & sleeping mon This outstanding bug was complicated slightly because the same code was used for a sleeping mon as for a paralyzed mon so message phrasing was called into question. Just flip the phrasing to be about what you are able to discern under those circumstances, which is very little, and don't have the sleeping or paralyzed monster react to the mirror. --- diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 443dfec50..24ed7f624 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -128,6 +128,8 @@ cancelled shapeshifter hit by polymorph magic will become uncancelled polymorph zap which creates a new long worm (or retains an old one via wizard mode monpolycontrol) can hit that worm multiple times (tail segments) wishing for "orange" could yield orange or orange colored gem/potion/spellbook +a sleeping or paralyzed mon would be frightened by its reflection when + applying a mirror Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/apply.c b/src/apply.c index 07269a358..61a9db19d 100644 --- a/src/apply.c +++ b/src/apply.c @@ -956,9 +956,20 @@ struct obj *obj; (void) rloc(mtmp, TRUE); } else if (!is_unicorn(mtmp->data) && !humanoid(mtmp->data) && (!mtmp->minvis || perceives(mtmp->data)) && rn2(5)) { - if (vis) - pline("%s is frightened by its reflection.", Monnam(mtmp)); - monflee(mtmp, d(2, 4), FALSE, FALSE); + boolean do_react = TRUE; + + if (mtmp->mfrozen) { + if (vis) + You("discern no obvious reaction from %s.", mon_nam(mtmp)); + else + You_feel("a bit silly gesturing the mirror in that direction."); + do_react = FALSE; + } + if (do_react) { + if (vis) + pline("%s is frightened by its reflection.", Monnam(mtmp)); + monflee(mtmp, d(2, 4), FALSE, FALSE); + } } else if (!Blind) { if (mtmp->minvis && !See_invisible) ;