• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision9ebbd286cb7f84990d5047dda2d56ad884831f7c (tree)
Time2019-08-12 23:24:02
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

[Refactor] #38997 choose_kamae() に player_type * 引数を追加.

Change Summary

Incremental Difference

--- a/src/racial.c
+++ b/src/racial.c
@@ -42,20 +42,20 @@
4242 * @brief 修行僧の構え設定処理
4343 * @return 構えを変化させたらTRUE、構え不能かキャンセルしたらFALSEを返す。
4444 */
45-static bool choose_kamae(void)
45+static bool choose_kamae(player_type *creature_ptr)
4646 {
4747 char choice;
4848 int new_kamae = 0;
4949 int i;
5050 char buf[80];
5151
52- if (cmd_limit_confused(p_ptr)) return FALSE;
52+ if (cmd_limit_confused(creature_ptr)) return FALSE;
5353 screen_save();
5454 prt(_(" a) 構えをとく", " a) No form"), 2, 20);
5555
5656 for (i = 0; i < MAX_KAMAE; i++)
5757 {
58- if (p_ptr->lev >= kamae_shurui[i].min_level)
58+ if (creature_ptr->lev >= kamae_shurui[i].min_level)
5959 {
6060 sprintf(buf," %c) %-12s %s",I2A(i+1), kamae_shurui[i].desc, kamae_shurui[i].info);
6161 prt(buf, 3+i, 20);
@@ -76,9 +76,9 @@ static bool choose_kamae(void)
7676 }
7777 else if ((choice == 'a') || (choice == 'A'))
7878 {
79- if (p_ptr->action == ACTION_KAMAE)
79+ if (creature_ptr->action == ACTION_KAMAE)
8080 {
81- set_action(p_ptr, ACTION_NONE);
81+ set_action(creature_ptr, ACTION_NONE);
8282 }
8383 else
8484 msg_print(_("もともと構えていない。", "You are not assuming a posture."));
@@ -90,37 +90,37 @@ static bool choose_kamae(void)
9090 new_kamae = 0;
9191 break;
9292 }
93- else if (((choice == 'c') || (choice == 'C')) && (p_ptr->lev > 29))
93+ else if (((choice == 'c') || (choice == 'C')) && (creature_ptr->lev > 29))
9494 {
9595 new_kamae = 1;
9696 break;
9797 }
98- else if (((choice == 'd') || (choice == 'D')) && (p_ptr->lev > 34))
98+ else if (((choice == 'd') || (choice == 'D')) && (creature_ptr->lev > 34))
9999 {
100100 new_kamae = 2;
101101 break;
102102 }
103- else if (((choice == 'e') || (choice == 'E')) && (p_ptr->lev > 39))
103+ else if (((choice == 'e') || (choice == 'E')) && (creature_ptr->lev > 39))
104104 {
105105 new_kamae = 3;
106106 break;
107107 }
108108 }
109- set_action(p_ptr, ACTION_KAMAE);
109+ set_action(creature_ptr, ACTION_KAMAE);
110110
111- if (p_ptr->special_defense & (KAMAE_GENBU << new_kamae))
111+ if (creature_ptr->special_defense & (KAMAE_GENBU << new_kamae))
112112 {
113113 msg_print(_("構え直した。", "You reassume a posture."));
114114 }
115115 else
116116 {
117- p_ptr->special_defense &= ~(KAMAE_MASK);
118- p_ptr->update |= (PU_BONUS);
119- p_ptr->redraw |= (PR_STATE);
117+ creature_ptr->special_defense &= ~(KAMAE_MASK);
118+ creature_ptr->update |= (PU_BONUS);
119+ creature_ptr->redraw |= (PR_STATE);
120120 msg_format(_("%sの構えをとった。", "You assume a posture of %s form."),kamae_shurui[new_kamae].desc);
121- p_ptr->special_defense |= (KAMAE_GENBU << new_kamae);
121+ creature_ptr->special_defense |= (KAMAE_GENBU << new_kamae);
122122 }
123- p_ptr->redraw |= PR_STATE;
123+ creature_ptr->redraw |= PR_STATE;
124124 screen_load();
125125 return TRUE;
126126 }
@@ -476,7 +476,7 @@ static bool cmd_racial_power_aux(s32b command)
476476
477477 if (command == -3)
478478 {
479- if (!choose_kamae()) return FALSE;
479+ if (!choose_kamae(p_ptr)) return FALSE;
480480 p_ptr->update |= (PU_BONUS);
481481 }
482482 else if (command == -4)
Show on old repository browser