]> granicus.if.org Git - nethack/commitdiff
blindfold (from r.g.r.n)
authorarromdee <arromdee>
Fri, 12 Mar 2004 03:57:20 +0000 (03:57 +0000)
committerarromdee <arromdee>
Fri, 12 Mar 2004 03:57:20 +0000 (03:57 +0000)
Someone suggested that if your vision is only blocked by a blindfold and it's
the blindfold that glows, you should be able to see it.

include/youprop.h
src/potion.c
src/pray.c

index 9050125161636ed0c4e38e11a6c7434223351dd2..44ed82bdc08adec7765d0ecd4ddcff30d66e5e28 100644 (file)
                 !(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 Sick                   u.uprops[SICK].intrinsic
 #define Stoned                 u.uprops[STONED].intrinsic
index c6b577329024bed74bc16729aba5e538cf8c1de3..55b38985a877246849e300c3bc6e3780d2c39d89 100644 (file)
@@ -1682,7 +1682,7 @@ dodip()
        }
        potion->in_use = TRUE;          /* assume it will be used up */
        if(potion->otyp == POT_WATER) {
-               boolean useeit = !Blind;
+               boolean useeit = !Blind || (obj == ublindf && Blindfolded_only);
                if (potion->blessed) {
                        if (obj->cursed) {
                                if (useeit)
index e2c82d2d78b2ebbb3c3f0995f78eacfe17d0e749..d1d9c90527e9bf59ecdc4407d76e4225329c935a 100644 (file)
@@ -396,7 +396,7 @@ decurse:
                        return;
                    }
                    uncurse(otmp);
-                   if (!Blind) {
+                   if (!Blind || (otmp == ublindf && Blindfolded_only)) {
                        pline("%s %s.", what ? what :
                                (const char *)Yobjnam2(otmp, "softly glow"),
                              hcolor(NH_AMBER));