]> granicus.if.org Git - nethack/commitdiff
blind-from-birth fix
authorPatR <rankin@nethack.org>
Wed, 3 Jun 2015 00:30:16 +0000 (17:30 -0700)
committerPatR <rankin@nethack.org>
Wed, 3 Jun 2015 00:30:16 +0000 (17:30 -0700)
The Blindfolded_only macro didn't track u.uroleplay.blind so would
give a false positive if wearing a blindfold, not able to see due to
the blind option, and not afflicted with any other blindness factors.
Dipping a worn blindfold into holy or unholy water is supposed to
reveal a glow if that blindfold is the only reason for blindness but
the glow was described even when blind-from-birth.

There's no feedback at all when the glow isn't seen.  I'm punting on
that one.  (This change didn't introduce that, just added one extra
situation where it happens.)

include/youprop.h

index 5dc91b89d6649ff203ea3835dfd2872d9da29690..f1c1d9d00852e561fe8c4dc1d60de0befcc0c3fb 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 youprop.h       $NHDT-Date: 1432512778 2015/05/25 00:12:58 $  $NHDT-Branch: master $:$NHDT-Revision: 1.22 $ */
+/* NetHack 3.6 youprop.h       $NHDT-Date: 1433291407 2015/06/03 00:30:07 $  $NHDT-Branch: master $:$NHDT-Revision: 1.23 $ */
 /* Copyright (c) 1989 Mike Threepoint                            */
 /* NetHack may be freely redistributed.  See license for details. */
 
      && !(ublindf && ublindf->oartifact == ART_EYES_OF_THE_OVERWORLD))
 /* ...the Eyes operate even when you really are blind
     or don't have any eyes */
-#define Blindfolded_only                               \
-    (!Blinded && haseyes(youmonst.data) && Blindfolded \
-     && !(ublindf && ublindf->oartifact == ART_EYES_OF_THE_OVERWORLD))
-/* blind because of a blindfold, and *only* that */
+#define Blindfolded_only                                            \
+    (Blindfolded && ublindf->oartifact != ART_EYES_OF_THE_OVERWORLD \
+     && !u.uroleplay.blind && !Blinded && haseyes(youmonst.data))
+/* ...blind because of a blindfold, and *only* that */
 
 #define Sick u.uprops[SICK].intrinsic
 #define Stoned u.uprops[STONED].intrinsic