OSDN Git Service

patch src/
[jnethack/source.git] / src / vault.c
index 5b73dad..22e1c01 100644 (file)
@@ -2,6 +2,11 @@
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* 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            */
+/* JNetHack may be freely redistributed.  See license for details. */
+
 #include "hack.h"
 
 STATIC_DCL struct monst *NDECL(findgd);
@@ -92,9 +97,15 @@ boolean forceshow;
         egrd->fcbeg++;
     }
     if (sawcorridor)
+/*JP
         pline_The("corridor disappears.");
+*/
+        pline("\92Ê\98H\82Í\8fÁ\82¦\82½\81D");
     if (IS_ROCK(levl[u.ux][u.uy].typ))
+/*JP
         You("are encased in rock.");
+*/
+        You("\90Î\82É\82Â\82Â\82Ü\82ê\82½\81D");
     return TRUE;
 }
 
@@ -335,10 +346,17 @@ invault()
         reset_faint(); /* if fainted - wake up */
         gsensed = !canspotmon(guard);
         if (!gsensed)
+#if 0 /*JP*/
             pline("Suddenly one of the Vault's %s enters!",
                   makeplural(guard->data->mname));
+#else
+            pline("\93Ë\91R\81C\91q\8cÉ\82Ì\94Ô\95º\82ª\93ü\82Á\82Ä\82«\82½\81I");
+#endif
         else
+/*JP
             pline("Someone else has entered the Vault.");
+*/
+            pline("\92N\82©\82ª\91q\8cÉ\82É\93ü\82Á\82Ä\82«\82½\81D");
         newsym(guard->mx, guard->my);
         if (u.uswallow) {
             /* can't interrogate hero, don't interrogate engulfer */
@@ -351,10 +369,16 @@ invault()
         if (youmonst.m_ap_type == M_AP_OBJECT || u.uundetected) {
             if (youmonst.m_ap_type == M_AP_OBJECT
                 && youmonst.mappearance != GOLD_PIECE)
+/*JP
                 verbalize("Hey! Who left that %s in here?",
+*/
+                verbalize("\82¨\82¢\81I\82¾\82ê\82ª\82±\82Ì%s\82ð\82±\82±\82É\92u\82¢\82Ä\8ds\82Á\82½\82ñ\82¾\81H",
                           mimic_obj_name(&youmonst));
             /* You're mimicking some object or you're hidden. */
+/*JP
             pline("Puzzled, %s turns around and leaves.", mhe(guard));
+*/
+            pline("%s\82Í\8d¢\98f\82µ\82È\82ª\82ç\81C\8cü\82«\92¼\82Á\82Ä\8b\8e\82Á\82Ä\82¢\82Á\82½\81D", mhe(guard));
             mongone(guard);
             return;
         }
@@ -362,7 +386,10 @@ invault()
             /* [we ought to record whether this this message has already
                been given in order to vary it upon repeat visits, but
                discarding the monster and its egd data renders that hard] */
+/*JP
             verbalize("I'll be back when you're ready to speak to me!");
+*/
+            verbalize("\98b\82¹\82é\82æ\82¤\82É\82È\82Á\82½\82ç\96ß\82Á\82Ä\82«\82Ä\82â\82é\81I");
             mongone(guard);
             return;
         }
@@ -374,9 +401,16 @@ invault()
         }
         trycount = 5;
         do {
+/*JP
             getlin("\"Hello stranger, who are you?\" -", buf);
+*/
+            getlin("\81u\8c©\82È\82¢\8aç\82¾\82È\81C\82¨\82Ü\82¦\82Í\92N\82¾\81H\81v-", buf);
             (void) mungspaces(buf);
+#if 0 /*JP*/
         } while (!letter(buf[0]) && --trycount > 0);
+#else
+        } while (!letter(buf[0]) && !is_kanji(buf[0]) && --trycount > 0);
+#endif
 
         if (u.ualign.type == A_LAWFUL
             /* ignore trailing text, in case player includes rank */
@@ -384,15 +418,27 @@ invault()
             adjalign(-1); /* Liar! */
         }
 
+#if 0 /*JP*/
         if (!strcmpi(buf, "Croesus") || !strcmpi(buf, "Kroisos")
             || !strcmpi(buf, "Creosote")) {
+#else
+    if (!strcmpi(buf, "Croesus") || !strcmpi(buf, "Kroisos")
+        || !strcmpi(buf, "Creosote")
+        || !strcmp(buf, "\83N\83\8d\83C\83\\83X") || !strcmp(buf, "\83N\83\8c\83I\83\\81[\83g")) {
+#endif
             if (!mvitals[PM_CROESUS].died) {
                 verbalize(
+/*JP
                     "Oh, yes, of course.  Sorry to have disturbed you.");
+*/
+                    "\82¢\82â\81C\82±\82è\82á\81C\82¦\81[\82Æ\81C\82¨\91\9b\82ª\82¹\82µ\82Ü\82µ\82½\81D");
                 mongone(guard);
             } else {
                 setmangry(guard);
+/*JP
                 verbalize("Back from the dead, are you?  I'll remedy that!");
+*/
+                verbalize("\82Ù\82¤\81I\8e\80\82Ì\90¢\8aE\82©\82ç\96ß\82Á\82Ä\82«\82½\82Ì\82©\81H\82¤\82»\82È\82ç\8fã\8eè\82É\82Â\82¯\81I");
                 /* don't want guard to waste next turn wielding a weapon */
                 if (!MON_WEP(guard)) {
                     guard->weapon_check = NEED_HTH_WEAPON;
@@ -401,18 +447,33 @@ invault()
             }
             return;
         }
+/*JP
         verbalize("I don't know you.");
+*/
+        verbalize("\92m\82ç\82ñ\82È\81D");
         umoney = money_cnt(invent);
         if (Deaf) {
             ;
         } else if (!umoney && !hidden_gold()) {
+/*JP
             verbalize("Please follow me.");
+*/
+            verbalize("\8e\84\82Ì\8cã\82É\82Â\82¢\82Ä\82«\82È\82³\82¢\81D");
         } else {
             if (!umoney)
+/*JP
                 verbalize("You have hidden gold.");
+*/
+                verbalize("\82Ü\82¾\8bà\89Ý\82ð\89B\82µ\82Ä\82é\82È\81D");
             verbalize(
+/*JP
                 "Most likely all your gold was stolen from this vault.");
+*/
+                "\91q\8cÉ\82©\82ç\93\90\82ñ\82¾\8bà\89Ý\82ª\82 \82é\82¾\82ë\82¤\81D");
+/*JP
             verbalize("Please drop that gold and follow me.");
+*/
+            verbalize("\82»\82ê\82ð\82»\82Á\82­\82è\96ß\82µ\82Ä\82©\82ç\81C\8e\84\82Ì\8cã\82É\82Â\82¢\82Ä\82«\82È\82³\82¢\81D");
         }
         EGD(guard)->gdx = gx;
         EGD(guard)->gdy = gy;
@@ -521,13 +582,25 @@ struct monst *grd;
 
     if (movedgold || fixed) {
         if (in_fcorridor(grd, grd->mx, grd->my) || cansee(grd->mx, grd->my))
+/*JP
             pline("%s whispers an incantation.", noit_Monnam(grd));
+*/
+            pline("%s\82Í\8eô\95\82ð\82³\82³\82â\82¢\82½\81D", noit_Monnam(grd));
         else
+/*JP
             You_hear("a distant chant.");
+*/
+            You_hear("\89\93\95û\82Å\82Ì\8eô\95\82ð\95·\82¢\82½\81D");
         if (movedgold)
+/*JP
             pline("A mysterious force moves the gold into the vault.");
+*/
+            pline("\95s\8ev\8bc\82È\97Í\82ª\8bà\89Ý\82ð\91q\8cÉ\82Ö\89^\82ñ\82¾\81D");
         if (fixed)
+/*JP
             pline_The("damaged vault's walls are magically restored!");
+*/
+            pline("\8f\9d\82Â\82¢\82½\91q\8cÉ\82Ì\95Ç\82Í\96\82\96@\82Å\95\9c\8c³\82³\82ê\82½\81I");
     }
 }
 
@@ -587,16 +660,27 @@ register struct monst *grd;
     if (egrd->fcend == 1) {
         if (u_in_vault && (u_carry_gold || um_dist(grd->mx, grd->my, 1))) {
             if (egrd->warncnt == 3 && !Deaf)
+#if 0 /*JP*/
                 verbalize("I repeat, %sfollow me!",
                           u_carry_gold
                               ? (!umoney ? "drop that hidden money and "
                                          : "drop that money and ")
                               : "");
+#else
+                verbalize("\8cJ\82è\95Ô\82·\81I%s\8e\84\82É\82Â\82¢\82Ä\82±\82¢\81I",
+                          u_carry_gold
+                              ? (!umoney ? "\89B\82µ\8e\9d\82Á\82Ä\82é\8bà\82ð\92u\82¢\82Ä"
+                                         : "\8bà\82ð\92u\82¢\82Ä")
+                              : "");
+#endif
             if (egrd->warncnt == 7) {
                 m = grd->mx;
                 n = grd->my;
                 if (!Deaf)
+/*JP
                     verbalize("You've been warned, knave!");
+*/
+                    verbalize("\8cx\8d\90\82Í\82µ\82½\82¼\81C\88«\93}\82ß\81I");
                 mnexto(grd);
                 levl[m][n].typ = egrd->fakecorr[0].ftyp;
                 newsym(m, n);
@@ -619,17 +703,30 @@ register struct monst *grd;
                 grd->mpeaceful = 0;
             letknow:
                 if (!cansee(grd->mx, grd->my) || !mon_visible(grd))
+/*JP
                     You_hear("the shrill sound of a guard's whistle.");
+*/
+                    You_hear("\94Ô\95º\82Ì\89s\82¢\93J\82Ì\89¹\82ð\95·\82¢\82½\81D");
                 else
+#if 0 /*JP*/
                     You(um_dist(grd->mx, grd->my, 2)
                             ? "see %s approaching."
                             : "are confronted by %s.",
                         /* "an angry guard" */
                         x_monnam(grd, ARTICLE_A, "angry", 0, FALSE));
+#else
+                    You(um_dist(grd->mx, grd->my, 2)
+                        ? "%s\82ª\8bß\82Ã\82¢\82Ä\82­\82é\82Ì\82ð\8c©\82½\81D"
+                        : "%s\82Æ\91Î\9b³\82µ\82½\81D",
+                        x_monnam(grd, ARTICLE_A, "\93{\82Á\82½", 0, FALSE));
+#endif
                 return -1;
             } else {
                 if (!Deaf)
+/*JP
                     verbalize("Well, begone.");
+*/
+                    verbalize("\97§\82¿\8b\8e\82ê\81D");
                 wallify_vault(grd);
                 egrd->gddone = 1;
                 goto cleanup;
@@ -642,7 +739,10 @@ register struct monst *grd;
             && !egrd->gddone && !in_fcorridor(grd, u.ux, u.uy)
             && levl[egrd->fakecorr[0].fx][egrd->fakecorr[0].fy].typ
                    == egrd->fakecorr[0].ftyp) {
+/*JP
             pline("%s, confused, disappears.", noit_Monnam(grd));
+*/
+            pline("%s\82Í\8d¬\97\90\82µ\81C\8fÁ\82¦\82½\81D", noit_Monnam(grd));
             disappear_msg_seen = TRUE;
             goto cleanup;
         }
@@ -656,11 +756,17 @@ register struct monst *grd;
             if (egrd->warncnt < 6) {
                 egrd->warncnt = 6;
                 if (!Deaf)
+/*JP
                     verbalize("Drop all your gold, scoundrel!");
+*/
+                    verbalize("\8bà\82ð\91S\95\94\92u\82¢\82Ä\82ä\82¯\81C\82È\82ç\82¸\82à\82Ì\81I");
                 return 0;
             } else {
                 if (!Deaf)
+/*JP
                     verbalize("So be it, rogue!");
+*/
+                    verbalize("\93\90\90l\82ß\81I");
                 grd->mpeaceful = 0;
                 return -1;
             }
@@ -687,7 +793,10 @@ register struct monst *grd;
             /* just for insurance... */
             if (MON_AT(m, n) && m != grd->mx && n != grd->my) {
                 if (!Deaf)
+/*JP
                     verbalize("Out of my way, scum!");
+*/
+                    verbalize("\96Ú\82Ì\91O\82©\82ç\8fÁ\82¦\82ë\81C\83N\83\\82Á\82½\82ê\81I");
                 (void) rloc(m_at(m, n), FALSE);
             }
             remove_monster(grd->mx, grd->my);
@@ -696,8 +805,13 @@ register struct monst *grd;
             mpickgold(grd); /* does a newsym */
         }
         if (cansee(m, n))
+#if 0 /*JP*/
             pline("%s%s picks up the gold.", Monnam(grd),
                   grd->mpeaceful ? " calms down and" : "");
+#else
+            pline("%s\82Í%s\8bà\89Ý\82ð\8fE\82Á\82½\81D", Monnam(grd),
+                  grd->mpeaceful ? "\93{\82è\82ð\90Ã\82ß" : "");
+#endif
         if (x != grd->mx || y != grd->my) {
             remove_monster(grd->mx, grd->my);
             newsym(grd->mx, grd->my);
@@ -712,7 +826,10 @@ register struct monst *grd;
     if (um_dist(grd->mx, grd->my, 1) || egrd->gddone) {
         if (!egrd->gddone && !rn2(10) && !Deaf && !u.uswallow
             && !(u.ustuck && !sticks(youmonst.data)))
+/*JP
             verbalize("Move along!");
+*/
+            verbalize("\97£\82ê\82é\82È\81I");
         restfakecorr(grd);
         return 0; /* didn't move */
     }
@@ -833,7 +950,10 @@ newpos:
         restfakecorr(grd);
         if (!semi_dead && (in_fcorridor(grd, u.ux, u.uy) || cansee(x, y))) {
             if (!disappear_msg_seen && see_guard)
+/*JP
                 pline("Suddenly, %s disappears.", noit_mon_nam(grd));
+*/
+                pline("\93Ë\91R\81C%s\82Í\8fÁ\82¦\82½\81D", noit_mon_nam(grd));
             return 1;
         }
         return -2;
@@ -869,8 +989,13 @@ paygd()
         return;
 
     if (u.uinvault) {
+#if 0 /*JP*/
         Your("%ld %s goes into the Magic Memory Vault.", umoney,
              currency(umoney));
+#else
+        Your("%ld%s\82Í\96\82\96@\82Ì\8bL\94O\91q\8cÉ\82É\93ü\82Á\82½\81D", umoney,
+             currency(umoney));
+#endif
         gx = u.ux;
         gy = u.uy;
     } else {
@@ -879,11 +1004,19 @@ paygd()
             return;
         }
         mnexto(grd);
+/*JP
         pline("%s remits your gold to the vault.", Monnam(grd));
+*/
+        pline("%s\82Í\82 \82È\82½\82Ì\8bà\89Ý\82ð\91q\8cÉ\82É\91\97\82Á\82½\81D", Monnam(grd));
         gx = rooms[EGD(grd)->vroom].lx + rn2(2);
         gy = rooms[EGD(grd)->vroom].ly + rn2(2);
+#if 0 /*JP*/
         Sprintf(buf, "To Croesus: here's the gold recovered from %s the %s.",
                 plname, mons[u.umonster].mname);
+#else
+        Sprintf(buf, "\83N\83\8d\83C\83\\83X\82Ö: \82±\82±\82É%s\82Ì%s\82©\82ç\8eæ\82è\96ß\82µ\82½\8bà\89Ý\82ð\91\97\82é\81D",
+                mons[u.umonster].mname, plname);
+#endif
         make_grave(gx, gy, buf);
     }
     for (coins = invent; coins; coins = nextcoins) {