OSDN Git Service

patch src/
[jnethack/source.git] / src / role.c
index cccf9c4..90be78f 100644 (file)
@@ -47,7 +47,7 @@ const struct Role roles[] = {
         { "\93´\8cA\8aw\8eÒ", 0 },
         { "\94ü\8fp\8eû\8fW\8eÒ", 0 },
         { "\8aÙ\92·", 0 } },
-      "Quetzalcoatl", "Camaxtli", "Huhetotl", /* Central American */
+      "\83P\83c\83A\83\8b\83J\83g\83\8b", "\83J\83}\83L\83V\83g\83\8a", "\83t\83w\83g\83g\83\8b", /* Central American */
 #endif
       "Arc",
 #if 0 /*JP*/
@@ -108,7 +108,7 @@ const struct Role roles[] = {
         { "\8eE\9dC\8eÒ", 0 },
         { "\8eñ\97Ì", 0 },
         { "\90ª\95\9e\8eÒ", 0 } },
-      "Mitra", "Crom", "Set", /* Hyborian */
+      "\83~\83g\83\89", "\83N\83\8d\83\80", "\83Z\83g", /* Hyborian */
 #endif
       "Bar",
 #if 0 /*JP*/
@@ -169,7 +169,7 @@ const struct Role roles[] = {
         { "\97V\96q\96¯", 0 },
         { "\97¬\98Q\8eÒ", 0 },
         { "\90æ\8bì\8eÒ", 0 } },
-      "Anu", "_Ishtar", "Anshar", /* Babylonian */
+      "\83A\83k", "_\83C\83V\83\85\83^\83\8b", "\83A\83\93\83V\83\83\83\8b", /* Babylonian */
 #endif
       "Cav",
 #if 0 /*JP*/
@@ -230,7 +230,7 @@ const struct Role roles[] = {
         { "\88ã\8et\8eå\94C", 0 },
         { "\93à\89È\88ã", 0 },
         { "\8aO\89È\88ã", 0 } },
-      "_Athena", "Hermes", "Poseidon", /* Greek */
+      "_\83A\83e\83i", "\83w\83\8b\83\81\83X", "\83|\83Z\83C\83h\83\93", /* Greek */
 #endif
       "Hea",
 #if 0 /*JP*/
@@ -290,7 +290,7 @@ const struct Role roles[] = {
         { "\8fd\8bR\8em", 0 },
         { "\8cM\8bR\8em", 0 },
         { "\90¹\8bR\8em", 0 } },
-      "Lugh", "_Brigit", "Manannan Mac Lir", /* Celtic */
+      "\83\8b\81[\83t", "_\83u\83\8a\83W\83b\83g", "\83}\83i\83\93\83i\83\93\81E\83}\83N\83\8a\81[\83\8b", /* Celtic */
 #endif
       "Kni",
 #if 0 /*JP*/
@@ -350,7 +350,7 @@ const struct Role roles[] = {
         { "\96Ø\82Ì\8fK\82¢\8eè", 0 },
         { "\89Î\82Ì\8fK\82¢\8eè", 0 },
         { "\96Æ\8b\96\8aF\93`", 0 } },
-      "Shan Lai Ching", "Chih Sung-tzu", "Huan Ti", /* Chinese */
+      "\8eR\97\8b\90¸", "\90Ô\8f¼\8eq", "\89©\92é", /* Chinese */
 #endif
       "Mon",
 #if 0 /*JP*/
@@ -474,7 +474,7 @@ const struct Role roles[] = {
         { "\93D\96_", 0 },
         { "\8b­\93\90", 0 },
         { "\91å\93D\96_", 0 } },
-      "Issek", "Mog", "Kos", /* Nehwon */
+      "\83C\83Z\83b\83N", "\83\82\83O", "\83R\83X", /* Nehwon */
 #endif
       "Rog",
 #if 0 /*JP*/
@@ -609,7 +609,7 @@ const struct Role roles[] = {
         { "\91å\96¼", "\8d\98\8c³" },         /* a samurai lord */
         { "\8cö\89Æ", 0 },           /* Noble of the Court */
         { "\8cö\89Æ", "\91å\89\9c" } },       /* supreme commander, warlord */
-      "_Amaterasu Omikami", "Raijin", "Susanowo", /* Japanese */
+      "_\93V\8fÆ\91å\90_", "\97\8b\90_", "\90{\8d²\94V\92j", /* Japanese */
 #endif
       "Sam",
 #if 0 /*JP*/
@@ -669,7 +669,7 @@ const struct Role roles[] = {
         { "\8dq\8aC\8eÒ", 0 },
         { "\92T\8c\9f\89Æ", 0 },
         { "\96`\8c¯\8eÒ", 0 } },
-      "Blind Io", "_The Lady", "Offler", /* Discworld */
+      "\96Ó\96Ú\82Ì\83C\83\8d", "_\81\83\8f\97\90_\81\84", "\83I\83t\83\89\81[", /* Discworld */
 #endif
       "Tou",
 #if 0 /*JP*/
@@ -729,7 +729,7 @@ const struct Role roles[] = {
         { "\89p\97Y", 0 },
         { "\90æ\93±\8eÒ", 0 },
         { "\83\8d\81[\83h", "\83\8c\83f\83B" } },
-      "Tyr", "Odin", "Loki", /* Norse */
+      "\83`\83\85\81[\83\8b", "\83I\81[\83f\83B\83\93", "\83\8d\83L", /* Norse */
 #endif
       "Val",
 #if 0 /*JP*/
@@ -789,7 +789,7 @@ const struct Role roles[] = {
         { "\96\82\8fp\8et", 0 },
         { "\96\82\96@\8eg\82¢", 0 },
         { "\91å\96\82\96@\8eg\82¢", 0 } },
-      "Ptah", "Thoth", "Anhur", /* Egyptian */
+      "\83v\83^\83n", "\83g\81[\83g", "\83A\83\93\83t\83\8b", /* Egyptian */
 #endif
       "Wiz",
 #if 0 /*JP*/
@@ -1074,7 +1074,10 @@ STATIC_DCL int FDECL(role_gendercount, (int));
 STATIC_DCL int FDECL(race_alignmentcount, (int));
 
 /* used by str2XXX() */
+/*JP
 static char NEARDATA randomstr[] = "random";
+*/
+static char NEARDATA randomstr[] = "\83\89\83\93\83_\83\80";
 
 boolean
 validrole(rolenum)
@@ -1702,6 +1705,7 @@ promptsep(buf, num_post_attribs)
 char *buf;
 int num_post_attribs;
 {
+#if 0 /*JP*/
     const char *conjuct = "and ";
 
     if (num_post_attribs > 1 && post_attribs < num_post_attribs
@@ -1711,6 +1715,13 @@ int num_post_attribs;
     --post_attribs;
     if (!post_attribs && num_post_attribs > 1)
         Strcat(buf, conjuct);
+#else
+    /*JP: \93ú\96{\8cê\82Å\82Í "A, B, and C" \82Æ\82¢\82¤\8f\88\97\9d\82Í\95s\97v */
+    if(num_post_attribs > post_attribs){
+        Strcat(buf, "\81C");
+    }
+    --post_attribs;
+#endif
     return buf;
 }
 
@@ -1756,7 +1767,10 @@ int buflen, rolenum, racenum, gendnum, alignnum;
 {
     int k, gendercount = 0, aligncount = 0;
     char buf[BUFSZ];
+/*JP
     static char err_ret[] = " character's";
+*/
+    static char err_ret[] = "\83L\83\83\83\89\83N\83^\81[\82Ì";
     boolean donefirst = FALSE;
 
     if (!suppliedbuf || buflen < 1)
@@ -1777,13 +1791,17 @@ int buflen, rolenum, racenum, gendnum, alignnum;
         && ok_align(rolenum, racenum, gendnum, alignnum)) {
         /* if race specified, and multiple choice of alignments for it */
         if ((racenum >= 0) && (aligncount > 1)) {
+#if 0 /*JP*/
             if (donefirst)
                 Strcat(buf, " ");
+#endif
             Strcat(buf, aligns[alignnum].adj);
             donefirst = TRUE;
         } else {
+#if 0 /*JP*/
             if (donefirst)
                 Strcat(buf, " ");
+#endif
             Strcat(buf, aligns[alignnum].adj);
             donefirst = TRUE;
         }
@@ -1814,14 +1832,18 @@ int buflen, rolenum, racenum, gendnum, alignnum;
                and name of role itself does not distinguish gender */
             if ((rolenum != ROLE_NONE) && (gendercount > 1)
                 && !roles[rolenum].name.f) {
+#if 0 /*JP*/
                 if (donefirst)
                     Strcat(buf, " ");
+#endif
                 Strcat(buf, genders[gendnum].adj);
                 donefirst = TRUE;
             }
         } else {
+#if 0 /*JP*/
             if (donefirst)
                 Strcat(buf, " ");
+#endif
             Strcat(buf, genders[gendnum].adj);
             donefirst = TRUE;
         }
@@ -1840,14 +1862,18 @@ int buflen, rolenum, racenum, gendnum, alignnum;
     if (racenum != ROLE_NONE && racenum != ROLE_RANDOM) {
         if (validrole(rolenum)
             && ok_race(rolenum, racenum, gendnum, alignnum)) {
+#if 0 /*JP*/
             if (donefirst)
                 Strcat(buf, " ");
+#endif
             Strcat(buf, (rolenum == ROLE_NONE) ? races[racenum].noun
                                                : races[racenum].adj);
             donefirst = TRUE;
         } else if (!validrole(rolenum)) {
+#if 0 /*JP*/
             if (donefirst)
                 Strcat(buf, " ");
+#endif
             Strcat(buf, races[racenum].noun);
             donefirst = TRUE;
         } else {
@@ -1861,8 +1887,10 @@ int buflen, rolenum, racenum, gendnum, alignnum;
     /* <your lawful female gnomish> || <your lawful female gnome> */
 
     if (validrole(rolenum)) {
+#if 0 /*JP*/
         if (donefirst)
             Strcat(buf, " ");
+#endif
         if (gendnum != ROLE_NONE) {
             if (gendnum == 1 && roles[rolenum].name.f)
                 Strcat(buf, roles[rolenum].name.f);
@@ -1884,9 +1912,14 @@ int buflen, rolenum, racenum, gendnum, alignnum;
 
     if ((racenum == ROLE_NONE || racenum == ROLE_RANDOM)
         && !validrole(rolenum)) {
+#if 0 /*JP*/
         if (donefirst)
             Strcat(buf, " ");
+#endif
+/*JP
         Strcat(buf, "character");
+*/
+        Strcat(buf, "\83L\83\83\83\89\83N\83^\81[");
         donefirst = TRUE;
     }
     /* <your lawful female gnomish cavewoman> || <your lawful female gnome>
@@ -1904,30 +1937,43 @@ build_plselection_prompt(buf, buflen, rolenum, racenum, gendnum, alignnum)
 char *buf;
 int buflen, rolenum, racenum, gendnum, alignnum;
 {
+/*JP
     const char *defprompt = "Shall I pick a character for you? [ynaq] ";
+*/
+    const char *defprompt = "\93K\93\96\82É\83L\83\83\83\89\83N\83^\81[\82ð\91I\82ñ\82Å\82æ\82¢\82Å\82·\82©\81H[ynaq] ";
     int num_post_attribs = 0;
     char tmpbuf[BUFSZ], *p;
 
     if (buflen < QBUFSZ)
         return (char *) defprompt;
 
+#if 0 /*JP*/
     Strcpy(tmpbuf, "Shall I pick ");
     if (racenum != ROLE_NONE || validrole(rolenum))
         Strcat(tmpbuf, "your ");
     else {
         Strcat(tmpbuf, "a ");
     }
+#else
+    Strcpy(tmpbuf, "");
+#endif
     /* <your> */
 
     (void) root_plselection_prompt(eos(tmpbuf), buflen - strlen(tmpbuf),
                                    rolenum, racenum, gendnum, alignnum);
+#if 0 /*JP*/
     Sprintf(buf, "%s", s_suffix(tmpbuf));
+#else
+    Sprintf(buf, "%s\82Ì", tmpbuf);
+#endif
+#if 0 /*JP:\93ú\96{\8cê\82Å\82Í\95s\97v*/
     /* don't bother splitting caveman/cavewoman or priest/priestess
        in order to apply possessive suffix to both halves, but do
        change "priest/priestess'" to "priest/priestess's" */
     if ((p = strstri(buf, "priest/priestess'")) != 0
         && p[sizeof "priest/priestess'" - sizeof ""] == '\0')
         strkitten(buf, 's');
+#endif
 
     /* buf should now be:
      *    <your lawful female gnomish cavewoman's>
@@ -1940,22 +1986,37 @@ int buflen, rolenum, racenum, gendnum, alignnum;
     if (post_attribs) {
         if (pa[BP_RACE]) {
             (void) promptsep(eos(buf), num_post_attribs);
+/*
             Strcat(buf, "race");
+*/
+           Strcat(buf, "\8eí\91°");
         }
         if (pa[BP_ROLE]) {
             (void) promptsep(eos(buf), num_post_attribs);
+/*
             Strcat(buf, "role");
+*/
+           Strcat(buf, "\90E\8bÆ");
         }
         if (pa[BP_GEND]) {
             (void) promptsep(eos(buf), num_post_attribs);
+/*JP
             Strcat(buf, "gender");
+*/
+           Strcat(buf, "\90«\95Ê");
         }
         if (pa[BP_ALIGN]) {
             (void) promptsep(eos(buf), num_post_attribs);
+/*JP
             Strcat(buf, "alignment");
+*/
+           Strcat(buf, "\91®\90«");
         }
     }
+/*JP
     Strcat(buf, " for you? [ynaq] ");
+*/
+    Strcat(buf, "\82ð\93K\93\96\82É\91I\82ñ\82Å\82æ\82ë\82µ\82¢\82Å\82·\82©\81H[ynq] ");
     return buf;
 }
 
@@ -2023,9 +2084,18 @@ role_selection_prolog(which, where)
 int which;
 winid where;
 {
+/*JP
     static const char NEARDATA choosing[] = " choosing now",
+*/
+    static const char NEARDATA choosing[] = " \8c»\8dÝ\91I\91ð\92\86",
+/*JP
                                not_yet[] = " not yet specified",
+*/
+                               not_yet[] = " \96¢\91I\91ð",
+/*JP
                                rand_choice[] = " random";
+*/
+                               rand_choice[] = " \83\89\83\93\83_\83\80";
     char buf[BUFSZ];
     int r, c, g, a, allowmask;
 
@@ -2082,26 +2152,39 @@ winid where;
             Sprintf(eos(buf), "/%s", roles[r].name.f);
     }
     putstr(where, 0, buf);
+/*JP
     Sprintf(buf, "%12s ", "race:");
+*/
+    Sprintf(buf, "%12s ", "\8eí\91°:");
     Strcat(buf, (which == RS_RACE) ? choosing : (c == ROLE_NONE)
                                                     ? not_yet
                                                     : (c == ROLE_RANDOM)
                                                           ? rand_choice
                                                           : races[c].noun);
     putstr(where, 0, buf);
+/*JP
     Sprintf(buf, "%12s ", "gender:");
+*/
+    Sprintf(buf, "%12s ", "\90«\95Ê:");
     Strcat(buf, (which == RS_GENDER) ? choosing : (g == ROLE_NONE)
                                                       ? not_yet
                                                       : (g == ROLE_RANDOM)
                                                             ? rand_choice
                                                             : genders[g].adj);
     putstr(where, 0, buf);
+/*JP
     Sprintf(buf, "%12s ", "alignment:");
+*/
+    Sprintf(buf, "%12s ", "\91®\90«:");
     Strcat(buf, (which == RS_ALGNMNT) ? choosing : (a == ROLE_NONE)
                                                        ? not_yet
                                                        : (a == ROLE_RANDOM)
                                                              ? rand_choice
+#if 0 /*JP:\93ú\96{\8cê\82Å\82Í\96¼\8e\8c\82ª\8e©\91R*/
                                                              : aligns[a].adj);
+#else
+                                                             : aligns[a].noun);
+#endif
     putstr(where, 0, buf);
 }
 
@@ -2390,6 +2473,7 @@ const char *
 Hello(mtmp)
 struct monst *mtmp;
 {
+#if 0 /*JP*/
     switch (Role_switch) {
     case PM_KNIGHT:
         return "Salutations"; /* Olde English */
@@ -2408,11 +2492,38 @@ struct monst *mtmp;
     default:
         return "Hello";
     }
+#else
+/*
+  \82 \82¢\82³\82Â\82Í\93ú\96{\8cê\82Æ\82µ\82Ä\8e©\91R\82É\82È\82é\82æ\82¤\91å\82«\82­\8ed\97l\82ð\95Ï\8dX
+*/
+    static char helo_buf[BUFSZ];
+
+    switch (Role_switch) {
+    case PM_KNIGHT:
+        Sprintf(helo_buf, "\82æ\82­\82¼\8eQ\82Á\82½%s\82æ", plname);
+        break;
+    case PM_SAMURAI:
+        Sprintf(helo_buf, "\82æ\82­\82¼\8eQ\82ç\82ê\82½%s\82æ", plname);
+        break;
+    case PM_TOURIST:
+        Sprintf(helo_buf, "\83A\83\8d\81[\83n%s", plname);
+        break;
+    case PM_VALKYRIE:
+        Sprintf(helo_buf, "\8d°\82Ì\8eç\8cì\8eÒ%s\82æ", plname);
+        break;
+    default:
+        Sprintf(helo_buf, "\82æ\82¤\82±\82»%s", plname);
+        break;
+    }
+
+    return helo_buf;
+#endif
 }
 
 const char *
 Goodbye()
 {
+#if 0 /*JP*/
     switch (Role_switch) {
     case PM_KNIGHT:
         return "Fare thee well"; /* Olde English */
@@ -2425,6 +2536,29 @@ Goodbye()
     default:
         return "Goodbye";
     }
+#else
+    static char helo_buf[BUFSZ];
+
+    switch (Role_switch) {
+    case PM_KNIGHT:
+        Sprintf(helo_buf, "\82³\82ç\82Î\8chåi\82È\82é");
+        break;
+    case PM_SAMURAI:
+        Sprintf(helo_buf, "\82³\82ç\82Î\95\90\8em\93¹\82ð\8eu\82·");
+        break;
+    case PM_TOURIST:
+        Sprintf(helo_buf, "\83A\83\8d\81[\83n");
+        break;
+    case PM_VALKYRIE:
+        Sprintf(helo_buf, "\82³\82ç\82Î\8d°\82Ì\8eç\8cì\8eÒ");
+        break;
+    default:
+        Sprintf(helo_buf, "\82³\82æ\82¤\82È\82ç");
+        break;
+    }
+
+    return helo_buf;
+#endif
 }
 
 /* role.c */