]> granicus.if.org Git - nethack/commitdiff
blinded/unblinded message every turn while engulfed wearing the Eyes
authorcohrs <cohrs>
Thu, 21 Aug 2003 19:10:06 +0000 (19:10 +0000)
committercohrs <cohrs>
Thu, 21 Aug 2003 19:10:06 +0000 (19:10 +0000)
I think this was From a bug report, but I cannot find the report
anymore.  Perhaps I noticed it while doing something else.  In any case,
every turn you're engulfed in, say, a dust vortex wearing the Eyes of the
Overworld, you get the "can't see"/"vision clears" message pair.  This
patch modifies the behavior to only display this the first turn.  Other code,
partially related to B01003, already deals with the puton-remove cases.
Since B01003 is only in the trunk, this fix is also only in the trunk.

src/mhitu.c

index 724bc36c73fed8c7ad19e2d8a1f94ee12b27438d..039e6dc3a772f6116fcc1f28ff46d1556886233f 100644 (file)
@@ -1724,9 +1724,10 @@ gulpmu(mtmp, mattk)      /* monster swallows you, or damage if u.uswallow */
                case AD_BLND:
                    if (can_blnd(mtmp, &youmonst, mattk->aatyp, (struct obj*)0)) {
                        if(!Blind) {
-                           You_cant("see in here!");
+                           long was_blinded = Blinded;
+                           if (!Blinded) You_cant("see in here!");
                            make_blinded((long)tmp,FALSE);
-                           if (!Blind) Your(vision_clears);
+                           if (!was_blinded && !Blind) Your(vision_clears);
                        } else
                            /* keep him blind until disgorged */
                            make_blinded(Blinded+1,FALSE);