]> granicus.if.org Git - nethack/commitdiff
fix B16001 handlessness inconsistency
authornethack.allison <nethack.allison>
Fri, 3 Jan 2003 03:54:07 +0000 (03:54 +0000)
committernethack.allison <nethack.allison>
Fri, 3 Jan 2003 03:54:07 +0000 (03:54 +0000)
[forwarded from newsgroup]
When polymorphed into a handless monster, you can't loot a chest
that's on the ground but you can pick it up and then apply it when
it's in your inventory.

src/pickup.c

index 9ff54c738605c474ee33ab43ebab71d2dae20ed0..93a35ef29212d45d592e0a00a329a85c7b61bfd0 100644 (file)
@@ -1912,6 +1912,13 @@ register int held;
            menu_on_request;
 
        emptymsg[0] = '\0';
+       if (nohands(youmonst.data)) {
+               You("have no hands!");  /* not `body_part(HAND)' */
+               return 0;
+       } else if (!freehand()) {
+               You("have no free %s.", body_part(HAND));
+               return 0;
+       }
        if (obj->olocked) {
            pline("%s to be locked.", Tobjnam(obj, "seem"));
            if (held) You("must put it down to unlock.");