]> granicus.if.org Git - nethack/commitdiff
fix #H4187 - doppelgangers posing as Riders...
authorPatR <rankin@nethack.org>
Sat, 9 Jan 2016 21:57:15 +0000 (13:57 -0800)
committerPatR <rankin@nethack.org>
Sat, 9 Jan 2016 21:57:15 +0000 (13:57 -0800)
... never transform and can leave Rider corpses

Riders can't be polymorphed, and the code to prevent that was also
preventing doppelgangers in Rider form from changing shape.

Using ring of protection from shape changers effectively turned such
doppelgangers into actual Riders which would leave self-reviving
corpses.  That didn't prevent Riders from appearing on the Astral
Plane though.

doc/fixes36.1
src/mon.c

index 9149325efaa6a75fd7b0a884975ebfdd13e21225..49dc28c48acb59bce32da3f1dc284dc3b1a6d76b 100644 (file)
@@ -101,6 +101,9 @@ fix possible segfault in lev_comp when map was too tall
 fix "the ice is bridged with ice" when freezing castle's moat or Medusa's sea
 make monsters and pets avoid poison gas clouds if it would damage them
 covetous monsters may choose to teleport to downstairs or ladders
+doppelganger posing as Rider would never change shape
+since doppelganger posing as Rider could never revert to innate form,
+       protection from shape changers turned it into genuine Rider
 
 
 Platform- and/or Interface-Specific Fixes
index 5978f1c200c94f1af0d6516d2829b4b8809507a3..802d20bffbec0612ea8a1282ae7d7f18299d71e6 100644 (file)
--- a/src/mon.c
+++ b/src/mon.c
@@ -3157,8 +3157,9 @@ boolean msg;      /* "The oldmon turns into a newmon!" */
     struct permonst *olddata = mtmp->data;
     char oldname[BUFSZ], l_oldname[BUFSZ], newname[BUFSZ];
 
-    /* Riders are immune to polymorph and green slime */
-    if (is_rider(mtmp->data))
+    /* Riders are immune to polymorph and green slime
+       (but apparent Rider might actually be a doppelganger) */
+    if (is_rider(mtmp->data) && mtmp->cham == NON_PM)
         return 0;
 
     if (msg) {