OSDN Git Service

update year to 2023
[jnethack/source.git] / src / dig.c
index 32510ab..0cb4220 100644 (file)
--- a/src/dig.c
+++ b/src/dig.c
@@ -1,11 +1,11 @@
-/* NetHack 3.6 dig.c   $NHDT-Date: 1517913682 2018/02/06 10:41:22 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.108 $ */
+/* NetHack 3.6 dig.c   $NHDT-Date: 1547421446 2019/01/13 23:17:26 $  $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.117 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /*-Copyright (c) Michael Allison, 2012. */
 /* 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-2016            */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2023            */
 /* JNetHack may be freely redistributed.  See license for details. */
 
 #include "hack.h"
@@ -86,7 +86,7 @@ boolean waslit, rockit;
     lev->horizontal = FALSE;
     /* short-circuit vision recalc */
     viz_array[y][x] = (dist < 3) ? (IN_SIGHT | COULD_SEE) : COULD_SEE;
-    lev->typ = (rockit ? STONE : ROOM);
+    lev->typ = (rockit ? STONE : ROOM); /* flags set via doormask above */
     if (dist >= 3)
         impossible("mkcavepos called with dist %d", dist);
     feel_newsym(x, y);
@@ -108,7 +108,7 @@ register boolean rockit;
 */
         pline("\82°\82°\82ñ\81I\82 \82È\82½\82Ì\82Ü\82í\82è\82Ì\93V\88ä\82ª\95ö\82ê\82½\81I");
     else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         pline("A mysterious force %s cave around you!",
               (levl[u.ux][u.uy].typ == CORR) ? "creates a" : "extends the");
 #else
@@ -142,7 +142,7 @@ register boolean rockit;
     }
 
     if (!rockit && levl[u.ux][u.uy].typ == CORR) {
-        levl[u.ux][u.uy].typ = ROOM;
+        levl[u.ux][u.uy].typ = ROOM; /* flags for CORR already 0 */
         if (waslit)
             levl[u.ux][u.uy].waslit = TRUE;
         newsym(u.ux, u.uy); /* in case player is invisible */
@@ -311,7 +311,7 @@ dig(VOID_ARGS)
         }
         if (IS_ROCK(lev->typ) && !may_dig(dpx, dpy)
             && dig_typ(uwep, dpx, dpy) == DIGTYP_ROCK) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             pline("This %s is too hard to %s.",
                   is_db_wall(dpx, dpy) ? "drawbridge" : "wall", verb);
 #else
@@ -382,8 +382,7 @@ dig(VOID_ARGS)
         }
 
         if (context.digging.effort <= 50
-            || (ttmp && (ttmp->ttyp == TRAPDOOR || ttmp->ttyp == PIT
-                         || ttmp->ttyp == SPIKED_PIT))) {
+            || (ttmp && (ttmp->ttyp == TRAPDOOR || is_pit(ttmp->ttyp)))) {
             return 1;
         } else if (ttmp && (ttmp->ttyp == LANDMINE
                             || (ttmp->ttyp == BEAR_TRAP && !u.utrap))) {
@@ -407,22 +406,23 @@ dig(VOID_ARGS)
                 You("hit yourself in the %s.", body_part(FOOT));
 */
                 pline("%s\82É\93\96\82½\82Á\82½\81D", body_part(FOOT));
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 Sprintf(kbuf, "chopping off %s own %s", uhis(),
                         body_part(FOOT));
 #else
-                Sprintf(kbuf, "\8e©\95ª\82Ì%s\82ð\90Ø\82è\97\8e\82Æ\82µ\82Ä", body_part(FOOT));
+                Sprintf(kbuf, "\8e©\95ª\82Ì%s\82ð\90Ø\82è\97\8e\82Æ\82µ\82Ä",
+                        body_part(FOOT));
 #endif
                 losehp(Maybe_Half_Phys(dmg), kbuf, KILLED_BY);
             } else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 You("destroy the bear trap with %s.",
                     yobjnam(uwep, (const char *) 0));
 #else
                 You("%s\82Å\8cF\82Ìã©\82ð\89ó\82µ\82½\81D", xname(uwep));
 #endif
-                u.utrap = 0; /* release from trap */
                 deltrap(ttmp);
+                reset_utrap(TRUE); /* release from trap, maybe Lev or Fly */
             }
             /* we haven't made any progress toward a pit yet */
             context.digging.effort = 0;
@@ -443,9 +443,9 @@ dig(VOID_ARGS)
     }
 
     if (context.digging.effort > 100) {
-        register const char *digtxt, *dmgtxt = (const char *) 0;
-        register struct obj *obj;
-        register boolean shopedge = *in_rooms(dpx, dpy, SHOPBASE);
+        const char *digtxt, *dmgtxt = (const char *) 0;
+        struct obj *obj;
+        boolean shopedge = *in_rooms(dpx, dpy, SHOPBASE);
 
         if ((obj = sobj_at(STATUE, dpx, dpy)) != 0) {
             if (break_statue(obj))
@@ -488,7 +488,7 @@ dig(VOID_ARGS)
                 digtxt = "You cut down the tree.";
 */
                 digtxt = "\96Ø\82ð\90Ø\82è\93|\82µ\82½\81D";
-                lev->typ = ROOM;
+                lev->typ = ROOM, lev->flags = 0;
                 if (!rn2(5))
                     (void) rnd_treefruit_at(dpx, dpy);
             } else {
@@ -496,7 +496,7 @@ dig(VOID_ARGS)
                 digtxt = "You succeed in cutting away some rock.";
 */
                 digtxt = "\8aâ\82ð\8f­\82µ\90Ø\82è\82Æ\82Á\82½\81D";
-                lev->typ = CORR;
+                lev->typ = CORR, lev->flags = 0;
             }
         } else if (IS_WALL(lev->typ)) {
             if (shopedge) {
@@ -507,12 +507,11 @@ dig(VOID_ARGS)
                 dmgtxt = "\8f\9d\82Â\82¯\82é";
             }
             if (level.flags.is_maze_lev) {
-                lev->typ = ROOM;
+                lev->typ = ROOM, lev->flags = 0;
             } else if (level.flags.is_cavernous_lev && !in_town(dpx, dpy)) {
-                lev->typ = CORR;
+                lev->typ = CORR, lev->flags = 0;
             } else {
-                lev->typ = DOOR;
-                lev->doormask = D_NODOOR;
+                lev->typ = DOOR, lev->doormask = D_NODOOR;
             }
 /*JP
             digtxt = "You make an opening in the wall.";
@@ -685,7 +684,7 @@ int ttyp;
         if (u.utraptype == TT_BURIEDBALL)
             buried_ball_to_punishment();
         else if (u.utraptype == TT_INFLOOR)
-            u.utrap = 0;
+            reset_utrap(FALSE);
     }
 
     /* these furniture checks were in dighole(), but wand
@@ -701,6 +700,7 @@ int ttyp;
     } else if (lev->typ == DRAWBRIDGE_DOWN
                || (is_drawbridge_wall(x, y) >= 0)) {
         int bx = x, by = y;
+
         /* if under the portcullis, the bridge is adjacent */
         (void) find_drawbridge(&bx, &by);
         destroy_drawbridge(bx, by);
@@ -738,7 +738,10 @@ int ttyp;
     if (ttyp == PIT) {
         if (madeby_u) {
             if (x != u.ux || y != u.uy)
+/*JP
                 You("dig an adjacent pit.");
+*/
+                You("\97×\82Ì\97\8e\82µ\8c\8a\82ð\8c@\82Á\82½\81D");
             else
 /*JP
                 You("dig a pit in the %s.", surface_type);
@@ -749,30 +752,35 @@ int ttyp;
                 pay_for_damage("ruin", FALSE);
 */
                 pay_for_damage("\89ó\82·", FALSE);
-        } else if (!madeby_obj && canseemon(madeby))
+        } else if (!madeby_obj && canseemon(madeby)) {
 /*JP
             pline("%s digs a pit in the %s.", Monnam(madeby), surface_type);
 */
             pline("%s\82Í%s\82É\97\8e\82µ\8c\8a\82ð\8c@\82Á\82½\81D", Monnam(madeby), surface_type);
-        else if (cansee(x, y) && flags.verbose)
+        } else if (cansee(x, y) && flags.verbose) {
 /*JP
             pline("A pit appears in the %s.", surface_type);
 */
             pline("\97\8e\82µ\8c\8a\82ª%s\82É\8c»\82í\82ê\82½\81D", surface_type);
+        }
+        /* in case we're digging down while encased in solid rock
+           which is blocking levitation or flight */
+        switch_terrain();
+        if (Levitation || Flying)
+            wont_fall = TRUE;
 
         if (at_u) {
             if (!wont_fall) {
-                u.utrap = rn1(4, 2);
-                u.utraptype = TT_PIT;
+                set_utrap(rn1(4, 2), TT_PIT);
                 vision_full_recalc = 1; /* vision limits change */
             } else
-                u.utrap = 0;
+                reset_utrap(TRUE);
             if (oldobjs != newobjs) /* something unearthed */
                 (void) pickup(1);   /* detects pit */
         } else if (mtmp) {
             if (is_flyer(mtmp->data) || is_floater(mtmp->data)) {
                 if (canseemon(mtmp))
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                     pline("%s %s over the pit.", Monnam(mtmp),
                           (is_flyer(mtmp->data)) ? "flies" : "floats");
 #else
@@ -804,6 +812,13 @@ int ttyp;
             pline("%s\82É\8c\8a\82ª\8c»\82í\82ê\82½\81D", surface_type);
 
         if (at_u) {
+            /* in case we're digging down while encased in solid rock
+               which is blocking levitation or flight */
+            switch_terrain();
+            if (Levitation || Flying)
+                wont_fall = TRUE;
+
+            /* check for leashed pet that can't fall right now */
             if (!u.ustuck && !wont_fall && !next_to_u()) {
 /*JP
                 You("are jerked back by your pet!");
@@ -994,9 +1009,9 @@ coord *cc;
         }
 
     } else if ((boulder_here = sobj_at(BOULDER, dig_x, dig_y)) != 0) {
-        if (ttmp && (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT)
+        if (ttmp && is_pit(ttmp->ttyp)
             && rn2(2)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             pline_The("boulder settles into the %spit.",
                       (dig_x != u.ux || dig_y != u.uy) ? "adjacent " : "");
 #else
@@ -1010,7 +1025,7 @@ coord *cc;
              * fills it.  Final outcome:  no hole, no boulder.
              */
 /*JP
-            pline("KADOOM! The boulder falls in!");
+            pline("KADOOM!  The boulder falls in!");
 */
             pline("\82Ç\82Ç\81[\82ñ\81I\8aâ\82Í\97\8e\82¿\82½\81I");
             (void) delfloortrap(ttmp);
@@ -1032,7 +1047,7 @@ coord *cc;
              * We can't dig a hole here since that will destroy
              * the drawbridge.  The following is a cop-out. --dlc
              */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             pline_The("%s %shere is too hard to dig in.",
                       surface(dig_x, dig_y),
                       (dig_x != u.ux || dig_y != u.uy) ? "t" : "");
@@ -1069,9 +1084,10 @@ coord *cc;
     } else {
         typ = fillholetyp(dig_x, dig_y, FALSE);
 
+        lev->flags = 0;
         if (typ != ROOM) {
             lev->typ = typ;
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             liquid_flow(dig_x, dig_y, typ, ttmp,
                         "As you dig, the hole fills with %s!");
 #else
@@ -1183,7 +1199,7 @@ coord *cc;
         pline("\82±\82Ì\95æ\82Í\96¢\8eg\97p\82Ì\82æ\82¤\82¾\81D\8aï\96­\82¾\81D\81D\81D");
         break;
     }
-    levl[dig_x][dig_y].typ = ROOM;
+    levl[dig_x][dig_y].typ = ROOM, levl[dig_x][dig_y].flags = 0;
     del_engr_at(dig_x, dig_y);
     newsym(dig_x, dig_y);
     return;
@@ -1219,7 +1235,7 @@ struct obj *obj;
               !res ? "Unfortunately," : "But", verb);
 #else
         pline("%s\82­\82à\82Ì\91\83\82É\82Ð\82Á\82©\82©\82Á\82Ä\82¢\82é\8aÔ\82Í%s\81D",
-              !res ? "\8ec\94O\82È\82ª\82ç" : "\82µ\82©\82µ", jconj(verb, "\82È\82¢"));
+              !res ? "\8ec\94O\82È\82ª\82ç" : "\82µ\82©\82µ", jcannot(verb));
 #endif
         return res;
     }
@@ -1395,7 +1411,7 @@ struct obj *obj;
                            KILLED_BY);
             } else if (u.utrap && u.utraptype == TT_PIT && trap
                        && (trap_with_u = t_at(u.ux, u.uy))
-                       && (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT)
+                       && is_pit(trap->ttyp)
                        && !conjoined_pits(trap, trap_with_u, FALSE)) {
                 int idx;
 
@@ -1415,8 +1431,8 @@ struct obj *obj;
                     pline("\82 \82È\82½\82Í\97\8e\82µ\8c\8a\82Ì\8aÔ\82©\82ç\82²\82Ý\82ð\8eæ\82è\82Ì\82¼\82¢\82½\81D");
                 }
             } else if (u.utrap && u.utraptype == TT_PIT
-                       && (trap_with_u = t_at(u.ux, u.uy))) {
-#if 0 /*JP*/
+                       && (trap_with_u = t_at(u.ux, u.uy)) != 0) {
+#if 0 /*JP:T*/
                 You("swing %s, but the rubble has no place to go.",
                     yobjnam(obj, (char *) 0));
 #else
@@ -1510,7 +1526,7 @@ struct obj *obj;
             is_pool(u.ux, u.uy) ? "\90\85\96Ê\89º" : "\97n\8aâ\82Ì\92\86");
 #endif
     } else if ((trap = t_at(u.ux, u.uy)) != 0
-               && uteetering_at_seen_pit(trap)) {
+               && (uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {
         dotrap(trap, FORCEBUNGLE);
         /* might escape trap and still be teetering at brink */
         if (!u.utrap)
@@ -1656,7 +1672,7 @@ register struct monst *mtmp;
         newsym(mtmp->mx, mtmp->my);
         return FALSE;
     } else if (here->typ == SCORR) {
-        here->typ = CORR;
+        here->typ = CORR, here->flags = 0;
         unblock_point(mtmp->mx, mtmp->my);
         newsym(mtmp->mx, mtmp->my);
         draft_message(FALSE); /* "You feel a draft." */
@@ -1684,20 +1700,19 @@ register struct monst *mtmp;
         if (*in_rooms(mtmp->mx, mtmp->my, SHOPBASE))
             add_damage(mtmp->mx, mtmp->my, 0L);
         if (level.flags.is_maze_lev) {
-            here->typ = ROOM;
+            here->typ = ROOM, here->flags = 0;
         } else if (level.flags.is_cavernous_lev
                    && !in_town(mtmp->mx, mtmp->my)) {
-            here->typ = CORR;
+            here->typ = CORR, here->flags = 0;
         } else {
-            here->typ = DOOR;
-            here->doormask = D_NODOOR;
+            here->typ = DOOR, here->doormask = D_NODOOR;
         }
     } else if (IS_TREE(here->typ)) {
-        here->typ = ROOM;
+        here->typ = ROOM, here->flags = 0;
         if (pile && pile < 5)
             (void) rnd_treefruit_at(mtmp->mx, mtmp->my);
     } else {
-        here->typ = CORR;
+        here->typ = CORR, here->flags = 0;
         if (pile && pile < 5)
             (void) mksobj_at((pile == 1) ? BOULDER : ROCK, mtmp->mx, mtmp->my,
                              TRUE, FALSE);
@@ -1797,7 +1812,7 @@ zap_dig()
 
         if (!is_whirly(mtmp->data)) {
             if (is_animal(mtmp->data))
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 You("pierce %s %s wall!", s_suffix(mon_nam(mtmp)),
                     mbodypart(mtmp, STOMACH));
 #else
@@ -1815,7 +1830,7 @@ zap_dig()
             if (u.dz < 0 || On_stairs(u.ux, u.uy)) {
                 int dmg;
                 if (On_stairs(u.ux, u.uy))
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                     pline_The("beam bounces off the %s and hits the %s.",
                               (u.ux == xdnladder || u.ux == xupladder)
                                   ? "ladder"
@@ -1883,8 +1898,7 @@ zap_dig()
             struct trap *adjpit = t_at(zx, zy);
             if ((diridx < 8) && !conjoined_pits(adjpit, trap_with_u, FALSE)) {
                 digdepth = 0; /* limited to the adjacent location only */
-                if (!(adjpit && (adjpit->ttyp == PIT
-                                 || adjpit->ttyp == SPIKED_PIT))) {
+                if (!(adjpit && is_pit(adjpit->ttyp))) {
                     char buf[BUFSZ];
                     cc.x = zx;
                     cc.y = zy;
@@ -1898,7 +1912,7 @@ zap_dig()
                     }
                 }
                 if (adjpit
-                    && (adjpit->ttyp == PIT || adjpit->ttyp == SPIKED_PIT)) {
+                    && is_pit(adjpit->ttyp)) {
                     int adjidx = (diridx + 4) % 8;
                     trap_with_u->conjoined |= (1 << diridx);
                     adjpit->conjoined |= (1 << adjidx);
@@ -1919,7 +1933,7 @@ zap_dig()
                 shopdoor = TRUE;
             }
             if (room->typ == SDOOR)
-                room->typ = DOOR;
+                room->typ = DOOR; /* doormask set below */
             else if (cansee(zx, zy))
 /*JP
                 pline_The("door is razed!");
@@ -1938,7 +1952,7 @@ zap_dig()
                         add_damage(zx, zy, SHOP_WALL_COST);
                         shopwall = TRUE;
                     }
-                    room->typ = ROOM;
+                    room->typ = ROOM, room->flags = 0;
                     unblock_point(zx, zy); /* vision */
                 } else if (!Blind)
 /*JP
@@ -1948,7 +1962,7 @@ zap_dig()
                 break;
             } else if (IS_TREE(room->typ)) { /* check trees before stone */
                 if (!(room->wall_info & W_NONDIGGABLE)) {
-                    room->typ = ROOM;
+                    room->typ = ROOM, room->flags = 0;
                     unblock_point(zx, zy); /* vision */
                 } else if (!Blind)
 /*JP
@@ -1958,7 +1972,7 @@ zap_dig()
                 break;
             } else if (room->typ == STONE || room->typ == SCORR) {
                 if (!(room->wall_info & W_NONDIGGABLE)) {
-                    room->typ = CORR;
+                    room->typ = CORR, room->flags = 0;
                     unblock_point(zx, zy); /* vision */
                 } else if (!Blind)
 /*JP
@@ -1977,17 +1991,16 @@ zap_dig()
                 }
                 watch_dig((struct monst *) 0, zx, zy, TRUE);
                 if (level.flags.is_cavernous_lev && !in_town(zx, zy)) {
-                    room->typ = CORR;
+                    room->typ = CORR, room->flags = 0;
                 } else {
-                    room->typ = DOOR;
-                    room->doormask = D_NODOOR;
+                    room->typ = DOOR, room->doormask = D_NODOOR;
                 }
                 digdepth -= 2;
             } else if (IS_TREE(room->typ)) {
-                room->typ = ROOM;
+                room->typ = ROOM, room->flags = 0;
                 digdepth -= 2;
             } else { /* IS_ROCK but not IS_WALL or SDOOR */
-                room->typ = CORR;
+                room->typ = CORR, room->flags = 0;
                 digdepth--;
             }
             unblock_point(zx, zy); /* vision */
@@ -1999,8 +2012,10 @@ zap_dig()
 
     if (pitflow && isok(flow_x, flow_y)) {
         struct trap *ttmp = t_at(flow_x, flow_y);
-        if (ttmp && (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT)) {
+
+        if (ttmp && is_pit(ttmp->ttyp)) {
             schar filltyp = fillholetyp(ttmp->tx, ttmp->ty, TRUE);
+
             if (filltyp != ROOM)
                 pit_flow(ttmp, filltyp);
         }
@@ -2029,9 +2044,9 @@ char *msg;
     struct rm *room;
     const char *foundation_msg =
 /*JP
-        "The foundation is too hard to dig through from this angle.";
+                 "The foundation is too hard to dig through from this angle.";
 */
-        "\8aî\91b\82Í\82±\82Ì\8ap\93x\82©\82ç\8c@\82é\82É\82Í\8cÅ\82·\82¬\82é\81D";
+                 "\8aî\91b\82Í\82±\82Ì\8ap\93x\82©\82ç\8c@\82é\82É\82Í\8cÅ\82·\82¬\82é\81D";
 
     if (!cc)
         return FALSE;
@@ -2039,7 +2054,7 @@ char *msg;
         return FALSE;
     *msg = '\0';
     room = &levl[cc->x][cc->y];
-    ltyp = room->typ;
+    ltyp = room->typ, room->flags = 0;
 
     if (is_pool(cc->x, cc->y) || is_lava(cc->x, cc->y)) {
         /* this is handled by the caller after we return FALSE */
@@ -2135,7 +2150,7 @@ char *msg;
             supporting = "\92µ\82Ë\8b´";
 
         if (supporting) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             Sprintf(msg, "The %s%ssupporting structures remain intact.",
                     supporting ? s_suffix(supporting) : "",
                     supporting ? " " : "");
@@ -2158,15 +2173,14 @@ pit_flow(trap, filltyp)
 struct trap *trap;
 schar filltyp;
 {
-    if (trap && (filltyp != ROOM)
-        && (trap->ttyp == PIT || trap->ttyp == SPIKED_PIT)) {
+    if (trap && filltyp != ROOM && is_pit(trap->ttyp)) {
         struct trap t;
         int idx;
 
         t = *trap;
-        levl[trap->tx][trap->ty].typ = filltyp;
-        liquid_flow(trap->tx, trap->ty, filltyp, trap,
-                    (trap->tx == u.ux && trap->ty == u.uy)
+        levl[t.tx][t.ty].typ = filltyp, levl[t.tx][t.ty].flags = 0;
+        liquid_flow(t.tx, t.ty, filltyp, trap,
+                    (t.tx == u.ux && t.ty == u.uy)
 /*JP
                         ? "Suddenly %s flows in from the adjacent pit!"
 */
@@ -2258,8 +2272,7 @@ buried_ball_to_punishment()
             (void) stop_timer(RUST_METAL, obj_to_any(ball));
 #endif
         punish(ball); /* use ball as flag for unearthed buried ball */
-        u.utrap = 0;
-        u.utraptype = 0;
+        reset_utrap(FALSE);
         del_engr_at(cc.x, cc.y);
         newsym(cc.x, cc.y);
     }
@@ -2283,8 +2296,7 @@ buried_ball_to_freedom()
 #endif
         place_object(ball, cc.x, cc.y);
         stackobj(ball);
-        u.utrap = 0;
-        u.utraptype = 0;
+        reset_utrap(TRUE);
         del_engr_at(cc.x, cc.y);
         newsym(cc.x, cc.y);
     }
@@ -2393,8 +2405,13 @@ int x, y;
     newsym(x, y);
 
     if (costly && loss) {
+#if 0 /*JP:T*/
         You("owe %s %ld %s for burying merchandise.", mon_nam(shkp), loss,
             currency(loss));
+#else
+        You("\96\84\82Ü\82Á\82½\8f¤\95i\82É\8aÖ\82µ\82Ä%s\82É%ld%s\82Ì\95\89\8dÂ\82ð\95\89\82Á\82½\81D", mon_nam(shkp), loss,
+            currency(loss));
+#endif
     }
 }
 
@@ -2587,7 +2604,7 @@ escape_tomb()
         You("attempt a teleport spell.");
 */
         You("\8fu\8aÔ\88Ú\93®\82ð\8e\8e\82Ý\82½\81D");
-        (void) dotele();        /* calls unearth_you() */
+        (void) dotele(FALSE);        /* calls unearth_you() */
     } else if (u.uburied) { /* still buried after 'port attempt */
         boolean good;
 
@@ -2596,7 +2613,7 @@ escape_tomb()
             || (unsolid(youmonst.data)
                 && youmonst.data != &mons[PM_WATER_ELEMENTAL])
             || (tunnels(youmonst.data) && !needspick(youmonst.data))) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
             You("%s up through the %s.",
                 (tunnels(youmonst.data) && !needspick(youmonst.data))
                    ? "try to tunnel"