]> granicus.if.org Git - nethack/commitdiff
fix C343-331 mirrors & sleeping mon
authornhmall <nhmall@nethack.org>
Sat, 22 Sep 2018 03:34:00 +0000 (23:34 -0400)
committernhmall <nhmall@nethack.org>
Sat, 22 Sep 2018 03:34:00 +0000 (23:34 -0400)
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.

doc/fixes36.2
src/apply.c

index 443dfec50e7ba6c7425a3ae38233a41e786540bf..24ed7f6245cba80d4fa222e7071dd6c05484ba3c 100644 (file)
@@ -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
index 07269a358bd216ccd6177305eeb67485b66b8d76..61a9db19dba1870db385c830601357e0cdfc11ca 100644 (file)
@@ -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)
             ;