OSDN Git Service

[Refactor] #37353 プレイヤーのアイテム発動処理を cmd-activate.c/h に分離。文字コードミス修正。 / Separate player...
authorDeskull <deskull@users.sourceforge.jp>
Fri, 7 Sep 2018 13:11:28 +0000 (22:11 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Fri, 7 Sep 2018 13:11:28 +0000 (22:11 +0900)
Hengband_vcs2015/Hengband/Hengband.vcxproj
Hengband_vcs2015/Hengband/Hengband.vcxproj.filters
src/cmd-eat.c
src/cmd-quaff.c
src/cmd6.c
src/do-spell.c
src/dungeon.c
src/externs.h

index 9fcdd45..fe6a3ba 100644 (file)
     <ClCompile Include="..\..\src\bldg.c" />\r
     <ClCompile Include="..\..\src\cave.c" />\r
     <ClCompile Include="..\..\src\chuukei.c" />\r
+    <ClCompile Include="..\..\src\cmd-activate.c" />\r
     <ClCompile Include="..\..\src\cmd-eat.c" />\r
     <ClCompile Include="..\..\src\cmd-quaff.c" />\r
     <ClCompile Include="..\..\src\cmd1.c" />\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="..\..\src\angband.h" />\r
+    <ClInclude Include="..\..\src\cmd-activate.h" />\r
     <ClInclude Include="..\..\src\cmd-eat.h" />\r
     <ClInclude Include="..\..\src\cmd-quaff.h" />\r
     <ClInclude Include="..\..\src\defines.h" />\r
index 8f084b5..ec2885c 100644 (file)
     <ClCompile Include="..\..\src\selfinfo.c">\r
       <Filter>Source</Filter>\r
     </ClCompile>\r
-    <ClCompile Include="..\..\src\cmd-eat.c">\r
+    <ClCompile Include="..\..\src\cmd-activate.c">\r
       <Filter>Source</Filter>\r
     </ClCompile>\r
     <ClCompile Include="..\..\src\cmd-quaff.c">\r
       <Filter>Source</Filter>\r
     </ClCompile>\r
+    <ClCompile Include="..\..\src\cmd-eat.c">\r
+      <Filter>Source</Filter>\r
+    </ClCompile>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ClInclude Include="..\..\src\angband.h">\r
     <ClInclude Include="..\..\src\cmd-quaff.h">\r
       <Filter>Header</Filter>\r
     </ClInclude>\r
+    <ClInclude Include="..\..\src\cmd-activate.h">\r
+      <Filter>Header</Filter>\r
+    </ClInclude>\r
   </ItemGroup>\r
   <ItemGroup>\r
     <ResourceCompile Include="..\..\src\angband.rc" />\r
index 590fc5a..e9073fe 100644 (file)
@@ -1,18 +1,18 @@
-/*!\r
+/*!\r
  * @file cmd-eat.c\r
- * @brief \83v\83\8c\83C\83\84\81[\82Ì\90H\82×\82é\83R\83}\83\93\83h\8eÀ\91\95\r
+ * @brief プレイヤーの食べるコマンド実装\r
  * @date 2018/09/07\r
  * @details\r
- * cmd6.c\82æ\82è\95ª\97£\81B\r
+ * cmd6.cより分離。\r
  */\r
 \r
 \r
 #include "angband.h"\r
 \r
 /*!\r
- * @brief \90H\97¿\82ð\90H\82×\82é\83R\83}\83\93\83h\82Ì\83T\83u\83\8b\81[\83`\83\93\r
- * @param item \90H\82×\82é\83I\83u\83W\83F\83N\83g\82Ì\8f\8a\8e\9d\95iID\r
- * @return \82È\82µ\r
+ * @brief 食料を食べるコマンドのサブルーチン\r
+ * @param item 食べるオブジェクトの所持品ID\r
+ * @return なし\r
  */\r
 void do_cmd_eat_food_aux(int item)\r
 {\r
@@ -125,7 +125,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_WEAKNESS:\r
                {\r
-                       take_hit(DAMAGE_NOESCAPE, damroll(6, 6), _("\93Å\93ü\82è\90H\97¿", "poisonous food"), -1);\r
+                       take_hit(DAMAGE_NOESCAPE, damroll(6, 6), _("毒入り食料", "poisonous food"), -1);\r
                        (void)do_dec_stat(A_STR);\r
                        ident = TRUE;\r
                        break;\r
@@ -133,7 +133,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_SICKNESS:\r
                {\r
-                       take_hit(DAMAGE_NOESCAPE, damroll(6, 6), _("\93Å\93ü\82è\90H\97¿", "poisonous food"), -1);\r
+                       take_hit(DAMAGE_NOESCAPE, damroll(6, 6), _("毒入り食料", "poisonous food"), -1);\r
                        (void)do_dec_stat(A_CON);\r
                        ident = TRUE;\r
                        break;\r
@@ -141,7 +141,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_STUPIDITY:\r
                {\r
-                       take_hit(DAMAGE_NOESCAPE, damroll(8, 8), _("\93Å\93ü\82è\90H\97¿", "poisonous food"), -1);\r
+                       take_hit(DAMAGE_NOESCAPE, damroll(8, 8), _("毒入り食料", "poisonous food"), -1);\r
                        (void)do_dec_stat(A_INT);\r
                        ident = TRUE;\r
                        break;\r
@@ -149,7 +149,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_NAIVETY:\r
                {\r
-                       take_hit(DAMAGE_NOESCAPE, damroll(8, 8), _("\93Å\93ü\82è\90H\97¿", "poisonous food"), -1);\r
+                       take_hit(DAMAGE_NOESCAPE, damroll(8, 8), _("毒入り食料", "poisonous food"), -1);\r
                        (void)do_dec_stat(A_WIS);\r
                        ident = TRUE;\r
                        break;\r
@@ -157,7 +157,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_UNHEALTH:\r
                {\r
-                       take_hit(DAMAGE_NOESCAPE, damroll(10, 10), _("\93Å\93ü\82è\90H\97¿", "poisonous food"), -1);\r
+                       take_hit(DAMAGE_NOESCAPE, damroll(10, 10), _("毒入り食料", "poisonous food"), -1);\r
                        (void)do_dec_stat(A_CON);\r
                        ident = TRUE;\r
                        break;\r
@@ -165,7 +165,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_DISEASE:\r
                {\r
-                       take_hit(DAMAGE_NOESCAPE, damroll(10, 10), _("\93Å\93ü\82è\90H\97¿", "poisonous food"), -1);\r
+                       take_hit(DAMAGE_NOESCAPE, damroll(10, 10), _("毒入り食料", "poisonous food"), -1);\r
                        (void)do_dec_stat(A_STR);\r
                        ident = TRUE;\r
                        break;\r
@@ -226,31 +226,31 @@ void do_cmd_eat_food_aux(int item)
 \r
 \r
 #ifdef JP\r
-               /* \82»\82ê\82¼\82ê\82Ì\90H\82×\95¨\82Ì\8a´\91z\82ð\83I\83\8a\83W\83i\83\8b\82æ\82è\8d×\82©\82­\95\\8c» */\r
+               /* それぞれの食べ物の感想をオリジナルより細かく表現 */\r
                case SV_FOOD_BISCUIT:\r
                {\r
-                       msg_print("\8aÃ\82­\82Ä\83T\83N\83T\83N\82µ\82Ä\82Æ\82Ä\82à\82¨\82¢\82µ\82¢\81B");\r
+                       msg_print("甘くてサクサクしてとてもおいしい。");\r
                        ident = TRUE;\r
                        break;\r
                }\r
 \r
                case SV_FOOD_JERKY:\r
                {\r
-                       msg_print("\8e\95\82²\82½\82¦\82ª\82 \82Á\82Ä\82¨\82¢\82µ\82¢\81B");\r
+                       msg_print("歯ごたえがあっておいしい。");\r
                        ident = TRUE;\r
                        break;\r
                }\r
 \r
                case SV_FOOD_SLIME_MOLD:\r
                {\r
-                       msg_print("\82±\82ê\82Í\82È\82ñ\82Æ\82à\8c`\97e\82µ\82ª\82½\82¢\96¡\82¾\81B");\r
+                       msg_print("これはなんとも形容しがたい味だ。");\r
                        ident = TRUE;\r
                        break;\r
                }\r
 \r
                case SV_FOOD_RATION:\r
                {\r
-                       msg_print("\82±\82ê\82Í\82¨\82¢\82µ\82¢\81B");\r
+                       msg_print("これはおいしい。");\r
                        ident = TRUE;\r
                        break;\r
                }\r
@@ -269,7 +269,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                case SV_FOOD_WAYBREAD:\r
                {\r
-                       msg_print(_("\82±\82ê\82Í\82Ð\82\82å\82¤\82É\94ü\96¡\82¾\81B", "That tastes good."));\r
+                       msg_print(_("これはひじょうに美味だ。", "That tastes good."));\r
                        (void)set_poisoned(0);\r
                        (void)hp_player(damroll(4, 8));\r
                        ident = TRUE;\r
@@ -279,7 +279,7 @@ void do_cmd_eat_food_aux(int item)
 #ifdef JP\r
                case SV_FOOD_PINT_OF_ALE:\r
                {\r
-                       msg_print("\82Ì\82Ç\82²\82µ\91u\82â\82©\82¾\81B");\r
+                       msg_print("のどごし爽やかだ。");\r
                        ident = TRUE;\r
                        break;\r
                }\r
@@ -332,11 +332,11 @@ void do_cmd_eat_food_aux(int item)
        {\r
                /* Reduced nutritional benefit */\r
                (void)set_food(p_ptr->food + (o_ptr->pval / 10));\r
-               msg_print(_("\82 \82È\82½\82Ì\82æ\82¤\82È\8eÒ\82É\82Æ\82Á\82Ä\90H\97Æ\82È\82Ç\8bÍ\82©\82È\89h\97{\82É\82µ\82©\82È\82ç\82È\82¢\81B",\r
+               msg_print(_("あなたのような者にとって食糧など僅かな栄養にしかならない。",\r
                        "Mere victuals hold scant sustenance for a being such as yourself."));\r
 \r
                if (p_ptr->food < PY_FOOD_ALERT)   /* Hungry */\r
-                       msg_print(_("\82 \82È\82½\82Ì\8bQ\82¦\82Í\90V\91N\82È\8c\8c\82É\82æ\82Á\82Ä\82Ì\82Ý\96\9e\82½\82³\82ê\82é\81I",\r
+                       msg_print(_("あなたの飢えは新鮮な血によってのみ満たされる!",\r
                                "Your hunger can only be satisfied with fresh blood!"));\r
        }\r
        else if ((prace_is_(RACE_SKELETON) ||\r
@@ -350,15 +350,15 @@ void do_cmd_eat_food_aux(int item)
                if (o_ptr->tval == TV_STAFF &&\r
                        (item < 0) && (o_ptr->number > 1))\r
                {\r
-                       msg_print(_("\82Ü\82¸\82Í\8fñ\82ð\8fE\82í\82È\82¯\82ê\82Î\81B", "You must first pick up the staffs."));\r
+                       msg_print(_("まずは杖を拾わなければ。", "You must first pick up the staffs."));\r
                        return;\r
                }\r
-               staff = (o_ptr->tval == TV_STAFF) ? _("\8fñ", "staff") : _("\96\82\96@\96_", "wand");\r
+               staff = (o_ptr->tval == TV_STAFF) ? _("杖", "staff") : _("魔法棒", "wand");\r
 \r
                /* "Eat" charges */\r
                if (o_ptr->pval == 0)\r
                {\r
-                       msg_format(_("\82±\82Ì%s\82É\82Í\82à\82¤\96\82\97Í\82ª\8ec\82Á\82Ä\82¢\82È\82¢\81B", "The %s has no charges left."), staff);\r
+                       msg_format(_("この%sにはもう魔力が残っていない。", "The %s has no charges left."), staff);\r
                        o_ptr->ident |= (IDENT_EMPTY);\r
 \r
                        /* Combine / Reorder the pack (later) */\r
@@ -367,7 +367,7 @@ void do_cmd_eat_food_aux(int item)
 \r
                        return;\r
                }\r
-               msg_format(_("\82 \82È\82½\82Í%s\82Ì\96\82\97Í\82ð\83G\83l\83\8b\83M\81[\8c¹\82Æ\82µ\82Ä\8bz\8eû\82µ\82½\81B", "You absorb mana of the %s as your energy."), staff);\r
+               msg_format(_("あなたは%sの魔力をエネルギー源として吸収した。", "You absorb mana of the %s as your energy."), staff);\r
 \r
                /* Use a single charge */\r
                o_ptr->pval--;\r
@@ -400,7 +400,7 @@ void do_cmd_eat_food_aux(int item)
                        item = inven_carry(q_ptr);\r
 \r
                        /* Message */\r
-                       msg_format(_("\8fñ\82ð\82Ü\82Æ\82ß\82È\82¨\82µ\82½\81B", "You unstack your staff."));\r
+                       msg_format(_("杖をまとめなおした。", "You unstack your staff."));\r
                }\r
 \r
                /* Describe charges in the pack */\r
@@ -429,7 +429,7 @@ void do_cmd_eat_food_aux(int item)
                /* Drain vitality of humanoids */\r
                char o_name[MAX_NLEN];\r
                object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));\r
-               msg_format(_("%s\82Í\94R\82¦\8fã\82è\8aD\82É\82È\82Á\82½\81B\90¸\97Í\82ð\8bz\8eû\82µ\82½\8bC\82ª\82·\82é\81B", "%^s is burnt to ashes.  You absorb its vitality!"), o_name);\r
+               msg_format(_("%sは燃え上り灰になった。精力を吸収した気がする。", "%^s is burnt to ashes.  You absorb its vitality!"), o_name);\r
                (void)set_food(PY_FOOD_MAX - 1);\r
        }\r
        else if (prace_is_(RACE_SKELETON))\r
@@ -438,7 +438,7 @@ void do_cmd_eat_food_aux(int item)
                if (o_ptr->tval == TV_SKELETON ||\r
                        (o_ptr->tval == TV_CORPSE && o_ptr->sval == SV_SKELETON))\r
                {\r
-                       msg_print(_("\82 \82È\82½\82Í\8d\9c\82Å\8e©\95ª\82Ì\91Ì\82ð\95â\82Á\82½\81B", "Your body absorbs the bone."));\r
+                       msg_print(_("あなたは骨で自分の体を補った。", "Your body absorbs the bone."));\r
                        set_food(p_ptr->food + 5000);\r
                }\r
                else\r
@@ -450,7 +450,7 @@ void do_cmd_eat_food_aux(int item)
                                object_type forge;\r
                                object_type *q_ptr = &forge;\r
 \r
-                               msg_print(_("\90H\82×\95¨\82ª\83A\83S\82ð\91f\92Ê\82è\82µ\82Ä\97\8e\82¿\82½\81I", "The food falls through your jaws!"));\r
+                               msg_print(_("食べ物がアゴを素通りして落ちた!", "The food falls through your jaws!"));\r
 \r
                                /* Create the item */\r
                                object_prep(q_ptr, lookup_kind(o_ptr->tval, o_ptr->sval));\r
@@ -460,7 +460,7 @@ void do_cmd_eat_food_aux(int item)
                        }\r
                        else\r
                        {\r
-                               msg_print(_("\90H\82×\95¨\82ª\83A\83S\82ð\91f\92Ê\82è\82µ\82Ä\97\8e\82¿\81A\8fÁ\82¦\82½\81I", "The food falls through your jaws and vanishes!"));\r
+                               msg_print(_("食べ物がアゴを素通りして落ち、消えた!", "The food falls through your jaws and vanishes!"));\r
                        }\r
        }\r
        else if (prace_is_(RACE_GOLEM) ||\r
@@ -471,7 +471,7 @@ void do_cmd_eat_food_aux(int item)
                prace_is_(RACE_SPECTRE) ||\r
                (mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING))\r
        {\r
-               msg_print(_("\90\8eÒ\82Ì\90H\95¨\82Í\82 \82È\82½\82É\82Æ\82Á\82Ä\82Ù\82Æ\82ñ\82Ç\89h\97{\82É\82È\82ç\82È\82¢\81B", "The food of mortals is poor sustenance for you."));\r
+               msg_print(_("生者の食物はあなたにとってほとんど栄養にならない。", "The food of mortals is poor sustenance for you."));\r
                set_food(p_ptr->food + ((o_ptr->pval) / 20));\r
        }\r
        else if (o_ptr->tval == TV_FOOD && o_ptr->sval == SV_FOOD_WAYBREAD)\r
@@ -504,10 +504,10 @@ void do_cmd_eat_food_aux(int item)
 \r
 \r
 /*!\r
- * @brief \83I\83u\83W\83F\83N\83g\82ð\83v\83\8c\83C\83\84\81[\82ª\90H\82×\82é\82±\82Æ\82ª\82Å\82«\82é\82©\82ð\94»\92è\82·\82é /\r
+ * @brief オブジェクトをプレイヤーが食べることができるかを判定する /\r
  * Hook to determine if an object is eatable\r
- * @param o_ptr \94»\92è\82µ\82½\82¢\83I\83u\83W\83F\83N\83g\82Ì\8d\\91¢\91Ì\8eQ\8fÆ\83|\83C\83\93\83^\r
- * @return \90H\82×\82é\82±\82Æ\82ª\89Â\94\\82È\82ç\82ÎTRUE\82ð\95Ô\82·\r
+ * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ\r
+ * @return 食べることが可能ならばTRUEを返す\r
  */\r
 static bool item_tester_hook_eatable(object_type *o_ptr)\r
 {\r
@@ -546,9 +546,9 @@ static bool item_tester_hook_eatable(object_type *o_ptr)
 \r
 \r
 /*!\r
- * @brief \90H\97¿\82ð\90H\82×\82é\83R\83}\83\93\83h\82Ì\83\81\83C\83\93\83\8b\81[\83`\83\93 /\r
+ * @brief 食料を食べるコマンドのメインルーチン /\r
  * Eat some food (from the pack or floor)\r
- * @return \82È\82µ\r
+ * @return なし\r
  */\r
 void do_cmd_eat_food(void)\r
 {\r
@@ -565,8 +565,8 @@ void do_cmd_eat_food(void)
        item_tester_hook = item_tester_hook_eatable;\r
 \r
        /* Get an item */\r
-       q = _("\82Ç\82ê\82ð\90H\82×\82Ü\82·\82©? ", "Eat which item? ");\r
-       s = _("\90H\82×\95¨\82ª\82È\82¢\81B", "You have nothing to eat.");\r
+       q = _("どれを食べますか? ", "Eat which item? ");\r
+       s = _("食べ物がない。", "You have nothing to eat.");\r
 \r
        if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;\r
 \r
index 6f12e5d..cbeafb9 100644 (file)
@@ -1,9 +1,9 @@
-/*!\r
+/*!\r
  * @file cmd-quaff.c\r
- * @brief \83v\83\8c\83C\83\84\81[\82Ì\88ù\82Þ\83R\83}\83\93\83h\8eÀ\91\95\r
+ * @brief プレイヤーの飲むコマンド実装\r
  * @date 2018/09/07\r
  * @details\r
- * cmd6.c\82æ\82è\95ª\97£\81B\r
+ * cmd6.cより分離。\r
  */\r
 \r
 \r
 #include "selfinfo.h"\r
 \r
 /*!\r
- * @brief \96ò\82ð\88ù\82Þ\83R\83}\83\93\83h\82Ì\83T\83u\83\8b\81[\83`\83\93 /\r
+ * @brief 薬を飲むコマンドのサブルーチン /\r
  * Quaff a potion (from the pack or the floor)\r
- * @param item \88ù\82Þ\96ò\83I\83u\83W\83F\83N\83g\82Ì\8f\8a\8e\9d\95iID\r
- * @return \82È\82µ\r
+ * @param item 飲む薬オブジェクトの所持品ID\r
+ * @return なし\r
  */\r
 void do_cmd_quaff_potion_aux(int item)\r
 {\r
@@ -30,7 +30,7 @@ void do_cmd_quaff_potion_aux(int item)
        if (world_player)\r
        {\r
                if (flush_failure) flush();\r
-               msg_print(_("\95r\82©\82ç\90\85\82ª\97¬\82ê\8fo\82Ä\82±\82È\82¢\81I", "The potion doesn't flow out from a bottle."));\r
+               msg_print(_("瓶から水が流れ出てこない!", "The potion doesn't flow out from a bottle."));\r
 \r
                sound(SOUND_FAIL);\r
                return;\r
@@ -94,22 +94,22 @@ void do_cmd_quaff_potion_aux(int item)
        {\r
                switch (q_ptr->sval)\r
                {\r
-                       /* \88ù\82Ý\82²\82½\82¦\82ð\83I\83\8a\83W\83i\83\8b\82æ\82è\8d×\82©\82­\95\\8c» */\r
+                       /* 飲みごたえをオリジナルより細かく表現 */\r
                case SV_POTION_WATER:\r
-                       msg_print(_("\8cû\82Ì\92\86\82ª\82³\82Á\82Ï\82è\82µ\82½\81B", ""));\r
-                       msg_print(_("\82Ì\82Ç\82Ì\8a\89\82«\82ª\8f­\82µ\82¨\82³\82Ü\82Á\82½\81B", "You feel less thirsty."));\r
+                       msg_print(_("口の中がさっぱりした。", ""));\r
+                       msg_print(_("のどの渇きが少しおさまった。", "You feel less thirsty."));\r
                        ident = TRUE;\r
                        break;\r
 \r
                case SV_POTION_APPLE_JUICE:\r
-                       msg_print(_("\8aÃ\82­\82Ä\83T\83b\83p\83\8a\82Æ\82µ\82Ä\82¢\82Ä\81A\82Æ\82Ä\82à\82¨\82¢\82µ\82¢\81B", ""));\r
-                       msg_print(_("\82Ì\82Ç\82Ì\8a\89\82«\82ª\8f­\82µ\82¨\82³\82Ü\82Á\82½\81B", "You feel less thirsty."));\r
+                       msg_print(_("甘くてサッパリとしていて、とてもおいしい。", ""));\r
+                       msg_print(_("のどの渇きが少しおさまった。", "You feel less thirsty."));\r
                        ident = TRUE;\r
                        break;\r
 \r
                case SV_POTION_SLIME_MOLD:\r
-                       msg_print(_("\82È\82ñ\82Æ\82à\95s\8bC\96¡\82È\96¡\82¾\81B", ""));\r
-                       msg_print(_("\82Ì\82Ç\82Ì\8a\89\82«\82ª\8f­\82µ\82¨\82³\82Ü\82Á\82½\81B", "You feel less thirsty."));\r
+                       msg_print(_("なんとも不気味な味だ。", ""));\r
+                       msg_print(_("のどの渇きが少しおさまった。", "You feel less thirsty."));\r
                        ident = TRUE;\r
                        break;\r
 \r
@@ -118,7 +118,7 @@ void do_cmd_quaff_potion_aux(int item)
                        break;\r
 \r
                case SV_POTION_SALT_WATER:\r
-                       msg_print(_("\82¤\82¥\81I\8ev\82í\82¸\93f\82¢\82Ä\82µ\82Ü\82Á\82½\81B", "The potion makes you vomit!"));\r
+                       msg_print(_("うぇ!思わず吐いてしまった。", "The potion makes you vomit!"));\r
 \r
                        if (!(prace_is_(RACE_GOLEM) ||\r
                              prace_is_(RACE_ZOMBIE) ||\r
@@ -183,8 +183,8 @@ void do_cmd_quaff_potion_aux(int item)
                                        else wiz_dark();\r
                                        (void)teleport_player_aux(100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);\r
                                        wiz_dark();\r
-                                       msg_print(_("\92m\82ç\82È\82¢\8fê\8f\8a\82Å\96Ú\82ª\90Á\82ß\82½\81B\93ª\92É\82ª\82·\82é\81B", "You wake up somewhere with a sore head..."));\r
-                                       msg_print(_("\89½\82à\8ev\82¢\8fo\82¹\82È\82¢\81B\82Ç\82¤\82â\82Á\82Ä\82±\82±\82Ö\97\88\82½\82Ì\82©\82à\95ª\82©\82ç\82È\82¢\81I", "You can't remember a thing, or how you got here!"));\r
+                                       msg_print(_("知らない場所で目が醒めた。頭痛がする。", "You wake up somewhere with a sore head..."));\r
+                                       msg_print(_("何も思い出せない。どうやってここへ来たのかも分からない!", "You can't remember a thing, or how you got here!"));\r
                                }\r
                        }\r
                        break;\r
@@ -192,11 +192,11 @@ void do_cmd_quaff_potion_aux(int item)
                case SV_POTION_SLEEP:\r
                        if (!p_ptr->free_act)\r
                        {\r
-                               msg_print(_("\82 \82È\82½\82Í\96°\82Á\82Ä\82µ\82Ü\82Á\82½\81B", "You fall asleep."));\r
+                               msg_print(_("あなたは眠ってしまった。", "You fall asleep."));\r
 \r
                                if (ironman_nightmare)\r
                                {\r
-                                       msg_print(_("\8b°\82ë\82µ\82¢\8cõ\8ci\82ª\93ª\82É\95\82\82©\82ñ\82Å\82«\82½\81B", "A horrible vision enters your mind."));\r
+                                       msg_print(_("恐ろしい光景が頭に浮かんできた。", "A horrible vision enters your mind."));\r
 \r
                                        /* Have some nightmares */\r
                                        sanity_blast(NULL, FALSE);\r
@@ -211,7 +211,7 @@ void do_cmd_quaff_potion_aux(int item)
                case SV_POTION_LOSE_MEMORIES:\r
                        if (!p_ptr->hold_exp && (p_ptr->exp > 0))\r
                        {\r
-                               msg_print(_("\89ß\8b\8e\82Ì\8bL\89¯\82ª\94\96\82ê\82Ä\82¢\82­\8bC\82ª\82·\82é\81B", "You feel your memories fade."));\r
+                               msg_print(_("過去の記憶が薄れていく気がする。", "You feel your memories fade."));\r
                                chg_virtue(V_KNOWLEDGE, -5);\r
 \r
                                lose_exp(p_ptr->exp / 4);\r
@@ -220,8 +220,8 @@ void do_cmd_quaff_potion_aux(int item)
                        break;\r
 \r
                case SV_POTION_RUINATION:\r
-                       msg_print(_("\90g\82à\90S\82à\8eã\82Á\82Ä\82«\82Ä\81A\90¸\8bC\82ª\94²\82¯\82Ä\82¢\82­\82æ\82¤\82¾\81B", "Your nerves and muscles feel weak and lifeless!"));\r
-                       take_hit(DAMAGE_LOSELIFE, damroll(10, 10), _("\94j\96Å\82Ì\96ò", "a potion of Ruination"), -1);\r
+                       msg_print(_("身も心も弱ってきて、精気が抜けていくようだ。", "Your nerves and muscles feel weak and lifeless!"));\r
+                       take_hit(DAMAGE_LOSELIFE, damroll(10, 10), _("破滅の薬", "a potion of Ruination"), -1);\r
 \r
                        (void)dec_stat(A_DEX, 25, TRUE);\r
                        (void)dec_stat(A_WIS, 25, TRUE);\r
@@ -257,8 +257,8 @@ void do_cmd_quaff_potion_aux(int item)
                        break;\r
 \r
                case SV_POTION_DETONATIONS:\r
-                       msg_print(_("\91Ì\82Ì\92\86\82Å\8c\83\82µ\82¢\94\9a\94­\82ª\8bN\82«\82½\81I", "Massive explosions rupture your body!"));\r
-                       take_hit(DAMAGE_NOESCAPE, damroll(50, 20), _("\94\9a\94­\82Ì\96ò", "a potion of Detonation"), -1);\r
+                       msg_print(_("体の中で激しい爆発が起きた!", "Massive explosions rupture your body!"));\r
+                       take_hit(DAMAGE_NOESCAPE, damroll(50, 20), _("爆発の薬", "a potion of Detonation"), -1);\r
 \r
                        (void)set_stun(p_ptr->stun + 75);\r
                        (void)set_cut(p_ptr->cut + 5000);\r
@@ -268,8 +268,8 @@ void do_cmd_quaff_potion_aux(int item)
                case SV_POTION_DEATH:\r
                        chg_virtue(V_VITALITY, -1);\r
                        chg_virtue(V_UNLIFE, 5);\r
-                       msg_print(_("\8e\80\82Ì\97\\8a´\82ª\91Ì\92\86\82ð\8bì\82¯\82ß\82®\82Á\82½\81B", "A feeling of Death flows through your body."));\r
-                       take_hit(DAMAGE_LOSELIFE, 5000, _("\8e\80\82Ì\96ò", "a potion of Death"), -1);\r
+                       msg_print(_("死の予感が体中を駆けめぐった。", "A feeling of Death flows through your body."));\r
+                       take_hit(DAMAGE_LOSELIFE, 5000, _("死の薬", "a potion of Death"), -1);\r
                        ident = TRUE;\r
                        break;\r
 \r
@@ -384,7 +384,7 @@ void do_cmd_quaff_potion_aux(int item)
                case SV_POTION_LIFE:\r
                        chg_virtue(V_VITALITY, 1);\r
                        chg_virtue(V_UNLIFE, -5);\r
-                       msg_print(_("\91Ì\92\86\82É\90\96½\97Í\82ª\96\9e\82¿\82 \82Ó\82ê\82Ä\82«\82½\81I", "You feel life flow through your body!"));\r
+                       msg_print(_("体中に生命力が満ちあふれてきた!", "You feel life flow through your body!"));\r
                        restore_level();\r
                        (void)set_poisoned(0);\r
                        (void)set_blind(0);\r
@@ -419,7 +419,7 @@ void do_cmd_quaff_potion_aux(int item)
                                        p_ptr->magic_num1[i] -= ((p_ptr->magic_num2[i] < 10) ? EATER_ROD_CHARGE*3 : p_ptr->magic_num2[i]*EATER_ROD_CHARGE/3)*k_info[k_idx].pval;\r
                                        if (p_ptr->magic_num1[i] < 0) p_ptr->magic_num1[i] = 0;\r
                                }\r
-                               msg_print(_("\93ª\82ª\83n\83b\83L\83\8a\82Æ\82µ\82½\81B", "You feel your head clear."));\r
+                               msg_print(_("頭がハッキリとした。", "You feel your head clear."));\r
                                p_ptr->window |= (PW_PLAYER);\r
                                ident = TRUE;\r
                        }\r
@@ -427,7 +427,7 @@ void do_cmd_quaff_potion_aux(int item)
                        {\r
                                p_ptr->csp = p_ptr->msp;\r
                                p_ptr->csp_frac = 0;\r
-                               msg_print(_("\93ª\82ª\83n\83b\83L\83\8a\82Æ\82µ\82½\81B", "You feel your head clear."));\r
+                               msg_print(_("頭がハッキリとした。", "You feel your head clear."));\r
 \r
                                p_ptr->redraw |= (PR_MANA);\r
                                p_ptr->window |= (PW_PLAYER);\r
@@ -499,7 +499,7 @@ void do_cmd_quaff_potion_aux(int item)
                        break;\r
 \r
                case SV_POTION_ENLIGHTENMENT:\r
-                       msg_print(_("\8e©\95ª\82Ì\92u\82©\82ê\82Ä\82¢\82é\8fó\8bµ\82ª\94]\97 \82É\95\82\82©\82ñ\82Å\82«\82½...", "An image of your surroundings forms in your mind..."));\r
+                       msg_print(_("自分の置かれている状況が脳裏に浮かんできた...", "An image of your surroundings forms in your mind..."));\r
                        chg_virtue(V_KNOWLEDGE, 1);\r
                        chg_virtue(V_ENLIGHTEN, 1);\r
                        wiz_lite(FALSE);\r
@@ -507,7 +507,7 @@ void do_cmd_quaff_potion_aux(int item)
                        break;\r
 \r
                case SV_POTION_STAR_ENLIGHTENMENT:\r
-                       msg_print(_("\8dX\82È\82é\8c[\96Ö\82ð\8a´\82\82½...", "You begin to feel more enlightened..."));\r
+                       msg_print(_("更なる啓蒙を感じた...", "You begin to feel more enlightened..."));\r
                        chg_virtue(V_KNOWLEDGE, 1);\r
                        chg_virtue(V_ENLIGHTEN, 2);\r
                        msg_print(NULL);\r
@@ -526,7 +526,7 @@ void do_cmd_quaff_potion_aux(int item)
                        break;\r
 \r
                case SV_POTION_SELF_KNOWLEDGE:\r
-                       msg_print(_("\8e©\95ª\8e©\90g\82Ì\82±\82Æ\82ª\8f­\82µ\82Í\95ª\82©\82Á\82½\8bC\82ª\82·\82é...", "You begin to know yourself a little better..."));\r
+                       msg_print(_("自分自身のことが少しは分かった気がする...", "You begin to know yourself a little better..."));\r
                        msg_print(NULL);\r
                        self_knowledge();\r
                        ident = TRUE;\r
@@ -539,7 +539,7 @@ void do_cmd_quaff_potion_aux(int item)
                        {\r
                                s32b ee = (p_ptr->exp / 2) + 10;\r
                                if (ee > 100000L) ee = 100000L;\r
-                               msg_print(_("\8dX\82É\8co\8c±\82ð\90Ï\82ñ\82¾\82æ\82¤\82È\8bC\82ª\82·\82é\81B", "You feel more experienced."));\r
+                               msg_print(_("更に経験を積んだような気がする。", "You feel more experienced."));\r
                                gain_exp(ee);\r
                                ident = TRUE;\r
                        }\r
@@ -584,7 +584,7 @@ void do_cmd_quaff_potion_aux(int item)
                        break;\r
 \r
                case SV_POTION_TSUYOSHI:\r
-                       msg_print(_("\81u\83I\83N\83\8c\8cZ\82³\82ñ\81I\81v", "Brother OKURE!"));\r
+                       msg_print(_("「オクレ兄さん!」", "Brother OKURE!"));\r
                        msg_print(NULL);\r
                        p_ptr->tsuyoshi = 1;\r
                        (void)set_tsuyoshi(0, TRUE);\r
@@ -617,7 +617,7 @@ void do_cmd_quaff_potion_aux(int item)
 \r
        if (prace_is_(RACE_SKELETON))\r
        {\r
-               msg_print(_("\89t\91Ì\82Ì\88ê\95\94\82Í\82 \82È\82½\82Ì\83A\83S\82ð\91f\92Ê\82è\82µ\82Ä\97\8e\82¿\82½\81I", "Some of the fluid falls through your jaws!"));\r
+               msg_print(_("液体の一部はあなたのアゴを素通りして落ちた!", "Some of the fluid falls through your jaws!"));\r
                (void)potion_smash_effect(0, p_ptr->y, p_ptr->x, q_ptr->k_idx);\r
        }\r
 \r
@@ -665,7 +665,7 @@ void do_cmd_quaff_potion_aux(int item)
                        case RACE_ANDROID:\r
                                if (q_ptr->tval == TV_FLASK)\r
                                {\r
-                                       msg_print(_("\83I\83C\83\8b\82ð\95â\8b\8b\82µ\82½\81B", "You replenish yourself with the oil."));\r
+                                       msg_print(_("オイルを補給した。", "You replenish yourself with the oil."));\r
                                        set_food(p_ptr->food + 5000);\r
                                }\r
                                else\r
@@ -674,7 +674,7 @@ void do_cmd_quaff_potion_aux(int item)
                                }\r
                                break;\r
                        case RACE_ENT:\r
-                               msg_print(_("\90\85\95ª\82ð\8eæ\82è\8d\9e\82ñ\82¾\81B", "You are moistened."));\r
+                               msg_print(_("水分を取り込んだ。", "You are moistened."));\r
                                set_food(MIN(p_ptr->food + q_ptr->pval + MAX(0, q_ptr->pval * 10) + 2000, PY_FOOD_MAX - 1));\r
                                break;\r
                        default:\r
@@ -697,10 +697,10 @@ void do_cmd_quaff_potion_aux(int item)
 \r
 \r
 /*!\r
- * @brief \83I\83u\83W\83F\83N\83g\82ð\83v\83\8c\83C\83\84\81[\82ª\88ù\82Þ\82±\82Æ\82ª\82Å\82«\82é\82©\82ð\94»\92è\82·\82é /\r
+ * @brief オブジェクトをプレイヤーが飲むことができるかを判定する /\r
  * Hook to determine if an object can be quaffed\r
- * @param o_ptr \94»\92è\82µ\82½\82¢\83I\83u\83W\83F\83N\83g\82Ì\8d\\91¢\91Ì\8eQ\8fÆ\83|\83C\83\93\83^\r
- * @return \88ù\82Þ\82±\82Æ\82ª\89Â\94\\82È\82ç\82ÎTRUE\82ð\95Ô\82·\r
+ * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ\r
+ * @return 飲むことが可能ならばTRUEを返す\r
  */\r
 static bool item_tester_hook_quaff(object_type *o_ptr)\r
 {\r
@@ -716,9 +716,9 @@ static bool item_tester_hook_quaff(object_type *o_ptr)
 \r
 \r
 /*!\r
- * @brief \96ò\82ð\88ù\82Þ\83R\83}\83\93\83h\82Ì\83\81\83C\83\93\83\8b\81[\83`\83\93 /\r
+ * @brief 薬を飲むコマンドのメインルーチン /\r
  * Quaff some potion (from the pack or floor)\r
- * @return \82È\82µ\r
+ * @return なし\r
  */\r
 void do_cmd_quaff_potion(void)\r
 {\r
@@ -734,8 +734,8 @@ void do_cmd_quaff_potion(void)
        item_tester_hook = item_tester_hook_quaff;\r
 \r
        /* Get an item */\r
-       q = _("\82Ç\82Ì\96ò\82ð\88ù\82Ý\82Ü\82·\82©? ", "Quaff which potion? ");\r
-       s = _("\88ù\82ß\82é\96ò\82ª\82È\82¢\81B", "You have no potions to quaff.");\r
+       q = _("どの薬を飲みますか? ", "Quaff which potion? ");\r
+       s = _("飲める薬がない。", "You have no potions to quaff.");\r
 \r
        if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;\r
 \r
index 9e13144..44bfd8d 100644 (file)
@@ -54,6 +54,7 @@
 
 #include "angband.h"
 #include "selfinfo.h"
+#include "cmd-activate.h"
 #include "cmd-eat.h"
 #include "cmd-quaff.h"
 
@@ -2165,29 +2166,6 @@ void do_cmd_zap_rod(void)
 }
 
 /*!
- * @brief オブジェクトをプレイヤーが魔道具として発動できるかを判定する /
- * Hook to determine if an object is activatable
- * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
- * @return 魔道具として発動可能ならばTRUEを返す
- */
-static bool item_tester_hook_activate(object_type *o_ptr)
-{
-       u32b flgs[TR_FLAG_SIZE];
-
-       /* Not known */
-       if (!object_is_known(o_ptr)) return (FALSE);
-
-       /* Extract the flags */
-       object_flags(o_ptr, flgs);
-
-       /* Check activation flag */
-       if (have_flag(flgs, TR_ACTIVATE)) return (TRUE);
-
-       /* Assume not */
-       return (FALSE);
-}
-
-/*!
  * @brief 『一つの指輪』の効果処理 /
  * Hack -- activate the ring of power
  * @param dir 発動の方向ID
@@ -2256,391 +2234,6 @@ void ring_of_power(int dir)
 }
 
 /*!
- * @brief ペット入りモンスターボールをソートするための比較関数
- * @param u 所持品配列の参照ポインタ
- * @param v 未使用
- * @param a 所持品ID1
- * @param b 所持品ID2
- * @return 1の方が大であればTRUE
- */
-static bool ang_sort_comp_pet(vptr u, vptr v, int a, int b)
-{
-       u16b *who = (u16b*)(u);
-
-       int w1 = who[a];
-       int w2 = who[b];
-
-       monster_type *m_ptr1 = &m_list[w1];
-       monster_type *m_ptr2 = &m_list[w2];
-       monster_race *r_ptr1 = &r_info[m_ptr1->r_idx];
-       monster_race *r_ptr2 = &r_info[m_ptr2->r_idx];
-
-       /* Unused */
-       (void)v;
-
-       if (m_ptr1->nickname && !m_ptr2->nickname) return TRUE;
-       if (m_ptr2->nickname && !m_ptr1->nickname) return FALSE;
-
-       if ((r_ptr1->flags1 & RF1_UNIQUE) && !(r_ptr2->flags1 & RF1_UNIQUE)) return TRUE;
-       if ((r_ptr2->flags1 & RF1_UNIQUE) && !(r_ptr1->flags1 & RF1_UNIQUE)) return FALSE;
-
-       if (r_ptr1->level > r_ptr2->level) return TRUE;
-       if (r_ptr2->level > r_ptr1->level) return FALSE;
-
-       if (m_ptr1->hp > m_ptr2->hp) return TRUE;
-       if (m_ptr2->hp > m_ptr1->hp) return FALSE;
-       
-       return w1 <= w2;
-}
-
-
-/*!
- * @brief 装備を発動するコマンドのサブルーチン /
- * Activate a wielded object.  Wielded objects never stack.
- * And even if they did, activatable objects never stack.
- * @param item 発動するオブジェクトの所持品ID
- * @return なし
- * @details
- * <pre>
- * Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
- * But one could, for example, easily make an activatable "Ring of Plasma".
- * Note that it always takes a turn to activate an artifact, even if
- * the user hits "escape" at the "direction" prompt.
- * </pre>
- */
-static void do_cmd_activate_aux(int item)
-{
-       int         dir, lev, chance, fail;
-       object_type *o_ptr;
-       bool success;
-
-
-       /* Get the item (in the pack) */
-       if (item >= 0)
-       {
-               o_ptr = &inventory[item];
-       }
-
-       /* Get the item (on the floor) */
-       else
-       {
-               o_ptr = &o_list[0 - item];
-       }
-
-       /* Take a turn */
-       p_ptr->energy_use = 100;
-
-       /* Extract the item level */
-       lev = k_info[o_ptr->k_idx].level;
-
-       /* Hack -- use artifact level instead */
-       if (object_is_fixed_artifact(o_ptr)) lev = a_info[o_ptr->name1].level;
-       else if (object_is_random_artifact(o_ptr))
-       {
-               const activation_type* const act_ptr = find_activation_info(o_ptr);
-               if (act_ptr) {
-                       lev = act_ptr->level;
-               }
-       }
-       else if (((o_ptr->tval == TV_RING) || (o_ptr->tval == TV_AMULET)) && o_ptr->name2) lev = e_info[o_ptr->name2].level;
-
-       /* Base chance of success */
-       chance = p_ptr->skill_dev;
-
-       /* Confusion hurts skill */
-       if (p_ptr->confused) chance = chance / 2;
-
-       fail = lev+5;
-       if (chance > fail) fail -= (chance - fail)*2;
-       else chance -= (fail - chance)*2;
-       if (fail < USE_DEVICE) fail = USE_DEVICE;
-       if (chance < USE_DEVICE) chance = USE_DEVICE;
-
-       if (world_player)
-       {
-               if (flush_failure) flush();
-               msg_print(_("止まった時の中ではうまく働かないようだ。", "It shows no reaction."));
-               sound(SOUND_FAIL);
-               return;
-       }
-
-       if (p_ptr->pclass == CLASS_BERSERKER) success = FALSE;
-       else if (chance > fail)
-       {
-               if (randint0(chance*2) < fail) success = FALSE;
-               else success = TRUE;
-       }
-       else
-       {
-               if (randint0(fail*2) < chance) success = TRUE;
-               else success = FALSE;
-       }
-
-       /* Roll for usage */
-       if (!success)
-       {
-               if (flush_failure) flush();
-               msg_print(_("うまく始動させることができなかった。", "You failed to activate it properly."));
-               sound(SOUND_FAIL);
-               return;
-       }
-
-       /* Check the recharge */
-       if (o_ptr->timeout)
-       {
-               msg_print(_("それは微かに音を立て、輝き、消えた...", "It whines, glows and fades..."));
-               return;
-       }
-
-       /* Some lights need enough fuel for activation */
-       if (!o_ptr->xtra4 && (o_ptr->tval == TV_FLASK) &&
-               ((o_ptr->sval == SV_LITE_TORCH) || (o_ptr->sval == SV_LITE_LANTERN)))
-       {
-               msg_print(_("燃料がない。", "It has no fuel."));
-               p_ptr->energy_use = 0;
-               return;
-       }
-
-       /* Activate the artifact */
-       msg_print(_("始動させた...", "You activate it..."));
-
-       /* Sound */
-       sound(SOUND_ZAP);
-
-       /* Activate object */
-       if (activation_index(o_ptr))
-       {
-               (void)activate_random_artifact(o_ptr);
-
-               /* Window stuff */
-               p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
-               /* Success */
-               return;
-       }
-
-       /* Special items */
-       else if (o_ptr->tval == TV_WHISTLE)
-       {
-               if (music_singing_any()) stop_singing();
-               if (hex_spelling_any()) stop_hex_spell_all();
-
-#if 0
-               if (object_is_cursed(o_ptr))
-               {
-                       msg_print(_("カン高い音が響き渡った。", "You produce a shrill whistling sound."));
-                       aggravate_monsters(0);
-               }
-               else
-#endif
-               {
-                       IDX pet_ctr, i;
-                       IDX *who;
-                       int max_pet = 0;
-                       u16b dummy_why;
-
-                       /* Allocate the "who" array */
-                       C_MAKE(who, max_m_idx, IDX);
-
-                       /* Process the monsters (backwards) */
-                       for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
-                       {
-                               if (is_pet(&m_list[pet_ctr]) && (p_ptr->riding != pet_ctr))
-                                 who[max_pet++] = pet_ctr;
-                       }
-
-                       /* Select the sort method */
-                       ang_sort_comp = ang_sort_comp_pet;
-                       ang_sort_swap = ang_sort_swap_hook;
-
-                       ang_sort(who, &dummy_why, max_pet);
-
-                       /* Process the monsters (backwards) */
-                       for (i = 0; i < max_pet; i++)
-                       {
-                               pet_ctr = who[i];
-                               teleport_monster_to(pet_ctr, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
-                       }
-
-                       /* Free the "who" array */
-                       C_KILL(who, max_m_idx, IDX);
-               }
-               o_ptr->timeout = 100+randint1(100);
-               return;
-       }
-       else if (o_ptr->tval == TV_CAPTURE)
-       {
-               if(!o_ptr->pval)
-               {
-                       bool old_target_pet = target_pet;
-                       target_pet = TRUE;
-                       if (!get_aim_dir(&dir))
-                       {
-                               target_pet = old_target_pet;
-                               return;
-                       }
-                       target_pet = old_target_pet;
-
-                       if(fire_ball(GF_CAPTURE, dir, 0, 0))
-                       {
-                               o_ptr->pval = (PARAMETER_VALUE)cap_mon;
-                               o_ptr->xtra3 = (XTRA8)cap_mspeed;
-                               o_ptr->xtra4 = (XTRA16)cap_hp;
-                               o_ptr->xtra5 = (XTRA16)cap_maxhp;
-                               if (cap_nickname)
-                               {
-                                       cptr t;
-                                       char *s;
-                                       char buf[80] = "";
-
-                                       if (o_ptr->inscription)
-                                               strcpy(buf, quark_str(o_ptr->inscription));
-                                       s = buf;
-                                       for (s = buf;*s && (*s != '#'); s++)
-                                       {
-#ifdef JP
-                                               if (iskanji(*s)) s++;
-#endif
-                                       }
-                                       *s = '#';
-                                       s++;
-#ifdef JP
- /*nothing*/
-#else
-                                       *s++ = '\'';
-#endif
-                                       t = quark_str(cap_nickname);
-                                       while (*t)
-                                       {
-                                               *s = *t;
-                                               s++;
-                                               t++;
-                                       }
-#ifdef JP
- /*nothing*/
-#else
-                                       *s++ = '\'';
-#endif
-                                       *s = '\0';
-                                       o_ptr->inscription = quark_add(buf);
-                               }
-                       }
-               }
-               else
-               {
-                       success = FALSE;
-                       if (!get_rep_dir2(&dir)) return;
-                       if (monster_can_enter(p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
-                       {
-                               if (place_monster_aux(0, p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
-                               {
-                                       if (o_ptr->xtra3) m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
-                                       if (o_ptr->xtra5) m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
-                                       if (o_ptr->xtra4) m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
-                                       m_list[hack_m_idx_ii].maxhp = m_list[hack_m_idx_ii].max_maxhp;
-                                       if (o_ptr->inscription)
-                                       {
-                                               char buf[80];
-                                               cptr t;
-#ifndef JP
-                                               bool quote = FALSE;
-#endif
-
-                                               t = quark_str(o_ptr->inscription);
-                                               for (t = quark_str(o_ptr->inscription);*t && (*t != '#'); t++)
-                                               {
-#ifdef JP
-                                                       if (iskanji(*t)) t++;
-#endif
-                                               }
-                                               if (*t)
-                                               {
-                                                       char *s = buf;
-                                                       t++;
-#ifdef JP
-                                                       /* nothing */
-#else
-                                                       if (*t =='\'')
-                                                       {
-                                                               t++;
-                                                               quote = TRUE;
-                                                       }
-#endif
-                                                       while(*t)
-                                                       {
-                                                               *s = *t;
-                                                               t++;
-                                                               s++;
-                                                       }
-#ifdef JP
-                                                       /* nothing */
-#else
-                                                       if (quote && *(s-1) =='\'')
-                                                               s--;
-#endif
-                                                       *s = '\0';
-                                                       m_list[hack_m_idx_ii].nickname = quark_add(buf);
-                                                       t = quark_str(o_ptr->inscription);
-                                                       s = buf;
-                                                       while(*t && (*t != '#'))
-                                                       {
-                                                               *s = *t;
-                                                               t++;
-                                                               s++;
-                                                       }
-                                                       *s = '\0';
-                                                       o_ptr->inscription = quark_add(buf);
-                                               }
-                                       }
-                                       o_ptr->pval = 0;
-                                       o_ptr->xtra3 = 0;
-                                       o_ptr->xtra4 = 0;
-                                       o_ptr->xtra5 = 0;
-                                       success = TRUE;
-                               }
-                       }
-                       if (!success)
-                               msg_print(_("おっと、解放に失敗した。", "Oops.  You failed to release your pet."));
-               }
-               calc_android_exp();
-               return;
-       }
-
-       /* Mistake */
-       msg_print(_("おっと、このアイテムは始動できない。", "Oops.  That object cannot be activated."));
-}
-
-/*!
- * @brief 装備を発動するコマンドのメインルーチン /
- * @return なし
- */
-void do_cmd_activate(void)
-{
-       OBJECT_IDX item;
-       cptr    q, s;
-
-
-       if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
-       {
-               set_action(ACTION_NONE);
-       }
-
-       item_tester_no_ryoute = TRUE;
-       /* Prepare the hook */
-       item_tester_hook = item_tester_hook_activate;
-
-       /* Get an item */
-       q = _("どのアイテムを始動させますか? ", "Activate which item? ");
-       s = _("始動できるアイテムを装備していない。", "You have nothing to activate.");
-
-       if (!get_item(&item, q, s, (USE_EQUIP))) return;
-
-       /* Activate the item */
-       do_cmd_activate_aux(item);
-}
-
-
-/*!
  * @brief オブジェクトをプレイヤーが簡易使用コマンドで利用できるかを判定する /
  * Hook to determine if an object is useable
  * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
index e4ddcf7..b333744 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "angband.h"
 #include "selfinfo.h"
+#include "cmd-quaff.h"
 
 
 /*!
index a0290be..e109081 100644 (file)
@@ -11,6 +11,9 @@
  */
 
 #include "angband.h"
+#include "cmd-activate.h"
+#include "cmd-eat.h"
+#include "cmd-quaff.h"
 
 #define TY_CURSE_CHANCE 200 /*!<太古の怨念の1ターン毎の発動確率(1/n)*/
 #define CHAINSWORD_NOISE 100 /*!<チェンソーの1ターン毎の発動確率(1/n)*/
index 15cf884..21cd97b 100644 (file)
@@ -808,7 +808,6 @@ extern void do_cmd_read_scroll(void);
 extern void do_cmd_aim_wand(void);
 extern void do_cmd_use_staff(void);
 extern void do_cmd_zap_rod(void);
-extern void do_cmd_activate(void);
 extern void do_cmd_rerate_aux(void);
 extern void do_cmd_rerate(bool display);
 extern void ring_of_power(int dir);