OSDN Git Service

[Refactor] #37353 コメント整理。 / Refactor comments.
[hengband/hengband.git] / src / cmd-read.c
index d789a1b..a41163a 100644 (file)
@@ -8,14 +8,16 @@
 \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 "spells-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
  * Read a scroll (from the pack or floor).\r
@@ -47,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
@@ -639,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