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