]> granicus.if.org Git - nethack/commitdiff
Handle spiders, cockatrices in mbodypart
authorMichael Meyer <me@entrez.cc>
Tue, 22 Mar 2022 19:40:13 +0000 (15:40 -0400)
committerPatR <rankin@nethack.org>
Tue, 22 Mar 2022 21:30:21 +0000 (14:30 -0700)
Spiders and cockatrices were using the default animal_parts, which was
noticeably inaccurate in describing certain parts of their bodies.  Add
specific handling for both types of monsters: for spiders, add a
spider-specific body part list (the best I could figure out from online
sources, not being a spider anatomy expert), and for cockatrices, use
bird_parts with "scales" from snake_parts thrown in to emphasize their
unusual nature.

src/polyself.c

index df670f674ac1b1a029ef6ba1444e53b3fa12125e..081c63f349d448dd29384d24e4ba6e7ef85d0051 100644 (file)
@@ -1837,6 +1837,11 @@ mbodypart(struct monst *mon, int part)
                           "posterior", "over stretched", "clitellum",
                           "length", "posterior setae", "setae", "blood",
                           "skin", "prostomium", "stomach" },
+        *spider_parts[] = { "pedipalp", "eye", "face", "pedipalp", "tarsus",
+                            "claw", "pedipalp", "palped", "cephalothorax",
+                            "leg", "spun out", "cephalothorax", "abdomen",
+                            "claw", "hair", "hemolymph", "book lung",
+                            "labrum", "digestive tract" },
         *fish_parts[] = { "fin", "eye", "premaxillary", "pelvic axillary",
                           "pelvic fin", "anal fin", "pectoral fin", "finned",
                           "head", "peduncle", "played out", "gills",
@@ -1890,6 +1895,8 @@ mbodypart(struct monst *mon, int part)
     if (humanoid(mptr) && (part == ARM || part == FINGER || part == FINGERTIP
                            || part == HAND || part == HANDED))
         return humanoid_parts[part];
+    if (mptr->mlet == S_COCKATRICE)
+        return (part == HAIR) ? snake_parts[part] : bird_parts[part];
     if (mptr == &mons[PM_RAVEN])
         return bird_parts[part];
     if (mptr->mlet == S_CENTAUR || mptr->mlet == S_UNICORN
@@ -1911,6 +1918,8 @@ mbodypart(struct monst *mon, int part)
         return fish_parts[part];
     if (mptr->mlet == S_WORM)
         return worm_parts[part];
+    if (mptr->mlet == S_SPIDER)
+        return spider_parts[part];
     if (slithy(mptr) || (mptr->mlet == S_DRAGON && part == HAIR))
         return snake_parts[part];
     if (mptr->mlet == S_EYE)