OSDN Git Service

finalize changelog
[jnethack/source.git] / src / hack.c
index 968557a..d5d96cc 100644 (file)
@@ -1,11 +1,11 @@
-/* NetHack 3.6 hack.c  $NHDT-Date: 1551137618 2019/02/25 23:33:38 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.208 $ */
+/* NetHack 3.6 hack.c  $NHDT-Date: 1576638500 2019/12/18 03:08:20 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.220 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Derek S. Ray, 2015. */
 /* NetHack may be freely redistributed.  See license for details. */
 
 /* JNetHack Copyright */
 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000  */
-/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2019            */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2022            */
 /* JNetHack may be freely redistributed.  See license for details. */
 
 #include "hack.h"
@@ -170,6 +170,8 @@ moverock()
             if (mtmp && !noncorporeal(mtmp->data)
                 && (!mtmp->mtrapped
                     || !(ttmp && is_pit(ttmp->ttyp)))) {
+                boolean deliver_part1 = FALSE;
+
                 if (Blind)
                     feel_location(sx, sy);
                 if (canspotmon(mtmp)) {
@@ -177,20 +179,49 @@ moverock()
                     pline("There's %s on the other side.", a_monnam(mtmp));
 */
                     pline("\94½\91Î\91¤\82É%s\82ª\82¢\82é\81D", a_monnam(mtmp));
+                    deliver_part1 = TRUE;
                 } else {
 /*JP
                     You_hear("a monster behind %s.", the(xname(otmp)));
 */
                     pline("%s\82Ì\94w\8cã\82É\89ö\95¨\82Ì\8bC\94z\82ª\82·\82é\81D", the(xname(otmp)));
+                    if (!Deaf)
+                        deliver_part1 = TRUE;
                     map_invisible(rx, ry);
                 }
-                if (flags.verbose)
-#if 0 /*JP*/
-                    pline("Perhaps that's why %s cannot move it.",
-                          u.usteed ? y_monnam(u.usteed) : "you");
+                if (flags.verbose) {
+                    char you_or_steed[BUFSZ];
+
+#if 0 /*JP:T*/
+                    Strcpy(you_or_steed,
+                           u.usteed ? y_monnam(u.usteed) : "you");
 #else
-                    pline("\82½\82Ô\82ñ\82±\82ê\82ª\81C\8aâ\82ð\93®\82©\82¹\82È\82¢\97\9d\97R\82¾\81D");
+                    Strcpy(you_or_steed,
+                           u.usteed ? y_monnam(u.usteed) : "\82 \82È\82½");
 #endif
+#if 0 /*JP:T*/
+                    pline("%s%s cannot move %s.",
+                          deliver_part1
+                              ? "Perhaps that's why "
+                              : "",
+                          deliver_part1
+                              ? you_or_steed
+                              : upstart(you_or_steed),
+                          deliver_part1
+                              ? "it"
+                              : the(xname(otmp)));
+#else
+                    /* "Perhaps that's why (you_or_steed) cannot move it."*/
+                    /* "(You_or_steed) cannot move (otmp)."*/
+                    if (deliver_part1) {
+                        pline("\82½\82Ô\82ñ\82±\82ê\82ª\81C%s\82ª\82»\82ê\82ð\93®\82©\82¹\82È\82¢\97\9d\97R\82¾\81D",
+                              you_or_steed);
+                    } else {
+                        pline("%s\82Í%s\82ð\93®\82©\82¹\82È\82¢\81D",
+                              you_or_steed, xname(otmp));
+                    }
+#endif
+                }
                 goto cannot_push;
             }
 
@@ -205,7 +236,7 @@ moverock()
                         obj_extract_self(otmp);
                         place_object(otmp, rx, ry);
                         newsym(sx, sy);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                         pline("KAABLAMM!!!  %s %s land mine.",
                               Tobjnam(otmp, "trigger"),
                               ttmp->madeby_u ? "your" : "a");
@@ -248,7 +279,7 @@ moverock()
                         pline("\83h\83T\83b\81I\82 \82È\82½\82Í\82à\82¤%s\82ð\8a´\82\82ç\82ê\82È\82¢\81D",
                               the(xname(otmp)));
                     else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                         pline("%s%s and %s a %s in the %s!",
                               Tobjnam(otmp, (ttmp->ttyp == TRAPDOOR)
                                                 ? "trigger"
@@ -336,7 +367,7 @@ moverock()
  dopush:
                 if (!u.usteed) {
                     if (moves > lastmovetime + 2 || moves < lastmovetime)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                         pline("With %s effort you move %s.",
                               throws_rocks(youmonst.data) ? "little"
                                                           : "great",
@@ -348,7 +379,7 @@ moverock()
 #endif
                     exercise(A_STR, TRUE);
                 } else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                     pline("%s moves %s.", upstart(y_monnam(u.usteed)),
                           the(xname(otmp)));
 #else
@@ -371,7 +402,7 @@ moverock()
         } else {
  nopushmsg:
             if (u.usteed)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 pline("%s tries to move %s, but cannot.",
                       upstart(y_monnam(u.usteed)), the(xname(otmp)));
 #else
@@ -398,7 +429,7 @@ moverock()
                     willpickup = (canpickup && autopick_testobj(otmp, TRUE));
 
                 if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                     You("aren't skilled enough to %s %s from %s.",
                         willpickup ? "pick up" : "push aside",
                         the(xname(otmp)), y_monnam(u.usteed));
@@ -413,7 +444,7 @@ moverock()
                      * canpickup:   you could easily pick it up
                      * otherwise:   you easily push it aside
                      */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                     pline("However, you %seasily %s.",
                           (willpickup || !canpickup) ? "" : "could ",
                           (willpickup || canpickup) ? "pick it up"
@@ -470,7 +501,7 @@ xchar x, y;
         && ((IS_ROCK(lev->typ) && !may_dig(x, y))
             /* may_dig() checks W_NONDIGGABLE but doesn't handle iron bars */
             || (lev->typ == IRONBARS && (lev->wall_info & W_NONDIGGABLE)))) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         You("hurt your teeth on the %s.",
             (lev->typ == IRONBARS)
                 ? "bars"
@@ -498,7 +529,7 @@ xchar x, y;
         /* solid rock takes more work & time to dig through */
         context.digging.effort =
             (IS_ROCK(lev->typ) && !IS_TREE(lev->typ) ? 30 : 60) + u.udaminc;
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         You("start chewing %s %s.",
             (boulder || IS_TREE(lev->typ) || lev->typ == IRONBARS)
                 ? "on a"
@@ -531,7 +562,7 @@ xchar x, y;
         return 1;
     } else if ((context.digging.effort += (30 + u.udaminc)) <= 100) {
         if (flags.verbose)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             You("%s chewing on the %s.",
                 context.digging.chew ? "continue" : "begin",
                 boulder
@@ -567,7 +598,7 @@ xchar x, y;
 
     if (boulder) {
         delobj(boulder);         /* boulder goes bye-bye */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         You("eat the boulder."); /* yum */
 #else
         You("\8aâ\82ð\90H\82×\82½\81D"); /* yum */
@@ -1402,6 +1433,7 @@ int x,y;
     int ty = u.ty;
     boolean ret;
     int g = glyph_at(x,y);
+
     if (x == u.ux && y == u.uy)
         return TRUE;
     if (isok(x,y) && glyph_is_cmap(g) && S_stone == glyph_to_cmap(g)
@@ -1572,7 +1604,7 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
         if (--u.utrap) {
             if (flags.verbose) {
                 if (anchored) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                     predicament = "chained to the";
                     culprit = "buried ball";
 #else
@@ -1580,7 +1612,7 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
                     culprit = "\96\84\82Ü\82Á\82Ä\82¢\82é\8b\85";
 #endif
                 } else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                     predicament = "stuck in the";
                     culprit = surface(u.ux, u.uy);
 #else
@@ -1590,7 +1622,7 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
                 }
                 if (u.usteed) {
                     if (anchored)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                         Norep("You and %s are %s %s.", steedname, predicament,
                               culprit);
 #else
@@ -1598,7 +1630,7 @@ struct trap *desttrap; /* nonnull if another trap at <x,y> */
                               predicament);
 #endif
                     else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                         Norep("%s is %s %s.", upstart(steedname), predicament,
                               culprit);
 #else
@@ -1645,7 +1677,7 @@ boolean
 u_rooted()
 {
     if (!youmonst.data->mmove) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         You("are rooted %s.",
             Levitation || Is_airlevel(&u.uz) || Is_waterlevel(&u.uz)
                 ? "in place"
@@ -1672,7 +1704,7 @@ domove()
         domove_attempting = 0L;
 }
 
-void
+STATIC_OVL void
 domove_core()
 {
     register struct monst *mtmp;
@@ -1684,7 +1716,8 @@ domove_core()
     xchar chainx = 0, chainy = 0,
           ballx = 0, bally = 0;         /* ball&chain new positions */
     int bc_control = 0;                 /* control for ball&chain */
-    boolean cause_delay = FALSE;        /* dragging ball will skip a move */
+    boolean cause_delay = FALSE,        /* dragging ball will skip a move */
+            u_with_boulder = (sobj_at(BOULDER, u.ux, u.uy) != 0);
 
     if (context.travel) {
         if (!findtravelpath(FALSE))
@@ -1805,6 +1838,26 @@ domove_core()
             }
         }
         if (!isok(x, y)) {
+            if (iflags.mention_walls) {
+                int dx = u.dx, dy = u.dy;
+
+                if (dx && dy) { /* diagonal */
+                    /* only as far as possible diagonally if in very
+                       corner; otherwise just report whichever of the
+                       cardinal directions has reached its limit */
+                    if (isok(x, u.uy))
+                        dx = 0;
+                    else if (isok(u.ux, y))
+                        dy = 0;
+                }
+#if 0 /*JP*/
+                You("have already gone as far %s as possible.",
+                    directionname(xytod(dx, dy)));
+#else
+                You("\82·\82Å\82É\82Å\82«\82é\82¾\82¯%s\82É\93®\82¢\82Ä\82¢\82é\81D",
+                    directionname(xytod(dx, dy)));
+#endif
+            }
             nomul(0);
             return;
         }
@@ -1822,7 +1875,7 @@ domove_core()
                         You("%s\82Ì\8eè\91O\82Å\8e~\82Ü\82Á\82½\81D",
                             an(defsyms[trap_to_defsym(tt)].explanation));
                     } else if (is_pool_or_lava(x,y) && levl[x][y].seenv) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                         You("stop at the edge of the %s.",
                             hliquid(is_pool(x,y) ? "water" : "lava"));
 #else
@@ -2024,7 +2077,7 @@ domove_core()
                because you don't see remembered terrain while underwater;
                although the hero can attack an adjacent monster this way,
                assume he can't reach out far enough to distinguish terrain */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             Sprintf(buf, (Is_waterlevel(&u.uz) && levl[x][y].typ == AIR)
                              ? "an air bubble"
                              : "nothing");
@@ -2038,7 +2091,7 @@ domove_core()
                unlike searching, this won't reveal what that terrain is
                (except for solid rock, where the glyph would otherwise
                yield ludicrous "dark part of a room") */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             Strcpy(buf, (levl[x][y].typ == STONE) ? "solid rock"
                          : glyph_is_cmap(glyph)
                             ? the(defsyms[glyph_to_cmap(glyph)].explanation)
@@ -2057,12 +2110,12 @@ domove_core()
 */
             Strcpy(buf, "\89½\82à\82È\82¢\8bó\92\86");
         }
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         You("%s%s %s.",
             !(boulder || solid) ? "" : !explo ? "harmlessly " : "futilely ",
             explo ? "explode at" : "attack", buf);
 #else
-        You("%s%s%s.",
+        You("%s%s%s\81D",
             !(boulder || solid) ? "" : !explo ? "\8cø\89Ê\82È\82­" : "\82Þ\82¾\82É",
             buf, explo ? "\82Å\94\9a\94­\82µ\82½" : "\82ð\8dU\8c\82\82µ\82½");
 #endif
@@ -2177,6 +2230,20 @@ domove_core()
             You("stop.  %s can't move diagonally.", upstart(y_monnam(mtmp)));
 */
             You("\8e~\82Ü\82Á\82½\81D%s\82Í\8eÎ\82ß\82É\93®\82¯\82È\82¢\81D", upstart(y_monnam(mtmp)));
+        } else if (u_with_boulder
+                    && !(verysmall(mtmp->data)
+                         && (!mtmp->minvent || (curr_mon_load(mtmp) <= 600)))) {
+            /* can't swap places when pet won't fit there with the boulder */
+            u.ux = u.ux0, u.uy = u.uy0; /* didn't move after all */
+            if (u.usteed)
+                u.usteed->mx = u.ux, u.usteed->my = u.uy;
+#if 0 /*JP:T*/
+            You("stop.  %s won't fit into the same spot that you're at.",
+                 upstart(y_monnam(mtmp)));
+#else
+            You("\8e~\82Ü\82Á\82½\81D%s\82Í\82 \82È\82½\82Ì\82¢\82é\82Ì\82Æ\93¯\82\8fê\8f\8a\82É\82Í\8eû\82Ü\82ç\82È\82¢\81D",
+                 y_monnam(mtmp));
+#endif
         } else if (u.ux0 != x && u.uy0 != y && bad_rock(mtmp->data, x, u.uy0)
                    && bad_rock(mtmp->data, u.ux0, y)
                    && (bigmonst(mtmp->data) || (curr_mon_load(mtmp) > 600))) {
@@ -2199,7 +2266,7 @@ domove_core()
             newsym(x, y);
             newsym(u.ux0, u.uy0);
 
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             You("%s %s.", mtmp->mtame ? "swap places with" : "frighten",
                 pnambuf);
 #else
@@ -2325,7 +2392,7 @@ domove_core()
     }
 }
 
-void
+STATIC_OVL void
 maybe_smudge_engr(x1,y1,x2,y2)
 int x1, y1, x2, y2;
 {
@@ -2396,7 +2463,7 @@ invocation_message()
         You("%s\8aï\96­\82È\90U\93®\82ð\8a´\82\82½\81D", buf);
         u.uevent.uvibrated = 1;
         if (otmp && otmp->spe == 7 && otmp->lamplit)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             pline("%s %s!", The(xname(otmp)),
                   Blind ? "throbs palpably" : "glows with a strange light");
 #else
@@ -2474,13 +2541,13 @@ boolean newspot;             /* true if called by spoteffects */
 */
                 You("\82Ð\82å\82¢\82Æ\8bó\8bC\82Ì\96A\82É\93ü\82Á\82½\81D");
             else if (is_lava(u.ux, u.uy))
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 You("leave the %s...", hliquid("water")); /* oops! */
 #else
                 You("%s\90\85\82©\82ç\94²\82¯\82¾\82µ\82½\81D\81D\81D", hliquid("\90\85"));  /* oops! */
 #endif
             else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 You("are on solid %s again.",
                     is_ice(u.ux, u.uy) ? "ice" : "land");
 #else
@@ -2541,6 +2608,10 @@ boolean newspot;             /* true if called by spoteffects */
         }
         /* not mounted */
 
+        /* if hiding on ceiling then don't automatically enter pool */
+        if (Upolyd && ceiling_hider(&mons[u.umonnum]) && u.uundetected)
+            return FALSE;
+
         /* drown(),lava_effects() return true if hero changes
            location while surviving the problem */
         if (is_lava(u.ux, u.uy)) {
@@ -2644,7 +2715,7 @@ boolean pick;
     /* Warning alerts you to ice danger */
     if (Warning && is_ice(u.ux, u.uy)) {
         static const char *const icewarnings[] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             "The ice seems very soft and slushy.",
             "You feel the ice shift beneath you!",
             "The ice, is gonna BREAK!", /* The Dead Zone */
@@ -2665,7 +2736,7 @@ boolean pick;
         mtmp->mundetected = mtmp->msleeping = 0;
         switch (mtmp->data->mlet) {
         case S_PIERCER:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             pline("%s suddenly drops from the %s!", Amonnam(mtmp),
                   ceiling(u.ux, u.uy));
 #else
@@ -2691,7 +2762,7 @@ boolean pick;
             } else {
                 int dmg;
 
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 You("are hit by %s!",
                     x_monnam(mtmp, ARTICLE_A, "falling", 0, TRUE));
 #else
@@ -2706,7 +2777,7 @@ boolean pick;
             break;
         default: /* monster surprises you. */
             if (mtmp->mtame)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 pline("%s jumps near you from the %s.", Amonnam(mtmp),
                       ceiling(u.ux, u.uy));
 #else
@@ -2925,7 +2996,7 @@ register boolean newlev;
             pline("\83f\83r\83b\83g\95ó\94 \93®\95¨\89\80\82É\82æ\82¤\82±\82»\81I");
             break;
         case SWAMP:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             pline("It %s rather %s down here.", Blind ? "feels" : "looks",
                   Blind ? "humid" : "muddy");
 #else
@@ -2948,7 +3019,7 @@ register boolean newlev;
             break;
         case MORGUE:
             if (midnight()) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 const char *run = locomotion(youmonst.data, "Run");
                 pline("%s away!  %s away!", run, run);
 #else
@@ -3002,7 +3073,7 @@ register boolean newlev;
 */
                     verbalize("\82¨\82Ü\82¦\82Í\83f\83\8b\83t\83@\83C\82Ì\90_\91õ\8f\8a\82É\82¢\82é\81D");
                 else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                     verbalize("%s, %s, welcome to Delphi!",
                               Hello((struct monst *) 0), plname);
 #else
@@ -3086,7 +3157,7 @@ pickup_checks()
 */
                 pline("\82µ\82©\82µ\81C\82»\82ê\82Í\82Ê\82é\82Ê\82é\82µ\82Ä\95s\89õ\82¾\82Á\82½\82Ì\82Å\8eÌ\82Ä\82Ä\82µ\82Ü\82Á\82½\81D");
             } else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 You("don't %s anything in here to pick up.",
                     Blind ? "feel" : "see");
 #else
@@ -3162,10 +3233,18 @@ pickup_checks()
 */
             pline("\83q\83\93\83W\82ð\8aO\82¹\82È\82¢\81D");
         else if (IS_ALTAR(lev->typ))
+/*JP
             pline("Moving the altar would be a very bad idea.");
+*/
+            pline("\8dÕ\92d\82ð\93®\82©\82·\82Ì\82Í\82Æ\82Ä\82à\88«\82¢\8dl\82¦\82¾\81D");
         else if (lev->typ == STAIRS)
+#if 0 /*JP:T*/
             pline_The("stairs are solidly fixed to the %s.",
                       surface(u.ux, u.uy));
+#else
+            pline_The("\8aK\92i\82Í%s\82É\82µ\82Á\82©\82è\82Æ\8cÅ\92è\82³\82ê\82Ä\82¢\82é\81D",
+                      surface(u.ux, u.uy));
+#endif
         else
 /*JP
             There("is nothing here to pick up.");
@@ -3175,11 +3254,15 @@ pickup_checks()
     }
     if (!can_reach_floor(TRUE)) {
         struct trap *traphere = t_at(u.ux, u.uy);
-        if (traphere && uteetering_at_seen_pit(traphere))
-/*JP
-            You("cannot reach the bottom of the pit.");
-*/
-            You("\97\8e\82µ\8c\8a\82Ì\92ê\82É%s\82ª\93Í\82©\82È\82©\82Á\82½\81D", body_part(HAND));
+        if (traphere
+            && (uteetering_at_seen_pit(traphere) || uescaped_shaft(traphere)))
+#if 0 /*JP*/
+            You("cannot reach the bottom of the %s.",
+                is_pit(traphere->ttyp) ? "pit" : "abyss");
+#else
+            You("%s\82Ì\92ê\82É\93Í\82©\82È\82©\82Á\82½\81D",
+                is_pit(traphere->ttyp) ? "\97\8e\82µ\8c\8a" : "\93Þ\97\8e");
+#endif
         else if (u.usteed && P_SKILL(P_RIDING) < P_BASIC)
             rider_cant_reach();
         else if (Blind && !can_reach_floor(TRUE))
@@ -3208,9 +3291,9 @@ dopickup(VOID_ARGS)
               ? multi + 1 : 0;
     multi = 0; /* always reset */
 
-    if ((ret = pickup_checks() >= 0))
+    if ((ret = pickup_checks()) >= 0) {
         return ret;
-    else if (ret == -2) {
+    else if (ret == -2) {
         tmpcount = -count;
         return loot_mon(u.ustuck, &tmpcount, (boolean *) 0);
     } /* else ret == -1 */
@@ -3312,6 +3395,7 @@ lookaround()
                 if (x == u.ux + u.dx && y == u.uy + u.dy) {
                     if (iflags.mention_walls) {
                         int tt = what_trap(trap->ttyp, rn2_on_display_rng);
+
 /*JP
                         You("stop in front of %s.",
 */
@@ -3332,7 +3416,7 @@ lookaround()
                      * into a pool and seeing if the game allowed it
                      */
                     if (iflags.mention_walls)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                         You("stop at the edge of the %s.",
                             hliquid(is_pool(x,y) ? "water" : "lava"));
 #else
@@ -3406,7 +3490,7 @@ int x, y;
     if (!IS_DOOR(lev_p->typ))
         return FALSE;
     /* all rogue level doors are doorless but disallow diagonal access, so
-       we treat them as if their non-existant doors were actually present */
+       we treat them as if their non-existent doors were actually present */
     if (Is_rogue_level(&u.uz))
         return FALSE;
     return !(lev_p->doormask & ~(D_NODOOR | D_BROKEN));
@@ -3487,8 +3571,21 @@ const char *msg_override;
         nomovemsg = msg_override;
     else if (!nomovemsg)
         nomovemsg = You_can_move_again;
-    if (*nomovemsg)
+    if (*nomovemsg) {
         pline("%s", nomovemsg);
+        /* follow "you survived that attempt on your life" with a message
+           about current form if it's not the default; primarily for
+           life-saving while turning into green slime but is also a reminder
+           if life-saved while poly'd and Unchanging (explore or wizard mode
+           declining to die since can't be both Unchanging and Lifesaved) */
+#if 0 /*JP:T*/
+        if (Upolyd && !strncmpi(nomovemsg, "You survived that ", 18))
+            You("are %s.", an(mons[u.umonnum].mname)); /* (ignore Hallu) */
+#else
+        if (Upolyd && !STRNCMP2(nomovemsg, "\82 \82È\82½\82Í\90\82«\82È\82ª\82ç"))
+            You("%s\82¾\81D", mons[u.umonnum].mname); /* (ignore Hallu) */
+#endif
+    }
     nomovemsg = 0;
     u.usleep = 0;
     multi_reason = NULL;
@@ -3519,7 +3616,7 @@ maybe_wail()
         const char *who;
         int i, powercnt;
 
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         who = (Role_if(PM_WIZARD) || Role_if(PM_VALKYRIE)) ? urole.name.m
                                                            : "Elf";
 #else