OSDN Git Service

[Refactor] #37353 notice_stuff() の直接呼出しを抑止。 / Forbid call of notice_stuff() except...
[hengband/hengband.git] / src / bldg.c
index d22fadf..7728016 100644 (file)
@@ -1,21 +1,32 @@
-/* File: bldg.c */
-
-/*
- * Purpose: Building commands
- * Created by Ken Wigle for Kangband - a variant of Angband 2.8.3
- * -KMW-
- *
- * Rewritten for Kangband 2.8.3i using Kamband's version of
- * bldg.c as written by Ivan Tkatchev
- *
- * Changed for ZAngband by Robert Ruehlmann
- */
+/*!
+    @file bldg.c
+    @brief 町の施設処理 / Building commands
+    @date 2013/12/23
+    @author
+    Created by Ken Wigle for Kangband - a variant of Angband 2.8.3\n
+    -KMW-\n
+    \n
+    Rewritten for Kangband 2.8.3i using Kamband's version of\n
+    bldg.c as written by Ivan Tkatchev\n
+    \n
+    Changed for ZAngband by Robert Ruehlmann\n
+*/
 
 #include "angband.h"
+#include "object-hook.h"
 
-/* hack as in leave_store in store.c */
+/*!
+ * ループ中で / hack as in leave_store in store.c
+ */
 static bool leave_bldg = FALSE;
 
+/*!
+ * @brief 施設毎に設定された種族、職業、魔法領域フラグがプレイヤーと一致するかを判定する。
+ * @details 各種ギルドや寺院など、特定の職業ならば優遇措置を得られる施設、
+ * あるいは食堂など特定の種族では利用できない施設の判定処理を行う。
+ * @param bldg 施設構造体の参照ポインタ
+ * @return 種族、職業、魔法領域のいずれかが一致しているかの是非。
+ */
 static bool is_owner(building_type *bldg)
 {
        if (bldg->member_class[p_ptr->pclass] == BUILDING_OWNER)
@@ -37,7 +48,15 @@ static bool is_owner(building_type *bldg)
        return (FALSE);
 }
 
-
+/*!
+ * @brief 施設毎に設定された種族、職業、魔法領域フラグがプレイヤーと一致するかを判定する。
+ (スペルマスターの特別判定つき)
+ * @details 各種ギルドや寺院など、特定の職業ならば優遇措置を得られる施設、
+ * あるいは食堂など特定の種族では利用できない施設の判定処理を行う。
+ * @param bldg 施設構造体の参照ポインタ
+ * @return 種族、職業、魔法領域のいずれかが一致しているかの是非。
+ * @todo is_owner()との実質的な多重実装なので、リファクタリングを行うべきである。
+ */
 static bool is_member(building_type *bldg)
 {
        if (bldg->member_class[p_ptr->pclass])
@@ -70,9 +89,12 @@ static bool is_member(building_type *bldg)
        return (FALSE);
 }
 
-
-/*
- * Clear the building information
+/*!
+ * @brief コンソールに表示された施設に関する情報を消去する / Clear the building information
+ * @details 消去は行毎にヌル文字列で行われる。
+ * @param min_row 開始行番号
+ * @param max_row 末尾行番号
+ * @return なし
  */
 static void clear_bldg(int min_row, int max_row)
 {
@@ -82,24 +104,22 @@ static void clear_bldg(int min_row, int max_row)
                prt("", i, 0);
 }
 
+/*!
+ * @brief 所持金を表示する。
+ * @return なし
+ */
 static void building_prt_gold(void)
 {
        char tmp_str[80];
-
-#ifdef JP
-prt("¼ê»ý¤Á¤Î¤ª¶â: ", 23,53);
-#else
-       prt("Gold Remaining: ", 23, 53);
-#endif
-
-
+       prt(_("手持ちのお金: ", "Gold Remaining: "), 23,53);
        sprintf(tmp_str, "%9ld", (long)p_ptr->au);
        prt(tmp_str, 23, 68);
 }
 
-
-/*
- * Display a building.
+/*!
+ * @brief 施設のサービス一覧を表示する / Display a building.
+ * @param bldg 施設構造体の参照ポインタ
+ * @return なし
  */
 static void show_building(building_type* bldg)
 {
@@ -128,35 +148,19 @@ static void show_building(building_type* bldg)
                                else if (is_owner(bldg))
                                {
                                        action_color = TERM_YELLOW;
-#ifdef JP
-sprintf(buff, "($%ld)", (long int)bldg->member_costs[i]);
-#else
-                                       sprintf(buff, "(%ldgp)", (long int)bldg->member_costs[i]);
-#endif
-
+                                       sprintf(buff, _("($%ld)", "(%ldgp)"), (long int)bldg->member_costs[i]);
                                }
                                else
                                {
                                        action_color = TERM_YELLOW;
-#ifdef JP
-sprintf(buff, "($%ld)", (long int)bldg->other_costs[i]);
-#else
-                                       sprintf(buff, "(%ldgp)", (long int)bldg->other_costs[i]);
-#endif
-
-                               }
+                                       sprintf(buff, _("($%ld)", "(%ldgp)"), (long int)bldg->other_costs[i]);                          }
                        }
                        else if (bldg->action_restr[i] == 1)
                        {
                                if (!is_member(bldg))
                                {
                                        action_color = TERM_L_DARK;
-#ifdef JP
-strcpy(buff, "(ÊÄŹ)");
-#else
-                                       strcpy(buff, "(closed)");
-#endif
-
+                                       strcpy(buff, _("(閉店)", "(closed)"));
                                }
                                else if ((is_owner(bldg) && (bldg->member_costs[i] == 0)) ||
                                        (is_member(bldg) && (bldg->other_costs[i] == 0)))
@@ -167,22 +171,12 @@ strcpy(buff, "(
                                else if (is_owner(bldg))
                                {
                                        action_color = TERM_YELLOW;
-#ifdef JP
-sprintf(buff, "($%ld)", (long int)bldg->member_costs[i]);
-#else
-                                       sprintf(buff, "(%ldgp)", (long int)bldg->member_costs[i]);
-#endif
-
+                                       sprintf(buff, _("($%ld)", "(%ldgp)"), (long int)bldg->member_costs[i]);
                                }
                                else
                                {
                                        action_color = TERM_YELLOW;
-#ifdef JP
-sprintf(buff, "($%ld)", (long int)bldg->other_costs[i]);
-#else
-                                       sprintf(buff, "(%ldgp)", (long int)bldg->other_costs[i]);
-#endif
-
+                                       sprintf(buff, _("($%ld)", "(%ldgp)"), (long int)bldg->other_costs[i]);
                                }
                        }
                        else
@@ -190,22 +184,12 @@ sprintf(buff, "($%ld)", (long int)bldg->other_costs[i]);
                                if (!is_owner(bldg))
                                {
                                        action_color = TERM_L_DARK;
-#ifdef JP
-strcpy(buff, "(ÊÄŹ)");
-#else
-                                       strcpy(buff, "(closed)");
-#endif
-
+                                       strcpy(buff, _("(閉店)", "(closed)"));
                                }
                                else if (bldg->member_costs[i] != 0)
                                {
                                        action_color = TERM_YELLOW;
-#ifdef JP
-sprintf(buff, "($%ld)", (long int)bldg->member_costs[i]);
-#else
-                                       sprintf(buff, "(%ldgp)", (long int)bldg->member_costs[i]);
-#endif
-
+                                       sprintf(buff, _("($%ld)", "(%ldgp)"), (long int)bldg->member_costs[i]);
                                }
                                else
                                {
@@ -218,18 +202,13 @@ sprintf(buff, "($%ld)", (long int)bldg->member_costs[i]);
                        c_put_str(action_color, tmp_str, 19+(i/2), 35*(i%2));
                }
        }
-
-#ifdef JP
-prt(" ESC) ·úʪ¤ò½Ð¤ë", 23, 0);
-#else
-       prt(" ESC) Exit building", 23, 0);
-#endif
-
+       prt(_(" ESC) 建物を出る", " ESC) Exit building"), 23, 0);
 }
 
-
-/*
- * arena commands
+/*!
+ * @brief 闘技場に入るコマンドの処理 / arena commands
+ * @param cmd 闘技場処理のID
+ * @return なし
  */
 static void arena_comm(int cmd)
 {
@@ -243,25 +222,14 @@ static void arena_comm(int cmd)
                        if (p_ptr->arena_number == MAX_ARENA_MONS)
                        {
                                clear_bldg(5, 19);
-#ifdef JP
-prt("¥¢¥ê¡¼¥Ê¤ÎÍ¥¾¡¼Ô¡ª", 5, 0);
-prt("¤ª¤á¤Ç¤È¤¦¡ª¤¢¤Ê¤¿¤ÏÁ´¤Æ¤ÎŨ¤òÅݤ·¤Þ¤·¤¿¡£", 7, 0); 
-prt("¾Þ¶â¤È¤·¤Æ $1,000,000 ¤¬Í¿¤¨¤é¤ì¤Þ¤¹¡£", 8, 0);
-#else
-                               prt("               Arena Victor!", 5, 0);
-                               prt("Congratulations!  You have defeated all before you.", 7, 0);
-                               prt("For that, receive the prize: 1,000,000 gold pieces", 8, 0);
-#endif
+                               prt(_("アリーナの優勝者!", "               Arena Victor!"), 5, 0);
+                               prt(_("おめでとう!あなたは全ての敵を倒しました。", "Congratulations!  You have defeated all before you."), 7, 0);
+                               prt(_("賞金として $1,000,000 が与えられます。", "For that, receive the prize: 1,000,000 gold pieces"), 8, 0);
 
                                prt("", 10, 0);
                                prt("", 11, 0);
                                p_ptr->au += 1000000L;
-#ifdef JP
-msg_print("¥¹¥Ú¡¼¥¹¥­¡¼¤Ç³¹Ô");
-#else
-                               msg_print("Press the space bar to continue");
-#endif
-
+                               msg_print(_("スペースキーで続行", "Press the space bar to continue"));
                                msg_print(NULL);
                                p_ptr->arena_number++;
                        }
@@ -269,24 +237,11 @@ msg_print("
                        {
                                if (p_ptr->arena_number < MAX_ARENA_MONS+2)
                                {
-#ifdef JP
-msg_print("·¯¤Î¤¿¤á¤ËºÇ¶¯¤ÎÄ©Àï¼Ô¤òÍÑ°Õ¤·¤Æ¤ª¤¤¤¿¡£");
-#else
-                                       msg_print("The strongest challenger is waiting for you.");
-#endif
-
+                                       msg_print(_("君のために最強の挑戦者を用意しておいた。", "The strongest challenger is waiting for you."));
                                        msg_print(NULL);
-#ifdef JP
-                                       if (get_check("Ä©À魯¤ë¤«¤Í¡©"))
-#else
-                                       if (get_check("Do you fight? "))
-#endif
+                                       if (get_check(_("挑戦するかね?", "Do you fight? ")))
                                        {       
-#ifdef JP
-                        msg_print("»à¤Ì¤¬¤è¤¤¡£");
-#else
-                                           msg_print("Die, maggots.");
-#endif
+                                               msg_print(_("死ぬがよい。", "Die, maggots."));
                                                msg_print(NULL);
                                        
                                                p_ptr->exit_bldg = FALSE;
@@ -301,32 +256,20 @@ msg_print("
                                        }
                                        else
                                        {
-#ifdef JP
-msg_print("»ÄÇ°¤À¡£");
-#else
-                                               msg_print("We are disappointed.");
-#endif
+                                               msg_print(_("残念だ。", "We are disappointed."));
                                        }
                                }
                                else
                                {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¥¢¥ê¡¼¥Ê¤ËÆþ¤ê¡¢¤·¤Ð¤é¤¯¤Î´Ö±É¸÷¤Ë¤Ò¤¿¤Ã¤¿¡£");
-#else
-                                       msg_print("You enter the arena briefly and bask in your glory.");
-#endif
-
+                                       msg_print(_("あなたはアリーナに入り、しばらくの間栄光にひたった。",
+                                                               "You enter the arena briefly and bask in your glory."));
                                        msg_print(NULL);
                                }
                        }
                        else if (p_ptr->riding && (p_ptr->pclass != CLASS_BEASTMASTER) && (p_ptr->pclass != CLASS_CAVALRY))
                        {
-#ifdef JP
-msg_print("¥Ú¥Ã¥È¤Ë¾è¤Ã¤¿¤Þ¤Þ¤Ç¤Ï¥¢¥ê¡¼¥Ê¤ØÆþ¤ì¤µ¤»¤Æ¤â¤é¤¨¤Ê¤«¤Ã¤¿¡£");
-#else
-                               msg_print("You don't have permission to enter with pet.");
-#endif
-
+                               msg_print(_("ペットに乗ったままではアリーナへ入れさせてもらえなかった。",
+                                                       "You don't have permission to enter with pet."));
                                msg_print(NULL);
                        }
                        else
@@ -344,71 +287,48 @@ msg_print("
                        break;
                case BACT_POSTER:
                        if (p_ptr->arena_number == MAX_ARENA_MONS)
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¾¡Íø¼Ô¤À¡£ ¥¢¥ê¡¼¥Ê¤Ç¤Î¥»¥ì¥â¥Ë¡¼¤Ë»²²Ã¤·¤Ê¤µ¤¤¡£");
-#else
-                               msg_print("You are victorious. Enter the arena for the ceremony.");
-#endif
+                               msg_print(_("あなたは勝利者だ。 アリーナでのセレモニーに参加しなさい。",
+                                                       "You are victorious. Enter the arena for the ceremony."));
 
                        else if (p_ptr->arena_number > MAX_ARENA_MONS)
                        {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¤¹¤Ù¤Æ¤ÎŨ¤Ë¾¡Íø¤·¤¿¡£");
-#else
-                               msg_print("You have won against all foes.");
-#endif
+                               msg_print(_("あなたはすべての敵に勝利した。", "You have won against all foes."));
                        }
                        else
                        {
                                r_ptr = &r_info[arena_info[p_ptr->arena_number].r_idx];
                                name = (r_name + r_ptr->name);
-#ifdef JP
-msg_format("%s ¤ËÄ©À魯¤ë¤â¤Î¤Ï¤¤¤Ê¤¤¤«¡©", name);
-#else
-                               msg_format("Do I hear any challenges against: %s", name);
-#endif
+                               msg_format(_("%s に挑戦するものはいないか?", "Do I hear any challenges against: %s"), name);
+
+                               p_ptr->monster_race_idx = arena_info[p_ptr->arena_number].r_idx;
+                               p_ptr->window |= (PW_MONSTER);
+                               handle_stuff();
+
                        }
                        break;
                case BACT_ARENA_RULES:
-
-                       /* Save screen */
                        screen_save();
 
                        /* Peruse the arena help file */
-#ifdef JP
-(void)show_file(TRUE, "arena_j.txt", NULL, 0, 0);
-#else
-                       (void)show_file(TRUE, "arena.txt", NULL, 0, 0);
-#endif
-
-
-                       /* Load screen */
+                       (void)show_file(TRUE, _("arena_j.txt", "arena.txt"), NULL, 0, 0);
                        screen_load();
 
                        break;
        }
 }
 
-
-/*
- * display fruit for dice slots
+/*!
+ * @brief カジノのスロットシンボルを表示する / display fruit for dice slots
+ * @param row シンボルを表示する行の上端
+ * @param col シンボルを表示する行の左端
+ * @param fruit 表示するシンボルID
+ * @return なし
  */
 static void display_fruit(int row, int col, int fruit)
 {
        switch (fruit)
        {
                case 0: /* lemon */
-#ifdef JP
-                       c_put_str(TERM_YELLOW, "   ####.", row, col);
-                       c_put_str(TERM_YELLOW, "  #    #", row + 1, col);
-                       c_put_str(TERM_YELLOW, " #     #", row + 2, col);
-                       c_put_str(TERM_YELLOW, "#      #", row + 3, col);
-                       c_put_str(TERM_YELLOW, "#      #", row + 4, col);
-                       c_put_str(TERM_YELLOW, "#     # ", row + 5, col);
-                       c_put_str(TERM_YELLOW, "#    #  ", row + 6, col);
-                       c_put_str(TERM_YELLOW, ".####   ", row + 7, col);
-                       prt(                   " ¥ì¥â¥ó ", row + 8, col);
-#else
                        c_put_str(TERM_YELLOW, "   ####.", row, col);
                        c_put_str(TERM_YELLOW, "  #    #", row + 1, col);
                        c_put_str(TERM_YELLOW, " #     #", row + 2, col);
@@ -417,12 +337,10 @@ static void display_fruit(int row, int col, int fruit)
                        c_put_str(TERM_YELLOW, "#     # ", row + 5, col);
                        c_put_str(TERM_YELLOW, "#    #  ", row + 6, col);
                        c_put_str(TERM_YELLOW, ".####   ", row + 7, col);
-                       prt(                   " Lemon  ", row + 8, col);
-#endif
-
+                       prt(                 _(" レモン ",
+                                                          " Lemon  "), row + 8, col);
                        break;
                case 1: /* orange */
-#ifdef JP
                        c_put_str(TERM_ORANGE, "   ##   ", row, col);
                        c_put_str(TERM_ORANGE, "  #..#  ", row + 1, col);
                        c_put_str(TERM_ORANGE, " #....# ", row + 2, col);
@@ -431,46 +349,21 @@ static void display_fruit(int row, int col, int fruit)
                        c_put_str(TERM_ORANGE, " #....# ", row + 5, col);
                        c_put_str(TERM_ORANGE, "  #..#  ", row + 6, col);
                        c_put_str(TERM_ORANGE, "   ##   ", row + 7, col);
-                       prt(                   "¥ª¥ì¥ó¥¸", row + 8, col);
-#else
-                       c_put_str(TERM_ORANGE, "   ##   ", row, col);
-                       c_put_str(TERM_ORANGE, "  #..#  ", row + 1, col);
-                       c_put_str(TERM_ORANGE, " #....# ", row + 2, col);
-                       c_put_str(TERM_ORANGE, "#......#", row + 3, col);
-                       c_put_str(TERM_ORANGE, "#......#", row + 4, col);
-                       c_put_str(TERM_ORANGE, " #....# ", row + 5, col);
-                       c_put_str(TERM_ORANGE, "  #..#  ", row + 6, col);
-                       c_put_str(TERM_ORANGE, "   ##   ", row + 7, col);
-                       prt(                   " Orange ", row + 8, col);
-#endif
-
+                       prt(                 _("オレンジ",
+                                                                  " Orange "), row + 8, col);
                        break;
                case 2: /* sword */
-#ifdef JP
-                       c_put_str(TERM_SLATE, "   ¦«   " , row, col);
-                       c_put_str(TERM_SLATE, "   ||   " , row + 1, col);
-                       c_put_str(TERM_SLATE, "   ||   " , row + 2, col);
-                       c_put_str(TERM_SLATE, "   ||   " , row + 3, col);
-                       c_put_str(TERM_SLATE, "   ||   " , row + 4, col);
-                       c_put_str(TERM_SLATE, "   ||   " , row + 5, col);
-                       c_put_str(TERM_UMBER, " |=°¡=| " , row + 6, col);
-                       c_put_str(TERM_UMBER, "   ÌÜ   " , row + 7, col);
-                       prt(                  "   ·õ   " , row + 8, col);
-#else
-                       c_put_str(TERM_SLATE, "   /\\   " , row, col);
-                       c_put_str(TERM_SLATE, "   ##   " , row + 1, col);
-                       c_put_str(TERM_SLATE, "   ##   " , row + 2, col);
-                       c_put_str(TERM_SLATE, "   ##   " , row + 3, col);
-                       c_put_str(TERM_SLATE, "   ##   " , row + 4, col);
-                       c_put_str(TERM_SLATE, "   ##   " , row + 5, col);
-                       c_put_str(TERM_UMBER, " ###### " , row + 6, col);
-                       c_put_str(TERM_UMBER, "   ##   " , row + 7, col);
-                       prt(                  " Sword  " , row + 8, col);
-#endif
-
+                       c_put_str(TERM_SLATE, _("   Λ   ",  "   /\\   ") , row, col);
+                       c_put_str(TERM_SLATE, _("   ||   ", "   ##   ") , row + 1, col);
+                       c_put_str(TERM_SLATE, _("   ||   ", "   ##   ") , row + 2, col);
+                       c_put_str(TERM_SLATE, _("   ||   ", "   ##   ") , row + 3, col);
+                       c_put_str(TERM_SLATE, _("   ||   ", "   ##   ") , row + 4, col);
+                       c_put_str(TERM_SLATE, _("   ||   ", "   ##   ") , row + 5, col);
+                       c_put_str(TERM_UMBER, _(" |=亜=| ", " ###### ") , row + 6, col);
+                       c_put_str(TERM_UMBER, _("   目   ", "   ##   ") , row + 7, col);
+                       prt(                  _("   剣   ", " Sword  ") , row + 8, col);
                        break;
                case 3: /* shield */
-#ifdef JP
                        c_put_str(TERM_SLATE, " ###### ", row, col);
                        c_put_str(TERM_SLATE, "#      #", row + 1, col);
                        c_put_str(TERM_SLATE, "# ++++ #", row + 2, col);
@@ -479,32 +372,10 @@ static void display_fruit(int row, int col, int fruit)
                        c_put_str(TERM_SLATE, " #    # ", row + 5, col);
                        c_put_str(TERM_SLATE, "  #  #  ", row + 6, col);
                        c_put_str(TERM_SLATE, "   ##   ", row + 7, col);
-                       prt(                  "   ½â   ", row + 8, col);
-#else
-                       c_put_str(TERM_SLATE, " ###### ", row, col);
-                       c_put_str(TERM_SLATE, "#      #", row + 1, col);
-                       c_put_str(TERM_SLATE, "# ++++ #", row + 2, col);
-                       c_put_str(TERM_SLATE, "# +==+ #", row + 3, col);
-                       c_put_str(TERM_SLATE, "#  ++  #", row + 4, col);
-                       c_put_str(TERM_SLATE, " #    # ", row + 5, col);
-                       c_put_str(TERM_SLATE, "  #  #  ", row + 6, col);
-                       c_put_str(TERM_SLATE, "   ##   ", row + 7, col);
-                       prt(                  " Shield ", row + 8, col);
-#endif
-
+                       prt(                _("   盾   ",
+                                                                 " Shield "), row + 8, col);
                        break;
                case 4: /* plum */
-#ifdef JP
-                       c_put_str(TERM_VIOLET, "   ##   ", row, col);
-                       c_put_str(TERM_VIOLET, " ###### ", row + 1, col);
-                       c_put_str(TERM_VIOLET, "########", row + 2, col);
-                       c_put_str(TERM_VIOLET, "########", row + 3, col);
-                       c_put_str(TERM_VIOLET, "########", row + 4, col);
-                       c_put_str(TERM_VIOLET, " ###### ", row + 5, col);
-                       c_put_str(TERM_VIOLET, "  ####  ", row + 6, col);
-                       c_put_str(TERM_VIOLET, "   ##   ", row + 7, col);
-                       prt(                   " ¥×¥é¥à ", row + 8, col);
-#else
                        c_put_str(TERM_VIOLET, "   ##   ", row, col);
                        c_put_str(TERM_VIOLET, " ###### ", row + 1, col);
                        c_put_str(TERM_VIOLET, "########", row + 2, col);
@@ -513,22 +384,10 @@ static void display_fruit(int row, int col, int fruit)
                        c_put_str(TERM_VIOLET, " ###### ", row + 5, col);
                        c_put_str(TERM_VIOLET, "  ####  ", row + 6, col);
                        c_put_str(TERM_VIOLET, "   ##   ", row + 7, col);
-                       prt(                   "  Plum  ", row + 8, col);
-#endif
-
+                       prt(                 _(" プラム ",
+                                                                  "  Plum  "), row + 8, col);
                        break;
                case 5: /* cherry */
-#ifdef JP
-                       c_put_str(TERM_RED, "      ##", row, col);
-                       c_put_str(TERM_RED, "   ###  ", row + 1, col);
-                       c_put_str(TERM_RED, "  #..#  ", row + 2, col);
-                       c_put_str(TERM_RED, "  #..#  ", row + 3, col);
-                       c_put_str(TERM_RED, " ###### ", row + 4, col);
-                       c_put_str(TERM_RED, "#..##..#", row + 5, col);
-                       c_put_str(TERM_RED, "#..##..#", row + 6, col);
-                       c_put_str(TERM_RED, " ##  ## ", row + 7, col);
-                       prt(                "¥Á¥§¥ê¡¼", row + 8, col);
-#else
                        c_put_str(TERM_RED, "      ##", row, col);
                        c_put_str(TERM_RED, "   ###  ", row + 1, col);
                        c_put_str(TERM_RED, "  #..#  ", row + 2, col);
@@ -537,14 +396,13 @@ static void display_fruit(int row, int col, int fruit)
                        c_put_str(TERM_RED, "#..##..#", row + 5, col);
                        c_put_str(TERM_RED, "#..##..#", row + 6, col);
                        c_put_str(TERM_RED, " ##  ## ", row + 7, col);
-                       prt(                " Cherry ", row + 8, col);
-#endif
-
+                       prt(              _("チェリー",
+                                                               " Cherry "), row + 8, col);
                        break;
        }
 }
 
-/*
+/*! @note
  * kpoker no (tyuto-hannpa na)pakuri desu...
  * joker ha shineru node haitte masen.
  *
@@ -559,12 +417,18 @@ static void display_fruit(int row, int col, int fruit)
  * 9/13/2000 --Koka
  * 9/15/2000 joker wo jissou. soreto, code wo sukosi kakikae. --Habu
  */
-#define SUIT_OF(card)  ((card) / 13)
-#define NUM_OF(card)   ((card) % 13)
-#define IS_JOKER(card) ((card) == 52)
 
-static int cards[5]; /* tefuda no card */
+#define SUIT_OF(card)  ((card) / 13) /*!< トランプカードのスートを返す */
+#define NUM_OF(card)   ((card) % 13) /*!< トランプカードの番号を返す */
+#define IS_JOKER(card) ((card) == 52) /*!< トランプカードがジョーカーかどうかを返す */
+
+static int cards[5]; /*!< ポーカーの現在の手札ID */
 
+/*!
+ * @brief ポーカーの山札を切る。
+ * @param deck デッキの配列
+ * @return なし
+ */
 static void reset_deck(int deck[])
 {
        int i;
@@ -579,6 +443,10 @@ static void reset_deck(int deck[])
        }
 }
 
+/*!
+ * @brief ポーカープレイ中にジョーカーを持っているかの判定を返す。
+ * @return ジョーカーを持っているか。
+ */
 static bool have_joker(void)
 {
        int i;
@@ -589,6 +457,11 @@ static bool have_joker(void)
        return FALSE;
 }
 
+/*!
+ * @brief ポーカーの手札に該当の番号の札があるかを返す。
+ * @param num 探したいカードの番号。
+ * @return 該当の番号が手札にあるか。
+ */
 static bool find_card_num(int num)
 {
        int i;
@@ -597,6 +470,10 @@ static bool find_card_num(int num)
        return FALSE;
 }
 
+/*!
+ * @brief ポーカーの手札がフラッシュ役を得ているかを帰す。
+ * @return 役の判定結果
+ */
 static bool yaku_check_flush(void)
 {
        int i, suit;
@@ -615,10 +492,15 @@ static bool yaku_check_flush(void)
        return TRUE;
 }
 
+/*!
+ * @brief ポーカーの手札がストレートを含んだ高位の役を得ているかを帰す。
+ * @return 役の判定結果 0…ストレート、フラッシュいずれもなし/1…ストレートのみ/2…ストレートフラッシュ/3…ロイヤルストレートフラッシュ
+ */
 static int yaku_check_straight(void)
 {
        int i, lowest = 99;
        bool joker_is_used = FALSE;
+       bool straight = FALSE;
 
        /* get lowest */
        for (i = 0; i < 5; i++)
@@ -627,6 +509,7 @@ static int yaku_check_straight(void)
                        lowest = NUM_OF(cards[i]);
        }
        
+       /* Check Royal Straight Flush */
        if (yaku_check_flush())
        {
          if( lowest == 0 ){
@@ -639,37 +522,56 @@ static int yaku_check_straight(void)
                                  break;
                        }
                }
-               if (i == 4) return 3; /* Wow! Royal Flush!!! */
+               if (i == 4) return 3; /* Wow! Royal Straight Flush!!! */
          }
-         if( lowest == 9 ){
+         if(lowest == 9){
                for (i = 0; i < 3; i++)
                {
                        if (!find_card_num(10 + i))
                                break;
                }
-               if (i == 3 && have_joker()) return 3; /* Wow! Royal Flush!!! */
+               if (i == 3 && have_joker()) return 3; /* Wow! Royal Straight Flush!!! */
          }
        }
 
        joker_is_used = FALSE;
+
+       /* Straight Only Check */
+
+       if (lowest == 0) { /* (10 - J - Q - K)[JOKER] - A */
+               for (i = 0; i < 4; i++)
+               {
+                       if (!find_card_num(9 + i)) {
+                               if (have_joker() && !joker_is_used)
+                                       joker_is_used = TRUE;
+                               else
+                                       break; /* None */
+                       }
+               }
+               if(i == 4) straight = TRUE;
+       }
+
+       joker_is_used = FALSE;
+
        for (i = 0; i < 5; i++)
        {
-               if (!find_card_num(lowest + i)){
-                 if( have_joker() && !joker_is_used )
-                   joker_is_used = TRUE;
-                 else
-                   return 0;
+               if(!find_card_num(lowest + i)){
+                       if( have_joker() && !joker_is_used )
+                               joker_is_used = TRUE;
+                       else
+                               break; /* None */
                }
        }
+       if(i == 5) straight = TRUE;
        
-       if (yaku_check_flush())
-               return 2; /* Straight Flush */
-
-       return 1;
+       if (straight && yaku_check_flush()) return 2; /* Straight Flush */
+       else if(straight) return 1; /* Only Straight */
+       else return 0;
 }
 
-/*
- * 0:nopair 1:1 pair 2:2 pair 3:3 cards 4:full house 6:4cards
+/*!
+ * @brief ポーカーのペア役の状態を返す。
+ * @return 0:nopair 1:1 pair 2:2 pair 3:3 cards 4:full house 6:4cards
  */
 static int yaku_check_pair(void)
 {
@@ -711,42 +613,34 @@ static int yaku_check_pair(void)
        return matching;
 }
 
-#define ODDS_5A 3000
-#define ODDS_5C 400
-#define ODDS_RF 200
-#define ODDS_SF 80
-#define ODDS_4C 16
-#define ODDS_FH 12
-#define ODDS_FL 8
-#define ODDS_ST 4
-#define ODDS_3C 1
-#define ODDS_2P 1
-
+#define ODDS_5A 3000 /*!< ファイブエースの役倍率 */
+#define ODDS_5C 400 /*!< ファイブカードの役倍率 */
+#define ODDS_RF 200 /*!< ロイヤルストレートフラッシュの役倍率 */
+#define ODDS_SF 80 /*!< ストレートフラッシュの役倍率 */
+#define ODDS_4C 16 /*!< フォアカードの役倍率 */
+#define ODDS_FH 12 /*!< フルハウスの役倍率 */
+#define ODDS_FL 8 /*!< フラッシュの役倍率 */
+#define ODDS_ST 4 /*!< ストレートの役倍率 */
+#define ODDS_3C 1 /*!< スリーカードの役倍率 */
+#define ODDS_2P 1 /*!< ツーペアの役倍率 */
+
+/*!
+ * @brief ポーカーの役をチェックし、その結果を画面に表示しつつ結果を返す。
+ * @return 役のID
+ */
 static int yaku_check(void)
 {
        prt("                            ", 4, 3);
 
        switch(yaku_check_straight()){
        case 3: /* RF! */
-#ifdef JP
-               c_put_str(TERM_YELLOW, "¥í¥¤¥ä¥ë¥¹¥È¥ì¡¼¥È¥Õ¥é¥Ã¥·¥å",  4,  3);
-#else
-               c_put_str(TERM_YELLOW, "Royal Flush",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("ロイヤルストレートフラッシュ", "Royal Flush"),  4,  3);
                return ODDS_RF;
        case 2: /* SF! */
-#ifdef JP
-               c_put_str(TERM_YELLOW, "¥¹¥È¥ì¡¼¥È¥Õ¥é¥Ã¥·¥å",  4,  3);
-#else
-               c_put_str(TERM_YELLOW, "Straight Flush",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("ストレートフラッシュ", "Straight Flush"),  4,  3);
                return ODDS_SF;
        case 1:
-#ifdef JP
-               c_put_str(TERM_YELLOW, "¥¹¥È¥ì¡¼¥È",  4,  3);
-#else
-               c_put_str(TERM_YELLOW, "Straight",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("ストレート", "Straight"),  4,  3);
                return ODDS_ST;
        default:
                /* Not straight -- fall through */
@@ -755,69 +649,36 @@ static int yaku_check(void)
 
        if (yaku_check_flush())
        {
-
-#ifdef JP
-       c_put_str(TERM_YELLOW, "¥Õ¥é¥Ã¥·¥å",  4,  3);
-#else
-       c_put_str(TERM_YELLOW, "Flush",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("フラッシュ", "Flush"),  4,  3);
                return ODDS_FL;
        }
 
        switch (yaku_check_pair())
        {
        case 1:
-#ifdef JP
-               c_put_str(TERM_YELLOW, "¥ï¥ó¥Ú¥¢",  4,  3);
-#else
-               c_put_str(TERM_YELLOW, "One pair",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("ワンペア", "One pair"),  4,  3);
                return 0;
        case 2:
-#ifdef JP
-               c_put_str(TERM_YELLOW, "¥Ä¡¼¥Ú¥¢",  4,  3);
-#else
-               c_put_str(TERM_YELLOW, "Two pair",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("ツーペア", "Two pair"),  4,  3);
                return ODDS_2P;
        case 3:
-#ifdef JP
-               c_put_str(TERM_YELLOW, "¥¹¥ê¡¼¥«¡¼¥É",  4,  3);
-#else
-               c_put_str(TERM_YELLOW, "Three of a kind",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("スリーカード", "Three of a kind"),  4,  3);
                return ODDS_3C;
        case 4:
-#ifdef JP
-               c_put_str(TERM_YELLOW, "¥Õ¥ë¥Ï¥¦¥¹",  4,  3);
-#else
-               c_put_str(TERM_YELLOW, "Full house",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("フルハウス", "Full house"),  4,  3);
                return ODDS_FH;
        case 6:
-#ifdef JP
-               c_put_str(TERM_YELLOW, "¥Õ¥©¡¼¥«¡¼¥É",  4,  3);
-#else
-               c_put_str(TERM_YELLOW, "Four of a kind",  4,  3);
-#endif
+               c_put_str(TERM_YELLOW, _("フォーカード", "Four of a kind"),  4,  3);
                return ODDS_4C;
        case 7:
-               if (!NUM_OF(cards[0]) || !NUM_OF(cards[1]))
+               if (!NUM_OF(cards[0]) && !NUM_OF(cards[1]))
                {
-#ifdef JP
-                       c_put_str(TERM_YELLOW, "¥Õ¥¡¥¤¥Ö¥¨¡¼¥¹",  4,  3);
-#else
-                       c_put_str(TERM_YELLOW, "Five ace",  4,  3);
-#endif
+                       c_put_str(TERM_YELLOW, _("ファイブエース", "Five ace"),  4,  3);
                        return ODDS_5A;
                }
                else
                {
-#ifdef JP
-                       c_put_str(TERM_YELLOW, "¥Õ¥¡¥¤¥Ö¥«¡¼¥É",  4,  3);
-#else
-                       c_put_str(TERM_YELLOW, "Five of a kind",  4,  3);
-#endif
+                       c_put_str(TERM_YELLOW, _("ファイブカード", "Five of a kind"),  4,  3);
                        return ODDS_5C;
                }
        default:
@@ -826,6 +687,12 @@ static int yaku_check(void)
        return 0;
 }
 
+/*!
+ * @brief ポーカーの捨てる/残すインターフェイスの表示を更新する。
+ * @param hoge カーソルの現在位置
+ * @param kaeruka カードの捨てる/残すフラグ配列
+ * @return なし
+ */
 static void display_kaeruka(int hoge, int kaeruka[])
 {
        int i;
@@ -835,101 +702,94 @@ static void display_kaeruka(int hoge, int kaeruka[])
                if (i == hoge) col = TERM_YELLOW;
                else if(kaeruka[i]) col = TERM_WHITE;
                else col = TERM_L_BLUE;
-#ifdef JP
-               if(kaeruka[i])
-                       c_put_str(col, "¤«¤¨¤ë", 14,  5+i*16);
-               else
-                       c_put_str(col, "¤Î¤³¤¹", 14,  5+i*16);
-#else
+               
                if(kaeruka[i])
-                       c_put_str(col, "Change", 14,  5+i*16);
+                       c_put_str(col, _("かえる", "Change"), 14,  5+i*16);
                else
-                       c_put_str(col, " Stay ", 14,  5+i*16);
-#endif
+                       c_put_str(col, _("のこす", " Stay "), 14,  5+i*16);
        }
        if (hoge > 4) col = TERM_YELLOW;
        else col = TERM_WHITE;
-#ifdef JP
-       c_put_str(col, "·èÄê", 16,  38);
-#else
-       c_put_str(col, "Sure", 16,  38);
-#endif
+       c_put_str(col, _("決定", "Sure"), 16,  38);
 
        /* Hilite current option */
        if (hoge < 5) move_cursor(14, 5+hoge*16);
        else move_cursor(16, 38);
 }
 
-
+/*!
+ * @brief ポーカーの手札を表示する。
+ * @return なし
+ */
 static void display_cards(void)
 {
        int i, j;
        char suitcolor[4] = {TERM_YELLOW, TERM_L_RED, TERM_L_BLUE, TERM_L_GREEN};
 #ifdef JP
-       cptr suit[4] = {"¡ú", "¡ü", "¢ù", "¢÷"};
-       cptr card_grph[13][7] = {{"£Á   %s     ",
-                                 "     ÊÑ     ",
-                                 "     ¶ò     ",
-                                 "     ÈÚ     ",
-                                 "     ÅÜ     ",
+       cptr suit[4] = {"★", "●", "¶", "†"};
+       cptr card_grph[13][7] = {{"   %s     ",
+                                 "          ",
+                                 "          ",
+                                 "          ",
+                                 "          ",
                                  "     %s     ",
-                                 "          £Á"},
-                                {"£²          ",
+                                 "          "},
+                                {"          ",
                                  "     %s     ",
                                  "            ",
                                  "            ",
                                  "            ",
                                  "     %s     ",
-                                 "          £²"},
-                                {"£³          ",
+                                 "          "},
+                                {"          ",
                                  "     %s     ",
                                  "            ",
                                  "     %s     ",
                                  "            ",
                                  "     %s     ",
-                                 "          £³"},
-                                {"£´          ",
+                                 "          "},
+                                {"          ",
                                  "   %s  %s   ",
                                  "            ",
                                  "            ",
                                  "            ",
                                  "   %s  %s   ",
-                                 "          £´"},
-                                {"£µ          ",
+                                 "          "},
+                                {"          ",
                                  "   %s  %s   ",
                                  "            ",
                                  "     %s     ",
                                  "            ",
                                  "   %s  %s   ",
-                                 "          £µ"},
-                                {"£¶          ",
+                                 "          "},
+                                {"          ",
                                  "   %s  %s   ",
                                  "            ",
                                  "   %s  %s   ",
                                  "            ",
                                  "   %s  %s   ",
-                                 "          £¶"},
-                                {"£·          ",
+                                 "          "},
+                                {"          ",
                                  "   %s  %s   ",
                                  "     %s     ",
                                  "   %s  %s   ",
                                  "            ",
                                  "   %s  %s   ",
-                                 "          £·"},
-                                {"£¸          ",
+                                 "          "},
+                                {"          ",
                                  "   %s  %s   ",
                                  "     %s     ",
                                  "   %s  %s   ",
                                  "     %s     ",
                                  "   %s  %s   ",
-                                 "          £¸"},
-                                {"£¹ %s  %s   ",
+                                 "          "},
+                                {" %s  %s   ",
                                  "            ",
                                  "   %s  %s   ",
                                  "     %s     ",
                                  "   %s  %s   ",
                                  "            ",
-                                 "   %s  %s £¹"},
+                                 "   %s  %s "},
                                 {"10 %s  %s   ",
                                  "     %s     ",
                                  "   %s  %s   ",
@@ -937,33 +797,33 @@ static void display_cards(void)
                                  "   %s  %s   ",
                                  "     %s     ",
                                  "   %s  %s 10"},
-                                {"£Ê   ¦«     ",
+                                {"J   Λ     ",
                                  "%s   ||     ",
                                  "     ||     ",
                                  "     ||     ",
                                  "     ||     ",
-                                 "   |=°¡=| %s",
-                                 "     ÌÜ   £Ê"},
-                                {"£Ñ ######   ",
+                                 "   |==| %s",
+                                 "     目   J"},
+                                {" ######   ",
                                  "%s#      #  ",
                                  "  # ++++ #  ",
                                  "  # +==+ #  ",
                                  "   # ++ #   ",
                                  "    #  #  %s",
-                                 "     ##   £Ñ"},
-                                {"£Ë          ",
-                                 "%s ¡®¢Þ¡­   ",
-                                 "  ¦Ã¦Ã¦Ã¦Ë  ",
-                                 "  ¦Ï ¦Ï ¦É  ",
-                                 "   ¦Ô    ¢ß ",
-                                 "    ¦Ò ¥Î %s",
-                                 "          £Ë"}};
+                                 "     ##   "},
+                                {"          ",
+                                 "%s `⌒´   ",
+                                 "  γγγλ  ",
+                                 "  ο ο ι  ",
+                                 "   υ    ∂ ",
+                                 "    σ ノ %s",
+                                 "          "}};
        cptr joker_grph[7] = {    "            ",
-                                 "     £Ê     ",
-                                 "     £Ï     ",
-                                 "     £Ë     ",
-                                 "     £Å     ",
-                                 "     £Ò     ",
+                                 "          ",
+                                 "          ",
+                                 "          ",
+                                 "          ",
+                                 "          ",
                                  "            "};
 
 #else
@@ -1071,43 +931,31 @@ static void display_cards(void)
 
        for (i = 0; i < 5; i++)
        {
-#ifdef JP
-               prt("¨®¨¬¨¬¨¬¨¬¨¬¨¬¨¯",  5,  i*16);
-#else
-               prt(" +------------+ ",  5,  i*16);
-#endif
+               prt(_("┏━━━━━━┓", " +------------+ "),  5,  i*16);
        }
 
        for (i = 0; i < 5; i++)
        {
                for (j = 0; j < 7; j++)
                {
-#ifdef JP
-                       prt("¨­",  j+6,  i*16);
-#else
-                       prt(" |",  j+6,  i*16);
-#endif
+                       prt(_("┃", " |"),  j+6,  i*16);
                        if(IS_JOKER(cards[i]))
                                c_put_str(TERM_VIOLET, joker_grph[j],  j+6,  2+i*16);
                        else
                                c_put_str(suitcolor[SUIT_OF(cards[i])], format(card_grph[NUM_OF(cards[i])][j], suit[SUIT_OF(cards[i])], suit[SUIT_OF(cards[i])]),  j+6,  2+i*16);
-#ifdef JP
-                       prt("¨­",  j+6,  i*16+14);
-#else
-                       prt("| ",  j+6,  i*16+14);
-#endif
+                       prt(_("┃", "| "),  j+6,  i*16+14);
                }
        }
        for (i = 0; i < 5; i++)
        {
-#ifdef JP
-               prt("¨±¨¬¨¬¨¬¨¬¨¬¨¬¨°", 13,  i*16);
-#else
-               prt(" +------------+ ", 13,  i*16);
-#endif
+               prt(_("┗━━━━━━┛", " +------------+ "), 13,  i*16);
        }
 }
 
+/*!
+ * @brief ポーカーの1プレイルーチン。
+ * @return 1プレイの役の結果
+ */
 static int do_poker(void)
 {
        int i, k = 2;
@@ -1127,54 +975,9 @@ static int do_poker(void)
                cards[i] = deck[deck_ptr++];
                kaeruka[i] = 0; /* default:nokosu */
        }
-       
-#if 0
-       /* debug:RF */
-       cards[0] = 12;
-       cards[1] = 0;
-       cards[2] = 9;
-       cards[3] = 11;
-       cards[4] = 10;
-#endif
-#if 0
-       /* debug:SF */
-       cards[0] = 3;
-       cards[1] = 2;
-       cards[2] = 4;
-       cards[3] = 6;
-       cards[4] = 5;
-#endif
-#if 0
-       /* debug:Four Cards */
-       cards[0] = 0;
-       cards[1] = 0 + 13 * 1;
-       cards[2] = 0 + 13 * 2;
-       cards[3] = 0 + 13 * 3;
-       cards[4] = 51;
-#endif
-#if 0
-       /* debug:Straight */
-       cards[0] = 1;
-       cards[1] = 0 + 13;
-       cards[2] = 3;
-       cards[3] = 2 + 26;
-       cards[4] = 4;
-#endif
-#if 0
-       /* debug */
-       cards[0] = 52;
-       cards[1] = 0;
-       cards[2] = 1;
-       cards[3] = 2;
-       cards[4] = 3;
-#endif
 
        /* suteruno wo kimeru */
-#ifdef JP
-       prt("»Ä¤¹¥«¡¼¥É¤ò·è¤á¤Æ²¼¤µ¤¤(Êý¸þ¤Ç°ÜÆ°, ¥¹¥Ú¡¼¥¹¤ÇÁªÂò)¡£", 0, 0);
-#else
-       prt("Stay witch? ", 0, 0);
-#endif
+       prt(_("残すカードを決めて下さい(方向で移動, スペースで選択)。", "Stay witch? "), 0, 0);
 
        display_cards();
        yaku_check();
@@ -1225,8 +1028,10 @@ static int do_poker(void)
 #undef IS_JOKER
 /* end of poker codes --Koka */
 
-/*
- * gamble_comm
+/*!
+ * @brief カジノ1プレイごとのメインルーチン / gamble_comm
+ * @param cmd プレイするゲームID
+ * @return なし
  */
 static bool gamble_comm(int cmd)
 {
@@ -1244,24 +1049,15 @@ static bool gamble_comm(int cmd)
        if (cmd == BACT_GAMBLE_RULES)
        {
                /* Peruse the gambling help file */
-#ifdef JP
-(void)show_file(TRUE, "jgambling.txt", NULL, 0, 0);
-#else
-               (void)show_file(TRUE, "gambling.txt", NULL, 0, 0);
-#endif
-
+               (void)show_file(TRUE, _("jgambling.txt", "gambling.txt"), NULL, 0, 0);
        }
        else
        {
                /* No money */
                if (p_ptr->au < 1)
                {
-#ifdef JP
-                       msg_print("¤ª¤¤¡ª¤ª¤Þ¤¨°ìʸ¤Ê¤·¤¸¤ã¤Ê¤¤¤«¡ª¤³¤Ã¤«¤é½Ð¤Æ¤¤¤±¡ª");
-#else
-                       msg_print("Hey! You don't have gold - get out of here!");
-#endif
-
+                       msg_print(_("おい!おまえ一文なしじゃないか!こっから出ていけ!", 
+                                               "Hey! You don't have gold - get out of here!"));
                        msg_print(NULL);
                        screen_load();
                        return FALSE;
@@ -1276,11 +1072,7 @@ static bool gamble_comm(int cmd)
 
                /* Get the wager */
                strcpy(out_val, "");
-#ifdef JP
-sprintf(tmp_str,"ÅÒ¤±¶â (1-%ld)¡©", (long int)maxbet);
-#else
-               sprintf(tmp_str,"Your wager (1-%ld) ? ", (long int)maxbet);
-#endif
+               sprintf(tmp_str,_("賭け金 (1-%ld)?", "Your wager (1-%ld) ? "), (long int)maxbet);
 
 
                /*
@@ -1297,35 +1089,20 @@ sprintf(tmp_str,"
 
                        if (wager > p_ptr->au)
                        {
-#ifdef JP
-msg_print("¤ª¤¤¡ª¶â¤¬Â­¤ê¤Ê¤¤¤¸¤ã¤Ê¤¤¤«¡ª½Ð¤Æ¤¤¤±¡ª");
-#else
-                               msg_print("Hey! You don't have the gold - get out of here!");
-#endif
-
+                               msg_print(_("おい!金が足りないじゃないか!出ていけ!", "Hey! You don't have the gold - get out of here!"));
                                msg_print(NULL);
                                screen_load();
                                return (FALSE);
                        }
                        else if (wager > maxbet)
                        {
-#ifdef JP
-msg_format("%ld¥´¡¼¥ë¥É¤À¤±¼õ¤±¤è¤¦¡£»Ä¤ê¤Ï¼è¤Ã¤È¤­¤Ê¡£", (long int)maxbet);
-#else
-                               msg_format("I'll take %ld gold of that. Keep the rest.", (long int)maxbet);
-#endif
-
+                               msg_format(_("%ldゴールドだけ受けよう。残りは取っときな。",
+                                                        "I'll take %ld gold of that. Keep the rest."), (long int)maxbet);
                                wager = maxbet;
                        }
                        else if (wager < 1)
                        {
-#ifdef JP
-msg_print("£Ï£Ë¡¢£±¥´¡¼¥ë¥É¤«¤é¤Ï¤¸¤á¤è¤¦¡£");
-#else
-                               msg_print("Ok, we'll start with 1 gold.");
-#endif
-
-
+                               msg_print(_("OK、1ゴールドからはじめよう。", "Ok, we'll start with 1 gold."));
                                wager = 1;
                        }
                        msg_print(NULL);
@@ -1333,20 +1110,9 @@ msg_print("
                        odds = 0;
                        oldgold = p_ptr->au;
 
-#ifdef JP
-sprintf(tmp_str, "¥²¡¼¥àÁ°¤Î½ê»ý¶â: %9ld", (long int)oldgold);
-#else
-                       sprintf(tmp_str, "Gold before game: %9ld", (long int)oldgold);
-#endif
-
+                       sprintf(tmp_str, _("ゲーム前の所持金: %9ld", "Gold before game: %9ld"), (long int)oldgold);
                        prt(tmp_str, 20, 2);
-
-#ifdef JP
-sprintf(tmp_str, "¸½ºß¤Î³Ý¤±¶â:     %9ld", (long int)wager);
-#else
-                       sprintf(tmp_str, "Current Wager:    %9ld", (long int)wager);
-#endif
-
+                       sprintf(tmp_str, _("現在の掛け金:     %9ld", "Current Wager:    %9ld"), (long int)wager);
                        prt(tmp_str, 21, 2);
 
                        do
@@ -1355,29 +1121,17 @@ sprintf(tmp_str, "
                                switch (cmd)
                                {
                                 case BACT_IN_BETWEEN: /* Game of In-Between */
-#ifdef JP
-c_put_str(TERM_GREEN, "¥¤¥ó¡¦¥Ó¥È¥¤¡¼¥ó",5,2);
-#else
-                                       c_put_str(TERM_GREEN, "In Between", 5, 2);
-#endif
+                                       c_put_str(TERM_GREEN, _("イン・ビトイーン", "In Between"),5,2);
 
                                        odds = 4;
                                        win = FALSE;
                                        roll1 = randint1(10);
                                        roll2 = randint1(10);
                                        choice = randint1(10);
-#ifdef JP
-sprintf(tmp_str, "¹õ¥À¥¤¥¹: %d        ¹õ¥À¥¤¥¹: %d", roll1, roll2);
-#else
-                                       sprintf(tmp_str, "Black die: %d       Black Die: %d", roll1, roll2);
-#endif
+                                       sprintf(tmp_str, _("黒ダイス: %d        黒ダイス: %d", "Black die: %d       Black Die: %d"), roll1, roll2);
 
                                        prt(tmp_str, 8, 3);
-#ifdef JP
-sprintf(tmp_str, "ÀÖ¥À¥¤¥¹: %d", choice);
-#else
-                                       sprintf(tmp_str, "Red die: %d", choice);
-#endif
+                                       sprintf(tmp_str, _("赤ダイス: %d", "Red die: %d"), choice);
 
                                        prt(tmp_str, 11, 14);
                                        if (((choice > roll1) && (choice < roll2)) ||
@@ -1385,11 +1139,7 @@ sprintf(tmp_str, "
                                                win = TRUE;
                                        break;
                                case BACT_CRAPS:  /* Game of Craps */
-#ifdef JP
-c_put_str(TERM_GREEN, "¥¯¥é¥Ã¥×¥¹", 5, 2);
-#else
-                                       c_put_str(TERM_GREEN, "Craps", 5, 2);
-#endif
+                                       c_put_str(TERM_GREEN, _("クラップス", "Craps"), 5, 2);
 
                                        win = 3;
                                        odds = 2;
@@ -1397,13 +1147,8 @@ c_put_str(TERM_GREEN, "
                                        roll2 = randint1(6);
                                        roll3 = roll1 +  roll2;
                                        choice = roll3;
-#ifdef JP
-sprintf(tmp_str, "£±¿¶¤ê¤á: %d %d      Total: %d", roll1, 
-#else
-                                       sprintf(tmp_str, "First roll: %d %d    Total: %d", roll1,
-#endif
-
-                                                roll2, roll3);
+                                       sprintf(tmp_str, _("1振りめ: %d %d      Total: %d", 
+                                                                          "First roll: %d %d    Total: %d"), roll1, roll2, roll3);
                                        prt(tmp_str, 7, 5);
                                        if ((roll3 == 7) || (roll3 == 11))
                                                win = TRUE;
@@ -1412,24 +1157,14 @@ sprintf(tmp_str, "
                                        else
                                                do
                                                {
-#ifdef JP
-msg_print("¤Ê¤Ë¤«¥­¡¼¤ò²¡¤¹¤È¤â¤¦°ì²ó¿¶¤ê¤Þ¤¹¡£");
-#else
-                                                       msg_print("Hit any key to roll again");
-#endif
+                                                       msg_print(_("なにかキーを押すともう一回振ります。", "Hit any key to roll again"));
 
                                                        msg_print(NULL);
                                                        roll1 = randint1(6);
                                                        roll2 = randint1(6);
                                                        roll3 = roll1 +  roll2;
-
-#ifdef JP
-sprintf(tmp_str, "½ÐÌÜ: %d %d          ¹ç·×:      %d",
-#else
-                                                       sprintf(tmp_str, "Roll result: %d %d   Total:     %d",
-#endif
-
-                                                                roll1, roll2, roll3);
+                                                       sprintf(tmp_str, _("出目: %d %d          合計:      %d", 
+                                                                                  "Roll result: %d %d   Total:     %d"), roll1, roll2, roll3);
                                                        prt(tmp_str, 8, 5);
                                                        if (roll3 == choice)
                                                                win = TRUE;
@@ -1441,52 +1176,29 @@ sprintf(tmp_str, "
                                case BACT_SPIN_WHEEL:  /* Spin the Wheel Game */
                                        win = FALSE;
                                        odds = 9;
-#ifdef JP
-c_put_str(TERM_GREEN, "¥ë¡¼¥ì¥Ã¥È", 5, 2);
-#else
-                                       c_put_str(TERM_GREEN, "Wheel", 5, 2);
-#endif
+                                       c_put_str(TERM_GREEN, _("ルーレット", "Wheel"), 5, 2);
 
                                        prt("0  1  2  3  4  5  6  7  8  9", 7, 5);
                                        prt("--------------------------------", 8, 3);
                                        strcpy(out_val, "");
-#ifdef JP
-get_string("²¿ÈÖ¡© (0-9): ", out_val, 32);
-#else
-                                       get_string("Pick a number (0-9): ", out_val, 32);
-#endif
+                                       get_string(_("何番? (0-9): ", "Pick a number (0-9): "), out_val, 32);
 
-                                       for (p = out_val; isspace(*p); p++);
+                                       for (p = out_val; iswspace(*p); p++);
                                        choice = atol(p);
                                        if (choice < 0)
                                        {
-#ifdef JP
-msg_print("0È֤ˤ·¤È¤¯¤¼¡£");
-#else
-                                               msg_print("I'll put you down for 0.");
-#endif
-
+                                               msg_print(_("0番にしとくぜ。", "I'll put you down for 0."));
                                                choice = 0;
                                        }
                                        else if (choice > 9)
                                        {
-#ifdef JP
-msg_print("£Ï£Ë¡¢9È֤ˤ·¤È¤¯¤¼¡£");
-#else
-                                               msg_print("Ok, I'll put you down for 9.");
-#endif
-
+                                               msg_print(_("OK、9番にしとくぜ。", "Ok, I'll put you down for 9."));
                                                choice = 9;
                                        }
                                        msg_print(NULL);
                                        roll1 = randint0(10);
-#ifdef JP
-sprintf(tmp_str, "¥ë¡¼¥ì¥Ã¥È¤Ï²ó¤ê¡¢»ß¤Þ¤Ã¤¿¡£¾¡¼Ô¤Ï %dÈÖ¤À¡£",
-#else
-                                       sprintf(tmp_str, "The wheel spins to a stop and the winner is %d",
-#endif
-
-                                               roll1);
+                                       sprintf(tmp_str, _("ルーレットは回り、止まった。勝者は %d番だ。", 
+                                                                          "The wheel spins to a stop and the winner is %d"), roll1);
                                        prt(tmp_str, 13, 3);
                                        prt("", 9, 0);
                                        prt("*", 9, (3 * roll1 + 5));
@@ -1495,19 +1207,15 @@ sprintf(tmp_str, "
                                        break;
 
                                case BACT_DICE_SLOTS: /* The Dice Slots */
-#ifdef JP
-c_put_str(TERM_GREEN, "¥À¥¤¥¹¡¦¥¹¥í¥Ã¥È", 5, 2);
-                                       c_put_str(TERM_YELLOW, "¥ì¥â¥ó   ¥ì¥â¥ó            2", 6, 37);
-                                       c_put_str(TERM_YELLOW, "¥ì¥â¥ó   ¥ì¥â¥ó   ¥ì¥â¥ó   5", 7, 37);
-                                       c_put_str(TERM_ORANGE, "¥ª¥ì¥ó¥¸ ¥ª¥ì¥ó¥¸ ¥ª¥ì¥ó¥¸ 10", 8, 37);
-                                       c_put_str(TERM_UMBER, "·õ       ·õ       ·õ       20", 9, 37);
-                                       c_put_str(TERM_SLATE, "½â       ½â       ½â       50", 10, 37);
-                                       c_put_str(TERM_VIOLET, "¥×¥é¥à   ¥×¥é¥à   ¥×¥é¥à   200", 11, 37);
-                                       c_put_str(TERM_RED, "¥Á¥§¥ê¡¼ ¥Á¥§¥ê¡¼ ¥Á¥§¥ê¡¼ 1000", 12, 37);
-#else
-                                       c_put_str(TERM_GREEN, "Dice Slots", 5, 2);
-#endif
-
+                                       c_put_str(TERM_GREEN,  _("ダイス・スロット", "Dice Slots"), 5, 2);
+                                       c_put_str(TERM_YELLOW, _("レモン   レモン            2", ""), 6, 37);
+                                       c_put_str(TERM_YELLOW, _("レモン   レモン   レモン   5", ""), 7, 37);
+                                       c_put_str(TERM_ORANGE, _("オレンジ オレンジ オレンジ 10", ""), 8, 37);
+                                       c_put_str(TERM_UMBER, _("剣       剣       剣       20", ""), 9, 37);
+                                       c_put_str(TERM_SLATE, _("盾       盾       盾       50", ""), 10, 37);
+                                       c_put_str(TERM_VIOLET, _("プラム   プラム   プラム   200", ""), 11, 37);
+                                       c_put_str(TERM_RED, _("チェリー チェリー チェリー 1000", ""), 12, 37);
+                                       
                                        win = FALSE;
                                        roll1 = randint1(21);
                                        for (i=6;i>0;i--)
@@ -1578,43 +1286,22 @@ c_put_str(TERM_GREEN, "
 
                                if (win)
                                {
-#ifdef JP
-prt("¤¢¤Ê¤¿¤Î¾¡¤Á", 16, 37);
-#else
-                                       prt("YOU WON", 16, 37);
-#endif
+                                       prt(_("あなたの勝ち", "YOU WON"), 16, 37);
 
                                        p_ptr->au += odds * wager;
-#ifdef JP
-sprintf(tmp_str, "ÇÜΨ: %d", odds);
-#else
-                                       sprintf(tmp_str, "Payoff: %d", odds);
-#endif
+                                       sprintf(tmp_str, _("倍率: %d", "Payoff: %d"), odds);
 
                                        prt(tmp_str, 17, 37);
                                }
                                else
                                {
-#ifdef JP
-prt("¤¢¤Ê¤¿¤ÎÉ餱", 16, 37);
-#else
-                                       prt("You Lost", 16, 37);
-#endif
-
+                                       prt(_("あなたの負け", "You Lost"), 16, 37);
                                        prt("", 17, 37);
                                }
-#ifdef JP
-sprintf(tmp_str, "¸½ºß¤Î½ê»ý¶â:     %9ld", (long int)p_ptr->au);
-#else
-                               sprintf(tmp_str, "Current Gold:     %9ld", (long int)p_ptr->au);
-#endif
+                               sprintf(tmp_str, _("現在の所持金:     %9ld", "Current Gold:     %9ld"), (long int)p_ptr->au);
 
                                prt(tmp_str, 22, 2);
-#ifdef JP
-prt("¤â¤¦°ìÅÙ(Y/N)¡©", 18, 37);
-#else
-                               prt("Again(Y/N)?", 18, 37);
-#endif
+                               prt(_("もう一度(Y/N)?", "Again(Y/N)?"), 18, 37);
 
                                move_cursor(18, 52);
                                again = inkey();
@@ -1623,12 +1310,8 @@ prt("
                                prt("", 18, 37);
                                if (wager > p_ptr->au)
                                {
-#ifdef JP
-msg_print("¤ª¤¤¡ª¶â¤¬Â­¤ê¤Ê¤¤¤¸¤ã¤Ê¤¤¤«¡ª¤³¤³¤«¤é½Ð¤Æ¹Ô¤±¡ª");
-#else
-                                       msg_print("Hey! You don't have the gold - get out of here!");
-#endif
-
+                                       msg_print(_("おい!金が足りないじゃないか!ここから出て行け!", 
+                                                               "Hey! You don't have the gold - get out of here!"));
                                        msg_print(NULL);
 
                                        /* Get out here */
@@ -1639,20 +1322,13 @@ msg_print("
                        prt("", 18, 37);
                        if (p_ptr->au >= oldgold)
                        {
-#ifdef JP
-msg_print("¡Öº£²ó¤ÏÌÙ¤±¤¿¤Ê¡ª¤Ç¤â¼¡¤Ï¤³¤Ã¤Á¤¬¾¡¤Ã¤Æ¤ä¤ë¤«¤é¤Ê¡¢ÀäÂФˡª¡×");
-#else
-                               msg_print("You came out a winner! We'll win next time, I'm sure.");
-#endif
+                               msg_print(_("「今回は儲けたな!でも次はこっちが勝ってやるからな、絶対に!」",
+                                                       "You came out a winner! We'll win next time, I'm sure."));
                                chg_virtue(V_CHANCE, 3);
                        }
                        else
                        {
-#ifdef JP
-msg_print("¡Ö¶â¤ò¥¹¥Ã¤Æ¤·¤Þ¤Ã¤¿¤Ê¡¢¤ï¤Ï¤Ï¡ª¤¦¤Á¤Ëµ¢¤Ã¤¿Êý¤¬¤¤¤¤¤¼¡£¡×");
-#else
-                               msg_print("You lost gold! Haha, better head home.");
-#endif
+                               msg_print(_("「金をスッてしまったな、わはは!うちに帰った方がいいぜ。」", "You lost gold! Haha, better head home."));
                                chg_virtue(V_CHANCE, -3);
                        }
                }
@@ -1662,10 +1338,17 @@ msg_print("
        return (TRUE);
 }
 
-static bool vault_aux_battle(int r_idx)
+/*!
+ * @brief モンスター闘技場に参加できるモンスターの判定
+ * @param r_idx モンスターID
+ * @details 基準はNEVER_MOVE MULTIPLY QUANTUM RF7_AQUATIC RF7_CHAMELEONのいずれも持たず、
+ * 自爆以外のなんらかのHP攻撃手段を持っていること。
+ * @return 参加できるか否か
+ */
+static bool vault_aux_battle(MONRACE_IDX r_idx)
 {
        int i;
-       int dam = 0;
+       HIT_POINT dam = 0;
 
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -1687,12 +1370,15 @@ static bool vault_aux_battle(int r_idx)
                if (r_ptr->blow[i].method == RBM_EXPLODE) return (FALSE);
                if (r_ptr->blow[i].effect != RBE_DR_MANA) dam += r_ptr->blow[i].d_dice;
        }
-       if (!dam && !(r_ptr->flags4 & (RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_BREATH_MASK)) && !(r_ptr->flags5 & (RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_BREATH_MASK)) && !(r_ptr->flags6 & (RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | RF6_BREATH_MASK))) return (FALSE);
+       if (!dam && !(r_ptr->flags4 & (RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_BREATH_MASK)) && !(r_ptr->a_ability_flags1 & (RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_BREATH_MASK)) && !(r_ptr->a_ability_flags2 & (RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | RF6_BREATH_MASK))) return (FALSE);
 
-       /* Okay */
        return (TRUE);
 }
 
+/*!
+ * @brief モンスター闘技場に参加するモンスターをリセットする。
+ * @return なし
+ */
 void battle_monsters(void)
 {
        int total, i;
@@ -1721,9 +1407,10 @@ void battle_monsters(void)
        {
                total = 0;
                tekitou = FALSE;
-               for(i=0;i<4;i++)
+               for(i = 0; i < 4; i++)
                {
-                       int r_idx, j;
+                       MONRACE_IDX r_idx;
+                       int j;
                        while (1)
                        {
                                get_mon_num_prep(vault_aux_battle, NULL);
@@ -1763,139 +1450,20 @@ void battle_monsters(void)
                                power[i] = power[i] * (r_ptr->speed - 20) / 100;
                        if (num_taisei > 2)
                                power[i] = power[i] * (num_taisei*2+5) / 10;
-                       else if (r_ptr->flags6 & RF6_INVULNER)
+                       else if (r_ptr->a_ability_flags2 & RF6_INVULNER)
                                power[i] = power[i] * 4 / 3;
-                       else if (r_ptr->flags6 & RF6_HEAL)
+                       else if (r_ptr->a_ability_flags2 & RF6_HEAL)
                                power[i] = power[i] * 4 / 3;
-                       else if (r_ptr->flags5 & RF5_DRAIN_MANA)
+                       else if (r_ptr->a_ability_flags1 & RF5_DRAIN_MANA)
                                power[i] = power[i] * 11 / 10;
                        if (r_ptr->flags1 & RF1_RAND_25)
                                power[i] = power[i] * 9 / 10;
                        if (r_ptr->flags1 & RF1_RAND_50)
                                power[i] = power[i] * 9 / 10;
+                       if (r_ptr->flagsr & RFR_RES_ALL) power[i] *= 100000;
+                       if (r_ptr->arena_ratio) power[i] = power[i] * r_ptr->arena_ratio / 100;
+
 
-                       switch (battle_mon[i])
-                       {
-                               case MON_GREEN_G:
-                               case MON_THAT_BAT:
-                               case MON_GHOST_Q:
-                                       power[i] /= 4;
-                                       break;
-                               case MON_LOST_SOUL:
-                               case MON_GHOST:
-                                       power[i] /= 2;
-                                       break;
-                               case MON_UND_BEHOLDER:
-                               case MON_SANTACLAUS:
-                               case MON_ULT_BEHOLDER:
-                               case MON_UNGOLIANT:
-                               case MON_ATLACH_NACHA:
-                               case MON_Y_GOLONAC:
-                                       power[i] = power[i] * 3 / 5;
-                                       break;
-                               case MON_ROBIN_HOOD:
-                               case MON_RICH:
-                               case MON_LICH:
-                               case MON_COLOSSUS:
-                               case MON_CRYPT_THING:
-                               case MON_MASTER_LICH:
-                               case MON_DREADMASTER:
-                               case MON_DEMILICH:
-                               case MON_SHADOWLORD:
-                               case MON_ARCHLICH:
-                               case MON_BLEYS:
-                               case MON_CAINE:
-                               case MON_JULIAN:
-                               case MON_VENOM_WYRM:
-                               case MON_MASTER_MYS:
-                               case MON_G_MASTER_MYS:
-                                       power[i] = power[i] * 3 / 4;
-                                       break;
-                               case MON_VORPAL_BUNNY:
-                               case MON_SHAGRAT:
-                               case MON_GORBAG:
-                               case MON_LOG_MASTER:
-                               case MON_JURT:
-                               case MON_GRAV_HOUND:
-                               case MON_SHIM_VOR:
-                               case MON_JUBJUB:
-                               case MON_CLUB_DEMON:
-                               case MON_LLOIGOR:
-                               case MON_NIGHTCRAWLER:
-                               case MON_NIGHTWALKER:
-                               case MON_RAPHAEL:
-                               case MON_SHAMBLER:
-                               case MON_SKY_DRAKE:
-                               case MON_GERARD:
-                               case MON_G_CTHULHU:
-                               case MON_SPECT_WYRM:
-                               case MON_BAZOOKER:
-                               case MON_GCWADL:
-                               case MON_KIRIN:
-                               case MON_FENGHUANG:
-                                       power[i] = power[i] * 4 / 3;
-                                       break;
-                               case MON_UMBER_HULK:
-                               case MON_FIRE_VOR:
-                               case MON_WATER_VOR:
-                               case MON_COLD_VOR:
-                               case MON_ENERGY_VOR:
-                               case MON_GACHAPIN:
-                               case MON_REVENANT:
-                               case MON_NEXUS_VOR:
-                               case MON_PLASMA_VOR:
-                               case MON_TIME_VOR:
-                               case MON_MANDOR:
-                               case MON_KAVLAX:
-                               case MON_RINALDO:
-                               case MON_STORMBRINGER:
-                               case MON_TIME_HOUND:
-                               case MON_PLASMA_HOUND:
-                               case MON_TINDALOS:
-                               case MON_CHAOS_VOR:
-                               case MON_AETHER_VOR:
-                               case MON_AETHER_HOUND:
-                               case MON_CANTORAS:
-                               case MON_GODZILLA:
-                               case MON_TARRASQUE:
-                               case MON_DESTROYER:
-                               case MON_MORGOTH:
-                               case MON_SERPENT:
-                               case MON_OROCHI:
-                               case MON_D_ELF_SHADE:
-                               case MON_MANA_HOUND:
-                               case MON_SHARD_VOR:
-                               case MON_BANORLUPART:
-                               case MON_BOTEI:
-                               case MON_JAIAN:
-                               case MON_BAHAMUT:
-                               case MON_WAHHA:
-                                       power[i] = power[i] * 3 / 2;
-                                       break;
-                               case MON_ROLENTO:
-                               case MON_CYBER:
-                               case MON_CYBER_KING:
-                               case MON_UNICORN_ORD:
-                                       power[i] = power[i] * 5 / 3;
-                                       break;
-                               case MON_ARCH_VILE:
-                               case MON_PHANTOM_B:
-                               case MON_WYRM_POWER:
-                                       power[i] *= 2;
-                                       break;
-                               case MON_NODENS:
-                               case MON_CULVERIN:
-                                       power[i] *= 3;
-                                       break;
-                               case MON_ECHIZEN:
-                                       power[i] *= 9;
-                                       break;
-                               case MON_HAGURE:
-                                       power[i] *= 100000;
-                                       break;
-                               default:
-                                       break;
-                       }
                        total += power[i];
                }
                for (i=0;i<4;i++)
@@ -1910,6 +1478,10 @@ void battle_monsters(void)
        }
 }
 
+/*!
+ * @brief モンスター闘技場のメインルーチン
+ * @return 賭けを開始したか否か
+ */
 static bool kakutoujou(void)
 {
        s32b maxbet;
@@ -1928,12 +1500,7 @@ static bool kakutoujou(void)
        /* No money */
        if (p_ptr->au < 1)
        {
-#ifdef JP
-               msg_print("¤ª¤¤¡ª¤ª¤Þ¤¨°ìʸ¤Ê¤·¤¸¤ã¤Ê¤¤¤«¡ª¤³¤Ã¤«¤é½Ð¤Æ¤¤¤±¡ª");
-#else
-               msg_print("Hey! You don't have gold - get out of here!");
-#endif
-
+               msg_print(_("おい!おまえ一文なしじゃないか!こっから出ていけ!", "Hey! You don't have gold - get out of here!"));
                msg_print(NULL);
                screen_load();
                return FALSE;
@@ -1944,29 +1511,20 @@ static bool kakutoujou(void)
 
                clear_bldg(4, 10);
 
-#ifdef JP
-               prt("¥â¥ó¥¹¥¿¡¼                                                     ÇÜΨ", 4, 4);
-#else
-               prt("Monsters                                                       Odds", 4, 4);
-#endif
+               prt(_("モンスター                                                     倍率",
+                         "Monsters                                                       Odds"), 4, 4);
                for (i=0;i<4;i++)
                {
                        char buf[80];
                        monster_race *r_ptr = &r_info[battle_mon[i]];
 
-#ifdef JP
-                       sprintf(buf,"%d) %-58s  %4ld.%02ldÇÜ", i+1, format("%s%s",r_name + r_ptr->name, (r_ptr->flags1 & RF1_UNIQUE) ? "¤â¤É¤­" : "      "), (long int)mon_odds[i]/100, (long int)mon_odds[i]%100);
-#else
-                       sprintf(buf,"%d) %-58s  %4ld.%02ld", i+1, format("%s%s", (r_ptr->flags1 & RF1_UNIQUE) ? "Fake " : "", r_name + r_ptr->name), (long int)mon_odds[i]/100, (long int)mon_odds[i]%100);
-#endif
+                       sprintf(buf, _("%d) %-58s  %4ld.%02ld倍", "%d) %-58s  %4ld.%02ld"), i+1, 
+                                                _(format("%s%s",r_name + r_ptr->name, (r_ptr->flags1 & RF1_UNIQUE) ? "もどき" : "      "),
+                                                  format("%s%s", (r_ptr->flags1 & RF1_UNIQUE) ? "Fake " : "", r_name + r_ptr->name)),
+                                               (long int)mon_odds[i]/100, (long int)mon_odds[i]%100);
                        prt(buf, 5+i, 1);
                }
-
-#ifdef JP
-               prt("¤É¤ì¤ËÅÒ¤±¤Þ¤¹¤«:", 0, 0);
-#else
-               prt("Which monster: ", 0, 0);
-#endif
+               prt(_("どれに賭けますか:", "Which monster: "), 0, 0);
                while(1)
                {
                        i = inkey();
@@ -1996,13 +1554,7 @@ static bool kakutoujou(void)
 
                /* Get the wager */
                strcpy(out_val, "");
-#ifdef JP
-sprintf(tmp_str,"ÅÒ¤±¶â (1-%ld)¡©", (long int)maxbet);
-#else
-               sprintf(tmp_str,"Your wager (1-%ld) ? ", (long int)maxbet);
-#endif
-
-
+               sprintf(tmp_str,_("賭け金 (1-%ld)?", "Your wager (1-%ld) ? "), (long int)maxbet);
                /*
                 * Use get_string() because we may need more than
                 * the s16b value returned by get_quantity().
@@ -2017,11 +1569,7 @@ sprintf(tmp_str,"
 
                        if (wager > p_ptr->au)
                        {
-#ifdef JP
-msg_print("¤ª¤¤¡ª¶â¤¬Â­¤ê¤Ê¤¤¤¸¤ã¤Ê¤¤¤«¡ª½Ð¤Æ¤¤¤±¡ª");
-#else
-                               msg_print("Hey! You don't have the gold - get out of here!");
-#endif
+                               msg_print(_("おい!金が足りないじゃないか!出ていけ!", "Hey! You don't have the gold - get out of here!"));
 
                                msg_print(NULL);
                                screen_load();
@@ -2029,23 +1577,13 @@ msg_print("
                        }
                        else if (wager > maxbet)
                        {
-#ifdef JP
-msg_format("%ld¥´¡¼¥ë¥É¤À¤±¼õ¤±¤è¤¦¡£»Ä¤ê¤Ï¼è¤Ã¤È¤­¤Ê¡£", (long int)maxbet);
-#else
-                               msg_format("I'll take %ld gold of that. Keep the rest.",(long int) maxbet);
-#endif
+                               msg_format(_("%ldゴールドだけ受けよう。残りは取っときな。", "I'll take %ld gold of that. Keep the rest."), (long int)maxbet);
 
                                wager = maxbet;
                        }
                        else if (wager < 1)
                        {
-#ifdef JP
-msg_print("£Ï£Ë¡¢£±¥´¡¼¥ë¥É¤Ç¤¤¤³¤¦¡£");
-#else
-                               msg_print("Ok, we'll start with 1 gold.");
-#endif
-
-
+                               msg_print(_("OK、1ゴールドでいこう。", "Ok, we'll start with 1 gold."));
                                wager = 1;
                        }
                        msg_print(NULL);
@@ -2071,70 +1609,52 @@ msg_print("
        return (FALSE);
 }
 
+/*!
+ * @brief 本日の賞金首情報を表示する。
+ * @return なし
+ */
 static void today_target(void)
 {
        char buf[160];
        monster_race *r_ptr = &r_info[today_mon];
 
        clear_bldg(4,18);
-#ifdef JP
-c_put_str(TERM_YELLOW, "ËÜÆü¤Î¾Þ¶â¼ó", 5, 10);
-#else
-       prt("Wanted monster that changes from day to day", 5, 10);
-#endif
-#ifdef JP
-       sprintf(buf,"¥¿¡¼¥²¥Ã¥È¡§ %s",r_name + r_ptr->name);
-#else
-       sprintf(buf,"target: %s",r_name + r_ptr->name);
-#endif
+       c_put_str(TERM_YELLOW, _("本日の賞金首", "Wanted monster that changes from day to day"), 5, 10);
+       sprintf(buf,_("ターゲット: %s", "target: %s"),r_name + r_ptr->name);
        c_put_str(TERM_YELLOW, buf, 6, 10);
-#ifdef JP
-       sprintf(buf,"»àÂΠ---- $%d",r_ptr->level * 50 + 100);
-#else
-       sprintf(buf,"corpse   ---- $%d",r_ptr->level * 50 + 100);
-#endif
+       sprintf(buf,_("死体 ---- $%d", "corpse   ---- $%d"), (int)r_ptr->level * 50 + 100);
        prt(buf, 8, 10);
-#ifdef JP
-       sprintf(buf,"¹ü   ---- $%d",r_ptr->level * 30 + 60);
-#else
-       sprintf(buf,"skeleton ---- $%d",r_ptr->level * 30 + 60);
-#endif
+       sprintf(buf,_("骨   ---- $%d", "skeleton ---- $%d"), (int)r_ptr->level * 30 + 60);
        prt(buf, 9, 10);
        p_ptr->today_mon = today_mon;
 }
 
+/*!
+ * @brief ツチノコの賞金首情報を表示する。
+ * @return なし
+ */
 static void tsuchinoko(void)
 {
        clear_bldg(4,18);
-#ifdef JP
-c_put_str(TERM_YELLOW, "°ì³ÍÀé¶â¤ÎÂç¥Á¥ã¥ó¥¹¡ª¡ª¡ª", 5, 10);
-c_put_str(TERM_YELLOW, "¥¿¡¼¥²¥Ã¥È¡§¸¸¤ÎÄÁ½Ã¡Ö¥Ä¥Á¥Î¥³¡×", 6, 10);
-c_put_str(TERM_WHITE, "À¸¤±Êá¤ê ---- $1,000,000", 8, 10);
-c_put_str(TERM_WHITE, "»àÂΠ    ----   $200,000", 9, 10);
-c_put_str(TERM_WHITE, "¹ü       ----   $100,000", 10, 10);
-#else
-c_put_str(TERM_YELLOW, "Big chance to quick money!!!", 5, 10);
-c_put_str(TERM_YELLOW, "target: the rarest animal 'Tsuchinoko'", 6, 10);
-c_put_str(TERM_WHITE, "catch alive ---- $1,000,000", 8, 10);
-c_put_str(TERM_WHITE, "corpse      ----   $200,000", 9, 10);
-c_put_str(TERM_WHITE, "bones       ----   $100,000", 10, 10);
-#endif
+       c_put_str(TERM_YELLOW, _("一獲千金の大チャンス!!!", "Big chance to quick money!!!"), 5, 10);
+       c_put_str(TERM_YELLOW, _("ターゲット:幻の珍獣「ツチノコ」", "target: the rarest animal 'Tsuchinoko'"), 6, 10);
+       c_put_str(TERM_WHITE, _("生け捕り ---- $1,000,000", "catch alive ---- $1,000,000"), 8, 10);
+       c_put_str(TERM_WHITE, _("死体     ----   $200,000", "corpse      ----   $200,000"), 9, 10);
+       c_put_str(TERM_WHITE, _("骨       ----   $100,000", "bones       ----   $100,000"), 10, 10);
 }
 
+/*!
+ * @brief 通常の賞金首情報を表示する。
+ * @return なし
+ */
 static void shoukinkubi(void)
 {
        int i;
-       int y = 0;
+       TERM_LEN y = 0;
 
        clear_bldg(4,18);
-
-#ifdef JP
-       prt("»àÂΤò»ý¤Áµ¢¤ì¤ÐÊó½·¤òº¹¤·¾å¤²¤Þ¤¹¡£",4 ,10);
-c_put_str(TERM_YELLOW, "¸½ºß¤Î¾Þ¶â¼ó", 6, 10);
-#else
-       prt("Offer a prize when you bring a wanted monster's corpse",4 ,10);
-c_put_str(TERM_YELLOW, "Wanted monsters", 6, 10);
-#endif
+       prt(_("死体を持ち帰れば報酬を差し上げます。", "Offer a prize when you bring a wanted monster's corpse"),4 ,10);
+       c_put_str(TERM_YELLOW, _("現在の賞金首", "Wanted monsters"), 6, 10);
 
        for (i = 0; i < MAX_KUBI; i++)
        {
@@ -2145,11 +1665,7 @@ c_put_str(TERM_YELLOW, "Wanted monsters", 6, 10);
                if (kubi_r_idx[i] > 10000)
                {
                        color = TERM_RED;
-#ifdef JP
-                       done_mark = "(ºÑ)";
-#else
-                       done_mark = "(done)";
-#endif
+                       done_mark = _("(済)", "(done)");
                }
                else
                {
@@ -2162,11 +1678,7 @@ c_put_str(TERM_YELLOW, "Wanted monsters", 6, 10);
                y = (y+1) % 10;
                if (!y && (i < MAX_KUBI -1))
                {
-#ifdef JP
-                       prt("²¿¤«¥­¡¼¤ò²¡¤·¤Æ¤¯¤À¤µ¤¤", 0, 0);
-#else
-                       prt("Hit any key.", 0, 0);
-#endif
+                       prt(_("何かキーを押してください", "Hit any key."), 0, 0);
                        (void)inkey();
                        prt("", 0, 0);
                        clear_bldg(7,18);
@@ -2175,10 +1687,13 @@ c_put_str(TERM_YELLOW, "Wanted monsters", 6, 10);
 }
 
 
-/* List of prize object */
+
+/*!
+ * 賞金首の報酬テーブル / List of prize object
+ */
 static struct {
-       s16b tval;
-       s16b sval;
+       OBJECT_TYPE_VALUE tval; /*!< ベースアイテムのメイン種別ID */
+       OBJECT_SUBTYPE_VALUE sval; /*!< ベースアイテムのサブ種別ID */
 } prize_list[MAX_KUBI] = 
 {
        {TV_POTION, SV_POTION_CURING},
@@ -2206,11 +1721,14 @@ static struct {
        {TV_SCROLL, SV_SCROLL_ARTIFACT},
 };
 
-
-/* Get prize */
+/*!
+ * @brief 賞金首の引き換え処理 / Get prize
+ * @return 各種賞金首のいずれかでも換金が行われたか否か。
+ */
 static bool kankin(void)
 {
-       int i, j;
+       INVENTORY_IDX i;
+       int j;
        bool change = FALSE;
        char o_name[MAX_NLEN];
        object_type *o_ptr;
@@ -2225,18 +1743,10 @@ static bool kankin(void)
                {
                        char buf[MAX_NLEN+20];
                        object_desc(o_name, o_ptr, 0);
-#ifdef JP
-                       sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
-#else
-                       sprintf(buf, "Convert %s into money? ",o_name);
-#endif
+                       sprintf(buf, _("%s を換金しますか?", "Convert %s into money? "),o_name);
                        if (get_check(buf))
                        {
-#ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)(1000000L * o_ptr->number));
-#else
-                               msg_format("You get %ldgp.", (long int)(1000000L * o_ptr->number));
-#endif
+                               msg_format(_("賞金 %ld$を手に入れた。", "You get %ldgp."), (long int)(1000000L * o_ptr->number));
                                p_ptr->au += 1000000L * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
                                inven_item_increase(i, -o_ptr->number);
@@ -2256,18 +1766,10 @@ static bool kankin(void)
                {
                        char buf[MAX_NLEN+20];
                        object_desc(o_name, o_ptr, 0);
-#ifdef JP
-                       sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
-#else
-                       sprintf(buf, "Convert %s into money? ",o_name);
-#endif
+                       sprintf(buf, _("%s を換金しますか?", "Convert %s into money? "),o_name);
                        if (get_check(buf))
                        {
-#ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)(200000L * o_ptr->number));
-#else
-                               msg_format("You get %ldgp.", (long int)(200000L * o_ptr->number));
-#endif
+                               msg_format(_("賞金 %ld$を手に入れた。", "You get %ldgp."), (long int)(200000L * o_ptr->number));
                                p_ptr->au += 200000L * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
                                inven_item_increase(i, -o_ptr->number);
@@ -2287,18 +1789,10 @@ static bool kankin(void)
                {
                        char buf[MAX_NLEN+20];
                        object_desc(o_name, o_ptr, 0);
-#ifdef JP
-                       sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
-#else
-                       sprintf(buf, "Convert %s into money? ",o_name);
-#endif
+                       sprintf(buf, _("%s を換金しますか?", "Convert %s into money? "),o_name);
                        if (get_check(buf))
                        {
-#ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)(100000L * o_ptr->number));
-#else
-                               msg_format("You get %ldgp.", (long int)(100000L * o_ptr->number));
-#endif
+                               msg_format(_("賞金 %ld$を手に入れた。", "You get %ldgp."), (long int)(100000L * o_ptr->number));
                                p_ptr->au += 100000L * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
                                inven_item_increase(i, -o_ptr->number);
@@ -2316,18 +1810,10 @@ static bool kankin(void)
                {
                        char buf[MAX_NLEN+20];
                        object_desc(o_name, o_ptr, 0);
-#ifdef JP
-                       sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
-#else
-                       sprintf(buf, "Convert %s into money? ",o_name);
-#endif
+                       sprintf(buf, _("%s を換金しますか?", "Convert %s into money? "),o_name);
                        if (get_check(buf))
                        {
-#ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)((r_info[today_mon].level * 50 + 100) * o_ptr->number));
-#else
-                               msg_format("You get %ldgp.", (long int)((r_info[today_mon].level * 50 + 100) * o_ptr->number));
-#endif
+                               msg_format(_("賞金 %ld$を手に入れた。", "You get %ldgp."), (long int)((r_info[today_mon].level * 50 + 100) * o_ptr->number));
                                p_ptr->au += (r_info[today_mon].level * 50 + 100) * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
                                inven_item_increase(i, -o_ptr->number);
@@ -2346,18 +1832,10 @@ static bool kankin(void)
                {
                        char buf[MAX_NLEN+20];
                        object_desc(o_name, o_ptr, 0);
-#ifdef JP
-                       sprintf(buf, "%s ¤ò´¹¶â¤·¤Þ¤¹¤«¡©",o_name);
-#else
-                       sprintf(buf, "Convert %s into money? ",o_name);
-#endif
+                       sprintf(buf, _("%s を換金しますか?", "Convert %s into money? "),o_name);
                        if (get_check(buf))
                        {
-#ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (long int)((r_info[today_mon].level * 30 + 60) * o_ptr->number));
-#else
-                               msg_format("You get %ldgp.", (long int)((r_info[today_mon].level * 30 + 60) * o_ptr->number));
-#endif
+                               msg_format(_("賞金 %ld$を手に入れた。", "You get %ldgp."), (long int)((r_info[today_mon].level * 30 + 60) * o_ptr->number));
                                p_ptr->au += (r_info[today_mon].level * 30 + 60) * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
                                inven_item_increase(i, -o_ptr->number);
@@ -2377,23 +1855,16 @@ static bool kankin(void)
                        if ((o_ptr->tval == TV_CORPSE) && (o_ptr->pval == kubi_r_idx[j]))
                        {
                                char buf[MAX_NLEN+20];
-                               int num, k, item_new;
+                               int num, k;
+                               INVENTORY_IDX item_new;
                                object_type forge;
 
                                object_desc(o_name, o_ptr, 0);
-#ifdef JP
-                               sprintf(buf, "%s¤òÅϤ·¤Þ¤¹¤«¡©",o_name);
-#else
-                               sprintf(buf, "Hand %s over? ",o_name);
-#endif
+                               sprintf(buf, _("%sを渡しますか?", "Hand %s over? "),o_name);
                                if (!get_check(buf)) continue;
 
 #if 0 /* Obsoleted */
-#ifdef JP
-                               msg_format("¾Þ¶â %ld¡ð¤ò¼ê¤ËÆþ¤ì¤¿¡£", (r_info[kubi_r_idx[j]].level + 1) * 300 * o_ptr->number);
-#else
-                               msg_format("You get %ldgp.", (r_info[kubi_r_idx[j]].level + 1) * 300 * o_ptr->number);
-#endif
+                               msg_format(_("賞金 %ld$を手に入れた。", "You get %ldgp."), (r_info[kubi_r_idx[j]].level + 1) * 300 * o_ptr->number);
                                p_ptr->au += (r_info[kubi_r_idx[j]].level+1) * 300 * o_ptr->number;
                                p_ptr->redraw |= (PR_GOLD);
                                inven_item_increase(i, -o_ptr->number);
@@ -2418,12 +1889,7 @@ static bool kankin(void)
                                {
                                        if (kubi_r_idx[k] >= 10000) num++;
                                }
-
-#ifdef JP
-                               msg_format("¤³¤ì¤Ç¹ç·× %d ¥Ý¥¤¥ó¥È³ÍÆÀ¤·¤Þ¤·¤¿¡£", num);
-#else
-                               msg_format("You earned %d point%s total.", num, (num > 1 ? "s" : ""));
-#endif
+                               msg_format(_("これで合計 %d ポイント獲得しました。" ,"You earned %d point%s total."), num, (num > 1 ? "s" : ""));
 
                                /* Prepare to make a prize */
                                object_prep(&forge, lookup_kind(prize_list[num-1].tval, prize_list[num-1].sval));
@@ -2440,18 +1906,11 @@ static bool kankin(void)
                                 */
                                item_new = inven_carry(&forge);
 
-                               /* Describe the object */
                                object_desc(o_name, &forge, 0);
-#ifdef JP
-                               msg_format("%s(%c)¤òÌã¤Ã¤¿¡£", o_name, index_to_label(item_new));
-#else
-                               msg_format("You get %s (%c). ", o_name, index_to_label(item_new));
-#endif
+                               msg_format(_("%s(%c)を貰った。", "You get %s (%c). "), o_name, index_to_label(item_new));
 
                                /* Auto-inscription */
                                autopick_alter_item(item_new, FALSE);
-
-                               /* Handle stuff */
                                handle_stuff();
 
                                change = TRUE;
@@ -2461,18 +1920,19 @@ static bool kankin(void)
 
        if (!change)
        {
-#ifdef JP
-               msg_print("¾Þ¶â¤òÆÀ¤é¤ì¤½¤¦¤Ê¤â¤Î¤Ï»ý¤Ã¤Æ¤¤¤Ê¤«¤Ã¤¿¡£");
-#else
-               msg_print("You have nothing.");
-#endif
+               msg_print(_("賞金を得られそうなものは持っていなかった。", "You have nothing."));
                msg_print(NULL);
                return FALSE;
        }
        return TRUE;
 }
 
-bool get_nightmare(int r_idx)
+/*!
+ * @brief 悪夢の元凶となるモンスターかどうかを返す。
+ * @param r_idx 判定対象となるモンスターのID
+ * @return 悪夢の元凶となり得るか否か。
+ */
+bool get_nightmare(MONRACE_IDX r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
 
@@ -2486,332 +1946,38 @@ bool get_nightmare(int r_idx)
        return (TRUE);
 }
 
-
-void have_nightmare(int r_idx)
+/*!
+ * @brief 宿屋の利用サブルーチン
+ * @details inn commands\n
+ * Note that resting for the night was a perfect way to avoid player\n
+ * ghosts in the town *if* you could only make it to the inn in time (-:\n
+ * Now that the ghosts are temporarily disabled in 2.8.X, this function\n
+ * will not be that useful.  I will keep it in the hopes the player\n
+ * ghost code does become a reality again. Does help to avoid filthy urchins.\n
+ * Resting at night is also a quick way to restock stores -KMW-\n
+ * @param cmd 宿屋の利用施設ID
+ * @return 施設の利用が実際に行われたか否か。
+ */
+static bool inn_comm(int cmd)
 {
-       bool happened = FALSE;
-       monster_race *r_ptr = &r_info[r_idx];
-       int power = r_ptr->level + 10;
-       char m_name[80];
-       cptr desc = r_name + r_ptr->name;
-
-       /* Describe it */
-#ifndef JP
-       if (!(r_ptr->flags1 & RF1_UNIQUE))
-               sprintf(m_name, "%s %s", (is_a_vowel(desc[0]) ? "an" : "a"), desc);
-       else
-#endif
-               sprintf(m_name, "%s", desc);
-
-       if (!(r_ptr->flags1 & RF1_UNIQUE))
+       switch (cmd)
        {
-               if (r_ptr->flags1 & RF1_FRIENDS) power /= 2;
-       }
-       else power *= 2;
-
-       if (saving_throw(p_ptr->skill_sav * 100 / power))
-       {
-#ifdef JP
-               msg_format("Ì´¤ÎÃæ¤Ç%s¤ËÄɤ¤¤«¤±¤é¤ì¤¿¡£", m_name);
-#else
-               msg_format("%^s chases you through your dreams.", m_name);
-#endif
-
-               /* Safe */
-               return;
-       }
-
-       if (p_ptr->image)
-       {
-               /* Something silly happens... */
-#ifdef JP
-               msg_format("%s%s¤Î´é¤ò¸«¤Æ¤·¤Þ¤Ã¤¿¡ª",
-#else
-               msg_format("You behold the %s visage of %s!",
-#endif
-
-                                         funny_desc[randint0(MAX_SAN_FUNNY)], m_name);
-
-               if (one_in_(3))
-               {
-                       msg_print(funny_comments[randint0(MAX_SAN_COMMENT)]);
-                       p_ptr->image = p_ptr->image + randint1(r_ptr->level);
-               }
-
-               /* Never mind; we can't see it clearly enough */
-               return;
-       }
-
-       /* Something frightening happens... */
-#ifdef JP
-       msg_format("%s%s¤Î´é¤ò¸«¤Æ¤·¤Þ¤Ã¤¿¡ª",
-#else
-       msg_format("You behold the %s visage of %s!",
-#endif
-
-                                 horror_desc[randint0(MAX_SAN_HORROR)], desc);
-
-       r_ptr->r_flags2 |= RF2_ELDRITCH_HORROR;
-
-       if (!p_ptr->mimic_form)
-       {
-               switch (p_ptr->prace)
-               {
-               /* Demons may make a saving throw */
-               case RACE_IMP:
-               case RACE_DEMON:
-                       if (saving_throw(20 + p_ptr->lev)) return;
-                       break;
-               /* Undead may make a saving throw */
-               case RACE_SKELETON:
-               case RACE_ZOMBIE:
-               case RACE_SPECTRE:
-               case RACE_VAMPIRE:
-                       if (saving_throw(10 + p_ptr->lev)) return;
-                       break;
-               }
-       }
-       else
-       {
-               /* Demons may make a saving throw */
-               if (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_DEMON)
-               {
-                       if (saving_throw(20 + p_ptr->lev)) return;
-               }
-               /* Undead may make a saving throw */
-               else if (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_UNDEAD)
-               {
-                       if (saving_throw(10 + p_ptr->lev)) return;
-               }
-       }
-
-       /* Mind blast */
-       if (!saving_throw(p_ptr->skill_sav * 100 / power))
-       {
-               if (!p_ptr->resist_conf)
-               {
-                       (void)set_confused(p_ptr->confused + randint0(4) + 4);
-               }
-               if (!p_ptr->resist_chaos && one_in_(3))
-               {
-                       (void)set_image(p_ptr->image + randint0(250) + 150);
-               }
-               return;
-       }
-
-       /* Lose int & wis */
-       if (!saving_throw(p_ptr->skill_sav * 100 / power))
-       {
-               do_dec_stat(A_INT);
-               do_dec_stat(A_WIS);
-               return;
-       }
-
-       /* Brain smash */
-       if (!saving_throw(p_ptr->skill_sav * 100 / power))
-       {
-               if (!p_ptr->resist_conf)
-               {
-                       (void)set_confused(p_ptr->confused + randint0(4) + 4);
-               }
-               if (!p_ptr->free_act)
-               {
-                       (void)set_paralyzed(p_ptr->paralyzed + randint0(4) + 4);
-               }
-               while (!saving_throw(p_ptr->skill_sav))
-               {
-                       (void)do_dec_stat(A_INT);
-               }
-               while (!saving_throw(p_ptr->skill_sav))
-               {
-                       (void)do_dec_stat(A_WIS);
-               }
-               if (!p_ptr->resist_chaos)
-               {
-                       (void)set_image(p_ptr->image + randint0(250) + 150);
-               }
-               return;
-       }
-
-
-       /* Amnesia */
-       if (!saving_throw(p_ptr->skill_sav * 100 / power))
-       {
-               if (lose_all_info())
-               {
-#ifdef JP
-msg_print("¤¢¤Þ¤ê¤Î¶²ÉݤËÁ´¤Æ¤Î¤³¤È¤ò˺¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
-#else
-                       msg_print("You forget everything in your utmost terror!");
-#endif
-
-               }
-               return;
-       }
-
-       /* Else gain permanent insanity */
-       if ((p_ptr->muta3 & MUT3_MORONIC) && (p_ptr->muta2 & MUT2_BERS_RAGE) &&
-               ((p_ptr->muta2 & MUT2_COWARDICE) || (p_ptr->resist_fear)) &&
-               ((p_ptr->muta2 & MUT2_HALLU) || (p_ptr->resist_chaos)))
-       {
-               /* The poor bastard already has all possible insanities! */
-               return;
-       }
-
-       while (!happened)
-       {
-               switch (randint1(4))
-               {
-                       case 1:
-                       {
-                               if (!(p_ptr->muta3 & MUT3_MORONIC))
-                               {
-                                       if ((p_ptr->stat_use[A_INT] < 4) && (p_ptr->stat_use[A_WIS] < 4))
-                                       {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï´°àú¤ÊÇϼ¯¤Ë¤Ê¤Ã¤¿¤è¤¦¤Êµ¤¤¬¤·¤¿¡£¤·¤«¤·¤½¤ì¤Ï¸µ¡¹¤À¤Ã¤¿¡£");
-#else
-                                               msg_print("You turn into an utter moron!");
-#endif
-                                       }
-                                       else
-                                       {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï´°àú¤ÊÇϼ¯¤Ë¤Ê¤Ã¤¿¡ª");
-#else
-                                               msg_print("You turn into an utter moron!");
-#endif
-                                       }
-
-                                       if (p_ptr->muta3 & MUT3_HYPER_INT)
-                                       {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤ÎǾ¤ÏÀ¸ÂÎ¥³¥ó¥Ô¥å¡¼¥¿¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
-#else
-                                               msg_print("Your brain is no longer a living computer.");
-#endif
-
-                                               p_ptr->muta3 &= ~(MUT3_HYPER_INT);
-                                       }
-                                       p_ptr->muta3 |= MUT3_MORONIC;
-                                       happened = TRUE;
-                               }
-                               break;
-                       }
-                       case 2:
-                       {
-                               if (!(p_ptr->muta2 & MUT2_COWARDICE) && !p_ptr->resist_fear)
-                               {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¥Ñ¥é¥Î¥¤¥¢¤Ë¤Ê¤Ã¤¿¡ª");
-#else
-                                       msg_print("You become paranoid!");
-#endif
-
-
-                                       /* Duh, the following should never happen, but anyway... */
-                                       if (p_ptr->muta3 & MUT3_FEARLESS)
-                                       {
-#ifdef JP
-msg_print("¤¢¤Ê¤¿¤Ï¤â¤¦¶²¤ìÃΤ餺¤Ç¤Ï¤Ê¤¯¤Ê¤Ã¤¿¡£");
-#else
-                                               msg_print("You are no longer fearless.");
-#endif
-
-                                               p_ptr->muta3 &= ~(MUT3_FEARLESS);
-                                       }
-
-                                       p_ptr->muta2 |= MUT2_COWARDICE;
-                                       happened = TRUE;
-                               }
-                               break;
-                       }
-                       case 3:
-                       {
-                               if (!(p_ptr->muta2 & MUT2_HALLU) && !p_ptr->resist_chaos)
-                               {
-#ifdef JP
-msg_print("¸¸³Ð¤ò¤Ò¤­µ¯¤³¤¹Àº¿ÀºøÍð¤Ë´Ù¤Ã¤¿¡ª");
-#else
-                                       msg_print("You are afflicted by a hallucinatory insanity!");
-#endif
-
-                                       p_ptr->muta2 |= MUT2_HALLU;
-                                       happened = TRUE;
-                               }
-                               break;
-                       }
-                       default:
-                       {
-                               if (!(p_ptr->muta2 & MUT2_BERS_RAGE))
-                               {
-#ifdef JP
-msg_print("·ãÎõ¤Ê´¶¾ð¤Îȯºî¤Ë¤ª¤½¤ï¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤¿¡ª");
-#else
-                                       msg_print("You become subject to fits of berserk rage!");
-#endif
-
-                                       p_ptr->muta2 |= MUT2_BERS_RAGE;
-                                       happened = TRUE;
-                               }
-                               break;
-                       }
-               }
-       }
-
-       p_ptr->update |= PU_BONUS;
-       handle_stuff();
-}
-
-
-/*
- * inn commands
- * Note that resting for the night was a perfect way to avoid player
- * ghosts in the town *if* you could only make it to the inn in time (-:
- * Now that the ghosts are temporarily disabled in 2.8.X, this function
- * will not be that useful.  I will keep it in the hopes the player
- * ghost code does become a reality again. Does help to avoid filthy urchins.
- * Resting at night is also a quick way to restock stores -KMW-
- */
-static bool inn_comm(int cmd)
-{
-       switch (cmd)
-       {
-               case BACT_FOOD: /* Buy food & drink */
-                       if (p_ptr->food >= PY_FOOD_FULL)
-                       {
-#ifdef JP
-                               msg_print("º£¤ÏËþÊ¢¤À¡£");
-#else
-                               msg_print("You are full now.");
-#endif
-                               return FALSE;
-                       }
-
-#ifdef JP
-msg_print("¥Ð¡¼¥Æ¥ó¤Ï¤¤¤¯¤é¤«¤Î¿©¤Ùʪ¤È¥Ó¡¼¥ë¤ò¤¯¤ì¤¿¡£");
-#else
-                       msg_print("The barkeep gives you some gruel and a beer.");
-#endif
-
-                       (void)set_food(PY_FOOD_MAX - 1);
-                       break;
+               case BACT_FOOD: /* Buy food & drink */
+                       if (p_ptr->food >= PY_FOOD_FULL)
+                       {
+                               msg_print(_("今は満腹だ。", "You are full now."));
+                               return FALSE;
+                       }
+                       msg_print(_("バーテンはいくらかの食べ物とビールをくれた。", "The barkeep gives you some gruel and a beer."));
+                       (void)set_food(PY_FOOD_MAX - 1);
+                       break;
 
                case BACT_REST: /* Rest for the night */
                        if ((p_ptr->poisoned) || (p_ptr->cut))
                        {
-#ifdef JP
-                               msg_print("¤¢¤Ê¤¿¤ËɬÍפʤΤÏÉô²°¤Ç¤Ï¤Ê¤¯¡¢¼£ÎżԤǤ¹¡£");
-#else
-                               msg_print("You need a healer, not a room.");
-#endif
-
+                               msg_print(_("あなたに必要なのは部屋ではなく、治療者です。", "You need a healer, not a room."));
                                msg_print(NULL);
-#ifdef JP
-                               msg_print("¤¹¤ß¤Þ¤»¤ó¡¢¤Ç¤â¤¦¤Á¤Ç狼¤Ë»à¤Ê¤ì¤Á¤ãº¤¤ê¤Þ¤¹¤ó¤Ç¡£");
-#else
-                               msg_print("Sorry, but don't want anyone dying in here.");
-#endif
+                               msg_print(_("すみません、でもうちで誰かに死なれちゃ困りますんで。", "Sorry, but don't want anyone dying in here."));
                        }
                        else
                        {
@@ -2819,16 +1985,15 @@ msg_print("
                                int prev_day, prev_hour, prev_min;
 
                                extract_day_hour_min(&prev_day, &prev_hour, &prev_min);
-#ifdef JP
-                               do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "½É²°¤ËÇñ¤Þ¤Ã¤¿¡£");
-#else
-                               if ((prev_hour >= 6) && (prev_hour <= 17)) do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "stay over daytime at the inn.");
-                               else do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "stay over night at the inn.");
-#endif
-                               turn = (turn / (TURNS_PER_TICK*TOWN_DAWN/2) + 1) * (TURNS_PER_TICK*TOWN_DAWN/2);
+                               if ((prev_hour >= 6) && (prev_hour <= 17)) 
+                                       do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("宿屋に泊まった。", "stay over daytime at the inn."));
+                               else
+                                       do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("宿屋に泊まった。", "stay over night at the inn."));
+                               
+                               turn = (turn / (TURNS_PER_TICK * TOWN_DAWN / 2) + 1) * (TURNS_PER_TICK * TOWN_DAWN / 2);
                                if (dungeon_turn < dungeon_turn_limit)
                                {
-                                       dungeon_turn += MIN(turn - oldturn, TURNS_PER_TICK * 250);
+                                       dungeon_turn += MIN((turn - oldturn), TURNS_PER_TICK * 250) * INN_DUNGEON_TURN_ADJ;
                                        if (dungeon_turn > dungeon_turn_limit) dungeon_turn = dungeon_turn_limit;
                                }
 
@@ -2839,33 +2004,17 @@ msg_print("
 
                                if (ironman_nightmare)
                                {
-#ifdef JP
-                                       msg_print("̲¤ê¤Ë½¢¤¯¤È¶²¤í¤·¤¤¸÷·Ê¤¬¿´¤ò¤è¤®¤Ã¤¿¡£");
-#else
-                                       msg_print("Horrible visions flit through your mind as you sleep.");
-#endif
-
-                                       /* Pick a nightmare */
-                                       get_mon_num_prep(get_nightmare, NULL);
+                                       msg_print(_("眠りに就くと恐ろしい光景が心をよぎった。", "Horrible visions flit through your mind as you sleep."));
 
                                        /* Have some nightmares */
                                        while(1)
                                        {
-                                               have_nightmare(get_mon_num(MAX_DEPTH));
-
+                                               sanity_blast(NULL, FALSE);
                                                if (!one_in_(3)) break;
                                        }
 
-                                       /* Remove the monster restriction */
-                                       get_mon_num_prep(NULL, NULL);
-
-#ifdef JP
-                                       msg_print("¤¢¤Ê¤¿¤ÏÀ䶫¤·¤ÆÌܤò³Ð¤Þ¤·¤¿¡£");
-                                       do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "°­Ì´¤Ë¤¦¤Ê¤µ¤ì¤Æ¤è¤¯Ì²¤ì¤Ê¤«¤Ã¤¿¡£");
-#else
-                                       msg_print("You awake screaming.");
-                                       do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "be troubled by a nightmare.");
-#endif
+                                       msg_print(_("あなたは絶叫して目を覚ました。", "You awake screaming."));
+                                       do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("悪夢にうなされてよく眠れなかった。", "be troubled by a nightmare."));
                                }
                                else
                                {
@@ -2879,7 +2028,7 @@ msg_print("
                                                int i;
                                                for (i = 0; i < 72; i++)
                                                {
-                                                       p_ptr->magic_num1[i] = p_ptr->magic_num2[i]*EATER_CHARGE;
+                                                       p_ptr->magic_num1[i] = p_ptr->magic_num2[i] * EATER_CHARGE;
                                                }
                                                for (; i < 108; i++)
                                                {
@@ -2889,23 +2038,13 @@ msg_print("
 
                                        if ((prev_hour >= 6) && (prev_hour <= 17))
                                        {
-#ifdef JP
-                                               msg_print("¤¢¤Ê¤¿¤Ï¥ê¥Õ¥ì¥Ã¥·¥å¤·¤ÆÌܳФᡢͼÊý¤ò·Þ¤¨¤¿¡£");
-                                               do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "ͼÊý¤ò·Þ¤¨¤¿¡£");
-#else
-                                               msg_print("You awake refreshed for the evening.");
-                                               do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "awake refreshed.");
-#endif
+                                               msg_print(_("あなたはリフレッシュして目覚め、夕方を迎えた。", "You awake refreshed for the evening."));
+                                               do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("夕方を迎えた。", "awake refreshed."));
                                        }
                                        else
                                        {
-#ifdef JP
-                                               msg_print("¤¢¤Ê¤¿¤Ï¥ê¥Õ¥ì¥Ã¥·¥å¤·¤ÆÌܳФᡢ¿·¤¿¤ÊÆü¤ò·Þ¤¨¤¿¡£");
-                                               do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "¤¹¤¬¤¹¤¬¤·¤¤Ä«¤ò·Þ¤¨¤¿¡£");
-#else
-                                               msg_print("You awake refreshed for the new day.");
-                                               do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "awake refreshed.");
-#endif
+                                               msg_print(_("あなたはリフレッシュして目覚め、新たな日を迎えた。", "You awake refreshed for the new day."));
+                                               do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("すがすがしい朝を迎えた。", "awake refreshed."));
                                        }
                                }
                        }
@@ -2922,16 +2061,18 @@ msg_print("
 }
 
 
-/*
- * Display quest information
+/*!
+ * @brief クエスト情報を表示しつつ処理する。/ Display quest information
+ * @param questnum クエストのID
+ * @param do_init クエストの開始処理(TRUE)、結果処理か(FALSE)
+ * @return なし
  */
-static void get_questinfo(int questnum, bool do_init)
+static void get_questinfo(IDX questnum, bool do_init)
 {
        int     i;
-       int     old_quest;
+       IDX     old_quest;
        char    tmp_str[80];
 
-
        /* Clear the text */
        for (i = 0; i < 10; i++)
        {
@@ -2954,11 +2095,7 @@ static void get_questinfo(int questnum, bool do_init)
        p_ptr->inside_quest = old_quest;
 
        /* Print the quest info */
-#ifdef JP
-sprintf(tmp_str, "¥¯¥¨¥¹¥È¾ðÊó (´í¸±ÅÙ: %d ³¬ÁêÅö)", quest[questnum].level);
-#else
-       sprintf(tmp_str, "Quest Information (Danger level: %d)", quest[questnum].level);
-#endif
+       sprintf(tmp_str, _("クエスト情報 (危険度: %d 階相当)", "Quest Information (Danger level: %d)"), (int)quest[questnum].level);
 
        prt(tmp_str, 5, 0);
 
@@ -2970,13 +2107,13 @@ sprintf(tmp_str, "
        }
 }
 
-
-/*
- * Request a quest from the Lord.
+/*!
+ * @brief クエスト処理のメインルーチン / Request a quest from the Lord.
+ * @return なし
  */
 static void castle_quest(void)
 {
-       int             q_index = 0;
+       IDX q_index = 0;
        monster_race    *r_ptr;
        quest_type      *q_ptr;
        cptr            name;
@@ -2985,17 +2122,12 @@ static void castle_quest(void)
        clear_bldg(4, 18);
 
        /* Current quest of the building */
-       q_index = cave[py][px].special;
+       q_index = cave[p_ptr->y][p_ptr->x].special;
 
        /* Is there a quest available at the building? */
        if (!q_index)
        {
-#ifdef JP
-put_str("º£¤Î¤È¤³¤í¥¯¥¨¥¹¥È¤Ï¤¢¤ê¤Þ¤»¤ó¡£", 8, 0);
-#else
-               put_str("I don't have a quest for you at the moment.", 8, 0);
-#endif
-
+               put_str(_("今のところクエストはありません。", "I don't have a quest for you at the moment."), 8, 0);
                return;
        }
 
@@ -3024,24 +2156,9 @@ put_str("
        /* Quest is still unfinished */
        else if (q_ptr->status == QUEST_STATUS_TAKEN)
        {
-#ifdef JP
-put_str("¤¢¤Ê¤¿¤Ï¸½ºß¤Î¥¯¥¨¥¹¥È¤ò½ªÎ»¤µ¤»¤Æ¤¤¤Þ¤»¤ó¡ª", 8, 0);
-#else
-               put_str("You have not completed your current quest yet!", 8, 0);
-#endif
-
-#ifdef JP
-put_str("CTRL-Q¤ò»È¤¨¤Ð¥¯¥¨¥¹¥È¤Î¾õÂÖ¤¬¥Á¥§¥Ã¥¯¤Ç¤­¤Þ¤¹¡£", 9, 0);
-#else
-               put_str("Use CTRL-Q to check the status of your quest.", 9, 0);
-#endif
-
-#ifdef JP
-put_str("¥¯¥¨¥¹¥È¤ò½ª¤ï¤é¤»¤¿¤éÌá¤Ã¤ÆÍè¤Æ²¼¤µ¤¤¡£", 12, 0);
-#else
-               put_str("Return when you have completed your quest.", 12, 0);
-#endif
-
+               put_str(_("あなたは現在のクエストを終了させていません!", "You have not completed your current quest yet!"), 8, 0);
+               put_str(_("CTRL-Qを使えばクエストの状態がチェックできます。", "Use CTRL-Q to check the status of your quest."), 9, 0);
+               put_str(_("クエストを終わらせたら戻って来て下さい。", "Return when you have completed your quest."), 12, 0);
        }
        /* No quest yet */
        else if (q_ptr->status == QUEST_STATUS_UNTAKEN)
@@ -3078,12 +2195,7 @@ put_str("
 
                        q_ptr->cur_num = 0;
                        name = (r_name + r_ptr->name);
-#ifdef JP
-msg_format("¥¯¥¨¥¹¥È: %s¤ò %dÂÎÅݤ¹", name,q_ptr->max_num);
-#else
-                       msg_format("Your quest: kill %d %s", q_ptr->max_num, name);
-#endif
-
+                       msg_format(_("クエスト: %sを %d体倒す", "Your quest: kill %d %s"), name,q_ptr->max_num);
                }
                else
                {
@@ -3093,30 +2205,29 @@ msg_format("
 }
 
 
-/*
- * Display town history
+/*!
+ * @brief 町に関するヘルプを表示する / Display town history
+ * @return なし
  */
 static void town_history(void)
 {
-       /* Save screen */
        screen_save();
 
        /* Peruse the building help file */
-#ifdef JP
-(void)show_file(TRUE, "jbldg.txt", NULL, 0, 0);
-#else
-       (void)show_file(TRUE, "bldg.txt", NULL, 0, 0);
-#endif
-
-
-       /* Load screen */
+       (void)show_file(TRUE, _("jbldg.txt", "bldg.txt"), NULL, 0, 0);
        screen_load();
 }
 
-/* critical happens at i / 10000 */
-s16b calc_crit_ratio_shot(int weight, int plus_ammo, int plus_bow,  int dam)
+/*!
+ * @brief 射撃時クリティカルによるダメージ期待値修正計算(スナイパーの集中処理と武器経験値) / critical happens at i / 10000
+ * @param plus_ammo 矢弾のダメージ修正
+ * @param plus_bow 弓のダメージ修正
+ * @return ダメージ期待値
+ * @note 基本ダメージ量と重量はこの部位では計算に加わらない。
+ */
+HIT_POINT calc_crit_ratio_shot(HIT_POINT plus_ammo, HIT_POINT plus_bow)
 {
-       int i;
+       HIT_POINT i;
        object_type *j_ptr =  &inventory[INVEN_BOW];
        
        /* Extract "shot" power */
@@ -3132,18 +2243,26 @@ s16b calc_crit_ratio_shot(int weight, int plus_ammo, int plus_bow,  int dam)
        if ((p_ptr->pclass == CLASS_SNIPER) && (p_ptr->tval_ammo == TV_BOLT)) i *= 2;
        
        /* Good bow makes more critical */
-       i += MAX(0, plus_bow - 15) * 4 * (p_ptr->concent ? p_ptr->concent + 5 : 5);
+       i += plus_bow * 8 * (p_ptr->concent ? p_ptr->concent + 5 : 5);
        
        if (i < 0) i = 0;
        
-       return i * 5 / 3;
+       return i;
 }
 
-s16b calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow,  int dam)
+/*!
+ * @brief 射撃時クリティカルによるダメージ期待値修正計算(重量依存部分) / critical happens at i / 10000
+ * @param weight 武器の重量
+ * @param plus_ammo 矢弾のダメージ修正
+ * @param plus_bow 弓のダメージ修正
+ * @param dam 基本ダメージ量
+ * @return ダメージ期待値
+ */
+HIT_POINT calc_expect_crit_shot(WEIGHT weight, int plus_ammo, int plus_bow,  HIT_POINT dam)
 {
        u32b num;
        int i, k, crit;
-       i = calc_crit_ratio_shot(weight, plus_ammo, plus_bow, dam);
+       i = calc_crit_ratio_shot(plus_ammo, plus_bow);
        
        k = 0;
        num = 0;
@@ -3172,14 +2291,23 @@ s16b calc_expect_crit_shot(int weight, int plus_ammo, int plus_bow,  int dam)
        return num;
 }
 
-s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari)
+/*!
+ * @brief 攻撃時クリティカルによるダメージ期待値修正計算(重量と毒針処理) / critical happens at i / 10000
+ * @param weight 武器の重量
+ * @param plus 武器のダメージ修正
+ * @param dam 基本ダメージ
+ * @param meichuu 命中値
+ * @param dokubari 毒針処理か否か
+ * @return ダメージ期待値
+ */
+HIT_POINT calc_expect_crit(WEIGHT weight, int plus, HIT_POINT dam, s16b meichuu, bool dokubari)
 {
        u32b k, num;
        int i;
        
        if(dokubari) return dam;
        
-       i = weight + (meichuu * 3 + plus * 5) + (p_ptr->lev * 3);
+       i = (weight + (meichuu * 3 + plus * 5) + p_ptr->skill_thn);
        if (i < 0) i = 0;
        
        k = weight;
@@ -3208,7 +2336,15 @@ s16b calc_expect_crit(int weight, int plus, int dam, s16b meichuu, bool dokubari
        return num;
 }
 
-static s16b calc_slaydam(int dam, int mult, int div, bool force)
+/*!
+ * @brief 攻撃時スレイによるダメージ期待値修正計算 / critical happens at i / 10000
+ * @param dam 基本ダメージ
+ * @param mult スレイ倍率(掛け算部分)
+ * @param div スレイ倍率(割り算部分)
+ * @param force 理力特別計算フラグ
+ * @return ダメージ期待値
+ */
+static HIT_POINT calc_slaydam(HIT_POINT dam, int mult, int div, bool force)
 {
        int tmp;
        if(force)
@@ -3229,43 +2365,81 @@ static s16b calc_slaydam(int dam, int mult, int div, bool force)
        return tmp;
 }
 
-/*
- * Display the damage figure of an object
- * (used by compare_weapon_aux1)
- *
- * Only accurate for the current weapon, because it includes
- * the current +dam of the player.
+/*!
+ * @brief 攻撃時の期待値計算(スレイ→重量クリティカル→切れ味効果)
+ * @param dam 基本ダメージ
+ * @param mult スレイ倍率(掛け算部分)
+ * @param div スレイ倍率(割り算部分)
+ * @param force 理力特別計算フラグ
+ * @param weight 重量
+ * @param plus 武器ダメージ修正
+ * @param meichuu 命中値
+ * @param dokubari 毒針処理か否か
+ * @param vorpal_mult 切れ味倍率(掛け算部分)
+ * @param vorpal_div 切れ味倍率(割り算部分)
+ * @return ダメージ期待値
  */
-static void compare_weapon_aux2(int r, int c, int mindam, int maxdam, cptr attr, byte color)
+static u32b calc_expect_dice(u32b dam, int mult, int div, bool force, WEIGHT weight, int plus, s16b meichuu, bool dokubari, int vorpal_mult, int vorpal_div)
 {
-       char tmp_str[80];
+       dam = calc_slaydam(dam, mult, div, force);
+       dam = calc_expect_crit(weight, plus, dam, meichuu, dokubari);
+       dam = calc_slaydam(dam, vorpal_mult, vorpal_div, FALSE);
+       return dam;
+}
+
 
+/*!
+ * @brief 武器の各条件毎のダメージ期待値を表示する。
+ * @param r 表示行
+ * @param c 表示列
+ * @param mindice ダイス部分最小値
+ * @param maxdice ダイス部分最大値
+ * @param blows 攻撃回数
+ * @param dam_bonus ダメージ修正値
+ * @param attr 条件内容
+ * @param color 条件内容の表示色
+ * @details
+ * Display the damage figure of an object\n
+ * (used by compare_weapon_aux)\n
+ * \n
+ * Only accurate for the current weapon, because it includes\n
+ * the current +dam of the player.\n
+ * @return なし
+ */
+static void show_weapon_dmg(int r, int c, int mindice, int maxdice, int blows, int dam_bonus, cptr attr, byte color)
+{
+       char tmp_str[80];
+       int mindam, maxdam;
+       
+       mindam = blows * (mindice + dam_bonus);
+       maxdam = blows * (maxdice + dam_bonus);
 
        /* Print the intro text */
        c_put_str(color, attr, r, c);
 
        /* Calculate the min and max damage figures */
-#ifdef JP
-       sprintf(tmp_str, "£±¥¿¡¼¥ó: %d-%d ¥À¥á¡¼¥¸",
-#else
-       sprintf(tmp_str, "Attack: %d-%d damage",
-#endif
-                       mindam, maxdam);
+       sprintf(tmp_str, _("1ターン: %d-%d ダメージ", "Attack: %d-%d damage"), mindam, maxdam);
        
        /* Print the damage */
        put_str(tmp_str, r, c + 8);
 }
 
 
-/*
- * Show the damage figures for the various monster types
- *
- * Only accurate for the current weapon, because it includes
- * the current number of blows for the player.
+/*!
+ * @brief 武器一つ毎のダメージ情報を表示する。
+ * @param o_ptr オブジェクトの構造体の参照ポインタ。
+ * @param col 表示する行の上端
+ * @param r 表示する列の左端
+ * @details
+ * Show the damage figures for the various monster types\n
+ * \n
+ * Only accurate for the current weapon, because it includes\n
+ * the current number of blows for the player.\n
+ * @return なし
  */
-static void compare_weapon_aux1(object_type *o_ptr, int col, int r)
+static void compare_weapon_aux(object_type *o_ptr, int col, int r)
 {
-       u32b flgs[TR_FLAG_SIZE];
+       BIT_FLAGS flgs[TR_FLAG_SIZE];
        int blow = p_ptr->num_blow[0];
        bool force = FALSE;
        bool dokubari = FALSE;
@@ -3278,12 +2452,9 @@ static void compare_weapon_aux1(object_type *o_ptr, int col, int r)
        int maxdice = eff_ds * eff_dd;
        int mindam = 0;
        int maxdam = 0;
-       int slaydice_min = 0;
-       int slaydice_max = 0;
-       int critdice_min = 0;
-       int critdice_max = 0;
        int vorpal_mult = 1;
        int vorpal_div = 1;
+       int dmg_bonus = o_ptr->to_d + p_ptr->to_d[0];
        
 
        /* Get the flags of the weapon */
@@ -3293,17 +2464,11 @@ static void compare_weapon_aux1(object_type *o_ptr, int col, int r)
        
        
        /* Show Critical Damage*/
-       critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, mindice, p_ptr->to_h[0], dokubari);
-       critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, maxdice, p_ptr->to_h[0], dokubari);
-       
-       mindam = blow * (critdice_min+ o_ptr->to_d + p_ptr->to_d[0]);
-       maxdam = blow * (critdice_max+ o_ptr->to_d + p_ptr->to_d[0]);
+       mindam = calc_expect_crit(o_ptr->weight, o_ptr->to_h, mindice, p_ptr->to_h[0], dokubari);
+       maxdam = calc_expect_crit(o_ptr->weight, o_ptr->to_h, maxdice, p_ptr->to_h[0], dokubari);
        
-#ifdef JP
-       compare_weapon_aux2(r++, col, mindam, maxdam, "²ñ¿´:", TERM_L_RED);
-#else
-       compare_weapon_aux2(r++, col, mindam, maxdam, "Critical:", TERM_L_RED);
-#endif
+       show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("会心:", "Critical:"), TERM_L_RED);
+
        
        /* Vorpal Hit*/
        if ((have_flag(flgs, TR_VORPAL) || hex_spelling(HEX_RUNESWORD)))
@@ -3319,507 +2484,170 @@ static void compare_weapon_aux1(object_type *o_ptr, int col, int r)
                        vorpal_div = 9;
                }
                
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, mindice, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, maxdice, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               
-               #ifdef JP
-                       compare_weapon_aux2(r++, col, mindam, maxdam, "ÀÚ¤ìÌ£:", TERM_L_RED);
-               #else
-                       compare_weapon_aux2(r++, col, mindam, maxdam, "Vorpal:", TERM_L_RED);
-               #endif
+               mindam = calc_expect_dice(mindice, 1, 1, FALSE, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 1, 1, FALSE, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);         
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("切れ味:", "Vorpal:") , TERM_L_RED);
        }       
        
        if ((p_ptr->pclass != CLASS_SAMURAI) && have_flag(flgs, TR_FORCE_WEAPON) && (p_ptr->csp > (o_ptr->dd * o_ptr->ds / 5)))
        {
                force = TRUE;
                
-               slaydice_min = calc_slaydam(mindice, 1, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 1, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               
-               /* Print the relevant lines */
-#ifdef JP
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ÍýÎÏ:", TERM_L_BLUE);
-#else
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Force  :", TERM_L_BLUE);
-#endif         
+               mindam = calc_expect_dice(mindice, 1, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 1, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("理力:", "Force  :"), TERM_L_BLUE);
        }
                
        /* Print the relevant lines */
-#ifdef JP
        if (have_flag(flgs, TR_KILL_ANIMAL))
        {
-               slaydice_min = calc_slaydam(mindice, 4, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 4, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ưʪ:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 4, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 4, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);         
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("動物:", "Animals:"), TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_ANIMAL)) 
        {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ưʪ:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("動物:", "Animals:"), TERM_YELLOW);
        }
        if (have_flag(flgs, TR_KILL_EVIL))
        {       
-               slaydice_min = calc_slaydam(mindice, 7, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 7, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "¼Ù°­:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 7, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 7, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("邪悪:", "Evil:"), TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_EVIL))
        {       
-               slaydice_min = calc_slaydam(mindice, 2, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 2, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "¼Ù°­:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 2, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 2, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);         
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("邪悪:", "Evil:"), TERM_YELLOW);
        }
        if (have_flag(flgs, TR_KILL_HUMAN))
        {       
-               slaydice_min = calc_slaydam(mindice, 4, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 4, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "¿Í´Ö:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 4, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 4, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("人間:", "Human:"), TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_HUMAN))
        {       
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "¿Í´Ö:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("人間:", "Human:"), TERM_YELLOW);
        }
        if (have_flag(flgs, TR_KILL_UNDEAD))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ÉÔ»à:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("不死:", "Undead:"), TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_UNDEAD)) 
        {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ÉÔ»à:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("不死:", "Undead:"), TERM_YELLOW);
        }
        if (have_flag(flgs, TR_KILL_DEMON))
        {       
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "°­Ëâ:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("悪魔:", "Demons:") , TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_DEMON))
        {       
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "°­Ëâ:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("悪魔:", "Demons:") , TERM_YELLOW);
        }
        if (have_flag(flgs, TR_KILL_ORC))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "¥ª¡¼¥¯:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("オーク:", "Orcs:"), TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_ORC))
        {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "¥ª¡¼¥¯:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("オーク:", "Orcs:"), TERM_YELLOW);
        }
        if (have_flag(flgs, TR_KILL_TROLL))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "¥È¥í¥ë:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("トロル:", "Trolls:") , TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_TROLL))
        {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "¥È¥í¥ë:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,   _("トロル:", "Trolls:") , TERM_YELLOW);
        }
        if (have_flag(flgs, TR_KILL_GIANT))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "µð¿Í:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("巨人:", "Giants:"), TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_GIANT))
        {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "µð¿Í:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("巨人:", "Giants:"), TERM_YELLOW);
        }
        if (have_flag(flgs, TR_KILL_DRAGON))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ε:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("竜:", "Dragons:"), TERM_YELLOW);
        }
        else if (have_flag(flgs, TR_SLAY_DRAGON))
-       {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ε:", TERM_YELLOW);
+       {               
+               mindam = calc_expect_dice(mindice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 3, 1, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,   _("竜:", "Dragons:"), TERM_YELLOW);
        }
        if (have_flag(flgs, TR_BRAND_ACID))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "»À°À­:", TERM_RED);
+               mindam = calc_expect_dice(mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("酸属性:", "Acid:"), TERM_RED);
        }
        if (have_flag(flgs, TR_BRAND_ELEC))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ÅÅ°À­:", TERM_RED);
+               mindam = calc_expect_dice(mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("電属性:", "Elec:"), TERM_RED);
        }
        if (have_flag(flgs, TR_BRAND_FIRE))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "±ê°À­:", TERM_RED);
+               mindam = calc_expect_dice(mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("炎属性:", "Fire:"), TERM_RED);
        }
        if (have_flag(flgs, TR_BRAND_COLD))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Îä°À­:", TERM_RED);
+               mindam = calc_expect_dice(mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus,  _("冷属性:", "Cold:"), TERM_RED);
        }
        if (have_flag(flgs, TR_BRAND_POIS))
        {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "ÆÇ°À­:", TERM_RED);
-       }
-#else
-       if (have_flag(flgs, TR_KILL_ANIMAL))
-       {
-               slaydice_min = calc_slaydam(mindice, 4, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 4, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Animals:", TERM_YELLOW);
-       }
-       else if (have_flag(flgs, TR_SLAY_ANIMAL)) 
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Animals:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_KILL_EVIL))
-       {       
-               slaydice_min = calc_slaydam(mindice, 7, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 7, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Evil:", TERM_YELLOW);
-       }
-       else if (have_flag(flgs, TR_SLAY_EVIL))
-       {       
-               slaydice_min = calc_slaydam(mindice, 2, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 2, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Evil:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_KILL_HUMAN))
-       {       
-               slaydice_min = calc_slaydam(mindice, 4, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 4, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Human:", TERM_YELLOW);
-       }
-       else if (have_flag(flgs, TR_SLAY_HUMAN))
-       {       
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Human:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_KILL_UNDEAD))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Undead:", TERM_YELLOW);
-       }
-       else if (have_flag(flgs, TR_SLAY_UNDEAD)) 
-       {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Undead:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_KILL_DEMON))
-       {       
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Demons:", TERM_YELLOW);
-       }
-       else if (have_flag(flgs, TR_SLAY_DEMON))
-       {       
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Demons:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_KILL_ORC))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Orcs:", TERM_YELLOW);
+               mindam = calc_expect_dice(mindice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               maxdam = calc_expect_dice(maxdice, 5, 2, force, o_ptr->weight, o_ptr->to_h, p_ptr->to_h[0], dokubari, vorpal_mult, vorpal_div);
+               show_weapon_dmg(r++, col, mindam, maxdam, blow, dmg_bonus, _("毒属性:", "Poison:"), TERM_RED);
        }
-       else if (have_flag(flgs, TR_SLAY_ORC))
-       {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Orcs:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_KILL_TROLL))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Trolls:", TERM_YELLOW);
-       }
-       else if (have_flag(flgs, TR_SLAY_TROLL))
-       {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Trolls:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_KILL_GIANT))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Giants:", TERM_YELLOW);
-       }
-       else if (have_flag(flgs, TR_SLAY_GIANT))
-       {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Giants:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_KILL_DRAGON))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Dragons:", TERM_YELLOW);
-       }
-       else if (have_flag(flgs, TR_SLAY_DRAGON))
-       {
-               slaydice_min = calc_slaydam(mindice, 3, 1, force);
-               slaydice_max = calc_slaydam(maxdice, 3, 1, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Dragons:", TERM_YELLOW);
-       }
-       if (have_flag(flgs, TR_BRAND_ACID))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Acid:", TERM_RED);
-       }
-       if (have_flag(flgs, TR_BRAND_ELEC))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Elec:", TERM_RED);
-       }
-       if (have_flag(flgs, TR_BRAND_FIRE))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Fire:", TERM_RED);
-       }
-       if (have_flag(flgs, TR_BRAND_COLD))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Cold:", TERM_RED);
-       }
-       if (have_flag(flgs, TR_BRAND_POIS))
-       {
-               slaydice_min = calc_slaydam(mindice, 5, 2, force);
-               slaydice_max = calc_slaydam(maxdice, 5, 2, force);
-               critdice_min = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_min, p_ptr->to_h[0], dokubari);
-               critdice_max = calc_expect_crit(o_ptr->weight, o_ptr->to_h, slaydice_max, p_ptr->to_h[0], dokubari);
-               mindam = blow * (calc_slaydam(critdice_min, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               maxdam = blow * (calc_slaydam(critdice_max, vorpal_mult, vorpal_div, FALSE) + o_ptr->to_d + p_ptr->to_d[0]);
-               compare_weapon_aux2(r++, col, mindam, maxdam, "Poison:", TERM_RED);
-       }
-#endif
-       
 }
 
-static int hit_chance(int to_h, int ac)
+/*!
+ * @brief モンスターへの命中率の計算
+ * @param to_h 命中値
+ * @param ac 敵AC
+ * @return 命中確率
+ */
+static PERCENTAGE hit_chance(HIT_PROB to_h, ARMOUR_CLASS ac)
 {
-       int chance = 0;
+       PERCENTAGE chance = 0;
        int meichuu = p_ptr->skill_thn + (p_ptr->to_h[0] + to_h) * BTH_PLUS_ADJ;
 
        if (meichuu <= 0) return 5;
@@ -3829,149 +2657,86 @@ static int hit_chance(int to_h, int ac)
        if (chance > 95) chance = 95;
        if (chance < 5) chance = 5;
        if (p_ptr->pseikaku == SEIKAKU_NAMAKE)
-               chance = (chance*19+9)/20;
+               chance = (chance * 19 + 9) / 20;
        return chance;
 }
 
-/*
+/*!
+ * @brief 武器匠における武器一つ毎の完全情報を表示する。
+ * @param o_ptr オブジェクトの構造体の参照ポインタ。
+ * @param row 表示する列の左端
+ * @param col 表示する行の上端
+ * @details
  * Displays all info about a weapon
  *
  * Only accurate for the current weapon, because it includes
  * various info about the player's +to_dam and number of blows.
+ * @return なし
  */
-static void list_weapon(object_type *o_ptr, int row, int col)
+static void list_weapon(object_type *o_ptr, TERM_LEN row, TERM_LEN col)
 {
        char o_name[MAX_NLEN];
        char tmp_str[80];
 
        /* Effective dices */
-       int eff_dd = o_ptr->dd + p_ptr->to_dd[0];
-       int eff_ds = o_ptr->ds + p_ptr->to_ds[0];
-
-       /* Print the weapon name */
-       object_desc(o_name, o_ptr, OD_NAME_ONLY);
-       c_put_str(TERM_YELLOW, o_name, row, col);
+       DICE_NUMBER eff_dd = o_ptr->dd + p_ptr->to_dd[0];
+       DICE_SID eff_ds = o_ptr->ds + p_ptr->to_ds[0];
 
-       /* Print the player's number of blows */
-#ifdef JP
-sprintf(tmp_str, "¹¶·â²ó¿ô: %d", p_ptr->num_blow[0]);
-#else
-       sprintf(tmp_str, "Number of Blows: %d", p_ptr->num_blow[0]);
-#endif
-
-       put_str(tmp_str, row+1, col);
-
-       /* Print to_hit and to_dam of the weapon */
-#ifdef JP
-sprintf(tmp_str, "Ì¿ÃæΨ:  0  50 100 150 200 (Ũ¤ÎAC)");
-#else
-sprintf(tmp_str, "To Hit:  0  50 100 150 200 (AC)");
-#endif
-
-       put_str(tmp_str, row+2, col);
-
-       /* Print the weapons base damage dice */
-#ifdef JP
-sprintf(tmp_str, "        %2d  %2d  %2d  %2d  %2d (%%)", hit_chance(o_ptr->to_h, 0), hit_chance(o_ptr->to_h, 50), hit_chance(o_ptr->to_h, 100), hit_chance(o_ptr->to_h, 150), hit_chance(o_ptr->to_h, 200));
-#else
-sprintf(tmp_str, "        %2d  %2d  %2d  %2d  %2d (%%)", hit_chance(o_ptr->to_h, 0), hit_chance(o_ptr->to_h, 50), hit_chance(o_ptr->to_h, 100), hit_chance(o_ptr->to_h, 150), hit_chance(o_ptr->to_h, 200));
-#endif
-
-       put_str(tmp_str, row+3, col);
-
-#ifdef JP
-c_put_str(TERM_YELLOW, "²Äǽ¤Ê¥À¥á¡¼¥¸:", row+5, col);
-#else
-       c_put_str(TERM_YELLOW, "Possible Damage:", row+5, col);
-#endif
-
-
-       /* Damage for one blow (if it hits) */
-#ifdef JP
-sprintf(tmp_str, "¹¶·â°ì²ó¤Ë¤Ä¤­ %d-%d",
-#else
-       sprintf(tmp_str, "One Strike: %d-%d damage",
-#endif
-
-           eff_dd + o_ptr->to_d + p_ptr->to_d[0],
-           eff_ds * eff_dd + o_ptr->to_d + p_ptr->to_d[0]);
-       put_str(tmp_str, row+6, col+1);
-
-       /* Damage for the complete attack (if all blows hit) */
-#ifdef JP
-sprintf(tmp_str, "£±¥¿¡¼¥ó¤Ë¤Ä¤­ %d-%d",
-#else
-       sprintf(tmp_str, "One Attack: %d-%d damage",
-#endif
-
-           p_ptr->num_blow[0] * (eff_dd + o_ptr->to_d + p_ptr->to_d[0]),
-           p_ptr->num_blow[0] * (eff_ds * eff_dd + o_ptr->to_d + p_ptr->to_d[0]));
-       put_str(tmp_str, row+7, col+1);
-}
-
-
-/*
- * Hook to specify "weapon"
- */
-static bool item_tester_hook_melee_weapon(object_type *o_ptr)
-{
-       switch (o_ptr->tval)
-       {
-               case TV_HAFTED:
-               case TV_POLEARM:
-               case TV_DIGGING:
-               {
-                       return (TRUE);
-               }
-               case TV_SWORD:
-               {
-                       if (o_ptr->sval != SV_DOKUBARI) return (TRUE);
-               }
-       }
+       /* Print the weapon name */
+       object_desc(o_name, o_ptr, OD_NAME_ONLY);
+       c_put_str(TERM_YELLOW, o_name, row, col);
 
-       return (FALSE);
-}
+       /* Print the player's number of blows */
+       sprintf(tmp_str, _("攻撃回数: %d", "Number of Blows: %d"), p_ptr->num_blow[0]);
+       put_str(tmp_str, row+1, col);
 
+       /* Print to_hit and to_dam of the weapon */
+       sprintf(tmp_str, _("命中率:  0  50 100 150 200 (敵のAC)", "To Hit:  0  50 100 150 200 (AC)"));
+       put_str(tmp_str, row+2, col);
 
-/*
- * Hook to specify "ammo"
- */
-static bool item_tester_hook_ammo(object_type *o_ptr)
-{
-       switch (o_ptr->tval)
-       {
-               case TV_SHOT:
-               case TV_ARROW:
-               case TV_BOLT:
-               {
-                       return (TRUE);
-               }
-       }
+       /* Print the weapons base damage dice */
+       sprintf(tmp_str, "        %2d  %2d  %2d  %2d  %2d (%%)",
+                               hit_chance(o_ptr->to_h, 0), hit_chance(o_ptr->to_h, 50), hit_chance(o_ptr->to_h, 100),
+                               hit_chance(o_ptr->to_h, 150), hit_chance(o_ptr->to_h, 200));
+       put_str(tmp_str, row+3, col);
+       c_put_str(TERM_YELLOW, _("可能なダメージ:", "Possible Damage:"), row+5, col);
 
-       return (FALSE);
-}
+       /* Damage for one blow (if it hits) */
+       sprintf(tmp_str, _("攻撃一回につき %d-%d", "One Strike: %d-%d damage"),
+           (int)(eff_dd + o_ptr->to_d + p_ptr->to_d[0]),
+               (int)(eff_ds * eff_dd + o_ptr->to_d + p_ptr->to_d[0]));
+       put_str(tmp_str, row+6, col+1);
 
+       /* Damage for the complete attack (if all blows hit) */
+       sprintf(tmp_str, _("1ターンにつき %d-%d", "One Attack: %d-%d damage"),
+               (int)(p_ptr->num_blow[0] * (eff_dd + o_ptr->to_d + p_ptr->to_d[0])),
+                       (int)(p_ptr->num_blow[0] * (eff_ds * eff_dd + o_ptr->to_d + p_ptr->to_d[0])));
+       put_str(tmp_str, row+7, col+1);
+}
 
-/*
- * Compare weapons
- *
- * Copies the weapons to compare into the weapon-slot and
- * compares the values for both weapons.
+/*!
+ * @brief 武器匠鑑定1回分(オブジェクト2種)の処理。/ Compare weapons
+ * @details 
+ * Copies the weapons to compare into the weapon-slot and\n
+ * compares the values for both weapons.\n
+ * 武器1つだけで比較をしないなら費用は半額になる。
+ * @param bcost 基本鑑定費用
+ * @return 最終的にかかった費用
  */
-static int compare_weapons(int bcost)
+static PRICE compare_weapons(PRICE bcost)
 {
        int i, n;
-       int item, item2;
+       OBJECT_IDX item, item2;
        object_type *o_ptr[2];
        object_type orig_weapon;
        object_type *i_ptr;
        cptr q, s;
-       int row = 2;
-       int wid = 38, mgn = 2;
+       TERM_LEN row = 2;
+       TERM_LEN wid = 38, mgn = 2;
        bool old_character_xtra = character_xtra;
        char ch;
-       int total = 0;
-       int cost = 0; /* First time no price */
+       PRICE total = 0;
+       PRICE cost = 0; /* First time no price */
 
        /* Save the screen */
        screen_save();
@@ -3985,11 +2750,11 @@ static int compare_weapons(int bcost)
 
        /* Only compare melee weapons */
        item_tester_no_ryoute = TRUE;
-       item_tester_hook = item_tester_hook_melee_weapon;
+       item_tester_hook = item_tester_hook_orthodox_melee_weapons;
 
        /* Get the first weapon */
-       q = _("Âè°ì¤ÎÉð´ï¤Ï¡©", "What is your first weapon? ");
-       s = _("Èæ¤Ù¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£", "You have nothing to compare.");
+       q = _("第一の武器は?", "What is your first weapon? ");
+       s = _("比べるものがありません。", "You have nothing to compare.");
 
        if (!get_item(&item, q, s, (USE_EQUIP | USE_INVEN)))
        {
@@ -4009,7 +2774,7 @@ static int compare_weapons(int bcost)
 
                /* Only compare melee weapons */
                item_tester_no_ryoute = TRUE;
-               item_tester_hook = item_tester_hook_melee_weapon;
+               item_tester_hook = item_tester_hook_orthodox_melee_weapons;
 
                /* Hack -- prevent "icky" message */
                character_xtra = TRUE;
@@ -4022,26 +2787,27 @@ static int compare_weapons(int bcost)
                        /* Copy i-th weapon into the weapon slot (if it's not already there) */
                        if (o_ptr[i] != i_ptr) object_copy(i_ptr, o_ptr[i]);
 
-                       /* Get the new values */
-                       calc_bonuses();
+                       p_ptr->update |= PU_BONUS;
+                       handle_stuff();
 
                        /* List the new values */
                        list_weapon(o_ptr[i], row, col);
-                       compare_weapon_aux1(o_ptr[i], col, row + 8);
+                       compare_weapon_aux(o_ptr[i], col, row + 8);
 
                        /* Copy back the original weapon into the weapon slot */
                        object_copy(i_ptr, &orig_weapon);
                }
 
                /* Reset the values for the old weapon */
-               calc_bonuses();
+               p_ptr->update |= PU_BONUS;
+               handle_stuff();
 
                character_xtra = old_character_xtra;
 
 #ifdef JP
-               put_str(format("[ Èæ³ÓÂоÝ: 's'¤ÇÊѹ¹ ($%d) ]", cost), 1, (wid + mgn));
-               put_str("(°ìÈֹ⤤¥À¥á¡¼¥¸¤¬Å¬ÍѤµ¤ì¤Þ¤¹¡£Ê£¿ô¤ÎÇÜÂǸú²Ì¤Ï­¤·»»¤µ¤ì¤Þ¤»¤ó¡£)", row + 4, 0);
-               prt("¸½ºß¤Îµ»Î̤«¤éȽÃǤ¹¤ë¤È¡¢¤¢¤Ê¤¿¤ÎÉð´ï¤Ï°Ê²¼¤Î¤è¤¦¤Ê°ÒÎϤòȯ´ø¤·¤Þ¤¹:", 0, 0);
+               put_str(format("[ 比較対象: 's'で変更 ($%d) ]", cost), 1, (wid + mgn));
+               put_str("(一番高いダメージが適用されます。複数の倍打効果は足し算されません。)", row + 4, 0);
+               prt("現在の技量から判断すると、あなたの武器は以下のような威力を発揮します:", 0, 0);
 #else
                put_str(format("[ 's' Select secondary weapon($%d) ]", cost), row + 1, (wid * i + mgn));
                put_str("(Only highest damage applies per monster. Special damage not cumulative.)", row + 4, 0);
@@ -4055,13 +2821,13 @@ static int compare_weapons(int bcost)
                {
                        if (total + cost > p_ptr->au)
                        {
-                               msg_print(_("¤ª¶â¤¬Â­¤ê¤Þ¤»¤ó¡ª", "You don't have enough money!"));
+                               msg_print(_("お金が足りません!", "You don't have enough money!"));
                                msg_print(NULL);
                                continue;
                        }
 
-                       q = _("ÂèÆó¤ÎÉð´ï¤Ï¡©", "What is your second weapon? ");
-                       s = _("Èæ¤Ù¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£", "You have nothing to compare.");
+                       q = _("第二の武器は?", "What is your second weapon? ");
+                       s = _("比べるものがありません。", "You have nothing to compare.");
 
                        /* Get the second weapon */
                        if (!get_item(&item2, q, s, (USE_EQUIP | USE_INVEN))) continue;
@@ -4082,31 +2848,31 @@ static int compare_weapons(int bcost)
        /* Restore the screen */
        screen_load();
 
-       /* Done */
        return (total);
 }
 
 
-/*
- * Evaluate AC
- *
- * AC¤«¤é²óÈòΨ¡¢¥À¥á¡¼¥¸¸º¾¯Î¨¤ò·×»»¤·É½¼¨¤¹¤ë
+/*!
+ * @brief ACから回避率、ダメージ減少率を計算し表示する。 / Evaluate AC
+ * @details 
  * Calculate and display the dodge-rate and the protection-rate
  * based on AC
+ * @param iAC プレイヤーのAC。
+ * @return 常にTRUEを返す。
  */
-static bool eval_ac(int iAC)
+static bool eval_ac(ARMOUR_CLASS iAC)
 {
 #ifdef JP
        const char memo[] =
-               "¥À¥á¡¼¥¸·Ú¸ºÎ¨¤È¤Ï¡¢Å¨¤Î¹¶·â¤¬Åö¤¿¤Ã¤¿»þ¤½¤Î¥À¥á¡¼¥¸¤ò\n"
-               "²¿¥Ñ¡¼¥»¥ó¥È·Ú¸º¤¹¤ë¤«¤ò¼¨¤·¤Þ¤¹¡£\n"
-               "¥À¥á¡¼¥¸·Ú¸º¤ÏÄ̾ï¤ÎľÀܹ¶·â(¼ïÎब¡Ö¹¶·â¤¹¤ë¡×¤È¡ÖÊ´ºÕ¤¹¤ë¡×¤Îʪ)\n"
-               "¤ËÂФ·¤Æ¤Î¤ß¸ú²Ì¤¬¤¢¤ê¤Þ¤¹¡£\n \n"
-               "Ũ¤Î¥ì¥Ù¥ë¤È¤Ï¡¢¤½¤ÎŨ¤¬Ä̾ﲿ³¬¤Ë¸½¤ì¤ë¤«¤ò¼¨¤·¤Þ¤¹¡£\n \n"
-               "²óÈòΨ¤ÏŨ¤ÎľÀܹ¶·â¤ò²¿¥Ñ¡¼¥»¥ó¥È¤Î³ÎΨ¤ÇÈò¤±¤ë¤«¤ò¼¨¤·¡¢\n"
-               "Ũ¤Î¥ì¥Ù¥ë¤È¤¢¤Ê¤¿¤ÎAC¤Ë¤è¤Ã¤Æ·èÄꤵ¤ì¤Þ¤¹¡£\n \n"
-               "¥À¥á¡¼¥¸´üÂÔÃͤȤϡ¢Å¨¤Î£±£°£°¥Ý¥¤¥ó¥È¤ÎÄ̾ﹶ·â¤ËÂФ·¡¢\n"
-               "²óÈòΨ¤È¥À¥á¡¼¥¸·Ú¸ºÎ¨¤ò¹Íθ¤·¤¿¥À¥á¡¼¥¸¤Î´üÂÔÃͤò¼¨¤·¤Þ¤¹¡£\n";
+               "ダメージ軽減率とは、敵の攻撃が当たった時そのダメージを\n"
+               "何パーセント軽減するかを示します。\n"
+               "ダメージ軽減は通常の直接攻撃(種類が「攻撃する」と「粉砕する」の物)\n"
+               "に対してのみ効果があります。\n \n"
+               "敵のレベルとは、その敵が通常何階に現れるかを示します。\n \n"
+               "回避率は敵の直接攻撃を何パーセントの確率で避けるかを示し、\n"
+               "敵のレベルとあなたのACによって決定されます。\n \n"
+               "ダメージ期待値とは、敵の100ポイントの通常攻撃に対し、\n"
+               "回避率とダメージ軽減率を考慮したダメージの期待値を示します。\n";
 #else
        const char memo[] =
                "'Protection Rate' means how much damage is reduced by your armor.\n"
@@ -4121,27 +2887,27 @@ static bool eval_ac(int iAC)
 #endif
 
        int protection;
-       int col, row = 2;
-       int lvl;
+       TERM_LEN col, row = 2;
+       DEPTH lvl;
        char buf[80*20], *t;
 
        /* AC lower than zero has no effect */
        if (iAC < 0) iAC = 0;
 
-       /* ¥À¥á¡¼¥¸·Ú¸ºÎ¨¤ò·×»» */
+       /* ダメージ軽減率を計算 */
        protection = 100 * MIN(iAC, 150) / 250;
 
        screen_save();
        clear_bldg(0, 22);
 
 #ifdef JP
-       put_str(format("¤¢¤Ê¤¿¤Î¸½ºß¤ÎAC: %3d", iAC), row++, 0);
-       put_str(format("¥À¥á¡¼¥¸·Ú¸ºÎ¨  : %3d%%", protection), row++, 0);
+       put_str(format("あなたの現在のAC: %3d", iAC), row++, 0);
+       put_str(format("ダメージ軽減率  : %3d%%", protection), row++, 0);
        row++;
 
-       put_str("Ũ¤Î¥ì¥Ù¥ë      :", row + 0, 0);
-       put_str("²óÈòΨ          :", row + 1, 0);
-       put_str("¥À¥á¡¼¥¸´üÂÔÃÍ  :", row + 2, 0);
+       put_str("敵のレベル      :", row + 0, 0);
+       put_str("回避率          :", row + 1, 0);
+       put_str("ダメージ期待値  :", row + 2, 0);
 #else
        put_str(format("Your current AC : %3d", iAC), row++, 0);
        put_str(format("Protection rate : %3d%%", protection), row++, 0);
@@ -4155,16 +2921,16 @@ static bool eval_ac(int iAC)
        for (col = 17 + 1, lvl = 0; lvl <= 100; lvl += 10, col += 5)
        {
                int quality = 60 + lvl * 3; /* attack quality with power 60 */
-               int dodge;   /* ²óÈòΨ(%) */
-               int average; /* ¥À¥á¡¼¥¸´üÂÔÃÍ */
+               int dodge;   /* 回避率(%) */
+               int average; /* ダメージ期待値 */
 
                put_str(format("%3d", lvl), row + 0, col);
 
-               /* ²óÈòΨ¤ò·×»» */
+               /* 回避率を計算 */
                dodge = 5 + (MIN(100, 100 * (iAC * 3 / 4) / quality) * 9 + 5) / 10;
                put_str(format("%3d%%", dodge), row + 1, col);
 
-               /* 100ÅÀ¤Î¹¶·â¤ËÂФ·¤Æ¤Î¥À¥á¡¼¥¸´üÂÔÃͤò·×»» */
+               /* 100点の攻撃に対してのダメージ期待値を計算 */
                average = (100 - dodge) * (100 - protection) / 100;
                put_str(format("%3d", average), row + 2, col);
        }
@@ -4174,45 +2940,29 @@ static bool eval_ac(int iAC)
        for (t = buf; t[0]; t += strlen(t) + 1)
                put_str(t, (row++) + 4, 4);
 
-#ifdef JP
-       prt("¸½ºß¤Î¤¢¤Ê¤¿¤ÎÁõÈ÷¤«¤é¤¹¤ë¤È¡¢¤¢¤Ê¤¿¤ÎËɸæÎϤÏ"
-                  "¤³¤ì¤¯¤é¤¤¤Ç¤¹:", 0, 0);
-#else
-       prt("Defense abilities from your current Armor Class are evaluated below.", 0, 0);
-#endif
+       prt(_("現在のあなたの装備からすると、あなたの防御力はこれくらいです:", "Defense abilities from your current Armor Class are evaluated below."), 0, 0);
   
        flush();
        (void)inkey();
        screen_load();
 
-       /* Done */
        return (TRUE);
 }
 
 
-/*
- * Hook to specify "broken weapon"
- */
-static bool item_tester_hook_broken_weapon(object_type *o_ptr)
-{
-       if (o_ptr->tval != TV_SWORD) return FALSE;
-
-       switch (o_ptr->sval)
-       {
-       case SV_BROKEN_DAGGER:
-       case SV_BROKEN_SWORD:
-               return TRUE;
-       }
-
-       return FALSE;
-}
 
+/*!
+ * @brief 修復材料のオブジェクトから修復対象に特性を移植する。
+ * @param to_ptr 修復対象オブジェクトの構造体の参照ポインタ。
+ * @param from_ptr 修復材料オブジェクトの構造体の参照ポインタ。
+ * @return 修復対象になるならTRUEを返す。
+ */
 static void give_one_ability_of_object(object_type *to_ptr, object_type *from_ptr)
 {
        int i, n = 0;
        int cand[TR_FLAG_MAX];
-       u32b to_flgs[TR_FLAG_SIZE];
-       u32b from_flgs[TR_FLAG_SIZE];
+       BIT_FLAGS to_flgs[TR_FLAG_SIZE];
+       BIT_FLAGS from_flgs[TR_FLAG_SIZE];
 
        object_flags(to_ptr, to_flgs);
        object_flags(from_ptr, from_flgs);
@@ -4257,16 +3007,19 @@ static void give_one_ability_of_object(object_type *to_ptr, object_type *from_pt
        return;
 }
 
-/*
- * Repair broken weapon
+/*!
+ * @brief アイテム修復処理のメインルーチン / Repair broken weapon
+ * @param bcost 基本修復費用
+ * @return 実際にかかった費用
  */
-static int repair_broken_weapon_aux(int bcost)
+static PRICE repair_broken_weapon_aux(PRICE bcost)
 {
-       s32b cost;
-       int item, mater;
+       PRICE cost;
+       OBJECT_IDX item, mater;
        object_type *o_ptr, *mo_ptr; /* broken weapon and material weapon */
        object_kind *k_ptr;
-       int i, k_idx, dd_bonus, ds_bonus;
+       int i, dd_bonus, ds_bonus;
+       KIND_OBJECT_IDX k_idx;
        char basenm[MAX_NLEN];
        cptr q, s; /* For get_item prompt */
        int row = 7;
@@ -4274,13 +3027,11 @@ static int repair_broken_weapon_aux(int bcost)
        /* Clear screen */
        clear_bldg(0, 22);
 
-       /* Notice */
-       prt(_("½¤Éü¤Ë¤ÏºàÎÁ¤È¤Ê¤ë¤â¤¦1¤Ä¤ÎÉð´ï¤¬É¬ÍפǤ¹¡£", "Hand one material weapon to repair a broken weapon."), row, 2);
-       prt(_("ºàÎÁ¤Ë»ÈÍѤ·¤¿Éð´ï¤Ï¤Ê¤¯¤Ê¤ê¤Þ¤¹¡ª", "The material weapon will disappear after repairing!!"), row+1, 2);
+       prt(_("修復には材料となるもう1つの武器が必要です。", "Hand one material weapon to repair a broken weapon."), row, 2);
+       prt(_("材料に使用した武器はなくなります!", "The material weapon will disappear after repairing!!"), row+1, 2);
 
-       /* Get an item */
-       q = _("¤É¤ÎÀޤ줿Éð´ï¤ò½¤Éü¤·¤Þ¤¹¤«¡©", "Repair which broken weapon? ");
-       s = _("½¤Éü¤Ç¤­¤ëÀޤ줿Éð´ï¤¬¤¢¤ê¤Þ¤»¤ó¡£", "You have no broken weapon to repair.");
+       q = _("どの折れた武器を修復しますか?", "Repair which broken weapon? ");
+       s = _("修復できる折れた武器がありません。", "You have no broken weapon to repair.");
 
        /* Only forge broken weapons */
        item_tester_hook = item_tester_hook_broken_weapon;
@@ -4293,32 +3044,31 @@ static int repair_broken_weapon_aux(int bcost)
        /* It is worthless */
        if (!object_is_ego(o_ptr) && !object_is_artifact(o_ptr))
        {
-               msg_format(_("¤½¤ì¤Ïľ¤·¤Æ¤â¤·¤ç¤¦¤¬¤Ê¤¤¤¼¡£", "It is worthless to repair."));
+               msg_format(_("それは直してもしょうがないぜ。", "It is worthless to repair."));
                return (0);
        }
 
        /* They are too many */
        if (o_ptr->number > 1)
        {
-               msg_format(_("°ìÅÙ¤ËÊ£¿ô¤ò½¤Éü¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡ª", "They are too many to repair at once!"));
+               msg_format(_("一度に複数を修復することはできません!", "They are too many to repair at once!"));
                return (0);
        }
 
        /* Display item name */
        object_desc(basenm, o_ptr, OD_NAME_ONLY);
-       prt(format(_("½¤Éü¤¹¤ëÉð´ï¡¡¡§ %s", "Repairing: %s"), basenm), row+3, 2);
+       prt(format(_("修復する武器 : %s", "Repairing: %s"), basenm), row+3, 2);
 
-       /* Get an item */
-       q = _("ºàÎÁ¤È¤Ê¤ëÉð´ï¤Ï¡©", "Which weapon for material? ");
-       s = _("ºàÎÁ¤È¤Ê¤ëÉð´ï¤¬¤¢¤ê¤Þ¤»¤ó¡£", "You have no material to repair.");
+       q = _("材料となる武器は?", "Which weapon for material? ");
+       s = _("材料となる武器がありません。", "You have no material to repair.");
 
        /* Only forge broken weapons */
-       item_tester_hook = item_tester_hook_melee_weapon;
+       item_tester_hook = item_tester_hook_orthodox_melee_weapons;
 
        if (!get_item(&mater, q, s, (USE_INVEN | USE_EQUIP))) return (0);
        if (mater == item)
        {
-               msg_print(_("¥¯¥é¥¤¥ó¤ÎÄÛ¤¸¤ã¤Ê¤¤¡ª", "This is not a klein bottle!"));
+               msg_print(_("クラインの壷じゃない!", "This is not a klein bottle!"));
                return (0);
        }
 
@@ -4327,47 +3077,43 @@ static int repair_broken_weapon_aux(int bcost)
 
        /* Display item name */
        object_desc(basenm, mo_ptr, OD_NAME_ONLY);
-       prt(format(_("ºàÎÁ¤È¤¹¤ëÉð´ï¡§ %s", "Material : %s"), basenm), row+4, 2);
+       prt(format(_("材料とする武器: %s", "Material : %s"), basenm), row+4, 2);
 
        /* Get the value of one of the items (except curses) */
        cost = bcost + object_value_real(o_ptr) * 2;
 
-#ifdef JP
-       if (!get_check(format("¡ð%d¤«¤«¤ê¤Þ¤¹¤¬¤è¤í¤·¤¤¤Ç¤¹¤«¡© ", cost))) return (0);
-#else
-       if (!get_check(format("Costs %d gold, okay? ", cost))) return (0);
-#endif
+       if (!get_check(format(_("$%dかかりますがよろしいですか? ", "Costs %d gold, okay? "), cost))) return (0);
 
        /* Check if the player has enough money */
        if (p_ptr->au < cost)
        {
                object_desc(basenm, o_ptr, OD_NAME_ONLY);
-               msg_format(_("%s¤ò½¤Éü¤¹¤ë¤À¤±¤Î¥´¡¼¥ë¥É¤¬¤¢¤ê¤Þ¤»¤ó¡ª",
-                       "You do not have the gold to repair %s!"), basenm);
+               msg_format(_("%sを修復するだけのゴールドがありません!", "You do not have the gold to repair %s!"), basenm);
                msg_print(NULL);
                return (0);
        }
 
        if (o_ptr->sval == SV_BROKEN_DAGGER)
        {
-               int i, n = 1;
+               IDX j;
+               int n = 1;
 
                /* Suppress compiler warning */
                k_idx = 0;
 
-               for (i = 1; i < max_k_idx; i++)
+               for (j = 1; j < max_k_idx; j++)
                {
-                       object_kind *k_ptr = &k_info[i];
+                       object_kind *k_aux_ptr = &k_info[j];
 
-                       if (k_ptr->tval != TV_SWORD) continue;
-                       if ((k_ptr->sval == SV_BROKEN_DAGGER) ||
-                               (k_ptr->sval == SV_BROKEN_SWORD) ||
-                               (k_ptr->sval == SV_DOKUBARI)) continue;
-                       if (k_ptr->weight > 99) continue;
+                       if (k_aux_ptr->tval != TV_SWORD) continue;
+                       if ((k_aux_ptr->sval == SV_BROKEN_DAGGER) ||
+                               (k_aux_ptr->sval == SV_BROKEN_SWORD) ||
+                               (k_aux_ptr->sval == SV_DOKUBARI)) continue;
+                       if (k_aux_ptr->weight > 99) continue;
 
                        if (one_in_(n)) 
                        {
-                               k_idx = i;
+                               k_idx = j;
                                n++;
                        }
                }
@@ -4375,7 +3121,7 @@ static int repair_broken_weapon_aux(int bcost)
        else /* TV_BROKEN_SWORD */
        {
                /* Repair to a sword or sometimes material's type weapon */
-               int tval = (one_in_(5) ? mo_ptr->tval : TV_SWORD);
+               OBJECT_TYPE_VALUE tval = (one_in_(5) ? mo_ptr->tval : TV_SWORD);
 
                while(1)
                {
@@ -4425,13 +3171,13 @@ static int repair_broken_weapon_aux(int bcost)
        /* Copy base object's ability */
        for (i = 0; i < TR_FLAG_SIZE; i++) o_ptr->art_flags[i] |= k_ptr->flags[i];
        if (k_ptr->pval) o_ptr->pval = MAX(o_ptr->pval, randint1(k_ptr->pval));
-       if (have_flag(k_ptr->flags, TR_ACTIVATE)) o_ptr->xtra2 = k_ptr->act_idx;
+       if (have_flag(k_ptr->flags, TR_ACTIVATE)) o_ptr->xtra2 = (byte_hack)k_ptr->act_idx;
 
        /* Dice up */
        if (dd_bonus > 0)
        {
                o_ptr->dd++;
-               for (i = 0; i < dd_bonus; i++)
+               for (i = 1; i < dd_bonus; i++)
                {
                        if (one_in_(o_ptr->dd + i)) o_ptr->dd++;
                }
@@ -4439,7 +3185,7 @@ static int repair_broken_weapon_aux(int bcost)
        if (ds_bonus > 0)
        {
                o_ptr->ds++;
-               for (i = 0; i < ds_bonus; i++)
+               for (i = 1; i < ds_bonus; i++)
                {
                        if (one_in_(o_ptr->ds + i)) o_ptr->ds++;
                }
@@ -4484,12 +3230,12 @@ static int repair_broken_weapon_aux(int bcost)
                        one_ability(o_ptr);
                }
 
-               msg_print(_("¤³¤ì¤Ï¤«¤Ê¤ê¤Î¶Èʪ¤À¤Ã¤¿¤è¤¦¤À¡£", "This blade seems to be exceptionally."));
+               msg_print(_("これはかなりの業物だったようだ。", "This blade seems to be exceptionally."));
        }
 
        object_desc(basenm, o_ptr, OD_NAME_ONLY);
 #ifdef JP
-       msg_format("¡ð%d¤Ç%s¤Ë½¤Éü¤·¤Þ¤·¤¿¡£", cost, basenm);
+       msg_format("$%dで%sに修復しました。", cost, basenm);
 #else
        msg_format("Repaired into %s for %d gold.", basenm, cost);
 #endif
@@ -4513,10 +3259,14 @@ static int repair_broken_weapon_aux(int bcost)
        return (cost);
 }
 
-static int repair_broken_weapon(int bcost)
+/*!
+ * @brief アイテム修復処理の過渡ルーチン / Repair broken weapon
+ * @param bcost 基本鑑定費用
+ * @return 実際にかかった費用
+ */
+static int repair_broken_weapon(PRICE bcost)
 {
-       int cost;
-
+       PRICE cost;
        screen_save();
        cost = repair_broken_weapon_aux(bcost);
        screen_load();
@@ -4524,12 +3274,18 @@ static int repair_broken_weapon(int bcost)
 }
 
 
-/*
- * Enchant item
+/*!
+ * @brief アイテムの強化を行う。 / Enchant item
+ * @param cost 1回毎の費用
+ * @param to_hit 命中をアップさせる量
+ * @param to_dam ダメージをアップさせる量
+ * @param to_ac ACをアップさせる量
+ * @return 実際に行ったらTRUE
  */
-static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
+static bool enchant_item(PRICE cost, HIT_PROB to_hit, HIT_POINT to_dam, ARMOUR_CLASS to_ac)
 {
-       int         i, item;
+       int         i;
+       OBJECT_IDX  item;
        bool        okay = FALSE;
        object_type *o_ptr;
        cptr        q, s;
@@ -4538,8 +3294,8 @@ static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
 
        clear_bldg(4, 18);
 #ifdef JP
-       prt(format("¸½ºß¤Î¤¢¤Ê¤¿¤Îµ»Î̤À¤È¡¢+%d ¤Þ¤Ç²þÎɤǤ­¤Þ¤¹¡£", maxenchant), 5, 0);
-       prt(format(" ²þÎɤÎÎÁ¶â¤Ï°ì¸Ä¤Ë¤Ä¤­¡ð%d ¤Ç¤¹¡£", cost), 7, 0);
+       prt(format("現在のあなたの技量だと、+%d まで改良できます。", maxenchant), 5, 0);
+       prt(format(" 改良の料金は一個につき$%d です。", cost), 7, 0);
 #else
        prt(format("  Based on your skill, we can improve up to +%d.", maxenchant), 5, 0);
        prt(format("  The price for the service is %d gold per item.", cost), 7, 0);
@@ -4547,14 +3303,8 @@ static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
 
        item_tester_no_ryoute = TRUE;
 
-       /* Get an item */
-#ifdef JP
-       q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò²þÎɤ·¤Þ¤¹¤«¡©";
-       s = "²þÎɤǤ­¤ë¤â¤Î¤¬¤¢¤ê¤Þ¤»¤ó¡£";
-#else
-       q = "Improve which item? ";
-       s = "You have nothing to improve.";
-#endif
+       q = _("どのアイテムを改良しますか?", "Improve which item? ");
+       s = _("改良できるものがありません。", "You have nothing to improve.");
 
        if (!get_item(&item, q, s, (USE_INVEN | USE_EQUIP))) return (FALSE);
 
@@ -4565,12 +3315,7 @@ static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
        if (p_ptr->au < (cost * o_ptr->number))
        {
                object_desc(tmp_str, o_ptr, OD_NAME_ONLY);
-#ifdef JP
-               msg_format("%s¤ò²þÎɤ¹¤ë¤À¤±¤Î¥´¡¼¥ë¥É¤¬¤¢¤ê¤Þ¤»¤ó¡ª", tmp_str);
-#else
-               msg_format("You do not have the gold to improve %s!", tmp_str);
-#endif
-
+               msg_format(_("%sを改良するだけのゴールドがありません!", "You do not have the gold to improve %s!"), tmp_str);
                return (FALSE);
        }
 
@@ -4616,23 +3361,15 @@ static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
        /* Failure */
        if (!okay)
        {
-               /* Flush */
                if (flush_failure) flush();
-
-               /* Message */
-#ifdef JP
-               msg_print("²þÎɤ˼ºÇÔ¤·¤¿¡£");
-#else
-               msg_print("The improvement failed.");
-#endif
-
+               msg_print(_("改良に失敗した。", "The improvement failed."));
                return (FALSE);
        }
        else
        {
                object_desc(tmp_str, o_ptr, OD_NAME_AND_ENCHANT);
 #ifdef JP
-               msg_format("¡ð%d¤Ç%s¤Ë²þÎɤ·¤Þ¤·¤¿¡£", cost * o_ptr->number, tmp_str);
+               msg_format("$%dで%sに改良しました。", cost * o_ptr->number, tmp_str);
 #else
                msg_format("Improved into %s for %d gold.", tmp_str, cost * o_ptr->number);
 #endif
@@ -4648,24 +3385,26 @@ static bool enchant_item(int cost, int to_hit, int to_dam, int to_ac)
 }
 
 
-/*
- * Recharge rods, wands and staves
- *
- * The player can select the number of charges to add
- * (up to a limit), and the recharge never fails.
- *
- * The cost for rods depends on the level of the rod. The prices
- * for recharging wands and staves are dependent on the cost of
- * the base-item.
+/*!
+ * @brief 魔道具の使用回数を回復させる施設のメインルーチン / Recharge rods, wands and staves
+ * @details
+ * The player can select the number of charges to add\n
+ * (up to a limit), and the recharge never fails.\n
+ *\n
+ * The cost for rods depends on the level of the rod. The prices\n
+ * for recharging wands and staves are dependent on the cost of\n
+ * the base-item.\n
+ * @return なし
  */
 static void building_recharge(void)
 {
-       int         item, lev;
+       OBJECT_IDX  item;
+       DEPTH       lev;
        object_type *o_ptr;
        object_kind *k_ptr;
        cptr        q, s;
-       int         price;
-       int         charges;
+       PRICE       price;
+       PARAMETER_VALUE charges;
        int         max_charges;
        char        tmp_str[MAX_NLEN];
 
@@ -4673,25 +3412,14 @@ static void building_recharge(void)
 
        /* Display some info */
        clear_bldg(4, 18);
-#ifdef JP
-prt("  ºÆ½¼Å¶¤ÎÈñÍѤϥ¢¥¤¥Æ¥à¤Î¼ïÎà¤Ë¤è¤ê¤Þ¤¹¡£", 6, 0);
-#else
-       prt("  The prices of recharge depend on the type.", 6, 0);
-#endif
+       prt(_("  再充填の費用はアイテムの種類によります。", "  The prices of recharge depend on the type."), 6, 0);
 
 
        /* Only accept legal items */
        item_tester_hook = item_tester_hook_recharge;
 
-       /* Get an item */
-#ifdef JP
-q = "¤É¤Î¥¢¥¤¥Æ¥à¤ËËâÎϤò½¼Å¶¤·¤Þ¤¹¤«? ";
-s = "ËâÎϤò½¼Å¶¤¹¤Ù¤­¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
-#else
-       q = "Recharge which item? ";
-       s = "You have nothing to recharge.";
-#endif
-
+       q = _("どのアイテムに魔力を充填しますか? ", "Recharge which item? ");
+       s = _("魔力を充填すべきアイテムがない。", "You have nothing to recharge.");
        if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
 
        /* Get the item (in the pack) */
@@ -4715,20 +3443,11 @@ s = "
        /* The item must be "known" */
        if (!object_is_known(o_ptr))
        {
-#ifdef JP
-msg_format("½¼Å¶¤¹¤ëÁ°¤Ë´ÕÄꤵ¤ì¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡ª");
-#else
-               msg_format("The item must be identified first!");
-#endif
-
+               msg_format(_("充填する前に鑑定されている必要があります!", "The item must be identified first!"));
                msg_print(NULL);
 
                if ((p_ptr->au >= 50) &&
-#ifdef JP
-get_check("¡ð50¤Ç´ÕÄꤷ¤Þ¤¹¤«¡© "))
-#else
-                       get_check("Identify for 50 gold? "))
-#endif
+                       get_check(_("$50で鑑定しますか? ", "Identify for 50 gold? ")))
 
                {
                        /* Pay the price */
@@ -4739,12 +3458,7 @@ get_check("
 
                        /* Description */
                        object_desc(tmp_str, o_ptr, 0);
-
-#ifdef JP
-msg_format("%s ¤Ç¤¹¡£", tmp_str);
-#else
-                       msg_format("You have: %s.", tmp_str);
-#endif
+                       msg_format(_("%s です。", "You have: %s."), tmp_str);
 
                        /* Auto-inscription */
                        autopick_alter_item(item, FALSE);
@@ -4773,12 +3487,7 @@ msg_format("%s 
                {
                        /* No recharge necessary */
                        price = 0;
-#ifdef JP
-msg_format("¤½¤ì¤ÏºÆ½¼Å¶¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£");
-#else
-                       msg_format("That doesn't need to be recharged.");
-#endif
-
+                       msg_format(_("それは再充填する必要はありません。", "That doesn't need to be recharged."));
                        return;
                }
        }
@@ -4805,19 +3514,11 @@ msg_format("
        {
                if (o_ptr->number > 1)
                {
-#ifdef JP
-msg_print("¤³¤ÎËâË¡ËÀ¤Ï¤â¤¦½¼Ê¬¤Ë½¼Å¶¤µ¤ì¤Æ¤¤¤Þ¤¹¡£");
-#else
-                       msg_print("These wands are already fully charged.");
-#endif
+                       msg_print(_("この魔法棒はもう充分に充填されています。", "These wands are already fully charged."));
                }
                else
                {
-#ifdef JP
-msg_print("¤³¤ÎËâË¡ËÀ¤Ï¤â¤¦½¼Ê¬¤Ë½¼Å¶¤µ¤ì¤Æ¤¤¤Þ¤¹¡£");
-#else
-                       msg_print("This wand is already fully charged.");
-#endif
+                       msg_print(_("この魔法棒はもう充分に充填されています。", "This wand is already fully charged."));
                }
                return;
        }
@@ -4825,19 +3526,11 @@ msg_print("
        {
                if (o_ptr->number > 1)
                {
-#ifdef JP
-msg_print("¤³¤Î¾ó¤Ï¤â¤¦½¼Ê¬¤Ë½¼Å¶¤µ¤ì¤Æ¤¤¤Þ¤¹¡£");
-#else
-                       msg_print("These staffs are already fully charged.");
-#endif
+                       msg_print(_("この杖はもう充分に充填されています。", "These staffs are already fully charged."));
                }
                else
                {
-#ifdef JP
-msg_print("¤³¤Î¾ó¤Ï¤â¤¦½¼Ê¬¤Ë½¼Å¶¤µ¤ì¤Æ¤¤¤Þ¤¹¡£");
-#else
-                       msg_print("This staff is already fully charged.");
-#endif
+                       msg_print(_("この杖はもう充分に充填されています。", "This staff is already fully charged."));
                }
                return;
        }
@@ -4847,7 +3540,7 @@ msg_print("
        {
                object_desc(tmp_str, o_ptr, OD_NAME_ONLY);
 #ifdef JP
-msg_format("%s¤òºÆ½¼Å¶¤¹¤ë¤Ë¤Ï¡ð%d É¬ÍפǤ¹¡ª", tmp_str,price );
+               msg_format("%sを再充填するには$%d 必要です!", tmp_str,price );
 #else
                msg_format("You need %d gold to recharge %s!", price, tmp_str);
 #endif
@@ -4858,7 +3551,7 @@ msg_format("%s
        if (o_ptr->tval == TV_ROD)
        {
 #ifdef JP
-if (get_check(format("¤½¤Î¥í¥Ã¥É¤ò¡ð%d ¤ÇºÆ½¼Å¶¤·¤Þ¤¹¤«¡©",
+if (get_check(format("そのロッドを$%d で再充填しますか?",
  price)))
 #else
                if (get_check(format("Recharge the %s for %d gold? ",
@@ -4882,13 +3575,8 @@ if (get_check(format("
                        max_charges = o_ptr->number * k_ptr->pval - o_ptr->pval;
 
                /* Get the quantity for staves and wands */
-#ifdef JP
-charges = get_quantity(format("°ì²óʬ¡ð%d ¤Ç²¿²óʬ½¼Å¶¤·¤Þ¤¹¤«¡©",
-#else
-               charges = get_quantity(format("Add how many charges for %d gold? ",
-#endif
-
-                             price), MIN(p_ptr->au / price, max_charges));
+               charges = (PARAMETER_VALUE)get_quantity(format(_("一回分$%d で何回分充填しますか?", "Add how many charges for %d gold? "), price), 
+                                       MIN(p_ptr->au / price, max_charges));
 
                /* Do nothing */
                if (charges < 1) return;
@@ -4906,7 +3594,7 @@ charges = get_quantity(format("
        /* Give feedback */
        object_desc(tmp_str, o_ptr, 0);
 #ifdef JP
-msg_format("%s¤ò¡ð%d ¤ÇºÆ½¼Å¶¤·¤Þ¤·¤¿¡£", tmp_str, price);
+       msg_format("%sを$%d で再充填しました。", tmp_str, price);
 #else
        msg_format("%^s %s recharged for %d gold.", tmp_str, ((o_ptr->number > 1) ? "were" : "was"), price);
 #endif
@@ -4914,7 +3602,6 @@ msg_format("%s
        /* Combine / Reorder the pack (later) */
        p_ptr->notice |= (PN_COMBINE | PN_REORDER);
 
-       /* Window stuff */
        p_ptr->window |= (PW_INVEN);
 
        /* Pay the price */
@@ -4925,34 +3612,31 @@ msg_format("%s
 }
 
 
-/*
- * Recharge rods, wands and staves
- *
- * The player can select the number of charges to add
- * (up to a limit), and the recharge never fails.
- *
- * The cost for rods depends on the level of the rod. The prices
- * for recharging wands and staves are dependent on the cost of
- * the base-item.
+/*!
+ * @brief 魔道具の使用回数を回復させる施設の一括処理向けサブルーチン / Recharge rods, wands and staves
+ * @details
+ * The player can select the number of charges to add\n
+ * (up to a limit), and the recharge never fails.\n
+ *\n
+ * The cost for rods depends on the level of the rod. The prices\n
+ * for recharging wands and staves are dependent on the cost of\n
+ * the base-item.\n
+ * @return なし
  */
 static void building_recharge_all(void)
 {
-       int         i;
-       int         lev;
+       INVENTORY_IDX i;
+       DEPTH lev;
        object_type *o_ptr;
        object_kind *k_ptr;
-       int         price = 0;
-       int         total_cost = 0;
+       PRICE price = 0;
+       PRICE total_cost = 0;
 
 
        /* Display some info */
        msg_flag = FALSE;
        clear_bldg(4, 18);
-#ifdef JP
-       prt("  ºÆ½¼Å¶¤ÎÈñÍѤϥ¢¥¤¥Æ¥à¤Î¼ïÎà¤Ë¤è¤ê¤Þ¤¹¡£", 6, 0);
-#else
-       prt("  The prices of recharge depend on the type.", 6, 0);
-#endif
+       prt(_("  再充填の費用はアイテムの種類によります。", "  The prices of recharge depend on the type."), 6, 0);
 
        /* Calculate cost */
        for ( i = 0; i < INVEN_PACK; i++)
@@ -5005,12 +3689,7 @@ static void building_recharge_all(void)
 
        if (!total_cost)
        {
-#ifdef JP
-               msg_print("½¼Å¶¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£");
-#else
-               msg_print("No need to recharge.");
-#endif
-
+               msg_print(_("充填する必要はありません。", "No need to recharge."));
                msg_print(NULL);
                return;
        }
@@ -5018,22 +3697,12 @@ static void building_recharge_all(void)
        /* Check if the player has enough money */
        if (p_ptr->au < total_cost)
        {
-#ifdef JP
-               msg_format("¤¹¤Ù¤Æ¤Î¥¢¥¤¥Æ¥à¤òºÆ½¼Å¶¤¹¤ë¤Ë¤Ï¡ð%d É¬ÍפǤ¹¡ª", total_cost );
-#else
-               msg_format("You need %d gold to recharge all items!",total_cost);
-#endif
-
+               msg_format(_("すべてのアイテムを再充填するには$%d 必要です!", "You need %d gold to recharge all items!"), total_cost );
                msg_print(NULL);
                return;
        }
-
-#ifdef JP
-       if (!get_check(format("¤¹¤Ù¤Æ¤Î¥¢¥¤¥Æ¥à¤ò ¡ð%d ¤ÇºÆ½¼Å¶¤·¤Þ¤¹¤«¡©",  total_cost))) return;
-#else
-       if (!get_check(format("Recharge all items for %d gold? ", total_cost))) return;
-#endif
-
+       if (!get_check(format(_("すべてのアイテムを $%d で再充填しますか?", "Recharge all items for %d gold? "),  total_cost))) return;
+       
        for (i = 0; i < INVEN_PACK; i++)
        {
                o_ptr = &inventory[i];
@@ -5072,18 +3741,12 @@ static void building_recharge_all(void)
        }
 
        /* Give feedback */
-#ifdef JP
-       msg_format("¡ð%d ¤ÇºÆ½¼Å¶¤·¤Þ¤·¤¿¡£", total_cost);
-#else
-       msg_format("You pay %d gold.", total_cost);
-#endif
-
+       msg_format(_("$%d で再充填しました。", "You pay %d gold."), total_cost);
        msg_print(NULL);
 
        /* Combine / Reorder the pack (later) */
        p_ptr->notice |= (PN_COMBINE | PN_REORDER);
 
-       /* Window stuff */
        p_ptr->window |= (PW_INVEN);
 
        /* Pay the price */
@@ -5093,7 +3756,10 @@ static void building_recharge_all(void)
        return;
 }
 
-
+/*!
+ * @brief 町間のテレポートを行うメインルーチン。
+ * @return テレポート処理を決定したか否か
+ */
 bool tele_town(void)
 {
        int i, x, y;
@@ -5101,56 +3767,39 @@ bool tele_town(void)
 
        if (dun_level)
        {
-#ifdef JP
-               msg_print("¤³¤ÎËâË¡¤ÏÃϾå¤Ç¤·¤«»È¤¨¤Ê¤¤¡ª");
-#else
-               msg_print("This spell can only be used on the surface!");
-#endif
+               msg_print(_("この魔法は地上でしか使えない!", "This spell can only be used on the surface!"));
                return FALSE;
        }
 
        if (p_ptr->inside_arena || p_ptr->inside_battle)
        {
-#ifdef JP
-               msg_print("¤³¤ÎËâË¡¤Ï³°¤Ç¤·¤«»È¤¨¤Ê¤¤¡ª");
-#else
-               msg_print("This spell can only be used outside!");
-#endif
+               msg_print(_("この魔法は外でしか使えない!", "This spell can only be used outside!"));
                return FALSE;
        }
 
        screen_save();
        clear_bldg(4, 10);
 
-       for (i=1;i<max_towns;i++)
+       for (i = 1; i < max_towns; i++)
        {
                char buf[80];
 
-               if ((i == NO_TOWN) || (i == SECRET_TOWN) || (i == p_ptr->town_num) || !(p_ptr->visit & (1L << (i-1)))) continue;
+               if ((i == NO_TOWN) || (i == SECRET_TOWN) || (i == p_ptr->town_num) || !(p_ptr->visit & (1L << (i - 1)))) continue;
 
-               sprintf(buf,"%c) %-20s", I2A(i-1), town[i].name);
-               prt(buf, 5+i, 5);
+               sprintf(buf, "%c) %-20s", I2A(i - 1), town[i].name);
+               prt(buf, 5 + i, 5);
                num++;
        }
 
        if (!num)
        {
-#ifdef JP
-               msg_print("¤Þ¤À¹Ô¤±¤ë¤È¤³¤í¤¬¤Ê¤¤¡£");
-#else
-               msg_print("You have not yet visited any town.");
-#endif
-
+               msg_print(_("まだ行けるところがない。", "You have not yet visited any town."));
                msg_print(NULL);
                screen_load();
                return FALSE;
        }
 
-#ifdef JP
-       prt("¤É¤³¤Ë¹Ô¤­¤Þ¤¹¤«:", 0, 0);
-#else
-       prt("Which town you go: ", 0, 0);
-#endif
+       prt(_("どこに行きますか:", "Which town you go: "), 0, 0);
        while(1)
        {
                i = inkey();
@@ -5184,24 +3833,22 @@ bool tele_town(void)
        return TRUE;
 }
 
-
-/*
- *  research_mon
- *  -KMW-
+/*!
+ * @brief 施設でモンスターの情報を知るメインルーチン / research_mon -KMW-
+ * @return 常にTRUEを返す。
+ * @todo 返り値が意味不明なので直した方が良いかもしれない。
  */
 static bool research_mon(void)
 {
-       int i, n, r_idx;
+       IDX i;
+       int n;
+       MONRACE_IDX r_idx;
        char sym, query;
        char buf[128];
-
        bool notpicked;
-
        bool recall = FALSE;
-
        u16b why = 0;
-
-       u16b    *who;
+       MONSTER_IDX *who;
 
        /* XTRA HACK WHATSEARCH */
        bool    all = FALSE;
@@ -5211,18 +3858,15 @@ static bool research_mon(void)
 
        /* XTRA HACK REMEMBER_IDX */
        static int old_sym = '\0';
-       static int old_i = 0;
+       static IDX old_i = 0;
 
 
        /* Save the screen */
        screen_save();
 
        /* Get a character, or abort */
-#ifdef JP
-if (!get_com("¥â¥ó¥¹¥¿¡¼¤Îʸ»ú¤òÆþÎϤ·¤Æ²¼¤µ¤¤(µ­¹æ or ^AÁ´,^U¥æ,^NÈó¥æ,^M̾Á°):", &sym, FALSE)) 
-#else
-       if (!get_com("Enter character to be identified(^A:All,^U:Uniqs,^N:Non uniqs,^M:Name): ", &sym, FALSE))
-#endif
+       if (!get_com(_("モンスターの文字を入力して下さい(記号 or ^A全,^Uユ,^N非ユ,^M名前):",
+                                  "Enter character to be identified(^A:All,^U:Uniqs,^N:Non uniqs,^M:Name): "), &sym, FALSE)) 
 
        {
                /* Restore */
@@ -5241,38 +3885,22 @@ if (!get_com("
        if (sym == KTRL('A'))
        {
                all = TRUE;
-#ifdef JP
-               strcpy(buf, "Á´¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
-#else
-               strcpy(buf, "Full monster list.");
-#endif
+               strcpy(buf, _("全モンスターのリスト", "Full monster list."));
        }
        else if (sym == KTRL('U'))
        {
                all = uniq = TRUE;
-#ifdef JP
-               strcpy(buf, "¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
-#else
-               strcpy(buf, "Unique monster list.");
-#endif
+               strcpy(buf, _("ユニーク・モンスターのリスト", "Unique monster list."));
        }
        else if (sym == KTRL('N'))
        {
                all = norm = TRUE;
-#ifdef JP
-               strcpy(buf, "¥æ¥Ë¡¼¥¯³°¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
-#else
-               strcpy(buf, "Non-unique monster list.");
-#endif
+               strcpy(buf, _("ユニーク外モンスターのリスト", "Non-unique monster list."));
        }
        else if (sym == KTRL('M'))
        {
                all = TRUE;
-#ifdef JP
-               if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)",temp, 70))
-#else
-               if (!get_string("Enter name:",temp, 70))
-#endif
+               if (!get_string(_("名前(英語の場合小文字で可)", "Enter name:"),temp, 70))
                {
                        temp[0]=0;
 
@@ -5281,11 +3909,7 @@ if (!get_com("
 
                        return FALSE;
                }
-#ifdef JP
-               sprintf(buf, "̾Á°:%s¤Ë¥Þ¥Ã¥Á",temp);
-#else
-               sprintf(buf, "Monsters with a name \"%s\"",temp);
-#endif
+               sprintf(buf, _("名前:%sにマッチ", "Monsters with a name \"%s\""),temp);
        }
        else if (ident_info[i])
        {
@@ -5293,12 +3917,7 @@ if (!get_com("
        }
        else
        {
-#ifdef JP
-sprintf(buf, "%c - %s", sym, "̵¸ú¤Êʸ»ú");
-#else
-               sprintf(buf, "%c - %s.", sym, "Unknown Symbol");
-#endif
-
+               sprintf(buf, "%c - %s", sym, _("無効な文字", "Unknown Symbol"));
        }
 
        /* Display the result */
@@ -5306,7 +3925,7 @@ sprintf(buf, "%c - %s", sym, "̵
 
 
        /* Allocate the "who" array */
-       C_MAKE(who, max_r_idx, u16b);
+       C_MAKE(who, max_r_idx, IDX);
 
        /* Collect matching monsters */
        for (n = 0, i = 1; i < max_r_idx; i++)
@@ -5323,7 +3942,7 @@ sprintf(buf, "%c - %s", sym, "̵
                /* Require unique monsters if needed */
                if (uniq && !(r_ptr->flags1 & (RF1_UNIQUE))) continue;
 
-               /* Ì¾Á°¸¡º÷ */
+               /* 名前検索 */
                if (temp[0])
                {
                        int xx;
@@ -5338,7 +3957,7 @@ sprintf(buf, "%c - %s", sym, "̵
                                        continue;
                                }
 #endif
-                               if (isupper(temp[xx])) temp[xx] = tolower(temp[xx]);
+                               if (isupper(temp[xx])) temp[xx] = (char)tolower(temp[xx]);
                        }
   
 #ifdef JP
@@ -5347,7 +3966,7 @@ sprintf(buf, "%c - %s", sym, "̵
                        strcpy(temp2, r_name + r_ptr->name);
 #endif
                        for (xx = 0; temp2[xx] && xx < 80; xx++)
-                               if (isupper(temp2[xx])) temp2[xx] = tolower(temp2[xx]);
+                               if (isupper(temp2[xx])) temp2[xx] = (char)tolower(temp2[xx]);
 
 #ifdef JP
                        if (my_strstr(temp2, temp) || my_strstr(r_name + r_ptr->name, temp))
@@ -5363,7 +3982,7 @@ sprintf(buf, "%c - %s", sym, "̵
        if (!n)
        {
                /* Free the "who" array */
-               C_KILL(who, max_r_idx, u16b);
+               C_KILL(who, max_r_idx, IDX);
 
                /* Restore */
                screen_load();
@@ -5404,12 +4023,7 @@ sprintf(buf, "%c - %s", sym, "̵
                roff_top(r_idx);
 
                /* Hack -- Complete the prompt */
-#ifdef JP
-Term_addstr(-1, TERM_WHITE, " ['r'»×¤¤½Ð, ' '¤Ç³¹Ô, ESC]");
-#else
-               Term_addstr(-1, TERM_WHITE, " [(r)ecall, ESC, space to continue]");
-#endif
-
+               Term_addstr(-1, TERM_WHITE, _(" ['r'思い出, ' 'で続行, ESC]", " [(r)ecall, ESC, space to continue]"));
 
                /* Interact */
                while (1)
@@ -5424,8 +4038,6 @@ Term_addstr(-1, TERM_WHITE, " ['r'
 
                                /* Save this monster ID */
                                monster_race_track(r_idx);
-
-                               /* Hack -- Handle stuff */
                                handle_stuff();
 
                                /* know every thing mode */
@@ -5476,7 +4088,7 @@ Term_addstr(-1, TERM_WHITE, " ['r'
        /* prt(buf, 5, 5);*/
 
        /* Free the "who" array */
-       C_KILL(who, max_r_idx, u16b);
+       C_KILL(who, max_r_idx, IDX);
 
        /* Restore */
        screen_load();
@@ -5485,17 +4097,20 @@ Term_addstr(-1, TERM_WHITE, " ['r'
 }
 
 
-/*
- * Execute a building command
+/*!
+ * @brief 施設の処理実行メインルーチン / Execute a building command
+ * @param bldg 施設構造体の参照ポインタ
+ * @param i 実行したい施設のサービステーブルの添字
+ * @return なし
  */
 static void bldg_process_command(building_type *bldg, int i)
 {
-       int bact = bldg->actions[i];
-       int bcost;
+       BACT_IDX bact = bldg->actions[i];
+       PRICE bcost;
        bool paid = FALSE;
        int amt;
 
-       /* Flush messages XXX XXX XXX */
+       /* Flush messages */
        msg_flag = FALSE;
        msg_print(NULL);
 
@@ -5508,11 +4123,7 @@ static void bldg_process_command(building_type *bldg, int i)
        if (((bldg->action_restr[i] == 1) && !is_member(bldg)) ||
            ((bldg->action_restr[i] == 2) && !is_owner(bldg)))
        {
-#ifdef JP
-msg_print("¤½¤ì¤òÁªÂò¤¹¤ë¸¢Íø¤Ï¤¢¤ê¤Þ¤»¤ó¡ª");
-#else
-               msg_print("You have no right to choose that!");
-#endif
+               msg_print(_("それを選択する権利はありません!", "You have no right to choose that!"));
                return;
        }
 
@@ -5521,11 +4132,7 @@ msg_print("
            (((bldg->member_costs[i] > p_ptr->au) && is_owner(bldg)) ||
             ((bldg->other_costs[i] > p_ptr->au) && !is_owner(bldg))))
        {
-#ifdef JP
-msg_print("¤ª¶â¤¬Â­¤ê¤Þ¤»¤ó¡ª");
-#else
-               msg_print("You do not have the gold!");
-#endif
+               msg_print(_("お金が足りません!", "You do not have the gold!"));
                return;
        }
 
@@ -5591,16 +4198,9 @@ msg_print("
                building_recharge_all();
                break;
        case BACT_IDENTS: /* needs work */
-#ifdef JP
-               if (!get_check("»ý¤Áʪ¤òÁ´¤Æ´ÕÄꤷ¤Æ¤è¤í¤·¤¤¤Ç¤¹¤«¡©")) break;
+               if (!get_check(_("持ち物を全て鑑定してよろしいですか?", "Do you pay for identify all your possession? "))) break;
                identify_pack();
-               msg_print(" »ý¤ÁʪÁ´¤Æ¤¬´ÕÄꤵ¤ì¤Þ¤·¤¿¡£");
-#else
-               if (!get_check("Do you pay for identify all your possession? ")) break;
-               identify_pack();
-               msg_print("Your possessions have been identified.");
-#endif
-
+               msg_print(_(" 持ち物全てが鑑定されました。", "Your possessions have been identified."));
                paid = TRUE;
                break;
        case BACT_IDENT_ONE: /* needs work */
@@ -5610,21 +4210,10 @@ msg_print("
                do_cmd_study();
                break;
        case BACT_HEALING: /* needs work */
-               hp_player(200);
-               set_poisoned(0);
-               set_blind(0);
-               set_confused(0);
-               set_cut(0);
-               set_stun(0);
-               paid = TRUE;
+               paid = cure_critical_wounds(200);
                break;
        case BACT_RESTORE: /* needs work */
-               if (do_res_stat(A_STR)) paid = TRUE;
-               if (do_res_stat(A_INT)) paid = TRUE;
-               if (do_res_stat(A_WIS)) paid = TRUE;
-               if (do_res_stat(A_DEX)) paid = TRUE;
-               if (do_res_stat(A_CON)) paid = TRUE;
-               if (do_res_stat(A_CHR)) paid = TRUE;
+               paid = restore_all_status();
                break;
        case BACT_ENCHANT_ARROWS:
                item_tester_hook = item_tester_hook_ammo;
@@ -5639,15 +4228,11 @@ msg_print("
                break;
        case BACT_TELEPORT_LEVEL:
        {
-               int select_dungeon;
-               int max_depth;
+               IDX select_dungeon;
+               DEPTH max_depth;
 
                clear_bldg(4, 20);
-#ifdef JP
-               select_dungeon = choose_dungeon("¤Ë¥Æ¥ì¥Ý¡¼¥È", 4, 0);
-#else
-               select_dungeon = choose_dungeon("teleport", 4, 0);
-#endif
+               select_dungeon = choose_dungeon(_("にテレポート", "teleport"), 4, 0);
                show_building(bldg);
                if (!select_dungeon) return;
 
@@ -5659,12 +4244,8 @@ msg_print("
                        if (quest[QUEST_OBERON].status != QUEST_STATUS_FINISHED) max_depth = 98;
                        else if(quest[QUEST_SERPENT].status != QUEST_STATUS_FINISHED) max_depth = 99;
                }
-
-#ifdef JP
-               amt = get_quantity(format("%s¤Î²¿³¬¤Ë¥Æ¥ì¥Ý¡¼¥È¤·¤Þ¤¹¤«¡©", d_name + d_info[select_dungeon].name), max_depth);
-#else
-               amt = get_quantity(format("Teleport to which level of %s? ", d_name + d_info[select_dungeon].name), max_depth);
-#endif
+               amt = get_quantity(format(_("%sの何階にテレポートしますか?", "Teleport to which level of %s? "), 
+                                                       d_name + d_info[select_dungeon].name), (QUANTITY)max_depth);
 
                if (amt > 0)
                {
@@ -5672,16 +4253,9 @@ msg_print("
                        p_ptr->recall_dungeon = select_dungeon;
                        max_dlv[p_ptr->recall_dungeon] = ((amt > d_info[select_dungeon].maxdepth) ? d_info[select_dungeon].maxdepth : ((amt < d_info[select_dungeon].mindepth) ? d_info[select_dungeon].mindepth : amt));
                        if (record_maxdepth)
-#ifdef JP
-                               do_cmd_write_nikki(NIKKI_TRUMP, select_dungeon, "¥È¥é¥ó¥×¥¿¥ï¡¼¤Ç");
-#else
-                       do_cmd_write_nikki(NIKKI_TRUMP, select_dungeon, "at Trump Tower");
-#endif
-#ifdef JP
-                       msg_print("²ó¤ê¤ÎÂ絤¤¬Ä¥¤ê¤Ä¤á¤Æ¤­¤¿...");
-#else
-                       msg_print("The air about you becomes charged...");
-#endif
+                               do_cmd_write_nikki(NIKKI_TRUMP, select_dungeon, _("トランプタワーで", "at Trump Tower"));
+                               
+                       msg_print(_("回りの大気が張りつめてきた...", "The air about you becomes charged..."));
 
                        paid = TRUE;
                        p_ptr->redraw |= (PR_STATUS);
@@ -5699,11 +4273,7 @@ msg_print("
                }
                else
                {
-#ifdef JP
-                       msg_print("¼£¤¹¤Ù¤­ÆÍÁ³ÊÑ°Û¤¬Ìµ¤¤¡£");
-#else
-                       msg_print("You have no mutations.");
-#endif
+                       msg_print(_("治すべき突然変異が無い。", "You have no mutations."));
                        msg_print(NULL);
                }
                break;
@@ -5723,11 +4293,7 @@ msg_print("
                kankin();
                break;
        case BACT_HEIKOUKA:
-#ifdef JP
-               msg_print("Ê¿¹Õ²½¤Îµ·¼°¤ò¹Ô¤Ê¤Ã¤¿¡£");
-#else
-               msg_print("You received an equalization ritual.");
-#endif
+               msg_print(_("平衡化の儀式を行なった。", "You received an equalization ritual."));
                set_virtue(V_COMPASSION, 0);
                set_virtue(V_HONOUR, 0);
                set_virtue(V_JUSTICE, 0);
@@ -5767,35 +4333,25 @@ msg_print("
        }
 }
 
-
-/*
- * Enter quest level
+/*!
+ * @brief クエスト入り口にプレイヤーが乗った際の処理 / Do building commands
+ * @return なし
  */
 void do_cmd_quest(void)
 {
-       energy_use = 100;
+       p_ptr->energy_use = 100;
 
-       if (!cave_have_flag_bold(py, px, FF_QUEST_ENTER))
+       if (!cave_have_flag_bold(p_ptr->y, p_ptr->x, FF_QUEST_ENTER))
        {
-#ifdef JP
-msg_print("¤³¤³¤Ë¤Ï¥¯¥¨¥¹¥È¤ÎÆþ¸ý¤Ï¤Ê¤¤¡£");
-#else
-               msg_print("You see no quest level here.");
-#endif
-
+               msg_print(_("ここにはクエストの入口はない。", "You see no quest level here."));
                return;
        }
        else
        {
-#ifdef JP
-               msg_print("¤³¤³¤Ë¤Ï¥¯¥¨¥¹¥È¤Ø¤ÎÆþ¸ý¤¬¤¢¤ê¤Þ¤¹¡£");
-               if (!get_check("¥¯¥¨¥¹¥È¤ËÆþ¤ê¤Þ¤¹¤«¡©")) return;
+               msg_print(_("ここにはクエストへの入口があります。", "There is an entry of a quest."));
+               if (!get_check(_("クエストに入りますか?", "Do you enter? "))) return;
                if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
-                       msg_print("¡Ø¤È¤Ë¤«¤¯Æþ¤Ã¤Æ¤ß¤è¤¦¤¼¤§¡£¡Ù");
-#else
-               msg_print("There is an entry of a quest.");
-               if (!get_check("Do you enter? ")) return;
-#endif
+                       msg_print(_("『とにかく入ってみようぜぇ。』", ""));
 
                /* Player enters a new quest */
                p_ptr->oldpy = 0;
@@ -5804,15 +4360,16 @@ msg_print("
                leave_quest_check();
 
                if (quest[p_ptr->inside_quest].type != QUEST_TYPE_RANDOM) dun_level = 1;
-               p_ptr->inside_quest = cave[py][px].special;
+               p_ptr->inside_quest = cave[p_ptr->y][p_ptr->x].special;
 
                p_ptr->leaving = TRUE;
        }
 }
 
 
-/*
- * Do building commands
+/*!
+ * @brief 施設入り口にプレイヤーが乗った際の処理 / Do building commands
+ * @return なし
  */
 void do_cmd_bldg(void)
 {
@@ -5822,20 +4379,15 @@ void do_cmd_bldg(void)
        building_type   *bldg;
 
 
-       energy_use = 100;
+       p_ptr->energy_use = 100;
 
-       if (!cave_have_flag_bold(py, px, FF_BLDG))
+       if (!cave_have_flag_bold(p_ptr->y, p_ptr->x, FF_BLDG))
        {
-#ifdef JP
-               msg_print("¤³¤³¤Ë¤Ï·úʪ¤Ï¤Ê¤¤¡£");
-#else
-               msg_print("You see no building here.");
-#endif
-
+               msg_print(_("ここには建物はない。", "You see no building here."));
                return;
        }
 
-       which = f_info[cave[py][px].feat].subtype;
+       which = f_info[cave[p_ptr->y][p_ptr->x].feat].subtype;
 
        bldg = &building[which];
 
@@ -5844,22 +4396,14 @@ void do_cmd_bldg(void)
 
        if ((which == 2) && (p_ptr->arena_number < 0))
        {
-#ifdef JP
-               msg_print("¡ÖÇÔ¼Ô¤ËÍѤϤʤ¤¡£¡×");
-#else
-               msg_print("'There's no place here for a LOSER like you!'");
-#endif
+               msg_print(_("「敗者に用はない。」", "'There's no place here for a LOSER like you!'"));
                return;
        }
        else if ((which == 2) && p_ptr->inside_arena)
        {
                if (!p_ptr->exit_bldg && m_cnt > 0)
                {
-#ifdef JP
-                       prt("¥²¡¼¥È¤ÏÊĤޤäƤ¤¤ë¡£¥â¥ó¥¹¥¿¡¼¤¬¤¢¤Ê¤¿¤òÂԤäƤ¤¤ë¡ª", 0, 0);
-#else
-                       prt("The gates are closed.  The monster awaits!", 0, 0);
-#endif
+                       prt(_("ゲートは閉まっている。モンスターがあなたを待っている!", "The gates are closed.  The monster awaits!"), 0, 0);
                }
                else
                {
@@ -5873,7 +4417,7 @@ void do_cmd_bldg(void)
                        command_new = SPECIAL_KEY_BUILDING;
 
                        /* No energy needed to re-enter the arena */
-                       energy_use = 0;
+                       p_ptr->energy_use = 0;
                }
 
                return;
@@ -5890,14 +4434,14 @@ void do_cmd_bldg(void)
                command_new = SPECIAL_KEY_BUILDING;
 
                /* No energy needed to re-enter the arena */
-               energy_use = 0;
+               p_ptr->energy_use = 0;
 
                return;
        }
        else
        {
-               p_ptr->oldpy = py;
-               p_ptr->oldpx = px;
+               p_ptr->oldpy = p_ptr->y;
+               p_ptr->oldpx = p_ptr->x;
        }
 
        /* Forget the lite */
@@ -5916,6 +4460,8 @@ void do_cmd_bldg(void)
        show_building(bldg);
        leave_bldg = FALSE;
 
+       play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BUILD);
+
        while (!leave_bldg)
        {
                validcmd = FALSE;
@@ -5945,17 +4491,14 @@ void do_cmd_bldg(void)
                        }
                }
 
-               if (validcmd)
-                       bldg_process_command(bldg, i);
+               if(validcmd) bldg_process_command(bldg, i);
 
-               /* Notice stuff */
-               notice_stuff();
-
-               /* Handle stuff */
                handle_stuff();
        }
 
-       /* Flush messages XXX XXX XXX */
+       select_floor_music();
+
+       /* Flush messages */
        msg_flag = FALSE;
        msg_print(NULL);
 
@@ -5977,51 +4520,28 @@ void do_cmd_bldg(void)
        /* Redraw entire screen */
        p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_EQUIPPY | PR_MAP);
 
-       /* Window stuff */
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
 }
 
 
-/* Array of places to find an inscription */
+/*!
+ * @brief クエスト突入時のメッセージテーブル / Array of places to find an inscription
+ */
 static cptr find_quest[] =
 {
-#ifdef JP
-"¾²¤Ë¥á¥Ã¥»¡¼¥¸¤¬¹ï¤Þ¤ì¤Æ¤¤¤ë:",
-#else
-       "You find the following inscription in the floor",
-#endif
-
-#ifdef JP
-"Êɤ˥á¥Ã¥»¡¼¥¸¤¬¹ï¤Þ¤ì¤Æ¤¤¤ë:",
-#else
-       "You see a message inscribed in the wall",
-#endif
-
-#ifdef JP
-"¥á¥Ã¥»¡¼¥¸¤ò¸«¤Ä¤±¤¿:",
-#else
-       "There is a sign saying",
-#endif
-
-#ifdef JP
-"²¿¤«¤¬³¬Ãʤξå¤Ë½ñ¤¤¤Æ¤¢¤ë:",
-#else
-       "Something is written on the staircase",
-#endif
-
-#ifdef JP
-"´¬Êª¤ò¸«¤Ä¤±¤¿¡£¥á¥Ã¥»¡¼¥¸¤¬½ñ¤¤¤Æ¤¢¤ë:",
-#else
-       "You find a scroll with the following message",
-#endif
-
+       _("床にメッセージが刻まれている:", "You find the following inscription in the floor"),
+       _("壁にメッセージが刻まれている:", "You see a message inscribed in the wall"),
+       _("メッセージを見つけた:", "There is a sign saying"),
+       _("何かが階段の上に書いてある:", "Something is written on the staircase"),
+       _("巻物を見つけた。メッセージが書いてある:", "You find a scroll with the following message"),
 };
 
 
-/*
- * Discover quest
+/*!
+ * @brief クエストの導入メッセージを表示する / Discover quest
+ * @param q_idx 開始されたクエストのID
  */
-void quest_discovery(int q_idx)
+void quest_discovery(QUEST_IDX q_idx)
 {
        quest_type      *q_ptr = &quest[q_idx];
        monster_race    *r_ptr = &r_info[q_ptr->r_idx];
@@ -6044,49 +4564,45 @@ void quest_discovery(int q_idx)
                if ((r_ptr->flags1 & RF1_UNIQUE) &&
                    (0 == r_ptr->max_num))
                {
-#ifdef JP
-                       msg_print("¤³¤Î³¬¤Ï°ÊÁ°¤Ï狼¤Ë¤è¤Ã¤Æ¼é¤é¤ì¤Æ¤¤¤¿¤è¤¦¤À¡Ä¡£");
-#else
-                       msg_print("It seems that this level was protected by someone before...");
-#endif
+                       msg_print(_("この階は以前は誰かによって守られていたようだ…。", "It seems that this level was protected by someone before..."));
                        /* The unique is already dead */
                        quest[q_idx].status = QUEST_STATUS_FINISHED;
+                       q_ptr->complev = 0;
+                       update_playtime();
+                       q_ptr->comptime = playtime;
                }
                else
                {
-#ifdef JP
-                       msg_format("Ãí°Õ¤»¤è¡ª¤³¤Î³¬¤Ï%s¤Ë¤è¤Ã¤Æ¼é¤é¤ì¤Æ¤¤¤ë¡ª", name);
-#else
-                       msg_format("Beware, this level is protected by %s!", name);
-#endif
+                       msg_format(_("注意せよ!この階は%sによって守られている!", "Beware, this level is protected by %s!"), name);
                }
        }
        else
        {
                /* Normal monsters */
-#ifdef JP
-msg_format("Ãí°Õ¤·¤í¡ª¤³¤Î³¬¤Ï%dÂΤÎ%s¤Ë¤è¤Ã¤Æ¼é¤é¤ì¤Æ¤¤¤ë¡ª", q_num, name);
-#else
+#ifndef JP
                plural_aux(name);
-               msg_format("Be warned, this level is guarded by %d %s!", q_num, name);
 #endif
+               msg_format(_("注意しろ!この階は%d体の%sによって守られている!", "Be warned, this level is guarded by %d %s!"), q_num, name);
 
        }
 }
 
 
-/*
- * Hack -- Check if a level is a "quest" level
+/*!
+ * @brief 新しく入ったダンジョンの階層に固定されている一般のクエストを探し出しIDを返す。
+ * / Hack -- Check if a level is a "quest" level
+ * @param level 検索対象になる階
+ * @return クエストIDを返す。該当がない場合0を返す。
  */
-int quest_number(int level)
+QUEST_IDX quest_number(DEPTH level)
 {
-       int i;
+       QUEST_IDX i;
 
        /* Check quests */
        if (p_ptr->inside_quest)
                return (p_ptr->inside_quest);
 
-       for (i = 0; i < max_quests; i++)
+       for (i = 0; i < max_q_idx; i++)
        {
                if (quest[i].status != QUEST_STATUS_TAKEN) continue;
 
@@ -6101,28 +4617,27 @@ int quest_number(int level)
        return (random_quest_number(level));
 }
 
-
-/*
- * Return the index of the random quest on this level
- * (or zero)
+/*!
+ * @brief 新しく入ったダンジョンの階層に固定されているランダムクエストを探し出しIDを返す。
+ * @param level 検索対象になる階
+ * @return クエストIDを返す。該当がない場合0を返す。
  */
-int random_quest_number(int level)
+QUEST_IDX random_quest_number(DEPTH level)
 {
-       int i;
+       QUEST_IDX i;
 
        if (dungeon_type != DUNGEON_ANGBAND) return 0;
 
        for (i = MIN_RANDOM_QUEST; i < MAX_RANDOM_QUEST + 1; i++)
        {
                if ((quest[i].type == QUEST_TYPE_RANDOM) &&
-                   (quest[i].status == QUEST_STATUS_TAKEN) &&
-                   (quest[i].level == level) &&
-                   (quest[i].dungeon == DUNGEON_ANGBAND))
+                       (quest[i].status == QUEST_STATUS_TAKEN) &&
+                       (quest[i].level == level) &&
+                       (quest[i].dungeon == DUNGEON_ANGBAND))
                {
                        return i;
                }
        }
 
-       /* Nope */
        return 0;
 }