• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: Commit

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


Commit MetaInfo

Revision599bc70f6962015a58bd66573a2161bc27fe5736 (tree)
Time2019-06-27 11:46:13
Authordeskull <deskull@user...>
Commiterdeskull

Log Message

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

Change Summary

Incremental Difference

--- a/src/core.c
+++ b/src/core.c
@@ -2401,7 +2401,7 @@ static void process_world_aux_mutation(void)
24012401 }
24022402 if ((p_ptr->muta2 & MUT2_POLY_WOUND) && one_in_(3000))
24032403 {
2404- do_poly_wounds();
2404+ do_poly_wounds(p_ptr);
24052405 }
24062406 if ((p_ptr->muta2 & MUT2_WASTING) && one_in_(3000))
24072407 {
--- a/src/patron.c
+++ b/src/patron.c
@@ -453,7 +453,7 @@ void gain_level_reward(int chosen_reward)
453453
454454 msg_format(_("%sの力が触れるのを感じた。", "You feel the power of %s touch you."),
455455 chaos_patrons[p_ptr->chaos_patron]);
456- do_poly_wounds();
456+ do_poly_wounds(p_ptr);
457457 reward = _("傷が変化した。", "polymorphing wounds");
458458 break;
459459
--- a/src/player-effects.c
+++ b/src/player-effects.c
@@ -3679,27 +3679,27 @@ bool lose_all_info(player_type *creature_ptr)
36793679 }
36803680
36813681
3682-void do_poly_wounds(void)
3682+void do_poly_wounds(player_type *creature_ptr)
36833683 {
36843684 /* Changed to always provide at least _some_ healing */
3685- s16b wounds = p_ptr->cut;
3686- s16b hit_p = (p_ptr->mhp - p_ptr->chp);
3687- s16b change = damroll(p_ptr->lev, 5);
3685+ s16b wounds = creature_ptr->cut;
3686+ s16b hit_p = (creature_ptr->mhp - creature_ptr->chp);
3687+ s16b change = damroll(creature_ptr->lev, 5);
36883688 bool Nasty_effect = one_in_(5);
36893689
36903690 if (!(wounds || hit_p || Nasty_effect)) return;
36913691
36923692 msg_print(_("傷がより軽いものに変化した。", "Your wounds are polymorphed into less serious ones."));
3693- hp_player(p_ptr, change);
3693+ hp_player(creature_ptr, change);
36943694 if (Nasty_effect)
36953695 {
36963696 msg_print(_("新たな傷ができた!", "A new wound was created!"));
36973697 take_hit(DAMAGE_LOSELIFE, change / 2, _("変化した傷", "a polymorphed wound"), -1);
3698- set_cut(p_ptr,change);
3698+ set_cut(creature_ptr,change);
36993699 }
37003700 else
37013701 {
3702- set_cut(p_ptr,p_ptr->cut - (change / 2));
3702+ set_cut(creature_ptr,creature_ptr->cut - (change / 2));
37033703 }
37043704 }
37053705
@@ -3892,7 +3892,7 @@ void do_poly_self(player_type *creature_ptr)
38923892 if (power > randint0(5))
38933893 {
38943894 power -= 5;
3895- do_poly_wounds();
3895+ do_poly_wounds(p_ptr);
38963896 }
38973897
38983898 /* Note: earlier deductions may have left power < 0 already. */
--- a/src/player-effects.h
+++ b/src/player-effects.h
@@ -80,7 +80,7 @@ extern bool choose_ele_immune(TIME_EFFECT turn);
8080 extern bool set_wraith_form(TIME_EFFECT v, bool do_dec);
8181 extern bool set_tim_esp(TIME_EFFECT v, bool do_dec);
8282 extern bool set_superstealth(bool set);
83-extern void do_poly_wounds(void);
83+extern void do_poly_wounds(player_type *creature_ptr);
8484 extern void change_race(player_type *creature_ptr, CHARACTER_IDX new_race, concptr effect_msg);
8585
8686 extern const kamae kamae_shurui[MAX_KAMAE];
Show on old repository browser