]> granicus.if.org Git - nethack/commitdiff
eating tins while poly'd (trunk only)
authornethack.rankin <nethack.rankin>
Sun, 2 Oct 2011 01:50:23 +0000 (01:50 +0000)
committernethack.rankin <nethack.rankin>
Sun, 2 Oct 2011 01:50:23 +0000 (01:50 +0000)
     While testing something, I noticed that I could eat a tin (off the
floor) while polymorphed into a bat.  The code to check whether the hero
could open a tin was testing for limbs, so winged critters passed.  Now
it requires hands instead of limbs, and also that the current form be big
enough to be capable of wielding something (even though you don't need to
be wielding anything to open a tin).

     This means that a hero poly'd into a dog or cat will no longer be
able to serve him-/herself dinner from a tin....

doc/fixes35.0
src/eat.c

index ebd664bd884dc60650db64c7c063f690c3a377aa..533a2f2539760b039fa355d1f4314ad3c63b233e 100644 (file)
@@ -381,6 +381,7 @@ give alternate message for "<mon> turns to flee" when mon can't move
 all statues in a cockatrice nest were for giant ant if 'record' was empty
 when dying outside all shops on a level with multiple shopkeepers and one takes
        hero's stuff, choose one who is owed money over first one on fmon list
+hero poly'd into a critter without hands could still open tins
 
 
 Platform- and/or Interface-Specific Fixes
index fde283f037a21cf7135743a4a9dd0c0d827d35a4..6d01bf4ca05afd421932f56fb62e79f55c8f4f97 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -1439,7 +1439,7 @@ start_tin(otmp)           /* called when starting to open a tin */
        if (metallivorous(youmonst.data)) {
                mesg = "You bite right into the metal tin...";
                tmp = 0;
-       } else if (nolimbs(youmonst.data)) {
+       } else if (cantwield(youmonst.data)) {  /* nohands || verysmall */
                You("cannot handle the tin properly to open it.");
                return;
        } else if (otmp->blessed) {