treasure detection

Expert and skilled detect treasure was changed to behave like
blessed object detection in 3.3.1, but it didn't work as intended.

> Subject: [patch] skilled detect treasure doesn't detect object types
> <email deleted>
> Date: 13 Sep 2002 09:58:41 -0400
> <email deleted>
>
> It looks like the detect treasure spell when cast with skilled or expert
> ability in divination is supposed to detect the type of an object ("a
> scroll of identify" rather than "a scroll"), but this doesn't actually
> work in 3.4.0.  Here is a fix.
This commit is contained in:
nethack.rankin
2002-09-14 13:00:20 +00:00
parent 6772c3973c
commit ba8d740500
2 changed files with 6 additions and 3 deletions

View File

@@ -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;