OSDN Git Service

[Refactor] #38862 Moved files.c/h to io/
[hengband/hengband.git] / src / cmd / cmd-basic.c
index dc3c76c..43ef719 100644 (file)
  * are included in all such copies.  Other copyrights may also apply.
  */
 
-#include "angband.h"
-#include "util.h"
-#include "core.h"
-#include "term.h"
-
-#include "cmd-dump.h"
-#include "chest.h"
-#include "trap.h"
-#include "dungeon.h"
-#include "feature.h"
-#include "floor.h"
+#include "system/angband.h"
+#include "main/music-definitions-table.h"
+#include "main/sound-definitions-table.h"
+#include "system/system-variables.h"
+#include "core/stuff-handler.h"
+#include "gameterm.h"
+
+#include "io/write-diary.h"
+#include "cmd/cmd-dump.h"
+#include "cmd/cmd-save.h"
+#include "object/chest.h"
+#include "grid/trap.h"
+#include "dungeon/dungeon.h"
 #include "melee.h"
-#include "object-hook.h"
-#include "spells.h"
-#include "spells-summon.h"
-#include "spells-status.h"
-#include "monster.h"
-#include "monster-status.h"
+#include "object/object-hook.h"
+#include "monster/monster-status.h"
 #include "quest.h"
-#include "artifact.h"
-#include "avatar.h"
-#include "player-status.h"
-#include "realm-hex.h"
-#include "realm-song.h"
+#include "object/artifact.h"
+#include "player/avatar.h"
+#include "player/player-status.h"
+#include "realm/realm-hex.h"
 #include "geometry.h"
 #include "wild.h"
-#include "grid.h"
-#include "feature.h"
-#include "player-move.h"
-#include "player-effects.h"
-#include "player-class.h"
-#include "player-personality.h"
-#include "player-inventory.h"
-#include "objectkind.h"
-#include "object-broken.h"
-#include "object-flavor.h"
+#include "grid/grid.h"
+#include "player/player-move.h"
+#include "player/player-effects.h"
+#include "player/player-personality.h"
+#include "inventory/player-inventory.h"
+#include "object/object-kind.h"
+#include "object/object-broken.h"
+#include "object/object-flavor.h"
 #include "shoot.h"
 #include "snipe.h"
 
 #include "cmd-basic.h"
-#include "cmd-item.h"
-#include "floor-save.h"
-#include "dungeon-file.h"
-#include "files.h"
+#include "dungeon/dungeon-file.h"
+#include "io/files.h"
 
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
 #include "targeting.h"
-#include "world.h"
+#include "world/world.h"
+#include "effect/spells-effect-util.h"
+#include "spell/spells3.h"
+#include "core/output-updater.h"
 
 /*!
  * @brief フロア脱出時に出戻りが不可能だった場合に警告を加える処理
@@ -213,7 +209,7 @@ void do_cmd_go_up(player_type *creature_ptr)
                if (!confirm_leave_level(creature_ptr, FALSE)) return;
        
                /* Success */
-               if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+               if (IS_ECHIZEN(creature_ptr))
                        msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
                else
                        msg_print(_("上の階に登った。", "You enter the up staircase."));
@@ -310,7 +306,7 @@ void do_cmd_go_up(player_type *creature_ptr)
        if (record_stair) exe_write_diary(creature_ptr, DIARY_STAIR, 0-up_num, _("階段を上った", "climbed up the stairs to"));
 
        /* Success */
-       if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+       if (IS_ECHIZEN(creature_ptr))
                msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
        else if (up_num == creature_ptr->current_floor_ptr->dun_level)
                msg_print(_("地上に戻った。", "You go back to the surface."));
@@ -359,7 +355,7 @@ void do_cmd_go_down(player_type *creature_ptr)
                /* Confirm Leaving */
                if(!confirm_leave_level(creature_ptr, TRUE)) return;
                
-               if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+               if (IS_ECHIZEN(creature_ptr))
                        msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
                else
                        msg_print(_("下の階に降りた。", "You enter the down staircase."));
@@ -457,7 +453,7 @@ void do_cmd_go_down(player_type *creature_ptr)
                }
                else
                {
-                       if ((creature_ptr->pseikaku == SEIKAKU_COMBAT) || (creature_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
+                       if (IS_ECHIZEN(creature_ptr))
                                msg_print(_("なんだこの階段は!", "What's this STAIRWAY!"));
                        else
                                msg_print(_("階段を下りて新たなる迷宮へと足を踏み入れた。", "You enter a maze of down staircases."));
@@ -2274,7 +2270,7 @@ void do_cmd_fire(player_type *creature_ptr, SPELL_IDX snipe_type)
        /* Sniper actions after some shootings */
        if (snipe_type == SP_AWAY)
        {
-               teleport_player(creature_ptr, 10 + (creature_ptr->concent * 2), 0L);
+               teleport_player(creature_ptr, 10 + (creature_ptr->concent * 2), TELEPORT_SPONTANEOUS);
        }
 
        if (snipe_type == SP_FINAL)
@@ -2880,7 +2876,7 @@ void do_cmd_suicide(player_type *creature_ptr)
 
        if (!current_world_ptr->total_winner)
        {
-               exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 0, _("ダンジョンの探索に絶望して自殺した。", "give up all hope to commit suicide."));
+               exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 0, _("ダンジョンの探索に絶望して自殺した。", "gave up all hope to commit suicide."));
                exe_write_diary(creature_ptr, DIARY_GAMESTART, 1, _("-------- ゲームオーバー --------", "--------   Game  Over   --------"));
                exe_write_diary(creature_ptr, DIARY_DESCRIPTION, 1, "\n\n\n\n");
        }