debug enlightenment follow up

This commit is contained in:
nethack.allison
2004-06-01 11:25:29 +00:00
parent e523b6accc
commit 50e157d1db
2 changed files with 9 additions and 4 deletions

View 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;
}
}

View 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",