]> granicus.if.org Git - nethack/commitdiff
charging rings
authornethack.rankin <nethack.rankin>
Fri, 20 Apr 2007 01:43:42 +0000 (01:43 +0000)
committernethack.rankin <nethack.rankin>
Fri, 20 Apr 2007 01:43:42 +0000 (01:43 +0000)
     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.)

doc/fixes34.4
src/read.c

index 1eced6d874be423ae976ed904655523a84a53957..8254a7353eba90d69d2c51807bdb69167cc18f64 100644 (file)
@@ -347,6 +347,7 @@ use a more precise jumping path for far, non-straight line destinations
 increase damage bonus applies when kicking while polymorphed into a monster
        form which has a kicking attack, just like for other kicks
 if magically removing steed's saddle is fatal, don't leave it saddled in bones
+charging prompt used wrong criteria when deciding whether to list rings
 
 
 Platform- and/or Interface-Specific Fixes
index 2ae669f02c7d38b3e973298d1d490fa0a6f3c7ec..b40f44aeba55031a6ebf6314712d67ee29da6b76 100644 (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)