]> granicus.if.org Git - nethack/commitdiff
debug enlightenment follow up
authornethack.allison <nethack.allison>
Tue, 1 Jun 2004 11:25:29 +0000 (11:25 +0000)
committernethack.allison <nethack.allison>
Tue, 1 Jun 2004 11:25:29 +0000 (11:25 +0000)
src/artifact.c
src/attrib.c

index ff115e964e1e0ee56ce3356b096fbae0f2f79dee..dafd7db816b315be8ddb230b223fd0617d4c2a9a 100644 (file)
@@ -1509,7 +1509,10 @@ long *abil;
        long wornbits;
        long wornmask = (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF |
                         W_WEP | W_QUIVER | W_SWAPWEP | W_ART | W_ARTI | W_AMUL |
-                        W_RINGL | W_RINGR | W_TOOL | W_SADDLE | W_BALL | W_CHAIN
+                        W_RINGL | W_RINGR | W_TOOL | W_BALL | W_CHAIN
+#ifdef STEED
+                        | W_SADDLE
+#endif
 #ifdef TOURIST
                         | W_ARMU
 #endif
@@ -1531,7 +1534,7 @@ long *abil;
                                return obj;
                }
            } else {
-               if (wornbits == (wornmask & obj->owornmask))
+               if (wornbits && wornbits == (wornmask & obj->owornmask))
                                return obj;
            }
        }
index a5fbbf14723aec7feffa4d7fd3288a2dcf6d453f..d1cf5ff72ae742bb2c078f586115d3b01a46fa5c 100644 (file)
@@ -677,6 +677,8 @@ from_what(propidx)
 int propidx;
 {
        struct obj *obj = (struct obj *)0;
+       int innate = is_innate(propidx);
+
        static char buf[BUFSZ];
 
        buf[0] = '\0';
@@ -685,9 +687,9 @@ int propidx;
         */
 #ifdef WIZARD
        if (wizard) {
-           if (is_innate(propidx) == 2)
+           if (innate == 2)
                Strcpy(buf, " because of your experience");
-           else if (is_innate(propidx) == 1)
+           else if (innate == 1)
                Strcpy(buf, " innately");
            else if (wizard && (obj = what_gives(&u.uprops[propidx].extrinsic)))
                Sprintf(buf, " because of %s",