OSDN Git Service

patch src/
[jnethack/source.git] / src / mthrowu.c
index b63a479..34d69df 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 int FDECL(drop_throw, (struct obj *, BOOLEAN_P, int, int));
@@ -15,9 +20,15 @@ STATIC_DCL int FDECL(drop_throw, (struct obj *, BOOLEAN_P, int, int));
  * Keep consistent with breath weapons in zap.c, and AD_* in monattk.h.
  */
 STATIC_OVL NEARDATA const char *breathwep[] = {
+#if 0 /*JP*/
     "fragments", "fire", "frost", "sleep gas", "a disintegration blast",
     "lightning", "poison gas", "acid", "strange breath #8",
     "strange breath #9"
+#else
+    "\94j\95Ð", "\89\8a", "\97â\8bC", "\90\87\96°\83K\83X", "\95ª\89ð\82Ì\91§",
+    "\88î\8dÈ", "\93Å\82Ì\91§", "\8e_", "strange breath #8",
+    "strange breath #9"
+#endif
 };
 
 extern boolean notonhead; /* for long worms */
@@ -42,12 +53,19 @@ const char *name; /* if null, then format `obj' */
         knm = strcpy(knmbuf, killer_xname(obj));
         kprefix = KILLED_BY; /* killer_name supplies "an" if warranted */
     } else {
+#if 0 /*JP*/
         knm = name;
         /* [perhaps ought to check for plural here to] */
         if (!strncmpi(name, "the ", 4) || !strncmpi(name, "an ", 3)
             || !strncmpi(name, "a ", 2))
             kprefix = KILLED_BY;
+#else
+        knm = strcpy(knmbuf, name);
+#endif
     }
+#if 1 /*JP*/
+    strcat(knmbuf, "\82É\93\96\82½\82Á\82Ä");
+#endif
     onm = (obj && obj_is_pname(obj)) ? the(name) : (obj && obj->quan > 1L)
                                                        ? name
                                                        : an(name);
@@ -55,26 +73,47 @@ const char *name; /* if null, then format `obj' */
 
     if (u.uac + tlev <= rnd(20)) {
         if (Blind || !flags.verbose)
+/*JP
             pline("It misses.");
+*/
+            pline("\82»\82ê\82Í\82Í\82¸\82ê\82½\81D");
         else
+/*JP
             You("are almost hit by %s.", onm);
+*/
+            pline("\82à\82¤\8f­\82µ\82Å%s\82É\96½\92\86\82·\82é\82Æ\82±\82ë\82¾\82Á\82½\81I",onm);
         return 0;
     } else {
         if (Blind || !flags.verbose)
+/*JP
             You("are hit%s", exclam(dam));
+*/
+            pline("\89½\82©\82ª\82 \82È\82½\82É\96½\92\86\82µ\82½\81I");
         else
+/*JP
             You("are hit by %s%s", onm, exclam(dam));
+*/
+            pline("%s\82ª\82 \82È\82½\82É\96½\92\86\82µ\82½\81I", onm);
 
         if (obj && objects[obj->otyp].oc_material == SILVER && Hate_silver) {
             /* extra damage already applied by dmgval() */
+/*JP
             pline_The("silver sears your flesh!");
+*/
+            pline("\82 \82È\82½\82Ì\91Ì\82Í\8bâ\82Å\8fÄ\82©\82ê\82½\81I");
             exercise(A_CON, FALSE);
         }
         if (is_acid && Acid_resistance)
+/*JP
             pline("It doesn't seem to hurt you.");
+*/
+            pline("\82 \82È\82½\82Í\8f\9d\82Â\82©\82È\82©\82Á\82½\81D");
         else {
             if (is_acid)
+/*JP
                 pline("It burns!");
+*/
+                pline("\8e_\82Å\8fÄ\82©\82ê\82½\81I");
             losehp(dam, knm, kprefix); /* acid damage */
             exercise(A_STR, FALSE);
         }
@@ -113,8 +152,13 @@ int x, y;
         if (down_gate(x, y) != -1)
             objgone = ship_object(obj, x, y, FALSE);
         if (!objgone) {
+#if 0 /*JP*/
             if (!flooreffects(obj, x, y,
                               "fall")) { /* don't double-dip on damage */
+#else
+            if (!flooreffects(obj, x, y,
+                              "\97\8e\82¿\82é")) { /* don't double-dip on damage */
+#endif
                 place_object(obj, x, y);
                 if (!mtmp && x == u.ux && y == u.uy)
                     mtmp = &youmonst;
@@ -154,7 +198,10 @@ boolean verbose;    /* give message(s) even when you can't see what happened */
             if (vis)
                 miss(distant_name(otmp, mshot_xname), mtmp);
             else if (verbose)
+/*JP
                 pline("It is missed.");
+*/
+                pline("\89½\82©\82ª\82©\82·\82ß\82½\81D");
         }
         if (!range) { /* Last position; object drops */
             (void) drop_throw(otmp, 0, mtmp->mx, mtmp->my);
@@ -178,19 +225,28 @@ boolean verbose;    /* give message(s) even when you can't see what happened */
         if (vis)
             hit(distant_name(otmp, mshot_xname), mtmp, exclam(damage));
         else if (verbose)
+/*JP
             pline("%s is hit%s", Monnam(mtmp), exclam(damage));
+*/
+            pline("%s\82É\96½\92\86\82µ\82½%s", Monnam(mtmp), exclam(damage));
 
         if (otmp->opoisoned && is_poisonable(otmp)) {
             if (resists_poison(mtmp)) {
                 if (vis)
+/*JP
                     pline_The("poison doesn't seem to affect %s.",
+*/
+                    pline("%s\82Í\93Å\82Ì\89e\8b¿\82ð\8eó\82¯\82È\82¢\82æ\82¤\82¾\81D",
                               mon_nam(mtmp));
             } else {
                 if (rn2(30)) {
                     damage += rnd(6);
                 } else {
                     if (vis)
+/*JP
                         pline_The("poison was deadly...");
+*/
+                        pline("\93Å\82Í\92v\8e\80\97Ê\82¾\82Á\82½\81D\81D\81D");
                     damage = mtmp->mhp;
                 }
             }
@@ -198,30 +254,53 @@ boolean verbose;    /* give message(s) even when you can't see what happened */
         if (objects[otmp->otyp].oc_material == SILVER
             && mon_hates_silver(mtmp)) {
             if (vis)
+/*JP
                 pline_The("silver sears %s flesh!", s_suffix(mon_nam(mtmp)));
+*/
+                pline("%s\82Ì\91Ì\82Í\8bâ\82Å\8fÄ\82©\82ê\82½\81I", s_suffix(mon_nam(mtmp)));
             else if (verbose)
+/*JP
                 pline("Its flesh is seared!");
+*/
+                pline("\89½\8eÒ\82©\82Ì\91Ì\82Í\8fÄ\82©\82ê\82½\81I");
         }
         if (otmp->otyp == ACID_VENOM && cansee(mtmp->mx, mtmp->my)) {
             if (resists_acid(mtmp)) {
                 if (vis || verbose)
+/*JP
                     pline("%s is unaffected.", Monnam(mtmp));
+*/
+                    pline("%s\82Í\89e\8b¿\82ð\8eó\82¯\82È\82¢\81D", Monnam(mtmp));
                 damage = 0;
             } else {
                 if (vis)
+/*JP
                     pline_The("acid burns %s!", mon_nam(mtmp));
+*/
+                    pline("%s\82Í\8e_\82Å\8fÄ\82©\82ê\82½\81I", mon_nam(mtmp));
                 else if (verbose)
+/*JP
                     pline("It is burned!");
+*/
+                    pline("\89½\82©\82Í\8fÄ\82©\82ê\82½\81I");
             }
         }
         mtmp->mhp -= damage;
         if (mtmp->mhp < 1) {
             if (vis || verbose)
+#if 0 /*JP*/
                 pline("%s is %s!", Monnam(mtmp),
                       (nonliving(mtmp->data) || is_vampshifter(mtmp)
                        || !canspotmon(mtmp))
                           ? "destroyed"
                           : "killed");
+#else
+                pline("%s\82Í%s\81I", Monnam(mtmp),
+                      (nonliving(mtmp->data) || is_vampshifter(mtmp)
+                       || !canspotmon(mtmp))
+                          ? "\93|\82³\82ê\82½"
+                          : "\8e\80\82ñ\82¾");
+#endif
             /* don't blame hero for unknown rolling boulder trap */
             if (!context.mon_moving
                 && (otmp->otyp != BOULDER || range >= 0 || otmp->otrapped))
@@ -235,7 +314,10 @@ boolean verbose;    /* give message(s) even when you can't see what happened */
                                                            : AT_WEAP),
                      otmp)) {
             if (vis && mtmp->mcansee)
+/*JP
                 pline("%s is blinded by %s.", Monnam(mtmp), the(xname(otmp)));
+*/
+                pline("%s\82Í%s\82É\82æ\82Á\82Ä\96Ú\82ª\8c©\82¦\82È\82­\82È\82Á\82½\81D", Monnam(mtmp), the(xname(otmp)));
             mtmp->mcansee = 0;
             tmp = (int) mtmp->mblinded + rnd(25) + 20;
             if (tmp > 127)
@@ -296,10 +378,18 @@ struct obj *obj;         /* missile (or stack providing it) */
     if ((singleobj->cursed || singleobj->greased) && (dx || dy) && !rn2(7)) {
         if (canseemon(mon) && flags.verbose) {
             if (is_ammo(singleobj))
+/*JP
                 pline("%s misfires!", Monnam(mon));
+*/
+                pline("%s\82Í\82Í\82¸\82µ\82½\81I", Monnam(mon));
             else
+#if 0 /*JP*/
                 pline("%s as %s throws it!", Tobjnam(singleobj, "slip"),
                       mon_nam(mon));
+#else
+                pline("%s\82ª\93\8a\82°\82æ\82¤\82Æ\82µ\82½\82Æ\82½\82ñ%s\82ª\8a\8a\82Á\82½\81I",
+                          mon_nam(mon), xname(singleobj));
+#endif
         }
         dx = rn2(3) - 1;
         dy = rn2(3) - 1;
@@ -343,18 +433,33 @@ struct obj *obj;         /* missile (or stack providing it) */
                 && singleobj->otyp <= LAST_GEM + 9 /* 9 glass colors */
                 && is_unicorn(youmonst.data)) {
                 if (singleobj->otyp > LAST_GEM) {
+/*JP
                     You("catch the %s.", xname(singleobj));
+*/
+                    You("%s\82ð\82Â\82©\82Ü\82¦\82½\81D", xname(singleobj));
+/*JP
                     You("are not interested in %s junk.",
+*/
+                    You("%s\82Ì\83K\83\89\83N\83^\82É\8b»\96¡\82Í\82È\82¢\81D",
                         s_suffix(mon_nam(mon)));
                     makeknown(singleobj->otyp);
                     dropy(singleobj);
                 } else {
                     You(
+/*JP
                      "accept %s gift in the spirit in which it was intended.",
+*/
+                     "\82±\82ê\82ª\97~\82µ\82©\82Á\82½\82ñ\82¾\82Æ\8ev\82¢\82È\82ª\82ç%s\82Ì\91¡\82è\95¨\82ð\8eó\82¯\82Æ\82Á\82½\81D",
                         s_suffix(mon_nam(mon)));
+#if 0 /*JP*/
                     (void) hold_another_object(
                         singleobj, "You catch, but drop, %s.",
                         xname(singleobj), "You catch:");
+#else
+                    (void) hold_another_object(
+                        singleobj, "\82 \82È\82½\82Í%s\82ð\82Â\82©\82Ü\82¦\82½\82ª\81C\97\8e\82µ\82½\81D",
+                        xname(singleobj), "\82ð\82Â\82©\82Ü\82¦\82½\81D");
+#endif
                 }
                 break;
             }
@@ -417,11 +522,20 @@ struct obj *obj;         /* missile (or stack providing it) */
                 blindinc = rnd(25);
                 if (singleobj->otyp == CREAM_PIE) {
                     if (!Blind)
+/*JP
                         pline("Yecch!  You've been creamed.");
+*/
+                        pline("\83E\83F\81[\81D\83N\83\8a\81[\83\80\82ð\82©\82Ô\82Á\82½\81D");
                     else
+#if 0 /*JP*/
                         pline("There's %s sticky all over your %s.",
                               something, body_part(FACE));
+#else
+                        pline("\82 \82È\82½\82Í%s\82É\82×\82Æ\82Â\82­\82à\82Ì\82ð\8a´\82\82½\81D",
+                              body_part(FACE));
+#endif
                 } else if (singleobj->otyp == BLINDING_VENOM) {
+#if 0 /*JP*/
                     const char *eyes = body_part(EYE);
 
                     if (eyecount(youmonst.data) != 1)
@@ -431,6 +545,12 @@ struct obj *obj;         /* missile (or stack providing it) */
                         pline_The("venom blinds you.");
                     else
                         Your("%s %s.", eyes, vtense(eyes, "sting"));
+#else
+                    if(!Blind)
+                        pline("\93Å\82Å\96Ú\82ª\8c©\82¦\82È\82­\82È\82Á\82½\81D");
+                    else
+                        Your("%s\82Í\82¿\82­\82¿\82­\82µ\82½\81D", body_part(EYE));
+#endif
                 }
             }
             if (hitu && singleobj->otyp == EGG) {
@@ -542,8 +662,12 @@ struct monst *mtmp;
 
         if (canseemon(mtmp)) {
             onm = xname(otmp);
+#if 0 /*JP*/
             pline("%s thrusts %s.", Monnam(mtmp),
                   obj_is_pname(otmp) ? the(onm) : an(onm));
+#else
+            pline("%s\82Í%s\82ð\93Ë\82«\8eh\82µ\82½\81D", Monnam(mtmp), onm);
+#endif
         }
 
         dam = dmgval(otmp, &youmonst);
@@ -637,7 +761,10 @@ struct monst *mtmp;
         if (multishot > 1) {
             /* "N arrows"; multishot > 1 implies otmp->quan > 1, so
                xname()'s result will already be pluralized */
+/*JP
             Sprintf(onmbuf, "%d %s", multishot, xname(otmp));
+*/
+            Sprintf(onmbuf, "%d%s\82Ì%s", multishot, numeral(otmp), xname(otmp));
             onm = onmbuf;
         } else {
             /* "an arrow" */
@@ -645,7 +772,10 @@ struct monst *mtmp;
             onm = obj_is_pname(otmp) ? the(onm) : an(onm);
         }
         m_shot.s = ammo_and_launcher(otmp, mwep) ? TRUE : FALSE;
+/*JP
         pline("%s %s %s!", Monnam(mtmp), m_shot.s ? "shoots" : "throws", onm);
+*/
+        pline("%s\82Í%s\82ð%s!", Monnam(mtmp), onm, m_shot.s ? "\8c\82\82Á\82½" : "\93\8a\82°\82½");
         m_shot.o = otmp->otyp;
     } else {
         m_shot.o = STRANGE_OBJECT; /* don't give multishot feedback */
@@ -682,7 +812,10 @@ struct attack *mattk;
 
     if (mtmp->mcan) {
         if (!Deaf)
+/*JP
             pline("A dry rattle comes from %s throat.",
+*/
+            pline("%s\82Ì\8dA\82ª\83K\83\89\83K\83\89\82Æ\96Â\82Á\82½\81D",
                   s_suffix(mon_nam(mtmp)));
         return 0;
     }
@@ -702,7 +835,10 @@ struct attack *mattk;
         if (!rn2(BOLT_LIM
                  - distmin(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy))) {
             if (canseemon(mtmp))
+/*JP
                 pline("%s spits venom!", Monnam(mtmp));
+*/
+                pline("%s\82Í\93Å\82ð\93f\82¢\82½\81I", Monnam(mtmp));
             m_throw(mtmp, mtmp->mx, mtmp->my, sgn(tbx), sgn(tby),
                     distmin(mtmp->mx, mtmp->my, mtmp->mux, mtmp->muy), otmp);
             nomul(0);
@@ -728,17 +864,28 @@ struct attack *mattk;
         if (mtmp->mcan) {
             if (!Deaf) {
                 if (canseemon(mtmp))
+/*JP
                     pline("%s coughs.", Monnam(mtmp));
+*/
+                    pline("%s\82Í\82¹\82«\82ð\82µ\82½\81D", Monnam(mtmp));
                 else
+/*JP
                     You_hear("a cough.");
+*/
+                    You_hear("\82¹\82«\82Ì\89¹\82ð\95·\82¢\82½\81D");
             }
             return 0;
         }
         if (!mtmp->mspec_used && rn2(3)) {
             if ((typ >= AD_MAGM) && (typ <= AD_ACID)) {
                 if (canseemon(mtmp))
+#if 0 /*JP*/
                     pline("%s breathes %s!", Monnam(mtmp),
                           breathwep[typ - 1]);
+#else
+                    pline("%s\82Í%s\82ð\93f\82¢\82½\81I", Monnam(mtmp),
+                          breathwep[typ - 1]);
+#endif
                 buzz((int) (-20 - (typ - 1)), (int) mattk->damn, mtmp->mx,
                      mtmp->my, sgn(tbx), sgn(tby));
                 nomul(0);
@@ -889,13 +1036,22 @@ int whodidit;   /* 1==hero, 0=other, -1==just check whether it'll pass thru */
             *obj_p = otmp = 0; /* object is now gone */
         /* breakage makes its own noises */
         else if (obj_type == BOULDER || obj_type == HEAVY_IRON_BALL)
+/*JP
             pline("Whang!");
+*/
+            pline("\82®\82í\81[\82ñ\81I");
         else if (otmp->oclass == COIN_CLASS
                  || objects[obj_type].oc_material == GOLD
                  || objects[obj_type].oc_material == SILVER)
+/*JP
             pline("Clink!");
+*/
+            pline("\83`\83\83\83\8a\83\93\81I");
         else
+/*JP
             pline("Clonk!");
+*/
+            pline("\83S\83c\83\93\81I");
     }
 
     return hits;