OSDN Git Service

update year to 2023
[jnethack/source.git] / src / dig.c
index 2fb49d8..0cb4220 100644 (file)
--- a/src/dig.c
+++ b/src/dig.c
@@ -5,7 +5,7 @@
 
 /* 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-2023            */
 /* JNetHack may be freely redistributed.  See license for details. */
 
 #include "hack.h"
@@ -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
@@ -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
@@ -406,7 +406,7 @@ 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
@@ -415,7 +415,7 @@ dig(VOID_ARGS)
 #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
@@ -780,7 +780,7 @@ int ttyp;
         } 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
@@ -1011,7 +1011,7 @@ coord *cc;
     } else if ((boulder_here = sobj_at(BOULDER, dig_x, dig_y)) != 0) {
         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
@@ -1047,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" : "");
@@ -1087,7 +1087,7 @@ coord *cc;
         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
@@ -1235,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;
     }
@@ -1432,7 +1432,7 @@ struct obj *obj;
                 }
             } else if (u.utrap && u.utraptype == TT_PIT
                        && (trap_with_u = t_at(u.ux, u.uy)) != 0) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
                 You("swing %s, but the rubble has no place to go.",
                     yobjnam(obj, (char *) 0));
 #else
@@ -1526,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)
@@ -1812,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
@@ -1830,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"
@@ -2044,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;
@@ -2150,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 ? " " : "");
@@ -2405,7 +2405,7 @@ int x, y;
     newsym(x, y);
 
     if (costly && loss) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
         You("owe %s %ld %s for burying merchandise.", mon_nam(shkp), loss,
             currency(loss));
 #else
@@ -2613,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"