OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git] / src / cmd-read.c
index 5648e07..a41163a 100644 (file)
@@ -8,10 +8,15 @@
 \r
 #include "angband.h"\r
 #include "object-hook.h"\r
-#include "spells-summon.h"\r
 #include "artifact.h"\r
 #include "avatar.h"\r
 #include "player-status.h"\r
+#include "rumor.h"\r
+#include "realm-hex.h"\r
+\r
+#include "spells-object.h"\r
+#include "spells-summon.h"\r
+#include "spells-status.h"\r
 \r
 /*!\r
  * @brief 巻物を読むコマンドのサブルーチン\r
@@ -44,16 +49,8 @@ void do_cmd_read_scroll_aux(INVENTORY_IDX item, bool known)
                o_ptr = &o_list[0 - item];\r
        }\r
 \r
-\r
-       p_ptr->energy_use = 100;\r
-\r
-       if (world_player)\r
-       {\r
-               if (flush_failure) flush();\r
-               msg_print(_("止まった時の中ではうまく働かないようだ。", "Nothing happen."));\r
-               sound(SOUND_FAIL);\r
-               return;\r
-       }\r
+       take_turn(p_ptr, 100);;\r
+       if (cmd_limit_time_walk(p_ptr)) return;\r
 \r
        if (p_ptr->pclass == CLASS_BERSERKER)\r
        {\r
@@ -618,12 +615,7 @@ void do_cmd_read_scroll(void)
                return;\r
        }\r
 \r
-       if (p_ptr->inside_arena)\r
-       {\r
-               msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));\r
-               msg_print(NULL);\r
-               return;\r
-       }\r
+       if (cmd_limit_arena(p_ptr)) return;\r
 \r
        if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))\r
        {\r
@@ -641,12 +633,7 @@ void do_cmd_read_scroll(void)
                msg_print(_("明かりがないので、暗くて読めない。", "You have no light to read by."));\r
                return;\r
        }\r
-       if (p_ptr->confused)\r
-       {\r
-               msg_print(_("混乱していて読めない。", "You are too confused!"));\r
-               return;\r
-       }\r
-\r
+       if (cmd_limit_confused(p_ptr)) return;\r
 \r
        /* Restrict choices to scrolls */\r
        item_tester_hook = item_tester_hook_readable;\r