OSDN Git Service

patch src/
[jnethack/source.git] / src / wield.c
index 3a0625c..63a5e77 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"
 
 /* KMH -- Differences between the three weapon slots.
@@ -94,7 +99,10 @@ register struct obj *obj;
     if (uwep == obj && artifact_light(olduwep) && olduwep->lamplit) {
         end_burn(olduwep, FALSE);
         if (!Blind)
+/*JP
             pline("%s shining.", Tobjnam(olduwep, "stop"));
+*/
+            pline("%s\82Í\8bP\82«\82ð\8e~\82ß\82½\81D", xname(olduwep));
     }
     /* Note: Explicitly wielding a pick-axe will not give a "bashing"
      * message.  Wielding one via 'a'pplying it will.
@@ -121,10 +129,19 @@ struct obj *obj;
         return FALSE;
 
     /* Prevent wielding cockatrice when not wearing gloves --KAA */
+#if 0 /*JP*/
     You("wield %s in your bare %s.",
         corpse_xname(obj, (const char *) 0, CXN_PFX_THE),
         makeplural(body_part(HAND)));
+#else
+    You("%s\82ð%s\82É\82µ\82½\81D",
+        corpse_xname(obj, (const char *) 0, CXN_PFX_THE),
+        body_part(HAND));
+#endif
+/*JP
     Sprintf(kbuf, "wielding %s bare-handed", killer_xname(obj));
+*/
+    Sprintf(kbuf, "%s\82ð\91f\8eè\82Å\8eè\82É\82µ\82Ä", killer_xname(obj));
     instapetrify(kbuf);
     return TRUE;
 }
@@ -139,34 +156,53 @@ struct obj *wep;
     if (!wep) {
         /* No weapon */
         if (uwep) {
+/*JP
             You("are empty %s.", body_part(HANDED));
+*/
+            You("%s\82ð\8bó\82¯\82½\81D", body_part(HAND));
             setuwep((struct obj *) 0);
             res++;
         } else
+/*JP
             You("are already empty %s.", body_part(HANDED));
+*/
+            You("\89½\82à%s\82É\82µ\82Ä\82¢\82È\82¢\81I", body_part(HAND));
     } else if (wep->otyp == CORPSE && cant_wield_corpse(wep)) {
         /* hero must have been life-saved to get here; use a turn */
         res++; /* corpse won't be wielded */
     } else if (uarms && bimanual(wep)) {
+#if 0 /*JP*/
         You("cannot wield a two-handed %s while wearing a shield.",
             is_sword(wep) ? "sword" : wep->otyp == BATTLE_AXE ? "axe"
                                                               : "weapon");
+#else
+        pline("\8f\82\82ð\91\95\94õ\82µ\82Ä\82¢\82é\82Æ\82«\82É\97¼\8eè\8e\9d\82¿\82Ì%s\82ð\91\95\94õ\82Å\82«\82È\82¢\81D",
+              is_sword(wep) ? "\8c\95" : wep->otyp == BATTLE_AXE ? "\95\80"
+                                                             : "\95\90\8aí");
+#endif
     } else if (!retouch_object(&wep, FALSE)) {
         res++; /* takes a turn even though it doesn't get wielded */
     } else {
         /* Weapon WILL be wielded after this point */
         res++;
         if (will_weld(wep)) {
+#if 0 /*JP*//*\8eg\82í\82È\82¢*/
             const char *tmp = xname(wep), *thestr = "The ";
 
             if (strncmp(tmp, thestr, 4) && !strncmp(The(tmp), thestr, 4))
                 tmp = thestr;
             else
                 tmp = "";
+#endif
+#if 0 /*JP*/
             pline("%s%s %s to your %s!", tmp, aobjnam(wep, "weld"),
                   (wep->quan == 1L) ? "itself" : "themselves", /* a3 */
                   bimanual(wep) ? (const char *) makeplural(body_part(HAND))
                                 : body_part(HAND));
+#else
+            pline("%s\82Í\8f\9f\8eè\82É\82 \82È\82½\82Ì%s\82É\91\95\94õ\82³\82ê\82½\81D",
+                  xname(wep), body_part(HAND));
+#endif
             wep->bknown = TRUE;
         } else {
             /* The message must be printed before setuwep (since
@@ -189,8 +225,13 @@ struct obj *wep;
         if (artifact_light(wep) && !wep->lamplit) {
             begin_burn(wep, FALSE);
             if (!Blind)
+#if 0 /*JP*/
                 pline("%s to shine %s!", Tobjnam(wep, "begin"),
                       arti_light_description(wep));
+#else
+                pline("%s\82Í%s\8bP\82«\82Í\82\82ß\82½\81I", xname(wep),
+                      arti_light_description(wep));
+#endif
         }
 #if 0
         /* we'll get back to this someday, but it's not balanced yet */
@@ -206,8 +247,13 @@ struct obj *wep;
 
             if ((this_shkp = shop_keeper(inside_shop(u.ux, u.uy)))
                 != (struct monst *) 0) {
+#if 0 /*JP*/
                 pline("%s says \"You be careful with my %s!\"",
                       shkname(this_shkp), xname(wep));
+#else
+                pline("%s\82Í\8fq\82×\82½\81u%s\82Ì\88µ\82¢\82Í\8bC\82ð\82Â\82¯\82Ä\82­\82ê\82æ\81I\81v",
+                      shkname(this_shkp), xname(wep));
+#endif
             }
         }
     }
@@ -248,7 +294,10 @@ dowield()
     /* May we attempt this? */
     multi = 0;
     if (cantwield(youmonst.data)) {
+/*JP
         pline("Don't be ridiculous!");
+*/
+        pline("\82Î\82©\82Î\82©\82µ\82¢\81I");
         return 0;
     }
 
@@ -257,7 +306,10 @@ dowield()
         /* Cancelled */
         return 0;
     else if (wep == uwep) {
+/*JP
         You("are already wielding that!");
+*/
+        You("\82à\82¤\82»\82ê\82ð%s\82É\82µ\82Ä\82¢\82é\81I", body_part(HAND));
         if (is_weptool(wep) || is_wet_towel(wep))
             unweapon = FALSE; /* [see setuwep()] */
         return 0;
@@ -276,7 +328,10 @@ dowield()
     else if (wep == uquiver)
         setuqwep((struct obj *) 0);
     else if (wep->owornmask & (W_ARMOR | W_ACCESSORY | W_SADDLE)) {
+/*JP
         You("cannot wield that!");
+*/
+        You("\82»\82ê\82ð\91\95\94õ\82Å\82«\82È\82¢\81I");
         return 0;
     }
 
@@ -299,7 +354,10 @@ doswapweapon()
     /* May we attempt this? */
     multi = 0;
     if (cantwield(youmonst.data)) {
+/*JP
         pline("Don't be ridiculous!");
+*/
+        pline("\82Î\82©\82Î\82©\82µ\82¢\81I");
         return 0;
     }
     if (welded(uwep)) {
@@ -324,7 +382,10 @@ doswapweapon()
         if (uswapwep)
             prinv((char *) 0, uswapwep, 0L);
         else
+/*JP
             You("have no secondary weapon readied.");
+*/
+            You("\97\\94õ\82Ì\95\90\8aí\82Ì\97p\88Ó\82ð\82â\82ß\82½\81D");
     }
 
     if (u.twoweap && !can_twoweapon())
@@ -357,22 +418,38 @@ dowieldquiver()
     if (newquiver == &zeroobj) {
         /* Explicitly nothing */
         if (uquiver) {
+/*JP
             You("now have no ammunition readied.");
+*/
+            pline("\91\95\93U\82·\82é\82½\82ß\82Ì\96î\92e\82ª\82È\82­\82È\82Á\82½\81D");
             setuqwep(newquiver = (struct obj *) 0);
         } else {
+/*JP
             You("already have no ammunition readied!");
+*/
+            pline("\91\95\93U\82·\82é\82½\82ß\82Ì\96î\92e\82ª\82È\82¢\81D");
             return 0;
         }
     } else if (newquiver == uquiver) {
+/*JP
         pline("That ammunition is already readied!");
+*/
+        pline("\82à\82¤\91\95\93U\82³\82ê\82Ä\82¢\82é\81I");
         return 0;
     } else if (newquiver == uwep) {
         /* Prevent accidentally readying the main weapon */
+#if 0 /*JP*/
         pline("%s already being used as a weapon!",
               !is_plural(uwep) ? "That is" : "They are");
+#else
+        pline("\82à\82¤\95\90\8aí\82Æ\82µ\82Ä\8eg\82í\82ê\82Ä\82¢\82é\81I");
+#endif
         return 0;
     } else if (newquiver->owornmask & (W_ARMOR | W_ACCESSORY | W_SADDLE)) {
+/*JP
         You("cannot ready that!");
+*/
+        You("\82»\82ê\82Í\8eg\82¦\82È\82¢\81I");
         return 0;
     } else {
         long dummy;
@@ -408,19 +485,28 @@ const char *verb; /* "rub",&c */
     if (obj == uwep)
         return TRUE; /* nothing to do if already wielding it */
 
+#if 0 /*JP*/
     if (!verb)
         verb = "wield";
+#endif
     what = xname(obj);
+#if 0 /*JP*/
     more_than_1 = (obj->quan > 1L || strstri(what, "pair of ") != 0
                    || strstri(what, "s of ") != 0);
+#endif
 
     if (obj->owornmask & (W_ARMOR | W_ACCESSORY)) {
+#if 0 /*JP*/
         You_cant("%s %s while wearing %s.", verb, yname(obj),
                  more_than_1 ? "them" : "it");
+#else
+        pline("\90g\82É\82Â\82¯\82½\82Ü\82Ü\82Å\82Í%s\82Í\8eg\82¦\82È\82¢\81D", yname(obj));
+#endif
         return FALSE;
     }
     if (welded(uwep)) {
         if (flags.verbose) {
+#if 0 /*JP*/
             const char *hand = body_part(HAND);
 
             if (bimanual(uwep))
@@ -430,19 +516,33 @@ const char *verb; /* "rub",&c */
             pline(
                "Since your weapon is welded to your %s, you cannot %s %s %s.",
                   hand, verb, more_than_1 ? "those" : "that", xname(obj));
+#else
+            pline("\95\90\8aí\82ð\8eè\82É\82µ\82Ä\82¢\82é\82Ì\82Å\81C%s\82ð\8eg\82¦\82È\82¢\81D", xname(obj));
+#endif
         } else {
+/*JP
             You_cant("do that.");
+*/
+            pline("\82»\82ê\82Í\82Å\82«\82È\82¢\81D");
         }
         return FALSE;
     }
     if (cantwield(youmonst.data)) {
+/*JP
         You_cant("hold %s strongly enough.", more_than_1 ? "them" : "it");
+*/
+        You("\82»\82ê\82ð\8e\9d\82Â\82Ù\82Ç\97Í\82ª\82È\82¢\81D");
         return FALSE;
     }
     /* check shield */
     if (uarms && bimanual(obj)) {
+#if 0 /*JP*/
         You("cannot %s a two-handed %s while wearing a shield.", verb,
             (obj->oclass == WEAPON_CLASS) ? "weapon" : "tool");
+#else
+        pline("\8f\82\82ð\91\95\94õ\82µ\82½\82Ü\82Ü\97¼\8eè\8e\9d\82¿\82Ì%s\82ð\91\95\94õ\82Å\82«\82È\82¢\81D",
+              (obj->oclass == WEAPON_CLASS) ? "\95\90\8aí" : "\93¹\8bï");
+#endif
         return FALSE;
     }
 
@@ -456,7 +556,10 @@ const char *verb; /* "rub",&c */
     } else {
         struct obj *oldwep = uwep;
 
+/*JP
         You("now wield %s.", doname(obj));
+*/
+        You("%s\82ð\91\95\94õ\82µ\82½\81D", doname(obj));
         setuwep(obj);
         if (flags.pushweapon && oldwep && uwep != oldwep)
             setuswapwep(oldwep);
@@ -479,26 +582,52 @@ can_twoweapon()
 #define NOT_WEAPON(obj) (!is_weptool(obj) && obj->oclass != WEAPON_CLASS)
     if (!could_twoweap(youmonst.data)) {
         if (Upolyd)
+/*JP
             You_cant("use two weapons in your current form.");
+*/
+            pline("\8c»\8dÝ\82Ì\8ep\82Å\82Í\93ñ\93\81\97¬\82Í\8eg\82¦\82È\82¢\81D");
         else
+/*JP
             pline("%s aren't able to use two weapons at once.",
+*/
+            pline("%s\82Í\93ñ\82Â\82Ì\95\90\8aí\82ð\93¯\8e\9e\82É\88µ\82¦\82È\82¢\81D",
                   makeplural((flags.female && urole.name.f) ? urole.name.f
                                                             : urole.name.m));
     } else if (!uwep || !uswapwep)
+#if 0 /*JP*/
         Your("%s%s%s empty.", uwep ? "left " : uswapwep ? "right " : "",
              body_part(HAND), (!uwep && !uswapwep) ? "s are" : " is");
+#else
+        Your("%s%s\82Í\8bó\82Á\82Û\82¾\81D", uwep ? "\8d\82Ì" : uswapwep ? "\89E\82Ì" : "",
+             body_part(HAND));
+#endif
     else if (NOT_WEAPON(uwep) || NOT_WEAPON(uswapwep)) {
         otmp = NOT_WEAPON(uwep) ? uwep : uswapwep;
+#if 0 /*JP*/
         pline("%s %s.", Yname2(otmp),
               is_plural(otmp) ? "aren't weapons" : "isn't a weapon");
+#else
+        pline("%s\82Í\95\90\8aí\82\82á\82È\82¢\81D", Yname2(otmp));
+#endif
     } else if (bimanual(uwep) || bimanual(uswapwep)) {
         otmp = bimanual(uwep) ? uwep : uswapwep;
+/*JP
         pline("%s isn't one-handed.", Yname2(otmp));
+*/
+        pline("%s\82Í\95Ð\8eè\8e\9d\82¿\82Ì\95\90\8aí\82\82á\82È\82¢\81D", Yname2(otmp));
     } else if (uarms)
+/*JP
         You_cant("use two weapons while wearing a shield.");
+*/
+        You("\8f\82\82ð\8e\9d\82Á\82Ä\82¢\82é\8aÔ\82Í\97¼\8eè\8e\9d\82¿\82Å\82«\82È\82¢\81D");
     else if (uswapwep->oartifact)
+#if 0 /*JP*/
         pline("%s being held second to another weapon!",
               Yobjnam2(uswapwep, "resist"));
+#else
+        pline("%s\82Í\97\\94õ\82Ì\95\90\8aí\82Æ\82µ\82Ä\88µ\82í\82ê\82é\82±\82Æ\82ð\8b\91\82ñ\82¾\81I",
+              Yname2(uswapwep));
+#endif
     else if (uswapwep->otyp == CORPSE && cant_wield_corpse(uswapwep)) {
         /* [Note: NOT_WEAPON() check prevents ever getting here...] */
         ; /* must be life-saved to reach here; return FALSE */
@@ -519,7 +648,10 @@ drop_uswapwep()
 
     /* Avoid trashing makeplural's static buffer */
     Strcpy(str, makeplural(body_part(HAND)));
+/*JP
     pline("%s from your %s!", Yobjnam2(obj, "slip"), str);
+*/
+    You("%s\82ð\97\8e\82µ\82Ä\82µ\82Ü\82Á\82½\81I", xname(obj));
     dropx(obj);
 }
 
@@ -528,7 +660,10 @@ dotwoweapon()
 {
     /* You can always toggle it off */
     if (u.twoweap) {
+/*JP
         You("switch to your primary weapon.");
+*/
+        You("\88ê\82Â\82Ì\95\90\8aí\82Å\90í\93¬\82·\82é\82±\82Æ\82É\82µ\82½\81D");
         u.twoweap = 0;
         update_inventory();
         return 0;
@@ -537,7 +672,10 @@ dotwoweapon()
     /* May we use two weapons? */
     if (can_twoweapon()) {
         /* Success! */
+/*JP
         You("begin two-weapon combat.");
+*/
+        You("\93ñ\93\81\97¬\82Å\90í\93¬\82·\82é\82±\82Æ\82É\82µ\82½\81D");
         u.twoweap = 1;
         update_inventory();
         return (rnd(20) > ACURR(A_DEX));
@@ -558,7 +696,10 @@ uwepgone()
         if (artifact_light(uwep) && uwep->lamplit) {
             end_burn(uwep, FALSE);
             if (!Blind)
+/*JP
                 pline("%s shining.", Tobjnam(uwep, "stop"));
+*/
+                pline("%s\82Í\8bP\82«\82ð\8e~\82ß\82½\81D", xname(uwep));
         }
         setworn((struct obj *) 0, W_WEP);
         unweapon = TRUE;
@@ -588,7 +729,10 @@ void
 untwoweapon()
 {
     if (u.twoweap) {
+/*JP
         You("can no longer use two weapons at once.");
+*/
+        You("\82à\82¤\82Q\82Â\82Ì\95\90\8aí\82ð\93¯\8e\9e\82É\8eg\97p\82·\82é\82±\82Æ\82Í\82Å\82«\82È\82¢\81D");
         u.twoweap = FALSE;
         update_inventory();
     }
@@ -608,8 +752,13 @@ register int amount;
     if (!uwep || (uwep->oclass != WEAPON_CLASS && !is_weptool(uwep))) {
         char buf[BUFSZ];
 
+#if 0 /*JP*/
         Sprintf(buf, "Your %s %s.", makeplural(body_part(HAND)),
                 (amount >= 0) ? "twitch" : "itch");
+#else
+        Sprintf(buf, "\82 \82È\82½\82Ì%s\82Í%s\81D", makeplural(body_part(HAND)),
+                (amount >= 0) ? "\82Ð\82«\82Â\82Á\82½" : "\83\80\83Y\83\80\83Y\82µ\82½");
+#endif
         strange_feeling(otmp, buf);
         exercise(A_DEX, (boolean) (amount >= 0));
         return 0;
@@ -621,8 +770,13 @@ register int amount;
     if (uwep->otyp == WORM_TOOTH && amount >= 0) {
         multiple = (uwep->quan > 1L);
         /* order: message, transformation, shop handling */
+#if 0 /*JP*/
         Your("%s %s much sharper now.", simpleonames(uwep),
              multiple ? "fuse, and become" : "is");
+#else
+        Your("%s\82Í%s\82æ\82è\89s\82³\82ð\91\9d\82µ\82½\82æ\82¤\82¾\81D", simpleonames(uwep),
+             multiple ? "\97Z\8d\87\82µ\82Ä\81C" : "");
+#endif
         uwep->otyp = CRYSKNIFE;
         uwep->oerodeproof = 0;
         if (multiple) {
@@ -642,8 +796,13 @@ register int amount;
     } else if (uwep->otyp == CRYSKNIFE && amount < 0) {
         multiple = (uwep->quan > 1L);
         /* order matters: message, shop handling, transformation */
+#if 0 /*JP*/
         Your("%s %s much duller now.", simpleonames(uwep),
              multiple ? "fuse, and become" : "is");
+#else
+        Your("%s\82Í%s\82æ\82è\93Ý\82­\82È\82Á\82Ä\82µ\82Ü\82Á\82½\82æ\82¤\82¾\81D", simpleonames(uwep),
+             multiple ? "\97Z\8d\87\82µ\82Ä\81C" : "");
+#endif
         costly_alteration(uwep, COST_DEGRD); /* DECHNT? other? */
         uwep->otyp = WORM_TOOTH;
         uwep->oerodeproof = 0;
@@ -662,27 +821,47 @@ register int amount;
         wepname = ONAME(uwep);
     if (amount < 0 && uwep->oartifact && restrict_name(uwep, wepname)) {
         if (!Blind)
+/*JP
             pline("%s %s.", Yobjnam2(uwep, "faintly glow"), color);
+*/
+            Your("%s\82Í\82í\82¸\82©\82É%s\8bP\82¢\82½\81D", xname(uwep),jconj_adj(color));
         return 1;
     }
     /* there is a (soft) upper and lower limit to uwep->spe */
     if (((uwep->spe > 5 && amount >= 0) || (uwep->spe < -5 && amount < 0))
         && rn2(3)) {
         if (!Blind)
+#if 0 /*JP*/
             pline("%s %s for a while and then %s.",
                   Yobjnam2(uwep, "violently glow"), color,
                   otense(uwep, "evaporate"));
+#else
+            Your("%s\82Í\82µ\82Î\82ç\82­\8c\83\82µ\82­%s\8bP\82«\81C\8fö\94­\82µ\82½\81D",
+                 xname(uwep), jconj_adj(color));
+#endif
         else
+/*JP
             pline("%s.", Yobjnam2(uwep, "evaporate"));
+*/
+            Your("%s\82Í\8fö\94­\82µ\82½\81D", xname(uwep));
 
         useupall(uwep); /* let all of them disappear */
         return 1;
     }
     if (!Blind) {
+/*JP
         xtime = (amount * amount == 1) ? "moment" : "while";
+*/
+        xtime = (amount*amount == 1) ? "\88ê\8fu" : "\82µ\82Î\82ç\82­\82Ì\8aÔ";
+#if 0 /*JP*/
         pline("%s %s for a %s.",
               Yobjnam2(uwep, amount == 0 ? "violently glow" : "glow"), color,
               xtime);
+#else
+        Your("%s\82Í%s%s%s\8bP\82¢\82½\81D",
+             xname(uwep), xtime, jconj_adj(color), 
+             amount == 0 ? "\8c\83\82µ\82­" : "");
+#endif
         if (otyp != STRANGE_OBJECT && uwep->known
             && (amount > 0 || (amount < 0 && otmp->bknown)))
             makeknown(otyp);
@@ -704,15 +883,24 @@ register int amount;
      * spe dependent.  Give an obscure clue here.
      */
     if (uwep->oartifact == ART_MAGICBANE && uwep->spe >= 0) {
+#if 0 /*JP*/
         Your("right %s %sches!", body_part(HAND),
              (((amount > 1) && (uwep->spe > 1)) ? "flin" : "it"));
+#else
+        Your("\89E%s\82Í%s\81I",
+             body_part(HAND),
+             (((amount > 1) && (uwep->spe > 1)) ? "\82Ð\82è\82Ð\82è\82µ\82½" : "\83\80\83Y\83\80\83Y\82µ\82½"));
+#endif
     }
 
     /* an elven magic clue, cookie@keebler */
     /* elven weapons vibrate warningly when enchanted beyond a limit */
     if ((uwep->spe > 5)
         && (is_elven_weapon(uwep) || uwep->oartifact || !rn2(7)))
+/*JP
         pline("%s unexpectedly.", Yobjnam2(uwep, "suddenly vibrate"));
+*/
+        Your("%s\82Í\93Ë\91R\90k\82¦\82¾\82µ\82½\81D", xname(uwep));
 
     return 1;
 }
@@ -735,9 +923,13 @@ register struct obj *obj;
     long savewornmask;
 
     savewornmask = obj->owornmask;
+#if 0 /*JP*/
     pline("%s welded to your %s!", Yobjnam2(obj, "are"),
           bimanual(obj) ? (const char *) makeplural(body_part(HAND))
                         : body_part(HAND));
+#else
+    You("%s\82ð%s\82É\8d\\82¦\82½\81I", xname(obj), body_part(HAND));
+#endif
     obj->owornmask = savewornmask;
 }