OSDN Git Service

[Refactor] #38997 take_hit() に player_type * 引数を追加.
[hengband/hengband.git] / src / player-status.c
index 522b0bc..88ed64f 100644 (file)
@@ -1615,7 +1615,7 @@ void calc_bonuses(void)
        {
                if (!(empty_hands_status & EMPTY_HAND_RARM))
                {
-                       set_action(ACTION_NONE);
+                       set_action(p_ptr, ACTION_NONE);
                }
        }
 
@@ -3807,7 +3807,7 @@ void calc_bonuses(void)
                                msg_print(_("今の装備はどうも自分にふさわしくない気がする。", "You do not feel comfortable with your weapon."));
                                if (current_world_ptr->is_loading_now)
                                {
-                                       chg_virtue(V_FAITH, -1);
+                                       chg_virtue(p_ptr, V_FAITH, -1);
                                }
                        }
                        else if (has_melee_weapon(INVEN_RARM + i))
@@ -3853,7 +3853,7 @@ void calc_bonuses(void)
                        msg_print(_("装備が重くてバランスを取れない。", "The weight of your armor disrupts your balance."));
                        if (current_world_ptr->is_loading_now)
                        {
-                               chg_virtue(V_HARMONY, -1);
+                               chg_virtue(p_ptr, V_HARMONY, -1);
                        }
                }
                else
@@ -4162,7 +4162,7 @@ static void calc_torch(void)
                p_ptr->old_lite = p_ptr->cur_lite;
 
                if ((p_ptr->cur_lite > 0) && (p_ptr->special_defense & NINJA_S_STEALTH))
-                       set_superstealth(FALSE);
+                       set_superstealth(p_ptr, FALSE);
        }
 }
 
@@ -5177,7 +5177,7 @@ void wreck_the_pattern(void)
        msg_print(_("パターンを血で汚してしまった!", "You bleed on the Pattern!"));
        msg_print(_("何か恐ろしい事が起こった!", "Something terrible happens!"));
 
-       if (!IS_INVULN()) take_hit(DAMAGE_NOESCAPE, damroll(10, 8), _("パターン損壊", "corrupting the Pattern"), -1);
+       if (!IS_INVULN()) take_hit(p_ptr, DAMAGE_NOESCAPE, damroll(10, 8), _("パターン損壊", "corrupting the Pattern"), -1);
        to_ruin = randint1(45) + 35;
 
        while (to_ruin--)
@@ -5374,11 +5374,11 @@ void sanity_blast(monster_type *m_ptr, bool necro)
        }
 
        do {
-               (void)do_dec_stat(A_INT);
+               (void)do_dec_stat(p_ptr, A_INT);
        } while (randint0(100) > p_ptr->skill_sav && one_in_(2));
 
        do {
-               (void)do_dec_stat(A_WIS);
+               (void)do_dec_stat(p_ptr, A_WIS);
        } while (randint0(100) > p_ptr->skill_sav && one_in_(2));
 
        switch (randint1(21))
@@ -5447,15 +5447,15 @@ void sanity_blast(monster_type *m_ptr, bool necro)
                /* Brain smash */
                if (!p_ptr->resist_conf)
                {
-                       (void)set_confused(p_ptr->confused + randint0(4) + 4);
+                       (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
                }
                if (!p_ptr->free_act)
                {
-                       (void)set_paralyzed(p_ptr->paralyzed + randint0(4) + 4);
+                       (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint0(4) + 4);
                }
                if (!p_ptr->resist_chaos)
                {
-                       (void)set_image(p_ptr->image + randint0(250) + 150);
+                       (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
                }
                break;
        case 17:
@@ -5464,7 +5464,7 @@ void sanity_blast(monster_type *m_ptr, bool necro)
        case 20:
        case 21:
                /* Amnesia */
-               if (lose_all_info())
+               if (lose_all_info(p_ptr))
                        msg_print(_("あまりの恐怖に全てのことを忘れてしまった!", "You forget everything in your utmost terror!"));
                break;
        }
@@ -5598,11 +5598,11 @@ void check_experience(void)
                                                        prt("", n + 2, 14);
                                        if (get_check(_("よろしいですか?", "Are you sure? "))) break;
                                }
-                               do_inc_stat(choice - 'a');
+                               do_inc_stat(p_ptr, choice - 'a');
                                screen_load();
                        }
                        else if (!(p_ptr->max_plv % 2))
-                               do_inc_stat(randint0(6));
+                               do_inc_stat(p_ptr, randint0(6));
                }
 
                if (level_mutation)
@@ -5618,7 +5618,7 @@ void check_experience(void)
                 */
                if (level_reward)
                {
-                       gain_level_reward(0);
+                       gain_level_reward(p_ptr, 0);
                        level_reward = FALSE;
                }
 
@@ -5843,7 +5843,7 @@ void cheat_death(player_type *creature_ptr)
        creature_ptr->is_dead = FALSE;
 
        /* Hack -- Prevent starvation */
-       (void)set_food(PY_FOOD_MAX - 1);
+       (void)set_food(p_ptr, PY_FOOD_MAX - 1);
 
        current_floor_ptr->dun_level = 0;
        creature_ptr->inside_arena = FALSE;