OSDN Git Service

ソースコードのUTF-8化。
[hengband/hengband.git] / src / cmd3.c
index 39d6569..d1bc966 100644 (file)
@@ -1,8 +1,8 @@
-/* File: cmd3.c */
-
-/* Purpose: Inventory commands */
-
-/*
+/*!
+ *  @file cmd3.c
+ *  @brief プレイヤーのアイテムに関するコマンドの実装1 / Inventory commands
+ *  @date 2014/01/02
+ *  @author
  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
  *
  * This software may be copied and distributed for educational, research,
  * are included in all such copies.  Other copyrights may also apply.
  */
 
+
 #include "angband.h"
 
 
 
-/*
- * Display inventory
+/*!
+ * @brief 持ち物一覧を表示するコマンドのメインルーチン / Display inventory
+ * @return なし 
  */
 void do_cmd_inven(void)
 {
@@ -45,14 +47,13 @@ void do_cmd_inven(void)
        item_tester_full = FALSE;
 
 #ifdef JP
-       sprintf(out_val, "»ý¤Áʪ¡§ ¹ç·× %3d.%1d kg (¸Â³¦¤Î%ld%%) ¥³¥Þ¥ó¥É: ",
-           lbtokg1(p_ptr->total_weight) , lbtokg2(p_ptr->total_weight) ,
-           (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) 
-/ 2));
+       sprintf(out_val, "持ち物: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
+           (int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
+           (long int)((p_ptr->total_weight * 100) / weight_limit()));
 #else
        sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ",
            (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
-           (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2));
+           (p_ptr->total_weight * 100) / weight_limit());
 #endif
 
 
@@ -88,8 +89,9 @@ void do_cmd_inven(void)
 }
 
 
-/*
- * Display equipment
+/*!
+ * @brief 装備一覧を表示するコマンドのメインルーチン / Display equipment
+ * @return なし 
  */
 void do_cmd_equip(void)
 {
@@ -120,14 +122,13 @@ void do_cmd_equip(void)
 
        /* Build a prompt */
 #ifdef JP
-       sprintf(out_val, "ÁõÈ÷¡§ ¹ç·× %3d.%1d kg (¸Â³¦¤Î%ld%%) ¥³¥Þ¥ó¥É: ",
-           lbtokg1(p_ptr->total_weight) , lbtokg2(p_ptr->total_weight) ,
-           (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) 
-/ 2));
+       sprintf(out_val, "装備: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
+           (int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
+           (long int)((p_ptr->total_weight * 100) / weight_limit()));
 #else
        sprintf(out_val, "Equipment: carrying %d.%d pounds (%ld%% of capacity). Command: ",
            (int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
-           (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2));
+           (long int)((p_ptr->total_weight * 100) / weight_limit()));
 #endif
 
 
@@ -163,8 +164,10 @@ void do_cmd_equip(void)
 }
 
 
-/*
- * The "wearable" tester
+/*!
+ * @brief オブジェクトを防具として装備できるかの判定 / The "wearable" tester
+ * @param o_ptr 判定するオブジェクトの構造体参照ポインタ
+ * @return オブジェクトが防具として装備できるならTRUEを返す。
  */
 static bool item_tester_hook_wear(object_type *o_ptr)
 {
@@ -179,6 +182,11 @@ static bool item_tester_hook_wear(object_type *o_ptr)
 }
 
 
+/*!
+ * @brief オブジェクトがどちらの手にも装備できる武器かどうかの判定
+ * @param o_ptr 判定するオブジェクトの構造体参照ポインタ
+ * @return 左右両方の手で装備できるならばTRUEを返す。
+ */
 static bool item_tester_hook_mochikae(object_type *o_ptr)
 {
        /* Check for a usable slot */
@@ -190,7 +198,11 @@ static bool item_tester_hook_mochikae(object_type *o_ptr)
        return (FALSE);
 }
 
-
+/*!
+ * @brief オブジェクトが右手か左手に装備できる武器かどうかの判定
+ * @param o_ptr 判定するオブジェクトの構造体参照ポインタ
+ * @return 右手か左手の武器として装備できるならばTRUEを返す。
+ */
 static bool item_tester_hook_melee_weapon(object_type *o_ptr)
 {
        /* Check for a usable slot */
@@ -201,12 +213,15 @@ static bool item_tester_hook_melee_weapon(object_type *o_ptr)
 }
 
 
-/*
- * Wield or wear a single item from the pack or floor
+bool select_ring_slot = FALSE;
+
+/*!
+ * @brief 装備するコマンドのメインルーチン / Wield or wear a single item from the pack or floor
+ * @return なし 
  */
 void do_cmd_wield(void)
 {
-       int i, item, slot;
+       int item, slot;
 
        object_type forge;
        object_type *q_ptr;
@@ -219,6 +234,8 @@ void do_cmd_wield(void)
 
        cptr q, s;
 
+       int need_switch_wielding = 0;
+
        if (p_ptr->special_defense & KATA_MUSOU)
        {
                set_action(ACTION_NONE);
@@ -229,8 +246,8 @@ void do_cmd_wield(void)
 
        /* Get an item */
 #ifdef JP
-       q = "¤É¤ì¤òÁõÈ÷¤·¤Þ¤¹¤«? ";
-       s = "ÁõÈ÷²Äǽ¤Ê¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
+       q = "どれを装備しますか? ";
+       s = "装備可能なアイテムがない。";
 #else
        q = "Wear/Wield which item? ";
        s = "You have nothing you can wear or wield.";
@@ -260,6 +277,7 @@ void do_cmd_wield(void)
        case TV_CAPTURE:
        case TV_SHIELD:
        case TV_CARD:
+               /* Dual wielding */
                if (buki_motteruka(INVEN_RARM) && buki_motteruka(INVEN_LARM))
                {
                        /* Restrict the choices */
@@ -268,35 +286,36 @@ void do_cmd_wield(void)
 
                        /* Choose a weapon from the equipment only */
 #ifdef JP
-                       q = "¤É¤Á¤é¤ÎÉð´ï¤È¼è¤êÂؤ¨¤Þ¤¹¤«?";
-                       s = "¤ª¤Ã¤È¡£";
+                       q = "どちらの武器と取り替えますか?";
+                       s = "おっと。";
 #else
                        q = "Replace which weapon? ";
                        s = "Oops.";
 #endif
 
                        if (!get_item(&slot, q, s, (USE_EQUIP))) return;
-                       if ((slot == INVEN_RARM) && !cursed_p(&inventory[INVEN_RARM]))
-                       {
-                               object_type *or_ptr = &inventory[INVEN_RARM];
-                               object_type *ol_ptr = &inventory[INVEN_LARM];
-                               object_type object_tmp;
-                               object_type *otmp_ptr = &object_tmp;
-                               char ol_name[MAX_NLEN];
+                       if (slot == INVEN_RARM) need_switch_wielding = INVEN_LARM;
+               }
 
-                               object_desc(ol_name, ol_ptr, FALSE, 0);
+               else if (buki_motteruka(INVEN_LARM)) slot = INVEN_RARM;
 
-                               object_copy(otmp_ptr, ol_ptr);
-                               object_copy(ol_ptr, or_ptr);
-                               object_copy(or_ptr, otmp_ptr);
+               /* Both arms are already used by non-weapon */
+               else if (inventory[INVEN_RARM].k_idx && !object_is_melee_weapon(&inventory[INVEN_RARM]) &&
+                        inventory[INVEN_LARM].k_idx && !object_is_melee_weapon(&inventory[INVEN_LARM]))
+               {
+                       /* Restrict the choices */
+                       item_tester_hook = item_tester_hook_mochikae;
+
+                       /* Choose a hand */
 #ifdef JP
-                               msg_format("%s¤ò%s¤Ë¹½¤¨¤Ê¤ª¤·¤¿¡£", ol_name, left_hander ? "º¸¼ê" : "±¦¼ê");
+                       q = "どちらの手に装備しますか?";
+                       s = "おっと。";
 #else
-                               msg_format("You wield %s at %s hand.", ol_name, left_hander ? "left" : "right");
+                       q = "Equip which hand? ";
+                       s = "Oops.";
 #endif
 
-                               slot = INVEN_LARM;
-                       }
+                       if (!get_item(&slot, q, s, (USE_EQUIP))) return;
                }
                break;
 
@@ -309,12 +328,21 @@ void do_cmd_wield(void)
                if (slot == INVEN_LARM)
                {
 #ifdef JP
-                       if (!get_check("ÆóÅáή¤ÇÀ襤¤Þ¤¹¤«¡©")) slot = INVEN_RARM;
+                       if (!get_check("二刀流で戦いますか?")) slot = INVEN_RARM;
 #else
                        if (!get_check("Dual wielding? ")) slot = INVEN_RARM;
 #endif
                }
 
+               else if (!inventory[INVEN_RARM].k_idx && buki_motteruka(INVEN_LARM))
+               {
+#ifdef JP
+                       if (!get_check("二刀流で戦いますか?")) slot = INVEN_LARM;
+#else
+                       if (!get_check("Dual wielding? ")) slot = INVEN_LARM;
+#endif
+               }
+
                /* Both arms are already used */
                else if (inventory[INVEN_LARM].k_idx && inventory[INVEN_RARM].k_idx)
                {
@@ -323,48 +351,67 @@ void do_cmd_wield(void)
 
                        /* Choose a hand */
 #ifdef JP
-                       q = "¤É¤Á¤é¤Î¼ê¤ËÁõÈ÷¤·¤Þ¤¹¤«?";
-                       s = "¤ª¤Ã¤È¡£";
+                       q = "どちらの手に装備しますか?";
+                       s = "おっと。";
 #else
                        q = "Equip which hand? ";
                        s = "Oops.";
 #endif
 
                        if (!get_item(&slot, q, s, (USE_EQUIP))) return;
+                       if ((slot == INVEN_LARM) && !buki_motteruka(INVEN_RARM))
+                               need_switch_wielding = INVEN_RARM;
                }
                break;
 
        /* Rings */
        case TV_RING:
+               /* Choose a ring slot */
                if (inventory[INVEN_LEFT].k_idx && inventory[INVEN_RIGHT].k_idx)
                {
-                       /* Restrict the choices */
-                       item_tester_tval = TV_RING;
-                       item_tester_no_ryoute = TRUE;
-
-                       /* Choose a ring from the equipment only */
 #ifdef JP
-                       q = "¤É¤Á¤é¤Î»ØÎؤȼè¤êÂؤ¨¤Þ¤¹¤«?";
-                       s = "¤ª¤Ã¤È¡£";
+                       q = "どちらの指輪と取り替えますか?";
 #else
                        q = "Replace which ring? ";
-                       s = "Oops.";
 #endif
+               }
+               else
+               {
+#ifdef JP
+                       q = "どちらの手に装備しますか?";
+#else
+                       q = "Equip which hand? ";
+#endif
+               }
 
-                       if (!get_item(&slot, q, s, (USE_EQUIP))) return;
+#ifdef JP
+               s = "おっと。";
+#else
+               s = "Oops.";
+#endif
+
+               /* Restrict the choices */
+               select_ring_slot = TRUE;
+               item_tester_no_ryoute = TRUE;
+
+               if (!get_item(&slot, q, s, (USE_EQUIP)))
+               {
+                       select_ring_slot = FALSE;
+                       return;
                }
+               select_ring_slot = FALSE;
                break;
        }
 
        /* Prevent wielding into a cursed slot */
-       if (cursed_p(&inventory[slot]))
+       if (object_is_cursed(&inventory[slot]))
        {
                /* Describe it */
-               object_desc(o_name, &inventory[slot], FALSE, 0);
+               object_desc(o_name, &inventory[slot], (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
                /* Message */
 #ifdef JP
-               msg_format("%s%s¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¤è¤¦¤À¡£",
+               msg_format("%s%sは呪われているようだ。",
                           describe_use(slot) , o_name );
 #else
                msg_format("The %s you are %s appears to be cursed.",
@@ -375,16 +422,18 @@ void do_cmd_wield(void)
                return;
        }
 
-       if (cursed_p(o_ptr) && confirm_wear &&
-           (object_known_p(o_ptr) || (o_ptr->ident & IDENT_SENSE)))
+       if (confirm_wear &&
+               ((object_is_cursed(o_ptr) && object_is_known(o_ptr)) ||
+               ((o_ptr->ident & IDENT_SENSE) &&
+                       (FEEL_BROKEN <= o_ptr->feeling) && (o_ptr->feeling <= FEEL_CURSED))))
        {
                char dummy[MAX_NLEN+80];
 
                /* Describe it */
-               object_desc(o_name, o_ptr, FALSE, 0);
+               object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
 #ifdef JP
-sprintf(dummy, "ËÜÅö¤Ë%s{¼ö¤ï¤ì¤Æ¤¤¤ë}¤ò»È¤¤¤Þ¤¹¤«¡©", o_name);
+sprintf(dummy, "本当に%s{呪われている}を使いますか?", o_name);
 #else
                sprintf(dummy, "Really use the %s {cursed}? ", o_name);
 #endif
@@ -392,15 +441,15 @@ sprintf(dummy, "
                if (!get_check(dummy)) return;
        }
 
-       if ((o_ptr->name1 == ART_STONEMASK) && object_known_p(o_ptr) && (p_ptr->prace != RACE_VAMPIRE) && (p_ptr->prace != RACE_ANDROID))
+       if ((o_ptr->name1 == ART_STONEMASK) && object_is_known(o_ptr) && (p_ptr->prace != RACE_VAMPIRE) && (p_ptr->prace != RACE_ANDROID))
        {
                char dummy[MAX_NLEN+80];
 
                /* Describe it */
-               object_desc(o_name, o_ptr, FALSE, 0);
+               object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
 
 #ifdef JP
-sprintf(dummy, "%s¤òÁõÈ÷¤¹¤ë¤ÈµÛ·ìµ´¤Ë¤Ê¤ê¤Þ¤¹¡£¤è¤í¤·¤¤¤Ç¤¹¤«¡©", o_name);
+sprintf(dummy, "%sを装備すると吸血鬼になります。よろしいですか?", o_name);
 #else
                msg_format("%s will transforms you into a vampire permanently when equiped.", o_name);
                sprintf(dummy, "Do you become a vampire?");
@@ -409,32 +458,36 @@ sprintf(dummy, "%s
                if (!get_check(dummy)) return;
        }
 
-       /* Check if completed a quest */
-       for (i = 0; i < max_quests; i++)
+       if (need_switch_wielding && !object_is_cursed(&inventory[need_switch_wielding]))
        {
-               if ((quest[i].type == QUEST_TYPE_FIND_ARTIFACT) &&
-                   (quest[i].status == QUEST_STATUS_TAKEN) &&
-                   (quest[i].k_idx == o_ptr->name1))
-               {
-                       if (record_fix_quest) do_cmd_write_nikki(NIKKI_FIX_QUEST_C, i, NULL);
-                       quest[i].status = QUEST_STATUS_COMPLETED;
-                       quest[i].complev = (byte)p_ptr->lev;
+               object_type *slot_o_ptr = &inventory[slot];
+               object_type *switch_o_ptr = &inventory[need_switch_wielding];
+               object_type object_tmp;
+               object_type *otmp_ptr = &object_tmp;
+               char switch_name[MAX_NLEN];
+
+               object_desc(switch_name, switch_o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
+
+               object_copy(otmp_ptr, switch_o_ptr);
+               object_copy(switch_o_ptr, slot_o_ptr);
+               object_copy(slot_o_ptr, otmp_ptr);
 #ifdef JP
-msg_print("¥¯¥¨¥¹¥È¤òãÀ®¤·¤¿¡ª");
+               msg_format("%sを%sに構えなおした。", switch_name, (slot == INVEN_RARM) ? (left_hander ? "左手" : "右手") : (left_hander ? "右手" : "左手"));
 #else
-                       msg_print("You completed the quest!");
+               msg_format("You wield %s at %s hand.", switch_name, (slot == INVEN_RARM) ? (left_hander ? "left" : "right") : (left_hander ? "right" : "left"));
 #endif
 
-                       msg_print(NULL);
-               }
+               slot = need_switch_wielding;
        }
 
+       check_find_art_quest_completion(o_ptr);
+
        if (p_ptr->pseikaku == SEIKAKU_MUNCHKIN)
        {
                identify_item(o_ptr);
 
                /* Auto-inscription */
-               auto_inscribe_item(item, is_autopick(o_ptr));
+               autopick_alter_item(item, FALSE);
        }
 
        /* Take a turn */
@@ -476,41 +529,45 @@ msg_print("
        /* Wear the new stuff */
        object_copy(o_ptr, q_ptr);
 
+       /* Player touches it */
+       o_ptr->marked |= OM_TOUCHED;
+
        /* Increase the weight */
        p_ptr->total_weight += q_ptr->weight;
 
        /* Increment the equip counter by hand */
        equip_cnt++;
 
+#ifdef JP
+#define STR_WIELD_RARM "%s(%c)を右手に装備した。"
+#define STR_WIELD_LARM "%s(%c)を左手に装備した。"
+#define STR_WIELD_ARMS "%s(%c)を両手で構えた。"
+#else
+#define STR_WIELD_RARM "You are wielding %s (%c) in your right hand."
+#define STR_WIELD_LARM "You are wielding %s (%c) in your left hand."
+#define STR_WIELD_ARMS "You are wielding %s (%c) with both hands."
+#endif
+
        /* Where is the item now */
        switch (slot)
        {
        case INVEN_RARM:
-               if ((o_ptr->tval != TV_SHIELD) && (o_ptr->tval != TV_CAPTURE) && (o_ptr->tval != TV_CARD) && (empty_hands(FALSE) & EMPTY_HAND_LARM) && ((o_ptr->weight > 99) || (o_ptr->tval == TV_POLEARM)) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE)))
-#ifdef JP
-                       act = "%s(%c)¤òξ¼ê¤Ç¹½¤¨¤¿¡£";
-#else
-                       act = "You are wielding %s (%c) with both hands.";
-#endif
+               if (object_allow_two_hands_wielding(o_ptr) && (empty_hands(FALSE) == EMPTY_HAND_LARM) && CAN_TWO_HANDS_WIELDING())
+                       act = STR_WIELD_ARMS;
                else
-#ifdef JP
-                       act = (left_hander ? "%s(%c)¤òº¸¼ê¤ËÁõÈ÷¤·¤¿¡£" : "%s(%c)¤ò±¦¼ê¤ËÁõÈ÷¤·¤¿¡£");
-#else
-                       act = (left_hander ? "You are wielding %s (%c) on left hand." : "You are wielding %s (%c) on right hand.");
-#endif
+                       act = (left_hander ? STR_WIELD_LARM : STR_WIELD_RARM);
                break;
 
        case INVEN_LARM:
-#ifdef JP
-               act = (left_hander ? "%s(%c)¤ò±¦¼ê¤ËÁõÈ÷¤·¤¿¡£" : "%s(%c)¤òº¸¼ê¤ËÁõÈ÷¤·¤¿¡£");
-#else
-               act = (left_hander ? "You are wielding %s (%c) on right hand." : "You are wielding %s (%c) on left hand.");
-#endif
+               if (object_allow_two_hands_wielding(o_ptr) && (empty_hands(FALSE) == EMPTY_HAND_RARM) && CAN_TWO_HANDS_WIELDING())
+                       act = STR_WIELD_ARMS;
+               else
+                       act = (left_hander ? STR_WIELD_RARM : STR_WIELD_LARM);
                break;
 
        case INVEN_BOW:
 #ifdef JP
-               act = "%s(%c)¤ò¼Í·âÍѤËÁõÈ÷¤·¤¿¡£";
+               act = "%s(%c)を射撃用に装備した。";
 #else
                act = "You are shooting with %s (%c).";
 #endif
@@ -518,7 +575,7 @@ msg_print("
 
        case INVEN_LITE:
 #ifdef JP
-               act = "%s(%c)¤ò¸÷¸»¤Ë¤·¤¿¡£";
+               act = "%s(%c)を光源にした。";
 #else
                act = "Your light source is %s (%c).";
 #endif
@@ -526,7 +583,7 @@ msg_print("
 
        default:
 #ifdef JP
-               act = "%s(%c)¤òÁõÈ÷¤·¤¿¡£";
+               act = "%s(%c)を装備した。";
 #else
                act = "You are wearing %s (%c).";
 #endif
@@ -534,18 +591,18 @@ msg_print("
        }
 
        /* Describe the result */
-       object_desc(o_name, o_ptr, TRUE, 3);
+       object_desc(o_name, o_ptr, 0);
 
        /* Message */
        msg_format(act, o_name, index_to_label(slot));
 
 
        /* Cursed! */
-       if (cursed_p(o_ptr))
+       if (object_is_cursed(o_ptr))
        {
                /* Warn the player */
 #ifdef JP
-               msg_print("¤¦¤ï¡ª ¤¹¤µ¤Þ¤¸¤¯Î䤿¤¤¡ª");
+               msg_print("うわ! すさまじく冷たい!");
 #else
                msg_print("Oops! It feels deathly cold!");
 #endif
@@ -557,63 +614,11 @@ msg_print("
                o_ptr->ident |= (IDENT_SENSE);
        }
 
+       /* The Stone Mask make the player turn into a vampire! */
        if ((o_ptr->name1 == ART_STONEMASK) && (p_ptr->prace != RACE_VAMPIRE) && (p_ptr->prace != RACE_ANDROID))
        {
-               int h_percent;
-               if (p_ptr->prace < 32)
-               {
-                       p_ptr->old_race1 |= 1L << p_ptr->prace;
-               }
-               else
-               {
-                       p_ptr->old_race2 |= 1L << (p_ptr->prace-32);
-               }
-               p_ptr->prace = RACE_VAMPIRE;
-#ifdef JP
-               msg_format("¤¢¤Ê¤¿¤ÏµÛ·ìµ´¤ËÊѲ½¤·¤¿¡ª");
-#else
-               msg_format("You polymorphed into a vampire!");
-#endif
-
-               rp_ptr = &race_info[p_ptr->prace];
-
-               /* Experience factor */
-               p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
-
-               /* Calculate the height/weight for males */
-               if (p_ptr->psex == SEX_MALE)
-               {
-                       p_ptr->ht = randnor(rp_ptr->m_b_ht, rp_ptr->m_m_ht);
-                       h_percent = (int)(p_ptr->ht) * 100 / (int)(rp_ptr->m_b_ht);
-                       p_ptr->wt = randnor((int)(rp_ptr->m_b_wt) * h_percent /100
-                                           , (int)(rp_ptr->m_m_wt) * h_percent / 300 );
-               }
-
-               /* Calculate the height/weight for females */
-               else if (p_ptr->psex == SEX_FEMALE)
-               {
-                       p_ptr->ht = randnor(rp_ptr->f_b_ht, rp_ptr->f_m_ht);
-                       h_percent = (int)(p_ptr->ht) * 100 / (int)(rp_ptr->f_b_ht);
-                       p_ptr->wt = randnor((int)(rp_ptr->f_b_wt) * h_percent /100
-                                           , (int)(rp_ptr->f_m_wt) * h_percent / 300 );
-               }
-
-               check_experience();
-
-               /* Hitdice */
-               if (p_ptr->pclass == CLASS_SORCERER)
-                       p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
-               else
-                       p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
-
-               do_cmd_rerate(FALSE);
-
-               p_ptr->redraw |= (PR_BASIC);
-
-               p_ptr->update |= (PU_BONUS);
-
-               handle_stuff();
-               lite_spot(py, px);
+               /* Turn into a vampire */
+               change_race(RACE_VAMPIRE, "");
        }
 
        /* Recalculate bonuses */
@@ -633,58 +638,77 @@ msg_print("
        calc_android_exp();
 }
 
-
+/*!
+ * @brief 持ち替え処理
+ * @param item 持ち替えを行いたい装備部位ID
+ * @return なし
+ */
 void kamaenaoshi(int item)
 {
-       object_type *o_ptr, *o2_ptr;
+       object_type *o_ptr, *new_o_ptr;
        char o_name[MAX_NLEN];
 
-       if ((item == INVEN_RARM) && buki_motteruka(INVEN_LARM))
+       if (item == INVEN_RARM)
        {
-               o_ptr = &inventory[INVEN_RARM];
-               o2_ptr = &inventory[INVEN_LARM];
-               object_copy(o_ptr, o2_ptr);
-               p_ptr->total_weight += o2_ptr->weight;
-               inven_item_increase(INVEN_LARM,-1);
-               inven_item_optimize(INVEN_LARM);
-               object_desc(o_name, o_ptr, TRUE, 3);
-               if (((o_ptr->weight > 99) || (o_ptr->tval == TV_POLEARM)) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE)))
+               if (buki_motteruka(INVEN_LARM))
+               {
+                       o_ptr = &inventory[INVEN_LARM];
+                       object_desc(o_name, o_ptr, 0);
+
+                       if (!object_is_cursed(o_ptr))
+                       {
+                               new_o_ptr = &inventory[INVEN_RARM];
+                               object_copy(new_o_ptr, o_ptr);
+                               p_ptr->total_weight += o_ptr->weight;
+                               inven_item_increase(INVEN_LARM, -((int)o_ptr->number));
+                               inven_item_optimize(INVEN_LARM);
+                               if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
 #ifdef JP
-                       msg_format("%s¤òξ¼ê¤Ç¹½¤¨¤¿¡£", o_name );
+                                       msg_format("%sを両手で構えた。", o_name);
 #else
-                       msg_format("You are wielding %s with both hands.", o_name );
+                                       msg_format("You are wielding %s with both hands.", o_name);
 #endif
-                else
+                                else
 #ifdef JP
-                       msg_format("%s¤ò%s¤Ç¹½¤¨¤¿¡£", o_name, (left_hander ? "º¸¼ê" : "±¦¼ê"));
+                                       msg_format("%sを%sで構えた。", o_name, (left_hander ? "左手" : "右手"));
 #else
-                       msg_format("You are wielding %s on %s hand.", o_name, (left_hander ? "left":"right") );
+                                       msg_format("You are wielding %s in your %s hand.", o_name, (left_hander ? "left":"right"));
 #endif
+                       }
+                       else
+                       {
+                               if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
+#ifdef JP
+                                       msg_format("%sを両手で構えた。", o_name);
+#else
+                                       msg_format("You are wielding %s with both hands.", o_name);
+#endif
+                       }
+               }
        }
        else if (item == INVEN_LARM)
        {
+               o_ptr = &inventory[INVEN_RARM];
+               if (o_ptr->k_idx) object_desc(o_name, o_ptr, 0);
+
                if (buki_motteruka(INVEN_RARM))
                {
-                       o_ptr = &inventory[INVEN_RARM];
-                       object_desc(o_name, o_ptr, TRUE, 3);
-                       if (((o_ptr->weight > 99) || (o_ptr->tval == TV_POLEARM)) && (!p_ptr->riding || (p_ptr->pet_extra_flags & PF_RYOUTE)))
+                       if (object_allow_two_hands_wielding(o_ptr) && CAN_TWO_HANDS_WIELDING())
 #ifdef JP
-                               msg_format("%s¤òξ¼ê¤Ç¹½¤¨¤¿¡£", o_name );
+                               msg_format("%sを両手で構えた。", o_name);
 #else
-                               msg_format("You are wielding %s with both hands.", o_name );
+                               msg_format("You are wielding %s with both hands.", o_name);
 #endif
                }
-               else if (!(empty_hands(FALSE) & EMPTY_HAND_RARM))
+               else if (!(empty_hands(FALSE) & EMPTY_HAND_RARM) && !object_is_cursed(o_ptr))
                {
-                       o_ptr = &inventory[INVEN_LARM];
-                       o2_ptr = &inventory[INVEN_RARM];
-                       object_copy(o_ptr, o2_ptr);
-                       p_ptr->total_weight += o2_ptr->weight;
-                       inven_item_increase(INVEN_RARM,-1);
+                       new_o_ptr = &inventory[INVEN_LARM];
+                       object_copy(new_o_ptr, o_ptr);
+                       p_ptr->total_weight += o_ptr->weight;
+                       inven_item_increase(INVEN_RARM, -((int)o_ptr->number));
                        inven_item_optimize(INVEN_RARM);
-                       object_desc(o_name, o_ptr, TRUE, 3);
 #ifdef JP
-                       msg_format("%s¤ò»ý¤ÁÂؤ¨¤¿¡£", o_name);
+                       msg_format("%sを持ち替えた。", o_name);
 #else
                        msg_format("You switched hand of %s.", o_name);
 #endif
@@ -693,8 +717,9 @@ void kamaenaoshi(int item)
 }
 
 
-/*
- * Take off an item
+/*!
+ * @brief 装備を外すコマンドのメインルーチン / Take off an item
+ * @return なし
  */
 void do_cmd_takeoff(void)
 {
@@ -712,8 +737,8 @@ void do_cmd_takeoff(void)
        item_tester_no_ryoute = TRUE;
        /* Get an item */
 #ifdef JP
-       q = "¤É¤ì¤òÁõÈ÷¤«¤é¤Ï¤º¤·¤Þ¤¹¤«? ";
-       s = "¤Ï¤º¤»¤ëÁõÈ÷¤¬¤Ê¤¤¡£";
+       q = "どれを装備からはずしますか? ";
+       s = "はずせる装備がない。";
 #else
        q = "Take off which item? ";
        s = "You are not wearing anything to take off.";
@@ -735,13 +760,13 @@ void do_cmd_takeoff(void)
 
 
        /* Item is cursed */
-       if (cursed_p(o_ptr))
+       if (object_is_cursed(o_ptr))
        {
                if ((o_ptr->curse_flags & TRC_PERMA_CURSE) || (p_ptr->pclass != CLASS_BERSERKER))
                {
                        /* Oops */
 #ifdef JP
-                       msg_print("¤Õ¡¼¤à¡¢¤É¤¦¤ä¤é¼ö¤ï¤ì¤Æ¤¤¤ë¤è¤¦¤À¡£");
+                       msg_print("ふーむ、どうやら呪われているようだ。");
 #else
                        msg_print("Hmmm, it seems to be cursed.");
 #endif
@@ -753,7 +778,7 @@ void do_cmd_takeoff(void)
                if (((o_ptr->curse_flags & TRC_HEAVY_CURSE) && one_in_(7)) || one_in_(4))
                {
 #ifdef JP
-                       msg_print("¼ö¤ï¤ì¤¿ÁõÈ÷¤òÎϤŤ¯¤ÇÇí¤¬¤·¤¿¡ª");
+                       msg_print("呪われた装備を力づくで剥がした!");
 #else
                        msg_print("You teared a cursed equipment off by sheer strength!");
 #endif
@@ -773,7 +798,7 @@ void do_cmd_takeoff(void)
                        p_ptr->window |= (PW_EQUIP);
 
 #ifdef JP
-                       msg_print("¼ö¤¤¤òÂǤÁÇˤä¿¡£");
+                       msg_print("呪いを打ち破った。");
 #else
                        msg_print("You break the curse.");
 #endif
@@ -781,7 +806,7 @@ void do_cmd_takeoff(void)
                else
                {
 #ifdef JP
-                       msg_print("ÁõÈ÷¤ò³°¤»¤Ê¤«¤Ã¤¿¡£");
+                       msg_print("装備を外せなかった。");
 #else
                        msg_print("You couldn't remove the equipment.");
 #endif
@@ -804,8 +829,9 @@ void do_cmd_takeoff(void)
 }
 
 
-/*
- * Drop an item
+/*!
+ * @brief アイテムを落とすコマンドのメインルーチン / Drop an item
+ * @return なし
  */
 void do_cmd_drop(void)
 {
@@ -823,8 +849,8 @@ void do_cmd_drop(void)
        item_tester_no_ryoute = TRUE;
        /* Get an item */
 #ifdef JP
-       q = "¤É¤Î¥¢¥¤¥Æ¥à¤òÍî¤È¤·¤Þ¤¹¤«? ";
-       s = "Íî¤È¤»¤ë¥¢¥¤¥Æ¥à¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£";
+       q = "どのアイテムを落としますか? ";
+       s = "落とせるアイテムを持っていない。";
 #else
        q = "Drop which item? ";
        s = "You have nothing to drop.";
@@ -846,11 +872,11 @@ void do_cmd_drop(void)
 
 
        /* Hack -- Cannot remove cursed items */
-       if ((item >= INVEN_RARM) && cursed_p(o_ptr))
+       if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
        {
                /* Oops */
 #ifdef JP
-               msg_print("¤Õ¡¼¤à¡¢¤É¤¦¤ä¤é¼ö¤ï¤ì¤Æ¤¤¤ë¤è¤¦¤À¡£");
+               msg_print("ふーむ、どうやら呪われているようだ。");
 #else
                msg_print("Hmmm, it seems to be cursed.");
 #endif
@@ -878,14 +904,20 @@ void do_cmd_drop(void)
        /* Drop (some of) the item */
        inven_drop(item, amt);
 
-       if ((item == INVEN_RARM) || (item == INVEN_LARM)) kamaenaoshi(item);
-
-       if (item >= INVEN_RARM) calc_android_exp();
+       if (item >= INVEN_RARM)
+       {
+               kamaenaoshi(item);
+               calc_android_exp();
+       }
 
        p_ptr->redraw |= (PR_EQUIPPY);
 }
 
-
+/*!
+ * @brief オブジェクトが高位の魔法書かどうかを判定する
+ * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
+ * @return オブジェクトが高位の魔法書ならばTRUEを返す
+ */
 static bool high_level_book(object_type *o_ptr)
 {
        if ((o_ptr->tval == TV_LIFE_BOOK) ||
@@ -894,10 +926,11 @@ static bool high_level_book(object_type *o_ptr)
            (o_ptr->tval == TV_CHAOS_BOOK) ||
            (o_ptr->tval == TV_DEATH_BOOK) ||
            (o_ptr->tval == TV_TRUMP_BOOK) ||
-           (o_ptr->tval == TV_ENCHANT_BOOK) ||
+           (o_ptr->tval == TV_CRAFT_BOOK) ||
            (o_ptr->tval == TV_DAEMON_BOOK) ||
            (o_ptr->tval == TV_CRUSADE_BOOK) ||
-           (o_ptr->tval == TV_MUSIC_BOOK))
+           (o_ptr->tval == TV_MUSIC_BOOK) ||
+               (o_ptr->tval == TV_HEX_BOOK))
        {
                if (o_ptr->sval > 1)
                        return TRUE;
@@ -909,8 +942,9 @@ static bool high_level_book(object_type *o_ptr)
 }
 
 
-/*
- * Destroy an item
+/*!
+ * @brief アイテムを破壊するコマンドのメインルーチン / Destroy an item
+ * @return なし
  */
 void do_cmd_destroy(void)
 {
@@ -940,8 +974,8 @@ void do_cmd_destroy(void)
 
        /* Get an item */
 #ifdef JP
-       q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò²õ¤·¤Þ¤¹¤«? ";
-       s = "²õ¤»¤ë¥¢¥¤¥Æ¥à¤ò»ý¤Ã¤Æ¤¤¤Ê¤¤¡£";
+       q = "どのアイテムを壊しますか? ";
+       s = "壊せるアイテムを持っていない。";
 #else
        q = "Destroy which item? ";
        s = "You have nothing to destroy.";
@@ -961,31 +995,15 @@ void do_cmd_destroy(void)
                o_ptr = &o_list[0 - item];
        }
 
-
-       /* See how many items */
-       if (o_ptr->number > 1)
-       {
-               /* Get a quantity */
-               amt = get_quantity(NULL, o_ptr->number);
-
-               /* Allow user abort */
-               if (amt <= 0) return;
-       }
-
-
-       /* Describe the object */
-       old_number = o_ptr->number;
-       o_ptr->number = amt;
-       object_desc(o_name, o_ptr, TRUE, 3);
-       o_ptr->number = old_number;
-
-       /* Verify unless quantity given */
+       /* Verify unless quantity given beforehand */
        if (!force && (confirm_destroy || (object_value(o_ptr) > 0)))
        {
+               object_desc(o_name, o_ptr, OD_OMIT_PREFIX);
+
                /* Make a verification */
                sprintf(out_val, 
 #ifdef JP
-                       "ËÜÅö¤Ë%s¤ò²õ¤·¤Þ¤¹¤«? [y/n/Auto]",
+                       "本当に%sを壊しますか? [y/n/Auto]",
 #else
                        "Really destroy %s? [y/n/Auto]",
 #endif
@@ -1021,24 +1039,38 @@ void do_cmd_destroy(void)
                                /* Cancel */
                                return;
                        }
-                       if (i == 'a' || i == 'A')
+                       if (i == 'A')
                        {
-                               int idx;
-
                                /* Add an auto-destroy preference line */
-                               if (add_auto_register(o_ptr))
+                               if (autopick_autoregister(o_ptr))
                                {
                                        /* Auto-destroy it */
-                                       idx = is_autopick(o_ptr);
-                                       auto_destroy_item(item, idx);
+                                       autopick_alter_item(item, TRUE);
                                }
 
                                /* The object is already destroyed. */
                                return;
                        }
-               }
+               } /* while (TRUE) */
+       }
+
+       /* See how many items */
+       if (o_ptr->number > 1)
+       {
+               /* Get a quantity */
+               amt = get_quantity(NULL, o_ptr->number);
+
+               /* Allow user abort */
+               if (amt <= 0) return;
        }
 
+
+       /* Describe the object */
+       old_number = o_ptr->number;
+       o_ptr->number = amt;
+       object_desc(o_name, o_ptr, 0);
+       o_ptr->number = old_number;
+
        /* Take a turn */
        energy_use = 100;
 
@@ -1049,7 +1081,7 @@ void do_cmd_destroy(void)
 
                /* Message */
 #ifdef JP
-               msg_format("%s¤ÏÇ˲õÉÔ²Äǽ¤À¡£", o_name);
+               msg_format("%sは破壊不可能だ。", o_name);
 #else
                msg_format("You cannot destroy %s.", o_name);
 #endif
@@ -1062,7 +1094,7 @@ void do_cmd_destroy(void)
 
        /* Message */
 #ifdef JP
-       msg_format("%s¤ò²õ¤·¤¿¡£", o_name);
+       msg_format("%sを壊した。", o_name);
 #else
        msg_format("You destroy %s.", o_name);
 #endif
@@ -1119,7 +1151,7 @@ void do_cmd_destroy(void)
                        if (tester_exp<1) tester_exp = 1;
 
 #ifdef JP
-msg_print("¹¹¤Ë·Ð¸³¤òÀѤó¤À¤è¤¦¤Êµ¤¤¬¤¹¤ë¡£");
+msg_print("更に経験を積んだような気がする。");
 #else
                        msg_print("You feel more experienced.");
 #endif
@@ -1154,8 +1186,9 @@ msg_print("
 }
 
 
-/*
- * Observe an item which has been *identify*-ed
+/*!
+ * @brief アイテムを調査するコマンドのメインルーチン / Observe an item which has been *identify*-ed
+ * @return なし
  */
 void do_cmd_observe(void)
 {
@@ -1170,8 +1203,8 @@ void do_cmd_observe(void)
        item_tester_no_ryoute = TRUE;
        /* Get an item */
 #ifdef JP
-       q = "¤É¤Î¥¢¥¤¥Æ¥à¤òÄ´¤Ù¤Þ¤¹¤«? ";
-       s = "Ä´¤Ù¤é¤ì¤ë¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
+       q = "どのアイテムを調べますか? ";
+       s = "調べられるアイテムがない。";
 #else
        q = "Examine which item? ";
        s = "You have nothing to examine.";
@@ -1196,7 +1229,7 @@ void do_cmd_observe(void)
        if (!(o_ptr->ident & IDENT_MENTAL))
        {
 #ifdef JP
-               msg_print("¤³¤Î¥¢¥¤¥Æ¥à¤Ë¤Ä¤¤¤ÆÆäËÃΤäƤ¤¤ë¤³¤È¤Ï¤Ê¤¤¡£");
+               msg_print("このアイテムについて特に知っていることはない。");
 #else
                msg_print("You have no special knowledge about that item.");
 #endif
@@ -1206,29 +1239,30 @@ void do_cmd_observe(void)
 
 
        /* Description */
-       object_desc(o_name, o_ptr, TRUE, 3);
+       object_desc(o_name, o_ptr, 0);
 
        /* Describe */
 #ifdef JP
-       msg_format("%s¤òÄ´¤Ù¤Æ¤¤¤ë...", o_name);
+       msg_format("%sを調べている...", o_name);
 #else
        msg_format("Examining %s...", o_name);
 #endif
 
        /* Describe it fully */
 #ifdef JP
-       if (!screen_object(o_ptr, TRUE)) msg_print("ÆäËÊѤï¤Ã¤¿¤È¤³¤í¤Ï¤Ê¤¤¤è¤¦¤À¡£");
+       if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL)) msg_print("特に変わったところはないようだ。");
 #else
-       if (!screen_object(o_ptr, TRUE)) msg_print("You see nothing special.");
+       if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL)) msg_print("You see nothing special.");
 #endif
 
 }
 
 
 
-/*
- * Remove the inscription from an object
- * XXX Mention item (when done)?
+/*!
+ * @brief アイテムの銘を消すコマンドのメインルーチン
+ * Remove the inscription from an object XXX Mention item (when done)?
+ * @return なし
  */
 void do_cmd_uninscribe(void)
 {
@@ -1241,8 +1275,8 @@ void do_cmd_uninscribe(void)
        item_tester_no_ryoute = TRUE;
        /* Get an item */
 #ifdef JP
-       q = "¤É¤Î¥¢¥¤¥Æ¥à¤ÎÌäò¾Ã¤·¤Þ¤¹¤«? ";
-       s = "Ìäò¾Ã¤»¤ë¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
+       q = "どのアイテムの銘を消しますか? ";
+       s = "銘を消せるアイテムがない。";
 #else
        q = "Un-inscribe which item? ";
        s = "You have nothing to un-inscribe.";
@@ -1266,7 +1300,7 @@ void do_cmd_uninscribe(void)
        if (!o_ptr->inscription)
        {
 #ifdef JP
-               msg_print("¤³¤Î¥¢¥¤¥Æ¥à¤Ë¤Ï¾Ã¤¹¤Ù¤­Ì䬤ʤ¤¡£");
+               msg_print("このアイテムには消すべき銘がない。");
 #else
                msg_print("That item had no inscription to remove.");
 #endif
@@ -1276,7 +1310,7 @@ void do_cmd_uninscribe(void)
 
        /* Message */
 #ifdef JP
-       msg_print("Ìäò¾Ã¤·¤¿¡£");
+       msg_print("銘を消した。");
 #else
        msg_print("Inscription removed.");
 #endif
@@ -1291,14 +1325,16 @@ void do_cmd_uninscribe(void)
        /* Window stuff */
        p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-       /* .¤ä$¤Î´Ø·¸¤Ç, ºÆ·×»»¤¬É¬ÍפʤϤº -- henkma */
+       /* .や$の関係で, 再計算が必要なはず -- henkma */
        p_ptr->update |= (PU_BONUS);
 
 }
 
 
-/*
+/*!
+ * @brief アイテムの銘を刻むコマンドのメインルーチン
  * Inscribe an object with a comment
+ * @return なし
  */
 void do_cmd_inscribe(void)
 {
@@ -1315,8 +1351,8 @@ void do_cmd_inscribe(void)
        item_tester_no_ryoute = TRUE;
        /* Get an item */
 #ifdef JP
-       q = "¤É¤Î¥¢¥¤¥Æ¥à¤ËÌäò¹ï¤ß¤Þ¤¹¤«? ";
-       s = "Ìäò¹ï¤á¤ë¥¢¥¤¥Æ¥à¤¬¤Ê¤¤¡£";
+       q = "どのアイテムに銘を刻みますか? ";
+       s = "銘を刻めるアイテムがない。";
 #else
        q = "Inscribe which item? ";
        s = "You have nothing to inscribe.";
@@ -1337,11 +1373,11 @@ void do_cmd_inscribe(void)
        }
 
        /* Describe the activity */
-       object_desc(o_name, o_ptr, TRUE, 2);
+       object_desc(o_name, o_ptr, OD_OMIT_INSCRIPTION);
 
        /* Message */
 #ifdef JP
-       msg_format("%s¤ËÌäò¹ï¤à¡£", o_name);
+       msg_format("%sに銘を刻む。", o_name);
 #else
        msg_format("Inscribing %s.", o_name);
 #endif
@@ -1360,7 +1396,7 @@ void do_cmd_inscribe(void)
 
        /* Get a new inscription (possibly empty) */
 #ifdef JP
-       if (get_string("ÌÃ: ", out_val, 80))
+       if (get_string(": ", out_val, 80))
 #else
        if (get_string("Inscription: ", out_val, 80))
 #endif
@@ -1374,15 +1410,18 @@ void do_cmd_inscribe(void)
                /* Window stuff */
                p_ptr->window |= (PW_INVEN | PW_EQUIP);
 
-               /* .¤ä$¤Î´Ø·¸¤Ç, ºÆ·×»»¤¬É¬ÍפʤϤº -- henkma */
+               /* .や$の関係で, 再計算が必要なはず -- henkma */
                p_ptr->update |= (PU_BONUS);
        }
 }
 
 
 
-/*
+/*!
+ * @brief オブジェクトがランタンの燃料になるかどうかを判定する
  * An "item_tester_hook" for refilling lanterns
+ * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
+ * @return オブジェクトがランタンの燃料になるならばTRUEを返す
  */
 static bool item_tester_refill_lantern(object_type *o_ptr)
 {
@@ -1398,8 +1437,10 @@ static bool item_tester_refill_lantern(object_type *o_ptr)
 }
 
 
-/*
+/*!
+ * @brief ランタンに燃料を加えるコマンドのメインルーチン
  * Refill the players lamp (from the pack or floor)
+ * @return なし
  */
 static void do_cmd_refill_lamp(void)
 {
@@ -1416,8 +1457,8 @@ static void do_cmd_refill_lamp(void)
 
        /* Get an item */
 #ifdef JP
-       q = "¤É¤ÎÌý¤Ä¤Ü¤«¤éÃí¤®¤Þ¤¹¤«? ";
-       s = "Ìý¤Ä¤Ü¤¬¤Ê¤¤¡£";
+       q = "どの油つぼから注ぎますか? ";
+       s = "油つぼがない。";
 #else
        q = "Refill with which flask? ";
        s = "You have no flasks of oil.";
@@ -1449,7 +1490,7 @@ static void do_cmd_refill_lamp(void)
 
        /* Message */
 #ifdef JP
-       msg_print("¥é¥ó¥×¤ËÌý¤òÃí¤¤¤À¡£");
+       msg_print("ランプに油を注いだ。");
 #else
        msg_print("You fuel your lamp.");
 #endif
@@ -1459,7 +1500,7 @@ static void do_cmd_refill_lamp(void)
        {
                j_ptr->xtra4 = 0;
 #ifdef JP
-               msg_print("¥é¥ó¥×¤¬¾Ã¤¨¤Æ¤·¤Þ¤Ã¤¿¡ª");
+               msg_print("ランプが消えてしまった!");
 #else
                msg_print("Your lamp has gone out!");
 #endif
@@ -1468,7 +1509,7 @@ static void do_cmd_refill_lamp(void)
        {
                j_ptr->xtra4 = 0;
 #ifdef JP
-               msg_print("¤·¤«¤·¥é¥ó¥×¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£");
+               msg_print("しかしランプは全く光らない。");
 #else
                msg_print("Curiously, your lamp doesn't light.");
 #endif
@@ -1477,7 +1518,7 @@ static void do_cmd_refill_lamp(void)
        {
                j_ptr->xtra4 = FUEL_LAMP;
 #ifdef JP
-               msg_print("¥é¥ó¥×¤ÎÌý¤Ï°ìÇÕ¤À¡£");
+               msg_print("ランプの油は一杯だ。");
 #else
                msg_print("Your lamp is full.");
 #endif
@@ -1505,8 +1546,11 @@ static void do_cmd_refill_lamp(void)
 }
 
 
-/*
+/*!
+ * @brief オブジェクトが松明に束ねられるかどうかを判定する
  * An "item_tester_hook" for refilling torches
+ * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
+ * @return オブジェクトが松明に束ねられるならばTRUEを返す
  */
 static bool item_tester_refill_torch(object_type *o_ptr)
 {
@@ -1519,8 +1563,10 @@ static bool item_tester_refill_torch(object_type *o_ptr)
 }
 
 
-/*
+/*!
+ * @brief 松明を束ねるコマンドのメインルーチン
  * Refuel the players torch (from the pack or floor)
+ * @return なし
  */
 static void do_cmd_refill_torch(void)
 {
@@ -1537,8 +1583,8 @@ static void do_cmd_refill_torch(void)
 
        /* Get an item */
 #ifdef JP
-       q = "¤É¤Î¾¾ÌÀ¤ÇÌÀ¤«¤ê¤ò¶¯¤á¤Þ¤¹¤«? ";
-       s = "¾¤Ë¾¾ÌÀ¤¬¤Ê¤¤¡£";
+       q = "どの松明で明かりを強めますか? ";
+       s = "他に松明がない。";
 #else
        q = "Refuel with which torch? ";
        s = "You have no extra torches.";
@@ -1570,7 +1616,7 @@ static void do_cmd_refill_torch(void)
 
        /* Message */
 #ifdef JP
-       msg_print("¾¾ÌÀ¤ò·ë¹ç¤·¤¿¡£");
+       msg_print("松明を結合した。");
 #else
        msg_print("You combine the torches.");
 #endif
@@ -1581,7 +1627,7 @@ static void do_cmd_refill_torch(void)
        {
                j_ptr->xtra4 = 0;
 #ifdef JP
-               msg_print("¾¾ÌÀ¤¬¾Ã¤¨¤Æ¤·¤Þ¤Ã¤¿¡ª");
+               msg_print("松明が消えてしまった!");
 #else
                msg_print("Your torch has gone out!");
 #endif
@@ -1590,7 +1636,7 @@ static void do_cmd_refill_torch(void)
        {
                j_ptr->xtra4 = 0;
 #ifdef JP
-               msg_print("¤·¤«¤·¾¾ÌÀ¤ÏÁ´¤¯¸÷¤é¤Ê¤¤¡£");
+               msg_print("しかし松明は全く光らない。");
 #else
                msg_print("Curiously, your torche don't light.");
 #endif
@@ -1600,7 +1646,7 @@ static void do_cmd_refill_torch(void)
        {
                j_ptr->xtra4 = FUEL_TORCH;
 #ifdef JP
-               msg_print("¾¾ÌÀ¤Î¼÷Ì¿¤Ï½½Ê¬¤À¡£");
+               msg_print("松明の寿命は十分だ。");
 #else
                msg_print("Your torch is fully fueled.");
 #endif
@@ -1611,7 +1657,7 @@ static void do_cmd_refill_torch(void)
        else
        {
 #ifdef JP
-               msg_print("¾¾ÌÀ¤Ï¤¤¤Ã¤½¤¦ÌÀ¤ë¤¯µ±¤¤¤¿¡£");
+               msg_print("松明はいっそう明るく輝いた。");
 #else
                msg_print("Your torch glows more brightly.");
 #endif
@@ -1639,8 +1685,10 @@ static void do_cmd_refill_torch(void)
 }
 
 
-/*
+/*!
+ * @brief 燃料を補充するコマンドのメインルーチン
  * Refill the players lamp, or restock his torches
+ * @return なし
  */
 void do_cmd_refill(void)
 {
@@ -1658,7 +1706,7 @@ void do_cmd_refill(void)
        if (o_ptr->tval != TV_LITE)
        {
 #ifdef JP
-               msg_print("¸÷¸»¤òÁõÈ÷¤·¤Æ¤¤¤Ê¤¤¡£");
+               msg_print("光源を装備していない。");
 #else
                msg_print("You are not wielding a light.");
 #endif
@@ -1681,7 +1729,7 @@ void do_cmd_refill(void)
        else
        {
 #ifdef JP
-               msg_print("¤³¤Î¸÷¸»¤Ï¼÷Ì¿¤ò±ä¤Ð¤»¤Ê¤¤¡£");
+               msg_print("この光源は寿命を延ばせない。");
 #else
                msg_print("Your light cannot be refilled.");
 #endif
@@ -1690,8 +1738,10 @@ void do_cmd_refill(void)
 }
 
 
-/*
+/*!
+ * @brief ターゲットを設定するコマンドのメインルーチン
  * Target command
+ * @return なし
  */
 void do_cmd_target(void)
 {
@@ -1699,7 +1749,7 @@ void do_cmd_target(void)
        if (target_set(TARGET_KILL))
        {
 #ifdef JP
-               msg_print("¥¿¡¼¥²¥Ã¥È·èÄê¡£");
+               msg_print("ターゲット決定。");
 #else
                msg_print("Target Selected.");
 #endif
@@ -1710,7 +1760,7 @@ void do_cmd_target(void)
        else
        {
 #ifdef JP
-               msg_print("¥¿¡¼¥²¥Ã¥È²ò½ü¡£");
+               msg_print("ターゲット解除。");
 #else
                msg_print("Target Aborted.");
 #endif
@@ -1720,16 +1770,23 @@ void do_cmd_target(void)
 
 
 
-/*
+/*!
+ * @brief 周囲を見渡すコマンドのメインルーチン
  * Look command
+ * @return なし
  */
 void do_cmd_look(void)
 {
+       /*TEST*/
+       p_ptr->window |= PW_MONSTER_LIST;
+       window_stuff();
+       /*TEST*/
+
        /* Look around */
        if (target_set(TARGET_LOOK))
        {
 #ifdef JP
-               msg_print("¥¿¡¼¥²¥Ã¥È·èÄê¡£");
+               msg_print("ターゲット決定。");
 #else
                msg_print("Target Selected.");
 #endif
@@ -1738,9 +1795,10 @@ void do_cmd_look(void)
 }
 
 
-
-/*
+/*!
+ * @brief 位置を確認するコマンドのメインルーチン
  * Allow the player to examine other sectors on the map
+ * @return なし
  */
 void do_cmd_locate(void)
 {
@@ -1767,7 +1825,7 @@ void do_cmd_locate(void)
                if ((y2 == y1) && (x2 == x1))
                {
 #ifdef JP
-                       strcpy(tmp_val, "¿¿¾å");
+                       strcpy(tmp_val, "真上");
 #else
                        tmp_val[0] = '\0';
 #endif
@@ -1777,8 +1835,8 @@ void do_cmd_locate(void)
                {
 #ifdef JP
                        sprintf(tmp_val, "%s%s",
-                               ((y2 < y1) ? "ËÌ" : (y2 > y1) ? "Æî" : ""),
-                               ((x2 < x1) ? "À¾" : (x2 > x1) ? "Åì" : ""));
+                               ((y2 < y1) ? "北" : (y2 > y1) ? "南" : ""),
+                               ((x2 < x1) ? "西" : (x2 > x1) ? "東" : ""));
 #else
                        sprintf(tmp_val, "%s%s of",
                                ((y2 < y1) ? " North" : (y2 > y1) ? " South" : ""),
@@ -1790,7 +1848,7 @@ void do_cmd_locate(void)
                /* Prepare to ask which way to look */
                sprintf(out_val,
 #ifdef JP
-                       "¥Þ¥Ã¥×°ÌÃÖ [%d(%02d),%d(%02d)] (¥×¥ì¥¤¥ä¡¼¤Î%s)  Êý¸þ?",
+                       "マップ位置 [%d(%02d),%d(%02d)] (プレイヤーの%s)  方向?",
 #else
                        "Map sector [%d(%02d),%d(%02d)], which is%s your sector.  Direction?",
 #endif
@@ -1846,9 +1904,14 @@ void do_cmd_locate(void)
 
 
 
-/*
+/*!
+ * @brief モンスター種族情報を特定の基準によりソートするための比較処理
  * Sorting hook -- Comp function -- see below
- *
+ * @param u モンスター種族情報の入れるポインタ
+ * @param v 条件基準ID
+ * @param a 比較するモンスター種族のID1
+ * @param b 比較するモンスター種族のID2
+ * @return 2の方が大きければTRUEを返す
  * We use "u" to point to array of monster indexes,
  * and "v" to select the type of sorting to perform on "u".
  */
@@ -1920,9 +1983,15 @@ bool ang_sort_comp_hook(vptr u, vptr v, int a, int b)
 }
 
 
-/*
+/*!
+ * @brief モンスター種族情報を特定の基準によりソートするためのスワップ処理
  * Sorting hook -- Swap function -- see below
- *
+ * @param u モンスター種族情報の入れるポインタ
+ * @param v 未使用
+ * @param a スワップするモンスター種族のID1
+ * @param b スワップするモンスター種族のID2
+ * @return なし
+ * @details
  * We use "u" to point to array of monster indexes,
  * and "v" to select the type of sorting to perform.
  */
@@ -1943,9 +2012,12 @@ void ang_sort_swap_hook(vptr u, vptr v, int a, int b)
 
 
 
-/*
+/*!
+ * @brief モンスターの思い出を見るコマンドのメインルーチン
  * Identify a character, allow recall of monsters
- *
+ * @return なし
+ * @details
+ * <pre>
  * Several "special" responses recall "multiple" monsters:
  *   ^A (all monsters)
  *   ^U (all unique monsters)
@@ -1954,6 +2026,7 @@ void ang_sort_swap_hook(vptr u, vptr v, int a, int b)
  * The responses may be sorted in several ways, see below.
  *
  * Note that the player ghosts are ignored. XXX XXX XXX
+ * </pre>
  */
 void do_cmd_query_symbol(void)
 {
@@ -1974,7 +2047,7 @@ void do_cmd_query_symbol(void)
 
        /* Get a character, or abort */
 #ifdef JP
-       if (!get_com("ÃΤꤿ¤¤Ê¸»ú¤òÆþÎϤ·¤Æ²¼¤µ¤¤(µ­¹æ or ^AÁ´,^U¥æ,^NÈó¥æ,^R¾èÇÏ,^M̾Á°): ", &sym, FALSE)) return;
+       if (!get_com("知りたい文字を入力して下さい(記号 or ^A全,^Uユ,^N非ユ,^R乗馬,^M名前): ", &sym, FALSE)) return;
 #else
        if (!get_com("Enter character to be identified(^A:All,^U:Uniqs,^N:Non uniqs,^M:Name): ", &sym, FALSE)) return;
 #endif
@@ -1990,7 +2063,7 @@ void do_cmd_query_symbol(void)
        {
                all = TRUE;
 #ifdef JP
-               strcpy(buf, "Á´¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
+               strcpy(buf, "全モンスターのリスト");
 #else
                strcpy(buf, "Full monster list.");
 #endif
@@ -1999,7 +2072,7 @@ void do_cmd_query_symbol(void)
        {
                all = uniq = TRUE;
 #ifdef JP
-               strcpy(buf, "¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
+               strcpy(buf, "ユニーク・モンスターのリスト");
 #else
                strcpy(buf, "Unique monster list.");
 #endif
@@ -2008,7 +2081,7 @@ void do_cmd_query_symbol(void)
        {
                all = norm = TRUE;
 #ifdef JP
-               strcpy(buf, "¥æ¥Ë¡¼¥¯³°¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
+               strcpy(buf, "ユニーク外モンスターのリスト");
 #else
                strcpy(buf, "Non-unique monster list.");
 #endif
@@ -2017,7 +2090,7 @@ void do_cmd_query_symbol(void)
        {
                all = ride = TRUE;
 #ifdef JP
-               strcpy(buf, "¾èÇϲÄǽ¥â¥ó¥¹¥¿¡¼¤Î¥ê¥¹¥È");
+               strcpy(buf, "乗馬可能モンスターのリスト");
 #else
                strcpy(buf, "Ridable monster list.");
 #endif
@@ -2027,7 +2100,7 @@ void do_cmd_query_symbol(void)
        {
                all = TRUE;
 #ifdef JP
-               if (!get_string("̾Á°(±Ñ¸ì¤Î¾ì¹ç¾®Ê¸»ú¤Ç²Ä)",temp, 70))
+               if (!get_string("名前(英語の場合小文字で可)",temp, 70))
 #else
                if (!get_string("Enter name:",temp, 70))
 #endif
@@ -2036,7 +2109,7 @@ void do_cmd_query_symbol(void)
                        return;
                }
 #ifdef JP
-               sprintf(buf, "̾Á°:%s¤Ë¥Þ¥Ã¥Á",temp);
+               sprintf(buf, "名前:%sにマッチ",temp);
 #else
                sprintf(buf, "Monsters with a name \"%s\"",temp);
 #endif
@@ -2048,7 +2121,7 @@ void do_cmd_query_symbol(void)
        else
        {
 #ifdef JP
-               sprintf(buf, "%c - %s", sym, "̵¸ú¤Êʸ»ú");
+               sprintf(buf, "%c - %s", sym, "無効な文字");
 #else
                sprintf(buf, "%c - %s.", sym, "Unknown Symbol");
 #endif
@@ -2100,9 +2173,9 @@ void do_cmd_query_symbol(void)
                    if (isupper(temp2[xx])) temp2[xx]=tolower(temp2[xx]);
   
 #ifdef JP
-                 if (strstr(temp2, temp) || strstr_j(r_name + r_ptr->name, temp) )
+                 if (my_strstr(temp2, temp) || my_strstr(r_name + r_ptr->name, temp) )
 #else
-                 if (strstr(temp2, temp))
+                 if (my_strstr(temp2, temp))
 #endif
                          who[n++]=i;
                }
@@ -2123,7 +2196,7 @@ void do_cmd_query_symbol(void)
 
        /* Prompt XXX XXX XXX */
 #ifdef JP
-       put_str("»×¤¤½Ð¤ò¸«¤Þ¤¹¤«? (k:»¦³²½ç/y/n): ", 0, 36);
+       put_str("思い出を見ますか? (k:殺害順/y/n): ", 0, 36);
 #else
        put_str("Recall details? (k/y/n): ", 0, 40);
 #endif
@@ -2205,7 +2278,7 @@ void do_cmd_query_symbol(void)
 
                        /* Hack -- Complete the prompt */
 #ifdef JP
-                       Term_addstr(-1, TERM_WHITE, " ['r'»×¤¤½Ð, ESC]");
+                       Term_addstr(-1, TERM_WHITE, " ['r'思い出, ESC]");
 #else
                        Term_addstr(-1, TERM_WHITE, " [(r)ecall, ESC]");
 #endif