]> granicus.if.org Git - nethack/commitdiff
Fix: chameleon quickmimic not reset after eating
authorMichael Meyer <me@entrez.cc>
Thu, 30 Sep 2021 04:26:01 +0000 (00:26 -0400)
committerPasi Kallinen <paxed@alt.org>
Thu, 30 Dec 2021 19:14:08 +0000 (21:14 +0200)
finish_meating was checking whether the monster in question was a
chameleon/shapechanger, rather than whether it was a mimic, in deciding
which monsters should be allowed to maintain their current appearance
once they finish eating.  This meant that true mimics had their
appearance reset, while a chameleon, vampire, etc, who ate a mimic
would maintain their appearance as a tripe ration even after they had
finished eating and resumed their normal behavior.  The result?  An
amazing living tripe ration which followed the hero around throughout
the level.

src/dogmove.c

index 1fc4a02e0c6db107eaf41321b6d3ff8513030065..78047365e75fc205e990c630303b8654e90e4671 100644 (file)
@@ -1366,7 +1366,7 @@ void
 finish_meating(struct monst *mtmp)
 {
     mtmp->meating = 0;
-    if (M_AP_TYPE(mtmp) && mtmp->mappearance && mtmp->cham == NON_PM) {
+    if (M_AP_TYPE(mtmp) && mtmp->mappearance && mtmp->data->mlet != S_MIMIC) {
         /* was eating a mimic and now appearance needs resetting */
         mtmp->m_ap_type = M_AP_NOTHING;
         mtmp->mappearance = 0;