• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

変愚蛮怒のメインリポジトリです


Commit MetaInfo

Revisiona587af3776e9f8611e52094c1b9d362e38d83538 (tree)
Time2019-01-09 23:24:11
AuthorDeskull <deskull@user...>
CommiterDeskull

Log Message

[Refactor] #38852 一部 do_cmd_*() をリファクタリング。 / Refactor do_cmd_*() partly.

Change Summary

Incremental Difference

--- a/src/cmd2.c
+++ b/src/cmd2.c
@@ -738,6 +738,8 @@ void do_cmd_open(void)
738738
739739 bool more = FALSE;
740740
741+ if (p_ptr->wild_mode) return;
742+
741743 if (p_ptr->special_defense & KATA_MUSOU)
742744 {
743745 set_action(ACTION_NONE);
@@ -894,6 +896,8 @@ void do_cmd_close(void)
894896
895897 bool more = FALSE;
896898
899+ if (p_ptr->wild_mode) return;
900+
897901 if (p_ptr->special_defense & KATA_MUSOU)
898902 {
899903 set_action(ACTION_NONE);
@@ -1475,12 +1479,13 @@ void do_cmd_disarm(void)
14751479
14761480 bool more = FALSE;
14771481
1482+ if (p_ptr->wild_mode) return;
1483+
14781484 if (p_ptr->special_defense & KATA_MUSOU)
14791485 {
14801486 set_action(ACTION_NONE);
14811487 }
14821488
1483-
14841489 /* Option: Pick a direction */
14851490 if (easy_disarm)
14861491 {
@@ -1673,12 +1678,11 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
16731678 */
16741679 void do_cmd_bash(void)
16751680 {
1676- int y, x, dir;
1677-
1681+ int y, x, dir;
16781682 cave_type *c_ptr;
1679-
16801683 bool more = FALSE;
16811684
1685+ if (p_ptr->wild_mode) return;
16821686
16831687 if (p_ptr->special_defense & KATA_MUSOU)
16841688 {
@@ -1894,13 +1898,15 @@ void do_cmd_spike(void)
18941898 {
18951899 DIRECTION dir;
18961900
1901+ if (p_ptr->wild_mode) return;
1902+
18971903 if (p_ptr->special_defense & KATA_MUSOU)
18981904 {
18991905 set_action(ACTION_NONE);
19001906 }
19011907
19021908 /* Get a "repeated" direction */
1903- if (get_rep_dir(&dir,FALSE))
1909+ if (get_rep_dir(&dir, FALSE))
19041910 {
19051911 POSITION y, x;
19061912 INVENTORY_IDX item;
--- a/src/dungeon.c
+++ b/src/dungeon.c
@@ -4121,35 +4121,35 @@ static void process_command(void)
41214121 /* Open a door or chest */
41224122 case 'o':
41234123 {
4124- if (!p_ptr->wild_mode) do_cmd_open();
4124+ do_cmd_open();
41254125 break;
41264126 }
41274127
41284128 /* Close a door */
41294129 case 'c':
41304130 {
4131- if (!p_ptr->wild_mode) do_cmd_close();
4131+ do_cmd_close();
41324132 break;
41334133 }
41344134
41354135 /* Jam a door with spikes */
41364136 case 'j':
41374137 {
4138- if (!p_ptr->wild_mode) do_cmd_spike();
4138+ do_cmd_spike();
41394139 break;
41404140 }
41414141
41424142 /* Bash a door */
41434143 case 'B':
41444144 {
4145- if (!p_ptr->wild_mode) do_cmd_bash();
4145+ do_cmd_bash();
41464146 break;
41474147 }
41484148
41494149 /* Disarm a trap or chest */
41504150 case 'D':
41514151 {
4152- if (!p_ptr->wild_mode) do_cmd_disarm();
4152+ do_cmd_disarm();
41534153 break;
41544154 }
41554155
@@ -4326,13 +4326,13 @@ static void process_command(void)
43264326 {
43274327 if (!p_ptr->wild_mode)
43284328 {
4329- if (!p_ptr->inside_arena)
4330- do_cmd_aim_wand();
4331- else
4332- {
4333- msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
4334- msg_print(NULL);
4335- }
4329+ if (!p_ptr->inside_arena)
4330+ do_cmd_aim_wand();
4331+ else
4332+ {
4333+ msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
4334+ msg_print(NULL);
4335+ }
43364336 }
43374337 break;
43384338 }
Show on old repository browser