charging rings

Reported--more or less--by <email deleted>:
chargeable rings don't show up as likely candidates in the "what do you
want to charge?" prompt.  They're supposed to be there once the type has
been discovered but it was using the wrong field so basing that on whether
the player had assigned a name to the type instead.  (Picking a chargeable
ring's letter even though it wasn't listed did work correctly though.)
This commit is contained in:
nethack.rankin
2007-04-20 01:43:42 +00:00
parent 933c1846b9
commit ae36e5b3b3
2 changed files with 4 additions and 2 deletions

View File

@@ -214,10 +214,11 @@ is_chargeable(obj)
struct obj *obj;
{
if (obj->oclass == WAND_CLASS) return TRUE;
/* known && !uname is possible after amnesia/mind flayer */
/* known && !oc_name_known is possible after amnesia/mind flayer */
if (obj->oclass == RING_CLASS)
return (boolean)(objects[obj->otyp].oc_charged &&
(obj->known || objects[obj->otyp].oc_uname));
(obj->known ||
(obj->dknown && objects[obj->otyp].oc_name_known)));
if (is_weptool(obj)) /* specific check before general tools */
return FALSE;
if (obj->oclass == TOOL_CLASS)