From 23b3d5a1268ca3971f693be3c6fa3909bb8f5954 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 21 Apr 2016 16:45:19 -0700 Subject: [PATCH] newcham() feedback: "A turns into it!" Silly shapechange message if is sensed via telepathy and takes on a mindless form. In the case I noticed, it was a doppelganger on the far side of a maze wall who changed from something ordinary into a mummy while the hero was wearing an amulet of esp. 3.6.0 could deliver this message, but I think changes since then have increased the chance for newcham() to give shapechange feedback. --- doc/fixes36.1 | 2 ++ src/mon.c | 17 ++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.1 b/doc/fixes36.1 index b0ae56088..af6dc5210 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -214,6 +214,8 @@ for menustyles traditional or combination, 'A' (or object ID) followed by i displayed an inventory of everything rather than just worn items (or not fully identified items) exploding chest trap would destroy uchain while still worn if uball carried +if monster shapechange message " turns into !" was given, + could be "it" (if sensed telepathically and is mindless) post-3.6.0: fix "object lost" panic during pickup caused by sortloot revamp post-3.6.0: more sortloot revisions diff --git a/src/mon.c b/src/mon.c index d5ac2e0bb..bf742ad2b 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 mon.c $NHDT-Date: 1454528962 2016/02/03 19:49:22 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.210 $ */ +/* NetHack 3.6 mon.c $NHDT-Date: 1461282107 2016/04/21 23:41:47 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.215 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2421,7 +2421,7 @@ struct monst *mtmp; } newsym(mtmp->mx, mtmp->my); return FALSE; /* didn't petrify */ - } + } } return TRUE; } @@ -3367,10 +3367,17 @@ boolean msg; /* "The oldmon turns into a newmon!" */ ? "slime" : x_monnam(mtmp, ARTICLE_A, (char *) 0, SUPPRESS_SADDLE, FALSE)); - if (!strcmpi(oldname, "it") && !strcmpi(newname, "it")) + /* oldname was capitalized above; newname will be lower case */ + if (!strcmpi(newname, "it")) { /* can't see or sense it now */ + if (!!strcmpi(oldname, "it")) /* could see or sense it before */ + pline("%s disappears!", oldname); (void) usmellmon(mdat); - else - pline("%s turns into %s!", oldname, newname); + } else { /* can see or sense it now */ + if (!strcmpi(oldname, "it")) /* couldn't see or sense it before */ + pline("%s appears!", upstart(newname)); + else + pline("%s turns into %s!", oldname, newname); + } if (save_mname) MNAME(mtmp) = save_mname; }