• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision01722d489e59db9fe1a2292ef4178fedd90b4c2c (tree)
Time2019-06-27 12:15:55
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -4286,7 +4286,7 @@ bool choose_ele_attack(void)
42864286 /*
42874287 * Choose a elemental immune. -LM-
42884288 */
4289-bool choose_ele_immune(TIME_EFFECT immune_turn)
4289+bool choose_ele_immune(player_type *creature_ptr, TIME_EFFECT immune_turn)
42904290 {
42914291 char choice;
42924292 screen_save();
@@ -4307,13 +4307,13 @@ bool choose_ele_immune(TIME_EFFECT immune_turn)
43074307 choice = inkey();
43084308
43094309 if ((choice == 'a') || (choice == 'A'))
4310- set_ele_immune(p_ptr, DEFENSE_FIRE, immune_turn);
4310+ set_ele_immune(creature_ptr, DEFENSE_FIRE, immune_turn);
43114311 else if ((choice == 'b') || (choice == 'B'))
4312- set_ele_immune(p_ptr, DEFENSE_COLD, immune_turn);
4312+ set_ele_immune(creature_ptr, DEFENSE_COLD, immune_turn);
43134313 else if ((choice == 'c') || (choice == 'C'))
4314- set_ele_immune(p_ptr, DEFENSE_ACID, immune_turn);
4314+ set_ele_immune(creature_ptr, DEFENSE_ACID, immune_turn);
43154315 else if ((choice == 'd') || (choice == 'D'))
4316- set_ele_immune(p_ptr, DEFENSE_ELEC, immune_turn);
4316+ set_ele_immune(creature_ptr, DEFENSE_ELEC, immune_turn);
43174317 else
43184318 {
43194319 msg_print(_("免疫を付けるのをやめた。", "You cancel the temporary immune."));
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -76,7 +76,7 @@ extern bool set_ultimate_res(TIME_EFFECT v, bool do_dec);
7676 extern bool set_tim_res_nether(TIME_EFFECT v, bool do_dec);
7777 extern bool set_tim_res_time(TIME_EFFECT v, bool do_dec);
7878 extern bool choose_ele_attack(void);
79-extern bool choose_ele_immune(TIME_EFFECT turn);
79+extern bool choose_ele_immune(player_type *creature_ptr, TIME_EFFECT turn);
8080 extern bool set_wraith_form(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
8181 extern bool set_tim_esp(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
8282 extern bool set_superstealth(player_type *creature_ptr, bool set);
--- a/src/realm-craft.c
+++ b/src/realm-craft.c
@@ -499,7 +499,7 @@ concptr do_craft_spell(SPELL_IDX spell, BIT_FLAGS mode)
499499
500500 if (cast)
501501 {
502- if (!choose_ele_immune(base + randint1(base))) return NULL;
502+ if (!choose_ele_immune(p_ptr, base + randint1(base))) return NULL;
503503 }
504504 }
505505 break;
Show on old repository browser