Fix "gems in apply menu" From a bug report.
This commit is contained in:
@@ -216,6 +216,12 @@ struct obj {
|
||||
otmp->otyp == WAX_CANDLE)
|
||||
#define MAX_OIL_IN_FLASK 400 /* maximum amount of oil in a potion of oil */
|
||||
|
||||
/* special stones */
|
||||
#define is_greystone(obj) ((obj)->otyp == LUCKSTONE || \
|
||||
(obj)->otyp == LOADSTONE || \
|
||||
(obj)->otyp == FLINT || \
|
||||
(obj)->otyp == TOUCHSTONE)
|
||||
|
||||
/* Flags for get_obj_location(). */
|
||||
#define CONTAINED_TOO 0x1
|
||||
#define BURIED_TOO 0x2
|
||||
|
||||
@@ -2519,15 +2519,13 @@ do_break_wand(obj)
|
||||
return 1;
|
||||
}
|
||||
|
||||
boolean uhave_greystone()
|
||||
STATIC_OVL boolean
|
||||
uhave_greystone()
|
||||
{
|
||||
register struct obj *otmp;
|
||||
|
||||
for(otmp = invent; otmp; otmp = otmp->nobj)
|
||||
if(otmp->otyp == LOADSTONE ||
|
||||
otmp->otyp == FLINT ||
|
||||
otmp->otyp == LUCKSTONE ||
|
||||
otmp->otyp == TOUCHSTONE)
|
||||
if(is_greystone(otmp))
|
||||
return TRUE;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
@@ -819,7 +819,8 @@ register const char *let,*word;
|
||||
/* only applicable potion is oil, and it will only
|
||||
be offered as a choice when already discovered */
|
||||
(otyp != POT_OIL || !otmp->dknown ||
|
||||
!objects[POT_OIL].oc_name_known))))
|
||||
!objects[POT_OIL].oc_name_known))
|
||||
|| (otmp->oclass == GEM_CLASS && !is_greystone(otmp))))
|
||||
|| (!strcmp(word, "invoke") &&
|
||||
(!otmp->oartifact && !objects[otyp].oc_unique &&
|
||||
(otyp != FAKE_AMULET_OF_YENDOR || otmp->known) &&
|
||||
|
||||
Reference in New Issue
Block a user