変愚蛮怒のメインリポジトリです
Revision | 599bc70f6962015a58bd66573a2161bc27fe5736 (tree) |
---|---|
Time | 2019-06-27 11:46:13 |
Author | deskull <deskull@user...> |
Commiter | deskull |
[Refactor] #38997 do_poly_wounds() に player_type * 引数を追加.
@@ -2401,7 +2401,7 @@ static void process_world_aux_mutation(void) | ||
2401 | 2401 | } |
2402 | 2402 | if ((p_ptr->muta2 & MUT2_POLY_WOUND) && one_in_(3000)) |
2403 | 2403 | { |
2404 | - do_poly_wounds(); | |
2404 | + do_poly_wounds(p_ptr); | |
2405 | 2405 | } |
2406 | 2406 | if ((p_ptr->muta2 & MUT2_WASTING) && one_in_(3000)) |
2407 | 2407 | { |
@@ -453,7 +453,7 @@ void gain_level_reward(int chosen_reward) | ||
453 | 453 | |
454 | 454 | msg_format(_("%sの力が触れるのを感じた。", "You feel the power of %s touch you."), |
455 | 455 | chaos_patrons[p_ptr->chaos_patron]); |
456 | - do_poly_wounds(); | |
456 | + do_poly_wounds(p_ptr); | |
457 | 457 | reward = _("傷が変化した。", "polymorphing wounds"); |
458 | 458 | break; |
459 | 459 |
@@ -3679,27 +3679,27 @@ bool lose_all_info(player_type *creature_ptr) | ||
3679 | 3679 | } |
3680 | 3680 | |
3681 | 3681 | |
3682 | -void do_poly_wounds(void) | |
3682 | +void do_poly_wounds(player_type *creature_ptr) | |
3683 | 3683 | { |
3684 | 3684 | /* 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); | |
3688 | 3688 | bool Nasty_effect = one_in_(5); |
3689 | 3689 | |
3690 | 3690 | if (!(wounds || hit_p || Nasty_effect)) return; |
3691 | 3691 | |
3692 | 3692 | msg_print(_("傷がより軽いものに変化した。", "Your wounds are polymorphed into less serious ones.")); |
3693 | - hp_player(p_ptr, change); | |
3693 | + hp_player(creature_ptr, change); | |
3694 | 3694 | if (Nasty_effect) |
3695 | 3695 | { |
3696 | 3696 | msg_print(_("新たな傷ができた!", "A new wound was created!")); |
3697 | 3697 | take_hit(DAMAGE_LOSELIFE, change / 2, _("変化した傷", "a polymorphed wound"), -1); |
3698 | - set_cut(p_ptr,change); | |
3698 | + set_cut(creature_ptr,change); | |
3699 | 3699 | } |
3700 | 3700 | else |
3701 | 3701 | { |
3702 | - set_cut(p_ptr,p_ptr->cut - (change / 2)); | |
3702 | + set_cut(creature_ptr,creature_ptr->cut - (change / 2)); | |
3703 | 3703 | } |
3704 | 3704 | } |
3705 | 3705 |
@@ -3892,7 +3892,7 @@ void do_poly_self(player_type *creature_ptr) | ||
3892 | 3892 | if (power > randint0(5)) |
3893 | 3893 | { |
3894 | 3894 | power -= 5; |
3895 | - do_poly_wounds(); | |
3895 | + do_poly_wounds(p_ptr); | |
3896 | 3896 | } |
3897 | 3897 | |
3898 | 3898 | /* Note: earlier deductions may have left power < 0 already. */ |
@@ -80,7 +80,7 @@ extern bool choose_ele_immune(TIME_EFFECT turn); | ||
80 | 80 | extern bool set_wraith_form(TIME_EFFECT v, bool do_dec); |
81 | 81 | extern bool set_tim_esp(TIME_EFFECT v, bool do_dec); |
82 | 82 | extern bool set_superstealth(bool set); |
83 | -extern void do_poly_wounds(void); | |
83 | +extern void do_poly_wounds(player_type *creature_ptr); | |
84 | 84 | extern void change_race(player_type *creature_ptr, CHARACTER_IDX new_race, concptr effect_msg); |
85 | 85 | |
86 | 86 | extern const kamae kamae_shurui[MAX_KAMAE]; |