From: Michael Meyer Date: Tue, 22 Mar 2022 19:40:13 +0000 (-0400) Subject: Handle spiders, cockatrices in mbodypart X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4d82094e8b5a2dae941a55d1f67d7e4ae41a39e5;p=nethack Handle spiders, cockatrices in mbodypart 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. --- diff --git a/src/polyself.c b/src/polyself.c index df670f674..081c63f34 100644 --- a/src/polyself.c +++ b/src/polyself.c @@ -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)