OSDN Git Service

[Refactor] #37353 鏡使いのレイシャル「静水」を mirror_concentration() に分離。 / Separate Mirror master...
[hengband/hengband.git] / src / effects.c
index 8cb29aa..23ac4f4 100644 (file)
  */
 
 #include "angband.h"
+#include "mutation.h"
+#include "quest.h"
+#include "avatar.h"
+#include "player-status.h"
 
 /*!
  * @brief プレイヤーの継続行動を設定する。
@@ -116,11 +120,7 @@ void set_action(ACTION_IDX typ)
                        break;
                }
        }
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Redraw the state */
        p_ptr->redraw |= (PR_STATE);
 }
 
@@ -173,7 +173,6 @@ void reset_tim_flags(void)
        p_ptr->dustrobe = 0;
        p_ptr->action = ACTION_NONE;
 
-
        p_ptr->oppose_acid = 0;     /* Timed -- oppose acid */
        p_ptr->oppose_elec = 0;     /* Timed -- oppose lightning */
        p_ptr->oppose_fire = 0;     /* Timed -- oppose heat */
@@ -266,22 +265,15 @@ void dispel_player(void)
 
        if (music_singing_any() || hex_spelling_any())
        {
-               cptr str = (music_singing_any()) ? _("歌", "singing") : _("呪文", "spelling");
+               concptr str = (music_singing_any()) ? _("歌", "singing") : _("呪文", "spelling");
                INTERUPTING_SONG_EFFECT(p_ptr) = SINGING_SONG_EFFECT(p_ptr);
                SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
                msg_format(_("%sが途切れた。", "Your %s is interrupted."), str);
-               p_ptr->action = ACTION_NONE;
-
-               /* Recalculate bonuses */
-               p_ptr->update |= (PU_BONUS | PU_HP);
 
+               p_ptr->action = ACTION_NONE;
+               p_ptr->update |= (PU_BONUS | PU_HP | PU_MONSTERS);
                p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
-
-               /* Update monsters */
-               p_ptr->update |= (PU_MONSTERS);
-
                p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
                p_ptr->energy_need += ENERGY_NEED();
        }
 }
@@ -342,8 +334,6 @@ bool set_mimic(TIME_EFFECT v, IDX p, bool do_dec)
 
        /* Redraw title */
        p_ptr->redraw |= (PR_BASIC | PR_STATUS);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS | PU_HP);
 
        handle_stuff();
@@ -423,8 +413,6 @@ bool set_blind(TIME_EFFECT v)
        p_ptr->redraw |= (PR_MAP);
 
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -511,8 +499,6 @@ bool set_confused(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -562,8 +548,6 @@ bool set_poisoned(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -627,8 +611,6 @@ bool set_afraid(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -684,11 +666,7 @@ bool set_paralyzed(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Redraw the state */
        p_ptr->redraw |= (PR_STATE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -707,6 +685,7 @@ bool set_image(TIME_EFFECT v)
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
 
        if (p_ptr->is_dead) return FALSE;
+       if (p_ptr->pseikaku == SEIKAKU_CHARGEMAN) v = 0;
 
 
        /* Open */
@@ -750,13 +729,9 @@ bool set_image(TIME_EFFECT v)
 
        /* Update the health bar */
        p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
-
-       /* Update monsters */
        p_ptr->update |= (PU_MONSTERS);
 
        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -809,11 +784,7 @@ bool set_fast(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -868,11 +839,7 @@ bool set_lightspeed(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -923,11 +890,7 @@ bool set_slow(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -982,11 +945,7 @@ bool set_shield(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1041,11 +1000,7 @@ bool set_tsubureru(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1100,11 +1055,7 @@ bool set_magicdef(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1158,11 +1109,7 @@ bool set_blessed(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1217,14 +1164,10 @@ bool set_hero(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Recalculate hitpoints */
        p_ptr->update |= (PU_HP);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1279,14 +1222,10 @@ bool set_shero(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Recalculate hitpoints */
        p_ptr->update |= (PU_HP);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1340,8 +1279,6 @@ bool set_protevil(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1378,8 +1315,6 @@ bool set_wraith_form(TIME_EFFECT v, bool do_dec)
                        chg_virtue(V_VALOUR, -5);
 
                        p_ptr->redraw |= (PR_MAP);
-
-                       /* Update monsters */
                        p_ptr->update |= (PU_MONSTERS);
 
                        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
@@ -1395,8 +1330,6 @@ bool set_wraith_form(TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
 
                        p_ptr->redraw |= (PR_MAP);
-
-                       /* Update monsters */
                        p_ptr->update |= (PU_MONSTERS);
 
                        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
@@ -1413,11 +1346,7 @@ bool set_wraith_form(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 
@@ -1456,8 +1385,6 @@ bool set_invuln(TIME_EFFECT v, bool do_dec)
                        chg_virtue(V_VALOUR, -5);
 
                        p_ptr->redraw |= (PR_MAP);
-
-                       /* Update monsters */
                        p_ptr->update |= (PU_MONSTERS);
 
                        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
@@ -1473,8 +1400,6 @@ bool set_invuln(TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
 
                        p_ptr->redraw |= (PR_MAP);
-
-                       /* Update monsters */
                        p_ptr->update |= (PU_MONSTERS);
 
                        p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
@@ -1493,11 +1418,7 @@ bool set_invuln(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1551,14 +1472,8 @@ bool set_tim_esp(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Update the monsters */
        p_ptr->update |= (PU_MONSTERS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1612,14 +1527,10 @@ bool set_tim_invis(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Update the monsters */
        p_ptr->update |= (PU_MONSTERS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1673,14 +1584,10 @@ bool set_tim_infra(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Update the monsters */
        p_ptr->update |= (PU_MONSTERS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1734,11 +1641,7 @@ bool set_tim_regen(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1792,11 +1695,7 @@ bool set_tim_stealth(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1907,11 +1806,7 @@ bool set_tim_levitation(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -1965,8 +1860,6 @@ bool set_tim_sh_touki(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2020,11 +1913,7 @@ bool set_tim_sh_fire(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2078,11 +1967,7 @@ bool set_tim_sh_holy(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2136,11 +2021,7 @@ bool set_tim_eyeeye(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2195,11 +2076,7 @@ bool set_resist_magic(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2253,11 +2130,7 @@ bool set_tim_reflect(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2309,11 +2182,7 @@ bool set_multishadow(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2367,11 +2236,7 @@ bool set_dustrobe(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2425,11 +2290,7 @@ bool set_kabenuke(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2489,14 +2350,10 @@ bool set_tsuyoshi(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Recalculate hitpoints */
        p_ptr->update |= (PU_HP);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2573,8 +2430,6 @@ bool set_ele_attack(u32b attack_type, TIME_EFFECT v)
        p_ptr->redraw |= (PR_STATUS);
 
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
 
        return (TRUE);
@@ -2652,8 +2507,6 @@ bool set_ele_immune(u32b immune_type, TIME_EFFECT v)
        p_ptr->redraw |= (PR_STATUS);
 
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
 
        return (TRUE);
@@ -2708,8 +2561,6 @@ bool set_oppose_acid(TIME_EFFECT v, bool do_dec)
        p_ptr->redraw |= (PR_STATUS);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2763,8 +2614,6 @@ bool set_oppose_elec(TIME_EFFECT v, bool do_dec)
        p_ptr->redraw |= (PR_STATUS);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2819,8 +2668,6 @@ bool set_oppose_fire(TIME_EFFECT v, bool do_dec)
        p_ptr->redraw |= (PR_STATUS);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2874,8 +2721,6 @@ bool set_oppose_cold(TIME_EFFECT v, bool do_dec)
        p_ptr->redraw |= (PR_STATUS);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -2930,8 +2775,6 @@ bool set_oppose_pois(TIME_EFFECT v, bool do_dec)
        p_ptr->redraw |= (PR_STATUS);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -3082,14 +2925,10 @@ bool set_stun(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw the "stun" */
        p_ptr->redraw |= (PR_STUN);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -3279,14 +3118,10 @@ bool set_cut(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw the "cut" */
        p_ptr->redraw |= (PR_CUT);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -3477,14 +3312,10 @@ bool set_food(TIME_EFFECT v)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Redraw hunger */
        p_ptr->redraw |= (PR_HUNGER);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -3544,8 +3375,6 @@ bool inc_stat(int stat)
                {
                        p_ptr->stat_max[stat] = value;
                }
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Success */
@@ -3679,8 +3508,6 @@ bool dec_stat(int stat, int amount, int permanent)
 
                /* Redisplay the stats later */
                p_ptr->redraw |= (PR_STATS);
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
        }
 
@@ -3700,8 +3527,6 @@ bool res_stat(int stat)
        {
                /* Restore */
                p_ptr->stat_cur[stat] = p_ptr->stat_max[stat];
-
-               /* Recalculate bonuses */
                p_ptr->update |= (PU_BONUS);
 
                /* Redisplay the stats later */
@@ -3745,7 +3570,6 @@ bool hp_player(int num)
                        p_ptr->chp_frac = 0;
                }
 
-               /* Redraw */
                p_ptr->redraw |= (PR_HP);
 
                p_ptr->window |= (PW_PLAYER);
@@ -3785,7 +3609,7 @@ bool hp_player(int num)
 /*
  * Array of stat "descriptions"
  */
-static cptr desc_stat_pos[] =
+static concptr desc_stat_pos[] =
 {
        _("強く", "strong"),
        _("知的に", "smart"),
@@ -3799,7 +3623,7 @@ static cptr desc_stat_pos[] =
 /*
  * Array of stat "descriptions"
  */
-static cptr desc_stat_neg[] =
+static concptr desc_stat_neg[] =
 {
        _("弱く", "weak"),
        _("無知に", "stupid"),
@@ -3971,12 +3795,10 @@ bool lose_all_info(void)
                /* Hack -- Clear the "felt" flag */
                o_ptr->ident &= ~(IDENT_SENSE);
        }
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
 
        /* Combine / Reorder the pack (later) */
-       p_ptr->notice |= (PN_COMBINE | PN_REORDER);
+       p_ptr->update |= (PU_COMBINE | PU_REORDER);
 
        p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
 
@@ -4016,9 +3838,9 @@ void do_poly_wounds(void)
 /*
  * Change player race
  */
-void change_race(CHARACTER_IDX new_race, cptr effect_msg)
+void change_race(CHARACTER_IDX new_race, concptr effect_msg)
 {
-       cptr title = race_info[new_race].title;
+       concptr title = race_info[new_race].title;
        int  old_race = p_ptr->prace;
 
 #ifdef JP
@@ -4119,7 +3941,7 @@ void do_poly_self(void)
                        /* Harmful deformity */
                        power -= 15;
 
-                       while (tmp < 6)
+                       while (tmp < A_MAX)
                        {
                                if (one_in_(2))
                                {
@@ -4170,7 +3992,7 @@ void do_poly_self(void)
                power -= 20;
                msg_format(_("%sの構成が変化した!", "Your internal organs are rearranged!"), p_ptr->prace == RACE_ANDROID ? "機械" : "内臓");
 
-               while (tmp < 6)
+               while (tmp < A_MAX)
                {
                        (void)dec_stat(tmp, randint1(6) + 6, one_in_(3));
                        tmp++;
@@ -4223,7 +4045,7 @@ void do_poly_self(void)
  * setting the player to "dead".
  */
 
-int take_hit(int damage_type, HIT_POINT damage, cptr hit_from, int monspell)
+int take_hit(int damage_type, HIT_POINT damage, concptr hit_from, int monspell)
 {
        int old_chp = p_ptr->chp;
 
@@ -4346,7 +4168,7 @@ int take_hit(int damage_type, HIT_POINT damage, cptr hit_from, int monspell)
 
                if (p_ptr->inside_arena)
                {
-                       cptr m_name = r_name+r_info[arena_info[p_ptr->arena_number].r_idx].name;
+                       concptr m_name = r_name+r_info[arena_info[p_ptr->arena_number].r_idx].name;
                        msg_format(_("あなたは%sの前に敗れ去った。", "You are beaten by %s."), m_name);
                        msg_print(NULL);
                        if (record_arena) do_cmd_write_nikki(NIKKI_ARENA, -1 - p_ptr->arena_number, m_name);
@@ -4474,7 +4296,7 @@ int take_hit(int damage_type, HIT_POINT damage, cptr hit_from, int monspell)
                                        int h = Term->hgt;
                                        int msg_pos_x[9] = {  5,  7,  9, 12,  14,  17,  19,  21, 23};
                                        int msg_pos_y[9] = {  3,  4,  5,  4,   5,   4,   5,   6,  4};
-                                       cptr str;
+                                       concptr str;
                                        char* str2;
 
                                        Term_clear();
@@ -4683,7 +4505,7 @@ void calc_android_exp(void)
                        if (value > 100000L)
                                exp += (value - 100000L) / 4  * level;
                }
-               if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (buki_motteruka(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
+               if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (has_melee_weapon(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
                else total_exp += exp / 16;
                if (i == INVEN_BODY) total_exp += exp / 32;
        }
@@ -4787,11 +4609,7 @@ bool set_ultimate_res(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -4839,11 +4657,7 @@ bool set_tim_res_nether(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -4891,11 +4705,7 @@ bool set_tim_res_time(TIME_EFFECT v, bool do_dec)
        if (!notice) return (FALSE);
 
        if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Recalculate bonuses */
        p_ptr->update |= (PU_BONUS);
-
-       /* Handle stuff */
        handle_stuff();
        return (TRUE);
 }
@@ -4910,13 +4720,11 @@ bool choose_ele_attack(void)
 
        char choice;
 
-       if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
+       if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
        {
                msg_format(_("武器を持たないと魔法剣は使えない。", "You cannot use temporary branding with no weapon."));
                return FALSE;
        }
-
-       /* Save screen */
        screen_save();
 
        num = (p_ptr->lev - 20) / 5;
@@ -4967,7 +4775,6 @@ bool choose_ele_attack(void)
                screen_load();
                return FALSE;
        }
-       /* Load screen */
        screen_load();
        return TRUE;
 }
@@ -4979,8 +4786,6 @@ bool choose_ele_attack(void)
 bool choose_ele_immune(TIME_EFFECT immune_turn)
 {
        char choice;
-
-       /* Save screen */
        screen_save();
 
        c_prt(TERM_RED,    _("        a) 火炎", "        a) Immune Fire"), 2, 14);
@@ -5012,7 +4817,6 @@ bool choose_ele_immune(TIME_EFFECT immune_turn)
                screen_load();
                return FALSE;
        }
-       /* Load screen */
        screen_load();
        return TRUE;
 }