• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revisione021c306b2977faab8e47633ad3c9b50f9debab6 (tree)
Time2019-08-12 23:27:45
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/racial.c
+++ b/src/racial.c
@@ -129,22 +129,22 @@ static bool choose_kamae(player_type *creature_ptr)
129129 * @brief 剣術家の型設定処理
130130 * @return 型を変化させたらTRUE、型の構え不能かキャンセルしたらFALSEを返す。
131131 */
132-static bool choose_kata(void)
132+static bool choose_kata(player_type *creature_ptr)
133133 {
134134 char choice;
135135 int new_kata = 0;
136136 int i;
137137 char buf[80];
138138
139- if (cmd_limit_confused(p_ptr)) return FALSE;
139+ if (cmd_limit_confused(creature_ptr)) return FALSE;
140140
141- if (p_ptr->stun)
141+ if (creature_ptr->stun)
142142 {
143143 msg_print(_("意識がはっきりとしない。", "You are not clear headed"));
144144 return FALSE;
145145 }
146146
147- if (p_ptr->afraid)
147+ if (creature_ptr->afraid)
148148 {
149149 msg_print(_("体が震えて構えられない!", "You are trembling with fear!"));
150150 return FALSE;
@@ -154,7 +154,7 @@ static bool choose_kata(void)
154154
155155 for (i = 0; i < MAX_KATA; i++)
156156 {
157- if (p_ptr->lev >= kata_shurui[i].min_level)
157+ if (creature_ptr->lev >= kata_shurui[i].min_level)
158158 {
159159 sprintf(buf,_(" %c) %sの型 %s", " %c) Form of %-12s %s"),I2A(i+1), kata_shurui[i].desc, kata_shurui[i].info);
160160 prt(buf, 3+i, 20);
@@ -175,9 +175,9 @@ static bool choose_kata(void)
175175 }
176176 else if ((choice == 'a') || (choice == 'A'))
177177 {
178- if (p_ptr->action == ACTION_KATA)
178+ if (creature_ptr->action == ACTION_KATA)
179179 {
180- set_action(p_ptr, ACTION_NONE);
180+ set_action(creature_ptr, ACTION_NONE);
181181 }
182182 else
183183 msg_print(_("もともと構えていない。", "You are not assuming posture."));
@@ -189,36 +189,36 @@ static bool choose_kata(void)
189189 new_kata = 0;
190190 break;
191191 }
192- else if (((choice == 'c') || (choice == 'C')) && (p_ptr->lev > 29))
192+ else if (((choice == 'c') || (choice == 'C')) && (creature_ptr->lev > 29))
193193 {
194194 new_kata = 1;
195195 break;
196196 }
197- else if (((choice == 'd') || (choice == 'D')) && (p_ptr->lev > 34))
197+ else if (((choice == 'd') || (choice == 'D')) && (creature_ptr->lev > 34))
198198 {
199199 new_kata = 2;
200200 break;
201201 }
202- else if (((choice == 'e') || (choice == 'E')) && (p_ptr->lev > 39))
202+ else if (((choice == 'e') || (choice == 'E')) && (creature_ptr->lev > 39))
203203 {
204204 new_kata = 3;
205205 break;
206206 }
207207 }
208- set_action(p_ptr, ACTION_KATA);
208+ set_action(creature_ptr, ACTION_KATA);
209209
210- if (p_ptr->special_defense & (KATA_IAI << new_kata))
210+ if (creature_ptr->special_defense & (KATA_IAI << new_kata))
211211 {
212212 msg_print(_("構え直した。", "You reassume a posture."));
213213 }
214214 else
215215 {
216- p_ptr->special_defense &= ~(KATA_MASK);
217- p_ptr->update |= (PU_BONUS | PU_MONSTERS);
216+ creature_ptr->special_defense &= ~(KATA_MASK);
217+ creature_ptr->update |= (PU_BONUS | PU_MONSTERS);
218218 msg_format(_("%sの型で構えた。", "You assume a posture of %s form."),kata_shurui[new_kata].desc);
219- p_ptr->special_defense |= (KATA_IAI << new_kata);
219+ creature_ptr->special_defense |= (KATA_IAI << new_kata);
220220 }
221- p_ptr->redraw |= (PR_STATE | PR_STATUS);
221+ creature_ptr->redraw |= (PR_STATE | PR_STATUS);
222222 screen_load();
223223 return TRUE;
224224 }
@@ -570,7 +570,7 @@ static bool cmd_racial_power_aux(s32b command)
570570 msg_print(_("武器を持たないといけません。", "You need to wield a weapon."));
571571 return FALSE;
572572 }
573- if (!choose_kata()) return FALSE;
573+ if (!choose_kata(p_ptr)) return FALSE;
574574 p_ptr->update |= (PU_BONUS);
575575 }
576576 break;
Show on old repository browser