diff --git a/doc/fixes34.1 b/doc/fixes34.1 index d86b57b79..f2315110f 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -245,6 +245,8 @@ elevate the trouble priority of any cursed item which is preventing removal starving pets will eat more aggressively when a pet starves to death, say so instead of just "Fido dies." starved pet raised from dead shouldn't immediately starve again +skilled spell of detected treasure wasn't acting like blessed potion of + object detection (from Roderick Schertler) Platform- and/or Interface-Specific Fixes diff --git a/src/detect.c b/src/detect.c index 325d8c59b..ae30ecb8f 100644 --- a/src/detect.c +++ b/src/detect.c @@ -391,7 +391,7 @@ register struct obj *sobj; } /* - * Used for scrolls, potions, and crystal balls. Returns: + * Used for scrolls, potions, spells, and crystal balls. Returns: * * 1 - nothing was detected * 0 - something was detected @@ -403,8 +403,9 @@ int class; /* an object class, 0 for all */ { register int x, y; int is_cursed = (detector && detector->cursed); - int do_dknown = - (detector && detector->oclass == POTION_CLASS && detector->blessed); + int do_dknown = (detector && (detector->oclass == POTION_CLASS || + detector->oclass == SPBOOK_CLASS) && + detector->blessed); int ct = 0, ctu = 0; register struct obj *obj, *otmp = (struct obj *)0; register struct monst *mtmp;