]> granicus.if.org Git - nethack/commitdiff
dog/cat/rat/ape body parts
authorPatR <rankin@nethack.org>
Thu, 26 Nov 2015 00:09:33 +0000 (16:09 -0800)
committerPatR <rankin@nethack.org>
Thu, 26 Nov 2015 00:09:33 +0000 (16:09 -0800)
Another bit prompted by vibrating square testing:
 |You see a strange vibration beneath the little dog's rear claws.

Fix up some body parts:  dog, cat, and yeti-class (includes sasquatch,
monkey and ape, owlbear) already have "paws" instead of "fore claws".
Take away all 'Y' except owlbear from that list and add rodents to it.
Give them "rear paws" instead of "rear claws" for their feet; for legs,
use "foreleg" instead of "forelimb" and "read leg" instead of "rear limb".

For yeti/sasquatch/monkey/ape/carnivorous-ape, switch from paws to hands
since they have opposable thumbs, and switch to arm, leg, foot instead
of forelimb, rear limb, and rear claw.  I've left "fore claw" for finger.

doc/fixes36.0
src/polyself.c

index 24e38cb8c22228cdc447f1e9ea086e086026fb73..cc4947cbe6269b7ad812f506cbc2f4d9ff167b99 100644 (file)
@@ -170,7 +170,9 @@ nymphs and monkeys can't steal rings worn under gloves
 monkeys can't steal rings worn under cursed weapon
 succubi will remove hero's gloves before taking worn ring; incubi will do
        so before forcing ring to be put on
-mbodypart should return forehoof, not foreclaw, for horselike monsters
+mbodypart should return forehoof, not foreclaw, for horselike monsters;
+       rear paws instead of rear claws for feet of d, f, r, and owlbear;
+       hand, arm, leg, foot for yeti, sasquatch, monkey, ape, carnivorous ape
 further digging of an existing hole finishes in a single turn
 only prefix shopkeeper names with "Mr." or "Ms." when not a personal name
 account for all attacks when determining max_passive_dmg
index 4c9380b72b565aed3070632bb662c6018f570c8a..4cd01d0d6461e75df12511d4eaae8cacfc06b70f 100644 (file)
@@ -1,4 +1,4 @@
-/* NetHack 3.6 polyself.c      $NHDT-Date: 1446604117 2015/11/04 02:28:37 $  $NHDT-Branch: master $:$NHDT-Revision: 1.102 $ */
+/* NetHack 3.6 polyself.c      $NHDT-Date: 1448496566 2015/11/26 00:09:26 $  $NHDT-Branch: master $:$NHDT-Revision: 1.104 $ */
 /*      Copyright (C) 1987, 1988, 1989 by Ken Arromdee */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1610,15 +1610,31 @@ int part;
     };
     struct permonst *mptr = mon->data;
 
-    if (part == HAND || part == HANDED) { /* some special cases */
-        if (mptr->mlet == S_DOG || mptr->mlet == S_FELINE
-            || mptr->mlet == S_YETI)
-            return part == HAND ? "paw" : "pawed";
-        if (humanoid(mptr) && attacktype(mptr, AT_CLAW)
-            && !index(not_claws, mptr->mlet) && mptr != &mons[PM_STONE_GOLEM]
-            && mptr != &mons[PM_INCUBUS] && mptr != &mons[PM_SUCCUBUS])
-            return part == HAND ? "claw" : "clawed";
+    /* some special cases */
+    if (mptr->mlet == S_DOG || mptr->mlet == S_FELINE
+        || mptr->mlet == S_RODENT || mptr == &mons[PM_OWLBEAR]) {
+        switch (part) {
+        case HAND:
+            return "paw";
+        case HANDED:
+            return "pawed";
+        case FOOT:
+            return "rear paw";
+        case ARM:
+        case LEG:
+            return horse_parts[part]; /* "foreleg", "rear leg" */
+        default:
+            break; /* for other parts, use animal_parts[] below */
+        }
+    } else if (mptr->mlet == S_YETI) { /* excl. owlbear due to 'if' above */
+        /* opposable thumbs, hence "hands", "arms", "legs", &c */
+        return humanoid_parts[part]; /* yeti/sasquatch, monkey/ape */
     }
+    if ((part == HAND || part == HANDED)
+        && (humanoid(mptr) && attacktype(mptr, AT_CLAW)
+            && !index(not_claws, mptr->mlet) && mptr != &mons[PM_STONE_GOLEM]
+            && mptr != &mons[PM_INCUBUS] && mptr != &mons[PM_SUCCUBUS]))
+        return (part == HAND) ? "claw" : "clawed";
     if ((mptr == &mons[PM_MUMAK] || mptr == &mons[PM_MASTODON])
         && part == NOSE)
         return "trunk";