OSDN Git Service

[Refactor] #40275 Separated race_info[] from player-race.c/h to race-info-table.c/h
[hengband/hengband.git] / src / player-effects.c
index a0c180a..d9361dd 100644 (file)
@@ -39,7 +39,7 @@
 #include "player-class.h"
 #include "player-move.h"
 #include "player-effects.h"
-#include "player-race.h"
+#include "player/race-info-table.h"
 #include "player-class.h"
 #include "player-personality.h"
 #include "player-sex.h"
@@ -99,9 +99,9 @@ const kamae kata_shurui[MAX_KATA] =
  * #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_KAMAE / #ACTION_KATA / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL から選択。
  * @return なし
  */
-void set_action(ACTION_IDX typ)
+void set_action(player_type *creature_ptr, ACTION_IDX typ)
 {
-       int prev_typ = p_ptr->action;
+       int prev_typ = creature_ptr->action;
 
        if (typ == prev_typ)
        {
@@ -114,32 +114,32 @@ void set_action(ACTION_IDX typ)
                        case ACTION_SEARCH:
                        {
                                msg_print(_("探索をやめた。", "You no longer walk carefully."));
-                               p_ptr->redraw |= (PR_SPEED);
+                               creature_ptr->redraw |= (PR_SPEED);
                                break;
                        }
                        case ACTION_REST:
                        {
-                               p_ptr->resting = 0;
+                               creature_ptr->resting = 0;
                                break;
                        }
                        case ACTION_LEARN:
                        {
-                               msg_print(_("学習をやめた。", "You stop Learning"));
-                               p_ptr->new_mane = FALSE;
+                               msg_print(_("学習をやめた。", "You stop learning."));
+                               creature_ptr->new_mane = FALSE;
                                break;
                        }
                        case ACTION_KAMAE:
                        {
-                               msg_print(_("構えをといた。", "You stop assuming the posture."));
-                               p_ptr->special_defense &= ~(KAMAE_MASK);
+                               msg_print(_("構えをといた。", "You stop assuming the special stance."));
+                               creature_ptr->special_defense &= ~(KAMAE_MASK);
                                break;
                        }
                        case ACTION_KATA:
                        {
-                               msg_print(_("型を崩した。", "You stop assuming the posture."));
-                               p_ptr->special_defense &= ~(KATA_MASK);
-                               p_ptr->update |= (PU_MONSTERS);
-                               p_ptr->redraw |= (PR_STATUS);
+                               msg_print(_("型を崩した。", "You stop assuming the special stance."));
+                               creature_ptr->special_defense &= ~(KATA_MASK);
+                               creature_ptr->update |= (PU_MONSTERS);
+                               creature_ptr->redraw |= (PR_STATUS);
                                break;
                        }
                        case ACTION_SING:
@@ -150,34 +150,34 @@ void set_action(ACTION_IDX typ)
                        case ACTION_HAYAGAKE:
                        {
                                msg_print(_("足が重くなった。", "You are no longer walking extremely fast."));
-                               take_turn(p_ptr, 100);
+                               take_turn(creature_ptr, 100);
                                break;
                        }
                        case ACTION_SPELL:
                        {
-                               msg_print(_("呪文の詠唱を中断した。", "You stopped spelling all spells."));
+                               msg_print(_("呪文の詠唱を中断した。", "You stopped casting."));
                                break;
                        }
                }
        }
 
-       p_ptr->action = typ;
+       creature_ptr->action = typ;
 
        /* If we are requested other action, stop singing */
-       if (prev_typ == ACTION_SING) stop_singing(p_ptr);
-       if (prev_typ == ACTION_SPELL) stop_hex_spell();
+       if (prev_typ == ACTION_SING) stop_singing(creature_ptr);
+       if (prev_typ == ACTION_SPELL) stop_hex_spell(creature_ptr);
 
-       switch (p_ptr->action)
+       switch (creature_ptr->action)
        {
                case ACTION_SEARCH:
                {
                        msg_print(_("注意深く歩き始めた。", "You begin to walk carefully."));
-                       p_ptr->redraw |= (PR_SPEED);
+                       creature_ptr->redraw |= (PR_SPEED);
                        break;
                }
                case ACTION_LEARN:
                {
-                       msg_print(_("学習を始めた。", "You begin Learning"));
+                       msg_print(_("学習を始めた。", "You begin learning"));
                        break;
                }
                case ACTION_FISH:
@@ -195,92 +195,92 @@ void set_action(ACTION_IDX typ)
                        break;
                }
        }
-       p_ptr->update |= (PU_BONUS);
-       p_ptr->redraw |= (PR_STATE);
+       creature_ptr->update |= (PU_BONUS);
+       creature_ptr->redraw |= (PR_STATE);
 }
 
 /*!
  * @brief プレイヤーの全ての時限効果をリセットする。 / reset timed flags
  * @return なし
  */
-void reset_tim_flags(void)
-{
-       p_ptr->fast = 0;            /* Timed -- Fast */
-       p_ptr->lightspeed = 0;
-       p_ptr->slow = 0;            /* Timed -- Slow */
-       p_ptr->blind = 0;           /* Timed -- Blindness */
-       p_ptr->paralyzed = 0;       /* Timed -- Paralysis */
-       p_ptr->confused = 0;        /* Timed -- Confusion */
-       p_ptr->afraid = 0;          /* Timed -- Fear */
-       p_ptr->image = 0;           /* Timed -- Hallucination */
-       p_ptr->poisoned = 0;        /* Timed -- Poisoned */
-       p_ptr->cut = 0;             /* Timed -- Cut */
-       p_ptr->stun = 0;            /* Timed -- Stun */
-
-       p_ptr->protevil = 0;        /* Timed -- Protection */
-       p_ptr->invuln = 0;          /* Timed -- Invulnerable */
-       p_ptr->ult_res = 0;
-       p_ptr->hero = 0;            /* Timed -- Heroism */
-       p_ptr->shero = 0;           /* Timed -- Super Heroism */
-       p_ptr->shield = 0;          /* Timed -- Shield Spell */
-       p_ptr->blessed = 0;         /* Timed -- Blessed */
-       p_ptr->tim_invis = 0;       /* Timed -- Invisibility */
-       p_ptr->tim_infra = 0;       /* Timed -- Infra Vision */
-       p_ptr->tim_regen = 0;       /* Timed -- Regeneration */
-       p_ptr->tim_stealth = 0;     /* Timed -- Stealth */
-       p_ptr->tim_esp = 0;
-       p_ptr->wraith_form = 0;     /* Timed -- Wraith Form */
-       p_ptr->tim_levitation = 0;
-       p_ptr->tim_sh_touki = 0;
-       p_ptr->tim_sh_fire = 0;
-       p_ptr->tim_sh_holy = 0;
-       p_ptr->tim_eyeeye = 0;
-       p_ptr->magicdef = 0;
-       p_ptr->resist_magic = 0;
-       p_ptr->tsuyoshi = 0;
-       p_ptr->kabenuke = 0;
-       p_ptr->tim_res_nether = 0;
-       p_ptr->tim_res_time = 0;
-       p_ptr->tim_mimic = 0;
-       p_ptr->mimic_form = 0;
-       p_ptr->tim_reflect = 0;
-       p_ptr->multishadow = 0;
-       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 */
-       p_ptr->oppose_cold = 0;     /* Timed -- oppose cold */
-       p_ptr->oppose_pois = 0;     /* Timed -- oppose poison */
-
-       p_ptr->word_recall = 0;
-       p_ptr->alter_reality = 0;
-       p_ptr->sutemi = FALSE;
-       p_ptr->counter = FALSE;
-       p_ptr->ele_attack = 0;
-       p_ptr->ele_immune = 0;
-       p_ptr->special_attack = 0L;
-       p_ptr->special_defense = 0L;
-
-       while(p_ptr->energy_need < 0) p_ptr->energy_need += ENERGY_NEED();
-       p_ptr->timewalk = FALSE;
-
-       if (PRACE_IS_(p_ptr, RACE_DEMON) && (p_ptr->lev > 44)) p_ptr->oppose_fire = 1;
-       if ((p_ptr->pclass == CLASS_NINJA) && (p_ptr->lev > 44)) p_ptr->oppose_pois = 1;
-       if (p_ptr->pclass == CLASS_BERSERKER) p_ptr->shero = 1;
-
-       if (p_ptr->riding)
-       {
-               (void)set_monster_fast(p_ptr->riding, 0);
-               (void)set_monster_slow(p_ptr->riding, 0);
-               (void)set_monster_invulner(p_ptr->riding, 0, FALSE);
-       }
-
-       if (p_ptr->pclass == CLASS_BARD)
-       {
-               SINGING_SONG_EFFECT(p_ptr) = 0;
-               SINGING_SONG_ID(p_ptr) = 0;
+void reset_tim_flags(player_type *creature_ptr)
+{
+       creature_ptr->fast = 0;            /* Timed -- Fast */
+       creature_ptr->lightspeed = 0;
+       creature_ptr->slow = 0;            /* Timed -- Slow */
+       creature_ptr->blind = 0;           /* Timed -- Blindness */
+       creature_ptr->paralyzed = 0;       /* Timed -- Paralysis */
+       creature_ptr->confused = 0;        /* Timed -- Confusion */
+       creature_ptr->afraid = 0;          /* Timed -- Fear */
+       creature_ptr->image = 0;           /* Timed -- Hallucination */
+       creature_ptr->poisoned = 0;        /* Timed -- Poisoned */
+       creature_ptr->cut = 0;             /* Timed -- Cut */
+       creature_ptr->stun = 0;            /* Timed -- Stun */
+
+       creature_ptr->protevil = 0;        /* Timed -- Protection */
+       creature_ptr->invuln = 0;          /* Timed -- Invulnerable */
+       creature_ptr->ult_res = 0;
+       creature_ptr->hero = 0;            /* Timed -- Heroism */
+       creature_ptr->shero = 0;           /* Timed -- Super Heroism */
+       creature_ptr->shield = 0;          /* Timed -- Shield Spell */
+       creature_ptr->blessed = 0;         /* Timed -- Blessed */
+       creature_ptr->tim_invis = 0;       /* Timed -- Invisibility */
+       creature_ptr->tim_infra = 0;       /* Timed -- Infra Vision */
+       creature_ptr->tim_regen = 0;       /* Timed -- Regeneration */
+       creature_ptr->tim_stealth = 0;     /* Timed -- Stealth */
+       creature_ptr->tim_esp = 0;
+       creature_ptr->wraith_form = 0;     /* Timed -- Wraith Form */
+       creature_ptr->tim_levitation = 0;
+       creature_ptr->tim_sh_touki = 0;
+       creature_ptr->tim_sh_fire = 0;
+       creature_ptr->tim_sh_holy = 0;
+       creature_ptr->tim_eyeeye = 0;
+       creature_ptr->magicdef = 0;
+       creature_ptr->resist_magic = 0;
+       creature_ptr->tsuyoshi = 0;
+       creature_ptr->kabenuke = 0;
+       creature_ptr->tim_res_nether = 0;
+       creature_ptr->tim_res_time = 0;
+       creature_ptr->tim_mimic = 0;
+       creature_ptr->mimic_form = 0;
+       creature_ptr->tim_reflect = 0;
+       creature_ptr->multishadow = 0;
+       creature_ptr->dustrobe = 0;
+       creature_ptr->action = ACTION_NONE;
+
+       creature_ptr->oppose_acid = 0;     /* Timed -- oppose acid */
+       creature_ptr->oppose_elec = 0;     /* Timed -- oppose lightning */
+       creature_ptr->oppose_fire = 0;     /* Timed -- oppose heat */
+       creature_ptr->oppose_cold = 0;     /* Timed -- oppose cold */
+       creature_ptr->oppose_pois = 0;     /* Timed -- oppose poison */
+
+       creature_ptr->word_recall = 0;
+       creature_ptr->alter_reality = 0;
+       creature_ptr->sutemi = FALSE;
+       creature_ptr->counter = FALSE;
+       creature_ptr->ele_attack = 0;
+       creature_ptr->ele_immune = 0;
+       creature_ptr->special_attack = 0L;
+       creature_ptr->special_defense = 0L;
+
+       while(creature_ptr->energy_need < 0) creature_ptr->energy_need += ENERGY_NEED();
+       creature_ptr->timewalk = FALSE;
+
+       if (PRACE_IS_(creature_ptr, RACE_DEMON) && (creature_ptr->lev > 44)) creature_ptr->oppose_fire = 1;
+       if ((creature_ptr->pclass == CLASS_NINJA) && (creature_ptr->lev > 44)) creature_ptr->oppose_pois = 1;
+       if (creature_ptr->pclass == CLASS_BERSERKER) creature_ptr->shero = 1;
+
+       if (creature_ptr->riding)
+       {
+               (void)set_monster_fast(creature_ptr, creature_ptr->riding, 0);
+               (void)set_monster_slow(creature_ptr, creature_ptr->riding, 0);
+               (void)set_monster_invulner(creature_ptr, creature_ptr->riding, 0, FALSE);
+       }
+
+       if (creature_ptr->pclass == CLASS_BARD)
+       {
+               SINGING_SONG_EFFECT(creature_ptr) = 0;
+               SINGING_SONG_ID(creature_ptr) = 0;
        }
 }
 
@@ -288,87 +288,84 @@ void reset_tim_flags(void)
  * @brief プレイヤーに魔力消去効果を与える。
  * @return なし
  */
-void dispel_player(void)
-{
-       (void)set_fast(p_ptr, 0, TRUE);
-       (void)set_lightspeed(p_ptr, 0, TRUE);
-       (void)set_slow(p_ptr, 0, TRUE);
-       (void)set_shield(p_ptr, 0, TRUE);
-       (void)set_blessed(p_ptr, 0, TRUE);
-       (void)set_tsuyoshi(p_ptr, 0, TRUE);
-       (void)set_hero(p_ptr, 0, TRUE);
-       (void)set_shero(p_ptr, 0, TRUE);
-       (void)set_protevil(p_ptr, 0, TRUE);
-       (void)set_invuln(p_ptr, 0, TRUE);
-       (void)set_wraith_form(0, TRUE);
-       (void)set_kabenuke(p_ptr, 0, TRUE);
-       (void)set_tim_res_nether(0, TRUE);
-       (void)set_tim_res_time(0, TRUE);
-       /* by henkma */
-       (void)set_tim_reflect(p_ptr, 0,TRUE);
-       (void)set_multishadow(p_ptr, 0,TRUE);
-       (void)set_dustrobe(p_ptr, 0,TRUE);
-
-       (void)set_tim_invis(p_ptr, 0, TRUE);
-       (void)set_tim_infra(p_ptr, 0, TRUE);
-       (void)set_tim_esp(0, TRUE);
-       (void)set_tim_regen(p_ptr, 0, TRUE);
-       (void)set_tim_stealth(p_ptr, 0, TRUE);
-       (void)set_tim_levitation(p_ptr, 0, TRUE);
-       (void)set_tim_sh_touki(p_ptr, 0, TRUE);
-       (void)set_tim_sh_fire(p_ptr, 0, TRUE);
-       (void)set_tim_sh_holy(p_ptr, 0, TRUE);
-       (void)set_tim_eyeeye(p_ptr, 0, TRUE);
-       (void)set_magicdef(p_ptr, 0, TRUE);
-       (void)set_resist_magic(p_ptr, 0, TRUE);
-       (void)set_oppose_acid(p_ptr, 0, TRUE);
-       (void)set_oppose_elec(p_ptr, 0, TRUE);
-       (void)set_oppose_fire(p_ptr, 0, TRUE);
-       (void)set_oppose_cold(p_ptr, 0, TRUE);
-       (void)set_oppose_pois(p_ptr, 0, TRUE);
-       (void)set_ultimate_res(0, TRUE);
-       (void)set_mimic(p_ptr, 0, 0, TRUE);
-       (void)set_ele_attack(p_ptr, 0, 0);
-       (void)set_ele_immune(p_ptr, 0, 0);
-
-       /* Cancel glowing hands */
-       if (p_ptr->special_attack & ATTACK_CONFUSE)
-       {
-               p_ptr->special_attack &= ~(ATTACK_CONFUSE);
+void dispel_player(player_type *creature_ptr)
+{
+       (void)set_fast(creature_ptr, 0, TRUE);
+       (void)set_lightspeed(creature_ptr, 0, TRUE);
+       (void)set_slow(creature_ptr, 0, TRUE);
+       (void)set_shield(creature_ptr, 0, TRUE);
+       (void)set_blessed(creature_ptr, 0, TRUE);
+       (void)set_tsuyoshi(creature_ptr, 0, TRUE);
+       (void)set_hero(creature_ptr, 0, TRUE);
+       (void)set_shero(creature_ptr, 0, TRUE);
+       (void)set_protevil(creature_ptr, 0, TRUE);
+       (void)set_invuln(creature_ptr, 0, TRUE);
+       (void)set_wraith_form(creature_ptr, 0, TRUE);
+       (void)set_kabenuke(creature_ptr, 0, TRUE);
+       (void)set_tim_res_nether(creature_ptr, 0, TRUE);
+       (void)set_tim_res_time(creature_ptr, 0, TRUE);
+       (void)set_tim_reflect(creature_ptr, 0,TRUE);
+       (void)set_multishadow(creature_ptr, 0,TRUE);
+       (void)set_dustrobe(creature_ptr, 0,TRUE);
+
+       (void)set_tim_invis(creature_ptr, 0, TRUE);
+       (void)set_tim_infra(creature_ptr, 0, TRUE);
+       (void)set_tim_esp(creature_ptr, 0, TRUE);
+       (void)set_tim_regen(creature_ptr, 0, TRUE);
+       (void)set_tim_stealth(creature_ptr, 0, TRUE);
+       (void)set_tim_levitation(creature_ptr, 0, TRUE);
+       (void)set_tim_sh_touki(creature_ptr, 0, TRUE);
+       (void)set_tim_sh_fire(creature_ptr, 0, TRUE);
+       (void)set_tim_sh_holy(creature_ptr, 0, TRUE);
+       (void)set_tim_eyeeye(creature_ptr, 0, TRUE);
+       (void)set_magicdef(creature_ptr, 0, TRUE);
+       (void)set_resist_magic(creature_ptr, 0, TRUE);
+       (void)set_oppose_acid(creature_ptr, 0, TRUE);
+       (void)set_oppose_elec(creature_ptr, 0, TRUE);
+       (void)set_oppose_fire(creature_ptr, 0, TRUE);
+       (void)set_oppose_cold(creature_ptr, 0, TRUE);
+       (void)set_oppose_pois(creature_ptr, 0, TRUE);
+       (void)set_ultimate_res(creature_ptr, 0, TRUE);
+       (void)set_mimic(creature_ptr, 0, 0, TRUE);
+       (void)set_ele_attack(creature_ptr, 0, 0);
+       (void)set_ele_immune(creature_ptr, 0, 0);
+
+       if (creature_ptr->special_attack & ATTACK_CONFUSE)
+       {
+               creature_ptr->special_attack &= ~(ATTACK_CONFUSE);
                msg_print(_("手の輝きがなくなった。", "Your hands stop glowing."));
        }
 
-       if (music_singing_any() || hex_spelling_any())
+       if (music_singing_any(creature_ptr) || hex_spelling_any(creature_ptr))
        {
-               concptr str = (music_singing_any()) ? _("歌", "singing") : _("呪文", "spelling");
-               INTERUPTING_SONG_EFFECT(p_ptr) = SINGING_SONG_EFFECT(p_ptr);
-               SINGING_SONG_EFFECT(p_ptr) = MUSIC_NONE;
+               concptr str = (music_singing_any(creature_ptr)) ? _("歌", "singing") : _("呪文", "casting");
+               INTERUPTING_SONG_EFFECT(creature_ptr) = SINGING_SONG_EFFECT(creature_ptr);
+               SINGING_SONG_EFFECT(creature_ptr) = MUSIC_NONE;
                msg_format(_("%sが途切れた。", "Your %s is interrupted."), str);
 
-               p_ptr->action = ACTION_NONE;
-               p_ptr->update |= (PU_BONUS | PU_HP | PU_MONSTERS);
-               p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
-               p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-               p_ptr->energy_need += ENERGY_NEED();
+               creature_ptr->action = ACTION_NONE;
+               creature_ptr->update |= (PU_BONUS | PU_HP | PU_MONSTERS);
+               creature_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
+               creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+               creature_ptr->energy_need += ENERGY_NEED();
        }
 }
 
 
 /*!
- * @brief 変身効果の継続時間と変身先をセットする / Set "p_ptr->tim_mimic", and "p_ptr->mimic_form", notice observable changes
+ * @brief 変身効果の継続時間と変身先をセットする / Set "tim_mimic", and "mimic_form", notice observable changes
  * @param v 継続時間
  * @param p 変身内容
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, IDX p, bool do_dec)
+bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, MIMIC_RACE_IDX p, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_mimic && (creature_ptr->mimic_form == p) && !do_dec)
@@ -383,36 +380,32 @@ bool set_mimic(player_type *creature_ptr, TIME_EFFECT v, IDX p, bool do_dec)
                }
        }
 
-       /* Shut */
        else
        {
                if (creature_ptr->tim_mimic)
                {
                        msg_print(_("変身が解けた。", "You are no longer transformed."));
-                       if (creature_ptr->mimic_form == MIMIC_DEMON) set_oppose_fire(p_ptr, 0, TRUE);
+                       if (creature_ptr->mimic_form == MIMIC_DEMON) set_oppose_fire(creature_ptr, 0, TRUE);
                        creature_ptr->mimic_form=0;
                        notice = TRUE;
                        p = 0;
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_mimic = v;
+       if (!notice) return FALSE;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
-
-       if (disturb_state) disturb(FALSE, TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, TRUE);
 
        creature_ptr->redraw |= (PR_BASIC | PR_STATUS);
        creature_ptr->update |= (PU_BONUS | PU_HP);
 
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 /*!
- * @brief 盲目の継続時間をセットする / Set "p_ptr->blind", notice observable changes
+ * @brief 盲目の継続時間をセットする / Set "blind", notice observable changes
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  * @details
@@ -428,7 +421,6 @@ bool set_blind(player_type *creature_ptr, TIME_EFFECT v)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (!creature_ptr->blind)
@@ -443,11 +435,10 @@ bool set_blind(player_type *creature_ptr, TIME_EFFECT v)
                        }
 
                        notice = TRUE;
-                       chg_virtue(V_ENLIGHTEN, -1);
+                       chg_virtue(creature_ptr, V_ENLIGHTEN, -1);
                }
        }
 
-       /* Shut */
        else
        {
                if (creature_ptr->blind)
@@ -465,25 +456,21 @@ bool set_blind(player_type *creature_ptr, TIME_EFFECT v)
                }
        }
 
-       /* Use the value */
        creature_ptr->blind = v;
        creature_ptr->redraw |= (PR_STATUS);
+       if (!notice) return FALSE;
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
-       if (disturb_state) disturb(FALSE, FALSE);
-
-       /* Fully update the visuals */
        creature_ptr->update |= (PU_UN_VIEW | PU_UN_LITE | PU_VIEW | PU_LITE | PU_MONSTERS | PU_MON_LITE);
        creature_ptr->redraw |= (PR_MAP);
        creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief 混乱の継続時間をセットする / Set "p_ptr->confused", notice observable changes
+ * @brief 混乱の継続時間をセットする / Set "confused", notice observable changes
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
@@ -494,7 +481,6 @@ bool set_confused(player_type *creature_ptr, TIME_EFFECT v)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (!creature_ptr->confused)
@@ -503,7 +489,7 @@ bool set_confused(player_type *creature_ptr, TIME_EFFECT v)
 
                        if (creature_ptr->action == ACTION_LEARN)
                        {
-                               msg_print(_("学習が続けられない!", "You cannot continue Learning!"));
+                               msg_print(_("学習が続けられない!", "You cannot continue learning!"));
                                creature_ptr->new_mane = FALSE;
 
                                creature_ptr->redraw |= (PR_STATE);
@@ -511,7 +497,7 @@ bool set_confused(player_type *creature_ptr, TIME_EFFECT v)
                        }
                        if (creature_ptr->action == ACTION_KAMAE)
                        {
-                               msg_print(_("構えがとけた。", "Your posture gets loose."));
+                               msg_print(_("構えがとけた。", "You lose your stance."));
                                creature_ptr->special_defense &= ~(KAMAE_MASK);
                                creature_ptr->update |= (PU_BONUS);
                                creature_ptr->redraw |= (PR_STATE);
@@ -519,7 +505,7 @@ bool set_confused(player_type *creature_ptr, TIME_EFFECT v)
                        }
                        else if (creature_ptr->action == ACTION_KATA)
                        {
-                               msg_print(_("型が崩れた。", "Your posture gets loose."));
+                               msg_print(_("型が崩れた。", "You lose your stance."));
                                creature_ptr->special_defense &= ~(KATA_MASK);
                                creature_ptr->update |= (PU_BONUS);
                                creature_ptr->update |= (PU_MONSTERS);
@@ -529,18 +515,15 @@ bool set_confused(player_type *creature_ptr, TIME_EFFECT v)
                        }
 
                        /* Sniper */
-                       if (creature_ptr->concent) reset_concentration(TRUE);
+                       if (creature_ptr->concent) reset_concentration(creature_ptr, TRUE);
 
-                       /* Hex */
-                       if (hex_spelling_any()) stop_hex_spell_all();
+                       if (hex_spelling_any(creature_ptr)) stop_hex_spell_all(creature_ptr);
 
                        notice = TRUE;
                        creature_ptr->counter = FALSE;
-                       chg_virtue(V_HARMONY, -1);
+                       chg_virtue(creature_ptr, V_HARMONY, -1);
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->confused)
@@ -551,21 +534,19 @@ bool set_confused(player_type *creature_ptr, TIME_EFFECT v)
                }
        }
 
-       /* Use the value */
        creature_ptr->confused = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief 毒の継続時間をセットする / Set "p_ptr->poisoned", notice observable changes
+ * @brief 毒の継続時間をセットする / Set "poisoned", notice observable changes
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
@@ -576,7 +557,6 @@ bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (!creature_ptr->poisoned)
@@ -585,8 +565,6 @@ bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->poisoned)
@@ -596,21 +574,19 @@ bool set_poisoned(player_type *creature_ptr, TIME_EFFECT v)
                }
        }
 
-       /* Use the value */
        creature_ptr->poisoned = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief 恐怖の継続時間をセットする / Set "p_ptr->afraid", notice observable changes
+ * @brief 恐怖の継続時間をセットする / Set "afraid", notice observable changes
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
@@ -621,7 +597,6 @@ bool set_afraid(player_type *creature_ptr, TIME_EFFECT v)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (!creature_ptr->afraid)
@@ -630,7 +605,7 @@ bool set_afraid(player_type *creature_ptr, TIME_EFFECT v)
 
                        if (creature_ptr->special_defense & KATA_MASK)
                        {
-                               msg_print(_("型が崩れた。", "Your posture gets loose."));
+                               msg_print(_("型が崩れた。", "You lose your stance."));
                                creature_ptr->special_defense &= ~(KATA_MASK);
                                creature_ptr->update |= (PU_BONUS);
                                creature_ptr->update |= (PU_MONSTERS);
@@ -641,11 +616,9 @@ bool set_afraid(player_type *creature_ptr, TIME_EFFECT v)
 
                        notice = TRUE;
                        creature_ptr->counter = FALSE;
-                       chg_virtue(V_VALOUR, -1);
+                       chg_virtue(creature_ptr, V_VALOUR, -1);
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->afraid)
@@ -655,18 +628,17 @@ bool set_afraid(player_type *creature_ptr, TIME_EFFECT v)
                }
        }
 
-       /* Use the value */
        creature_ptr->afraid = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
  * @brief 麻痺の継続時間をセットする / Set "paralyzed", notice observable changes
  * @param v 継続時間
@@ -679,24 +651,18 @@ bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (!creature_ptr->paralyzed)
                {
                        msg_print(_("体が麻痺してしまった!", "You are paralyzed!"));
-                       /* Sniper */
-                       if (creature_ptr->concent) reset_concentration(TRUE);
-
-                       /* Hex */
-                       if (hex_spelling_any()) stop_hex_spell_all();
+                       if (creature_ptr->concent) reset_concentration(creature_ptr, TRUE);
+                       if (hex_spelling_any(creature_ptr)) stop_hex_spell_all(creature_ptr);
 
                        creature_ptr->counter = FALSE;
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->paralyzed)
@@ -706,21 +672,19 @@ bool set_paralyzed(player_type *creature_ptr, TIME_EFFECT v)
                }
        }
 
-       /* Use the value */
        creature_ptr->paralyzed = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->redraw |= (PR_STATE);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 /*!
- * @brief 幻覚の継続時間をセットする / Set "p_ptr->image", notice observable changes
+ * @brief 幻覚の継続時間をセットする / Set "image", notice observable changes
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  * @details Note that we must redraw the map when hallucination changes.
@@ -733,23 +697,20 @@ bool set_image(player_type *creature_ptr, TIME_EFFECT v)
        if (creature_ptr->is_dead) return FALSE;
        if (creature_ptr->pseikaku == SEIKAKU_CHARGEMAN) v = 0;
 
-       /* Open */
        if (v)
        {
-               set_tsuyoshi(p_ptr, 0, TRUE);
+               set_tsuyoshi(creature_ptr, 0, TRUE);
                if (!creature_ptr->image)
                {
                        msg_print(_("ワーオ!何もかも虹色に見える!", "Oh, wow! Everything looks so cosmic now!"));
 
                        /* Sniper */
-                       if (creature_ptr->concent) reset_concentration(TRUE);
+                       if (creature_ptr->concent) reset_concentration(creature_ptr, TRUE);
 
                        creature_ptr->counter = FALSE;
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->image)
@@ -759,24 +720,23 @@ bool set_image(player_type *creature_ptr, TIME_EFFECT v)
                }
        }
 
-       /* Use the value */
        creature_ptr->image = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, TRUE);
 
        creature_ptr->redraw |= (PR_MAP | PR_HEALTH | PR_UHEALTH);
        creature_ptr->update |= (PU_MONSTERS);
        creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 加速の継続時間をセットする / Set "p_ptr->fast", notice observable changes
+ * @brief 加速の継続時間をセットする / Set "fast", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -788,46 +748,41 @@ bool set_fast(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->fast && !do_dec)
                {
                        if (creature_ptr->fast > v) return FALSE;
                }
-               else if (!IS_FAST() && !creature_ptr->lightspeed)
+               else if (!IS_FAST(creature_ptr) && !creature_ptr->lightspeed)
                {
                        msg_print(_("素早く動けるようになった!", "You feel yourself moving much faster!"));
                        notice = TRUE;
-                       chg_virtue(V_PATIENCE, -1);
-                       chg_virtue(V_DILIGENCE, 1);
+                       chg_virtue(creature_ptr, V_PATIENCE, -1);
+                       chg_virtue(creature_ptr, V_DILIGENCE, 1);
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->fast && !creature_ptr->lightspeed && !music_singing(MUSIC_SPEED) && !music_singing(MUSIC_SHERO))
+               if (creature_ptr->fast && !creature_ptr->lightspeed && !music_singing(creature_ptr, MUSIC_SPEED) && !music_singing(creature_ptr, MUSIC_SHERO))
                {
                        msg_print(_("動きの素早さがなくなったようだ。", "You feel yourself slow down."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->fast = v;
+       if (!notice) return FALSE;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
-
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 光速移動の継続時間をセットする / Set "p_ptr->lightspeed", notice observable changes
+ * @brief 光速移動の継続時間をセットする / Set "lightspeed", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -841,7 +796,6 @@ bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->wild_mode) v = 0;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->lightspeed && !do_dec)
@@ -850,14 +804,12 @@ bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
                else if (!creature_ptr->lightspeed)
                {
-                       msg_print(_("非常に素早く動けるようになった!", "You feel yourself moving extremely faster!"));
+                       msg_print(_("非常に素早く動けるようになった!", "You feel yourself moving extremely fast!"));
                        notice = TRUE;
-                       chg_virtue(V_PATIENCE, -1);
-                       chg_virtue(V_DILIGENCE, 1);
+                       chg_virtue(creature_ptr, V_PATIENCE, -1);
+                       chg_virtue(creature_ptr, V_DILIGENCE, 1);
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->lightspeed)
@@ -867,20 +819,19 @@ bool set_lightspeed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->lightspeed = v;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 減速の継続時間をセットする / Set "p_ptr->slow", notice observable changes
+ * @brief 減速の継続時間をセットする / Set "slow", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -892,7 +843,6 @@ bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->slow && !do_dec)
@@ -905,8 +855,6 @@ bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->slow)
@@ -916,21 +864,18 @@ bool set_slow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->slow = v;
+       if (!notice) return FALSE;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
-
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief 肌石化の継続時間をセットする / Set "p_ptr->shield", notice observable changes
+ * @brief 肌石化の継続時間をセットする / Set "shield", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -942,7 +887,6 @@ bool set_shield(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->shield && !do_dec)
@@ -955,8 +899,6 @@ bool set_shield(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->shield)
@@ -966,22 +908,20 @@ bool set_shield(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->shield = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief つぶれるの継続時間をセットする / Set "p_ptr->tsubureru", notice observable changes
+ * @brief つぶれるの継続時間をセットする / Set "tsubureru", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -993,7 +933,6 @@ bool set_tsubureru(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tsubureru && !do_dec)
@@ -1006,8 +945,6 @@ bool set_tsubureru(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tsubureru)
@@ -1017,22 +954,20 @@ bool set_tsubureru(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->tsubureru = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief 魔法の鎧の継続時間をセットする / Set "p_ptr->magicdef", notice observable changes
+ * @brief 魔法の鎧の継続時間をセットする / Set "magicdef", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1044,7 +979,6 @@ bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->magicdef && !do_dec)
@@ -1057,8 +991,6 @@ bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->magicdef)
@@ -1068,21 +1000,20 @@ bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->magicdef = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 祝福の継続時間をセットする / Set "p_ptr->blessed", notice observable changes
+ * @brief 祝福の継続時間をセットする / Set "blessed", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1094,46 +1025,41 @@ bool set_blessed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->blessed && !do_dec)
                {
                        if (creature_ptr->blessed > v) return FALSE;
                }
-               else if (!IS_BLESSED())
+               else if (!is_blessed(creature_ptr))
                {
                        msg_print(_("高潔な気分になった!", "You feel righteous!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->blessed && !music_singing(MUSIC_BLESS))
+               if (creature_ptr->blessed && !music_singing(creature_ptr, MUSIC_BLESS))
                {
                        msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->blessed = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief 士気高揚の継続時間をセットする / Set "p_ptr->hero", notice observable changes
+ * @brief 士気高揚の継続時間をセットする / Set "hero", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1145,48 +1071,41 @@ bool set_hero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->hero && !do_dec)
                {
                        if (creature_ptr->hero > v) return FALSE;
                }
-               else if (!IS_HERO())
+               else if (!IS_HERO(creature_ptr))
                {
                        msg_print(_("ヒーローになった気がする!", "You feel like a hero!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->hero && !music_singing(MUSIC_HERO) && !music_singing(MUSIC_SHERO))
+               if (creature_ptr->hero && !music_singing(creature_ptr, MUSIC_HERO) && !music_singing(creature_ptr, MUSIC_SHERO))
                {
                        msg_print(_("ヒーローの気分が消え失せた。", "The heroism wears off."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->hero = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-
-       /* Recalculate hitpoints */
        creature_ptr->update |= (PU_HP);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 /*!
- * @brief 狂戦士化の継続時間をセットする / Set "p_ptr->shero", notice observable changes
+ * @brief 狂戦士化の継続時間をセットする / Set "shero", notice observable changes
  * @param v 継続時間/ 0ならば無条件にリセット
  * @param do_dec FALSEの場合現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1199,7 +1118,6 @@ bool set_shero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
        if (creature_ptr->is_dead) return FALSE;
 
        if (creature_ptr->pclass == CLASS_BERSERKER) v = 1;
-       /* Open */
        if (v)
        {
                if (creature_ptr->shero && !do_dec)
@@ -1212,35 +1130,30 @@ bool set_shero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->shero)
                {
-                       msg_print(_("野蛮な気持ちが消え失せた。", "You feel less Berserk."));
+                       msg_print(_("野蛮な気持ちが消え失せた。", "You feel less berserk."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->shero = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-
-       /* Recalculate hitpoints */
        creature_ptr->update |= (PU_HP);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 対邪悪結界の継続時間をセットする / Set "p_ptr->protevil", notice observable changes
+ * @brief 対邪悪結界の継続時間をセットする / Set "protevil", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1252,7 +1165,6 @@ bool set_protevil(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->protevil && !do_dec)
@@ -1265,8 +1177,6 @@ bool set_protevil(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->protevil)
@@ -1276,85 +1186,79 @@ bool set_protevil(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->protevil = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 幽体化の継続時間をセットする / Set "p_ptr->wraith_form", notice observable changes
+ * @brief 幽体化の継続時間をセットする / Set "wraith_form", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_wraith_form(TIME_EFFECT v, bool do_dec)
+bool set_wraith_form(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
 
-       if (p_ptr->is_dead) return FALSE;
+       if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
-               if (p_ptr->wraith_form && !do_dec)
+               if (creature_ptr->wraith_form && !do_dec)
                {
-                       if (p_ptr->wraith_form > v) return FALSE;
+                       if (creature_ptr->wraith_form > v) return FALSE;
                }
-               else if (!p_ptr->wraith_form)
+               else if (!creature_ptr->wraith_form)
                {
-                       msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and current_world_ptr->game_turn into a wraith-being!"));
+                       msg_print(_("物質界を離れて幽鬼のような存在になった!", "You leave the physical world and turn into a wraith-being!"));
                        notice = TRUE;
-                       chg_virtue(V_UNLIFE, 3);
-                       chg_virtue(V_HONOUR, -2);
-                       chg_virtue(V_SACRIFICE, -2);
-                       chg_virtue(V_VALOUR, -5);
+                       chg_virtue(creature_ptr, V_UNLIFE, 3);
+                       chg_virtue(creature_ptr, V_HONOUR, -2);
+                       chg_virtue(creature_ptr, V_SACRIFICE, -2);
+                       chg_virtue(creature_ptr, V_VALOUR, -5);
 
-                       p_ptr->redraw |= (PR_MAP);
-                       p_ptr->update |= (PU_MONSTERS);
+                       creature_ptr->redraw |= (PR_MAP);
+                       creature_ptr->update |= (PU_MONSTERS);
 
-                       p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+                       creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
                }
        }
-
-       /* Shut */
        else
        {
-               if (p_ptr->wraith_form)
+               if (creature_ptr->wraith_form)
                {
                        msg_print(_("不透明になった感じがする。", "You feel opaque."));
                        notice = TRUE;
 
-                       p_ptr->redraw |= (PR_MAP);
-                       p_ptr->update |= (PU_MONSTERS);
+                       creature_ptr->redraw |= (PR_MAP);
+                       creature_ptr->update |= (PU_MONSTERS);
 
-                       p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+                       creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
                }
        }
 
-       /* Use the value */
-       p_ptr->wraith_form = v;
-       p_ptr->redraw |= (PR_STATUS);
-
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       creature_ptr->wraith_form = v;
+       creature_ptr->redraw |= (PR_STATUS);
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       p_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       if (!notice) return FALSE;
 
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       creature_ptr->update |= (PU_BONUS);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 無傷球の継続時間をセットする / Set "p_ptr->invuln", notice observable changes
+ * @brief 無傷球の継続時間をセットする / Set "invuln", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1366,22 +1270,21 @@ bool set_invuln(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->invuln && !do_dec)
                {
                        if (creature_ptr->invuln > v) return FALSE;
                }
-               else if (!IS_INVULN())
+               else if (!IS_INVULN(creature_ptr))
                {
                        msg_print(_("無敵だ!", "Invulnerability!"));
                        notice = TRUE;
 
-                       chg_virtue(V_UNLIFE, -2);
-                       chg_virtue(V_HONOUR, -2);
-                       chg_virtue(V_SACRIFICE, -3);
-                       chg_virtue(V_VALOUR, -5);
+                       chg_virtue(creature_ptr, V_UNLIFE, -2);
+                       chg_virtue(creature_ptr, V_HONOUR, -2);
+                       chg_virtue(creature_ptr, V_SACRIFICE, -3);
+                       chg_virtue(creature_ptr, V_VALOUR, -5);
 
                        creature_ptr->redraw |= (PR_MAP);
                        creature_ptr->update |= (PU_MONSTERS);
@@ -1389,11 +1292,9 @@ bool set_invuln(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->invuln && !music_singing(MUSIC_INVULN))
+               if (creature_ptr->invuln && !music_singing(creature_ptr, MUSIC_INVULN))
                {
                        msg_print(_("無敵ではなくなった。", "The invulnerability wears off."));
                        notice = TRUE;
@@ -1407,72 +1308,67 @@ bool set_invuln(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->invuln = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 時限ESPの継続時間をセットする / Set "p_ptr->tim_esp", notice observable changes
+ * @brief 時限ESPの継続時間をセットする / Set "tim_esp", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_tim_esp(TIME_EFFECT v, bool do_dec)
+bool set_tim_esp(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
 
-       if (p_ptr->is_dead) return FALSE;
+       if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
-               if (p_ptr->tim_esp && !do_dec)
+               if (creature_ptr->tim_esp && !do_dec)
                {
-                       if (p_ptr->tim_esp > v) return FALSE;
+                       if (creature_ptr->tim_esp > v) return FALSE;
                }
-               else if (!IS_TIM_ESP())
+               else if (!is_time_limit_esp(creature_ptr))
                {
                        msg_print(_("意識が広がった気がする!", "You feel your consciousness expand!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (p_ptr->tim_esp && !music_singing(MUSIC_MIND))
+               if (creature_ptr->tim_esp && !music_singing(creature_ptr, MUSIC_MIND))
                {
                        msg_print(_("意識は元に戻った。", "Your consciousness contracts again."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
-       p_ptr->tim_esp = v;
-       p_ptr->redraw |= (PR_STATUS);
+       creature_ptr->tim_esp = v;
+       creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       p_ptr->update |= (PU_BONUS);
-       p_ptr->update |= (PU_MONSTERS);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       creature_ptr->update |= (PU_BONUS);
+       creature_ptr->update |= (PU_MONSTERS);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 時限透明視の継続時間をセットする / Set "p_ptr->tim_invis", notice observable changes
+ * @brief 時限透明視の継続時間をセットする / Set "tim_invis", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1484,7 +1380,6 @@ bool set_tim_invis(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_invis && !do_dec)
@@ -1497,8 +1392,6 @@ bool set_tim_invis(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_invis)
@@ -1508,24 +1401,21 @@ bool set_tim_invis(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_invis = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-
-       /* Update the monsters */
        creature_ptr->update |= (PU_MONSTERS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 時限赤外線視力の継続時間をセットする / Set "p_ptr->tim_infra", notice observable changes
+ * @brief 時限赤外線視力の継続時間をセットする / Set "tim_infra", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1537,7 +1427,6 @@ bool set_tim_infra(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_infra && !do_dec)
@@ -1550,8 +1439,6 @@ bool set_tim_infra(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_infra)
@@ -1561,24 +1448,21 @@ bool set_tim_infra(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_infra = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-
-       /* Update the monsters */
        creature_ptr->update |= (PU_MONSTERS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 時限急回復の継続時間をセットする / Set "p_ptr->tim_regen", notice observable changes
+ * @brief 時限急回復の継続時間をセットする / Set "tim_regen", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1590,7 +1474,6 @@ bool set_tim_regen(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_regen && !do_dec)
@@ -1603,8 +1486,6 @@ bool set_tim_regen(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_regen)
@@ -1614,21 +1495,20 @@ bool set_tim_regen(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_regen = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 隠密の歌の継続時間をセットする / Set "p_ptr->tim_stealth", notice observable changes
+ * @brief 隠密の歌の継続時間をセットする / Set "tim_stealth", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1640,100 +1520,89 @@ bool set_tim_stealth(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_stealth && !do_dec)
                {
                        if (creature_ptr->tim_stealth > v) return FALSE;
                }
-               else if (!IS_TIM_STEALTH())
+               else if (!is_time_limit_stealth(creature_ptr))
                {
                        msg_print(_("足音が小さくなった!", "You begin to walk silently!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->tim_stealth && !music_singing(MUSIC_STEALTH))
+               if (creature_ptr->tim_stealth && !music_singing(creature_ptr, MUSIC_STEALTH))
                {
                        msg_print(_("足音が大きくなった。", "You no longer walk silently."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_stealth = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
  * @brief 超隠密状態をセットする
  * @param set TRUEならば超隠密状態になる。
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  */
-bool set_superstealth(bool set)
+bool set_superstealth(player_type *creature_ptr, bool set)
 {
        bool notice = FALSE;
 
-       if (p_ptr->is_dead) return FALSE;
+       if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (set)
        {
-               if (!(p_ptr->special_defense & NINJA_S_STEALTH))
+               if (!(creature_ptr->special_defense & NINJA_S_STEALTH))
                {
-                       if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_MNLT)
+                       if (creature_ptr->current_floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].info & CAVE_MNLT)
                        {
                                msg_print(_("敵の目から薄い影の中に覆い隠された。", "You are mantled in weak shadow from ordinary eyes."));
-                               p_ptr->monlite = p_ptr->old_monlite = TRUE;
+                               creature_ptr->monlite = creature_ptr->old_monlite = TRUE;
                        }
                        else
                        {
                                msg_print(_("敵の目から影の中に覆い隠された!", "You are mantled in shadow from ordinary eyes!"));
-                               p_ptr->monlite = p_ptr->old_monlite = FALSE;
+                               creature_ptr->monlite = creature_ptr->old_monlite = FALSE;
                        }
 
                        notice = TRUE;
-
-                       /* Use the value */
-                       p_ptr->special_defense |= NINJA_S_STEALTH;
+                       creature_ptr->special_defense |= NINJA_S_STEALTH;
                }
        }
-
-       /* Shut */
        else
        {
-               if (p_ptr->special_defense & NINJA_S_STEALTH)
+               if (creature_ptr->special_defense & NINJA_S_STEALTH)
                {
                        msg_print(_("再び敵の目にさらされるようになった。", "You are exposed to common sight once more."));
                        notice = TRUE;
-
-                       /* Use the value */
-                       p_ptr->special_defense &= ~(NINJA_S_STEALTH);
+                       creature_ptr->special_defense &= ~(NINJA_S_STEALTH);
                }
        }
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
-       p_ptr->redraw |= (PR_STATUS);
+       if (!notice) return FALSE;
+       creature_ptr->redraw |= (PR_STATUS);
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的浮遊の継続時間をセットする / Set "p_ptr->tim_levitation", notice observable changes
+ * @brief 一時的浮遊の継続時間をセットする / Set "tim_levitation", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1745,7 +1614,6 @@ bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_levitation && !do_dec)
@@ -1758,8 +1626,6 @@ bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_levitation)
@@ -1769,21 +1635,20 @@ bool set_tim_levitation(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_levitation = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的闘気のオーラの継続時間をセットする / Set "p_ptr->tim_sh_touki", notice observable changes
+ * @brief 一時的闘気のオーラの継続時間をセットする / Set "tim_sh_touki", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1795,7 +1660,6 @@ bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_sh_touki && !do_dec)
@@ -1804,35 +1668,32 @@ bool set_tim_sh_touki(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
                else if (!creature_ptr->tim_sh_touki)
                {
-                       msg_print(_("体が闘気のオーラで覆われた。", "You have enveloped by the aura of the Force!"));
+                       msg_print(_("体が闘気のオーラで覆われた。", "You are enveloped by an aura of the Force!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_sh_touki)
                {
-                       msg_print(_("闘気が消えた。", "Aura of the Force disappeared."));
+                       msg_print(_("闘気が消えた。", "The aura of the Force disappeared."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_sh_touki = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的火炎のオーラの継続時間をセットする / Set "p_ptr->tim_sh_fire", notice observable changes
+ * @brief 一時的火炎のオーラの継続時間をセットする / Set "tim_sh_fire", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1844,7 +1705,6 @@ bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_sh_fire && !do_dec)
@@ -1853,36 +1713,33 @@ bool set_tim_sh_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
                else if (!creature_ptr->tim_sh_fire)
                {
-                       msg_print(_("体が炎のオーラで覆われた。", "You have enveloped by fiery aura!"));
+                       msg_print(_("体が炎のオーラで覆われた。", "You are enveloped by a fiery aura!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_sh_fire)
                {
-                       msg_print(_("炎のオーラが消えた。", "Fiery aura disappeared."));
+                       msg_print(_("炎のオーラが消えた。", "The fiery aura disappeared."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_sh_fire = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的聖なるのオーラの継続時間をセットする / Set "p_ptr->tim_sh_holy", notice observable changes
+ * @brief 一時的聖なるのオーラの継続時間をセットする / Set "tim_sh_holy", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1894,7 +1751,6 @@ bool set_tim_sh_holy(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_sh_holy && !do_dec)
@@ -1903,36 +1759,33 @@ bool set_tim_sh_holy(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
                else if (!creature_ptr->tim_sh_holy)
                {
-                       msg_print(_("体が聖なるオーラで覆われた。", "You have enveloped by holy aura!"));
+                       msg_print(_("体が聖なるオーラで覆われた。", "You are enveloped by a holy aura!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_sh_holy)
                {
-                       msg_print(_("聖なるオーラが消えた。", "Holy aura disappeared."));
+                       msg_print(_("聖なるオーラが消えた。", "The holy aura disappeared."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_sh_holy = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 目には目をの残り時間をセットする / Set "p_ptr->tim_eyeeye", notice observable changes
+ * @brief 目には目をの残り時間をセットする / Set "tim_eyeeye", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1944,7 +1797,6 @@ bool set_tim_eyeeye(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_eyeeye && !do_dec)
@@ -1957,8 +1809,6 @@ bool set_tim_eyeeye(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_eyeeye)
@@ -1968,22 +1818,20 @@ bool set_tim_eyeeye(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_eyeeye = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief 一時的魔法防御の継続時間をセットする / Set "p_ptr->resist_magic", notice observable changes
+ * @brief 一時的魔法防御の継続時間をセットする / Set "resist_magic", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -1995,7 +1843,6 @@ bool set_resist_magic(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->resist_magic && !do_dec)
@@ -2008,8 +1855,6 @@ bool set_resist_magic(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->resist_magic)
@@ -2019,21 +1864,20 @@ bool set_resist_magic(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->resist_magic = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的反射の継続時間をセットする / Set "p_ptr->tim_reflect", notice observable changes
+ * @brief 一時的反射の継続時間をセットする / Set "tim_reflect", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2045,7 +1889,6 @@ bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tim_reflect && !do_dec)
@@ -2058,8 +1901,6 @@ bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tim_reflect)
@@ -2069,22 +1910,20 @@ bool set_tim_reflect(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->tim_reflect = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*
- * Set "p_ptr->multishadow", notice observable changes
+ * Set "multishadow", notice observable changes
  */
 bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
@@ -2093,7 +1932,6 @@ bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->multishadow && !do_dec)
@@ -2106,8 +1944,6 @@ bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->multishadow)
@@ -2117,21 +1953,20 @@ bool set_multishadow(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->multishadow = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的破片のオーラの継続時間をセットする / Set "p_ptr->dustrobe", notice observable changes
+ * @brief 一時的破片のオーラの継続時間をセットする / Set "dustrobe", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2143,7 +1978,6 @@ bool set_dustrobe(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->dustrobe && !do_dec)
@@ -2156,8 +1990,6 @@ bool set_dustrobe(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->dustrobe)
@@ -2167,21 +1999,20 @@ bool set_dustrobe(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
        }
 
-       /* Use the value */
        creature_ptr->dustrobe = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的壁抜けの継続時間をセットする / Set "p_ptr->kabenuke", notice observable changes
+ * @brief 一時的壁抜けの継続時間をセットする / Set "kabenuke", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2193,7 +2024,6 @@ bool set_kabenuke(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->kabenuke && !do_dec)
@@ -2202,36 +2032,33 @@ bool set_kabenuke(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                }
                else if (!creature_ptr->kabenuke)
                {
-                       msg_print(_("体が半物質の状態になった。", "You became ethereal form."));
+                       msg_print(_("体が半物質の状態になった。", "You became ethereal."));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->kabenuke)
                {
-                       msg_print(_("体が物質化した。", "You are no longer in an ethereal form."));
+                       msg_print(_("体が物質化した。", "You are no longer ethereal."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->kabenuke = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief オクレ兄さんの継続時間をセットする / Set "p_ptr->tsuyoshi", notice observable changes
+ * @brief オクレ兄さんの継続時間をセットする / Set "tsuyoshi", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2243,7 +2070,6 @@ bool set_tsuyoshi(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->tsuyoshi && !do_dec)
@@ -2254,41 +2080,36 @@ bool set_tsuyoshi(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
                {
                        msg_print(_("「オクレ兄さん!」", "Brother OKURE!"));
                        notice = TRUE;
-                       chg_virtue(V_VITALITY, 2);
+                       chg_virtue(creature_ptr, V_VITALITY, 2);
                }
        }
-
-       /* Shut */
        else
        {
                if (creature_ptr->tsuyoshi)
                {
-                       msg_print(_("肉体が急速にしぼんでいった。", "Your body had quickly shriveled."));
+                       msg_print(_("肉体が急速にしぼんでいった。", "Your body has quickly shriveled."));
 
                        (void)dec_stat(creature_ptr, A_CON, 20, TRUE);
                        (void)dec_stat(creature_ptr, A_STR, 20, TRUE);
 
                        notice = TRUE;
-                       chg_virtue(V_VITALITY, -3);
+                       chg_virtue(creature_ptr, V_VITALITY, -3);
                }
        }
 
-       /* Use the value */
        creature_ptr->tsuyoshi = v;
        creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-
-       /* Recalculate hitpoints */
        creature_ptr->update |= (PU_HP);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
  * @brief 一時的元素スレイの継続時間をセットする / Set a temporary elemental brand. Clear all other brands. Print status messages. -LM-
  * @param attack_type スレイのタイプID
@@ -2299,27 +2120,30 @@ bool set_ele_attack(player_type *creature_ptr, u32b attack_type, TIME_EFFECT v)
 {
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
 
-       /* Clear all elemental attacks (only one is allowed at a time). */
        if ((creature_ptr->special_attack & (ATTACK_ACID)) && (attack_type != ATTACK_ACID))
        {
                creature_ptr->special_attack &= ~(ATTACK_ACID);
                msg_print(_("酸で攻撃できなくなった。", "Your temporary acidic brand fades away."));
        }
+
        if ((creature_ptr->special_attack & (ATTACK_ELEC)) && (attack_type != ATTACK_ELEC))
        {
                creature_ptr->special_attack &= ~(ATTACK_ELEC);
                msg_print(_("電撃で攻撃できなくなった。", "Your temporary electrical brand fades away."));
        }
+
        if ((creature_ptr->special_attack & (ATTACK_FIRE)) && (attack_type != ATTACK_FIRE))
        {
                creature_ptr->special_attack &= ~(ATTACK_FIRE);
                msg_print(_("火炎で攻撃できなくなった。", "Your temporary fiery brand fades away."));
        }
+
        if ((creature_ptr->special_attack & (ATTACK_COLD)) && (attack_type != ATTACK_COLD))
        {
                creature_ptr->special_attack &= ~(ATTACK_COLD);
                msg_print(_("冷気で攻撃できなくなった。", "Your temporary frost brand fades away."));
        }
+
        if ((creature_ptr->special_attack & (ATTACK_POIS)) && (attack_type != ATTACK_POIS))
        {
                creature_ptr->special_attack &= ~(ATTACK_POIS);
@@ -2328,12 +2152,8 @@ bool set_ele_attack(player_type *creature_ptr, u32b attack_type, TIME_EFFECT v)
 
        if ((v) && (attack_type))
        {
-               /* Set attack type. */
                creature_ptr->special_attack |= (attack_type);
-
-               /* Set duration. */
                creature_ptr->ele_attack = v;
-
 #ifdef JP
                msg_format("%sで攻撃できるようになった!",
                             ((attack_type == ATTACK_ACID) ? "酸" :
@@ -2353,15 +2173,15 @@ bool set_ele_attack(player_type *creature_ptr, u32b attack_type, TIME_EFFECT v)
 #endif
        }
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->redraw |= (PR_STATUS);
-
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
+       handle_stuff(creature_ptr);
 
-       return (TRUE);
+       return TRUE;
 }
 
+
 /*!
  * @brief 一時的元素免疫の継続時間をセットする / Set a temporary elemental brand.  Clear all other brands.  Print status messages. -LM-
  * @param immune_type 免疫のタイプID
@@ -2372,27 +2192,30 @@ bool set_ele_immune(player_type *creature_ptr, u32b immune_type, TIME_EFFECT v)
 {
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
 
-       /* Clear all elemental attacks (only one is allowed at a time). */
        if ((creature_ptr->special_defense & (DEFENSE_ACID)) && (immune_type != DEFENSE_ACID))
        {
                creature_ptr->special_defense &= ~(DEFENSE_ACID);
                msg_print(_("酸の攻撃で傷つけられるようになった。。", "You are no longer immune to acid."));
        }
+
        if ((creature_ptr->special_defense & (DEFENSE_ELEC)) && (immune_type != DEFENSE_ELEC))
        {
                creature_ptr->special_defense &= ~(DEFENSE_ELEC);
                msg_print(_("電撃の攻撃で傷つけられるようになった。。", "You are no longer immune to electricity."));
        }
+
        if ((creature_ptr->special_defense & (DEFENSE_FIRE)) && (immune_type != DEFENSE_FIRE))
        {
                creature_ptr->special_defense &= ~(DEFENSE_FIRE);
                msg_print(_("火炎の攻撃で傷つけられるようになった。。", "You are no longer immune to fire."));
        }
+
        if ((creature_ptr->special_defense & (DEFENSE_COLD)) && (immune_type != DEFENSE_COLD))
        {
                creature_ptr->special_defense &= ~(DEFENSE_COLD);
                msg_print(_("冷気の攻撃で傷つけられるようになった。。", "You are no longer immune to cold."));
        }
+
        if ((creature_ptr->special_defense & (DEFENSE_POIS)) && (immune_type != DEFENSE_POIS))
        {
                creature_ptr->special_defense &= ~(DEFENSE_POIS);
@@ -2401,12 +2224,8 @@ bool set_ele_immune(player_type *creature_ptr, u32b immune_type, TIME_EFFECT v)
 
        if ((v) && (immune_type))
        {
-               /* Set attack type. */
                creature_ptr->special_defense |= (immune_type);
-
-               /* Set duration. */
                creature_ptr->ele_immune = v;
-
                msg_format(_("%sの攻撃を受けつけなくなった!", "For a while, You are immune to %s"),
                             ((immune_type == DEFENSE_ACID) ? _("酸", "acid!") :
                              ((immune_type == DEFENSE_ELEC) ? _("電撃", "electricity!") :
@@ -2416,16 +2235,16 @@ bool set_ele_immune(player_type *creature_ptr, u32b immune_type, TIME_EFFECT v)
                                        _("(なし)", "do nothing special.")))))));
        }
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->redraw |= (PR_STATUS);
        creature_ptr->update |= (PU_BONUS);
-       handle_stuff();
+       handle_stuff(creature_ptr);
 
-       return (TRUE);
+       return TRUE;
 }
 
 /*!
- * @brief 一時的酸耐性の継続時間をセットする / Set "p_ptr->oppose_acid", notice observable changes
+ * @brief 一時的酸耐性の継続時間をセットする / Set "oppose_acid", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2434,47 +2253,42 @@ bool set_oppose_acid(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
-
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->oppose_acid && !do_dec)
                {
                        if (creature_ptr->oppose_acid > v) return FALSE;
                }
-               else if (!IS_OPPOSE_ACID())
+               else if (!is_oppose_acid(creature_ptr))
                {
                        msg_print(_("酸への耐性がついた気がする!", "You feel resistant to acid!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->oppose_acid && !music_singing(MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
+               if (creature_ptr->oppose_acid && !music_singing(creature_ptr, MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
                {
                        msg_print(_("酸への耐性が薄れた気がする。", "You feel less resistant to acid."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->oppose_acid = v;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
        creature_ptr->redraw |= (PR_STATUS);
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的電撃耐性の継続時間をセットする / Set "p_ptr->oppose_elec", notice observable changes
+ * @brief 一時的電撃耐性の継続時間をセットする / Set "oppose_elec", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2486,44 +2300,40 @@ bool set_oppose_elec(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->oppose_elec && !do_dec)
                {
                        if (creature_ptr->oppose_elec > v) return FALSE;
                }
-               else if (!IS_OPPOSE_ELEC())
+               else if (!is_oppose_elec(creature_ptr))
                {
                        msg_print(_("電撃への耐性がついた気がする!", "You feel resistant to electricity!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->oppose_elec && !music_singing(MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
+               if (creature_ptr->oppose_elec && !music_singing(creature_ptr, MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
                {
                        msg_print(_("電撃への耐性が薄れた気がする。", "You feel less resistant to electricity."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->oppose_elec = v;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
        creature_ptr->redraw |= (PR_STATUS);
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的火炎耐性の継続時間をセットする / Set "p_ptr->oppose_fire", notice observable changes
+ * @brief 一時的火炎耐性の継続時間をセットする / Set "oppose_fire", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2532,48 +2342,43 @@ bool set_oppose_fire(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
-
        if (creature_ptr->is_dead) return FALSE;
 
        if ((PRACE_IS_(creature_ptr, RACE_DEMON) && (creature_ptr->lev > 44)) || (creature_ptr->mimic_form == MIMIC_DEMON)) v = 1;
-       /* Open */
        if (v)
        {
                if (creature_ptr->oppose_fire && !do_dec)
                {
                        if (creature_ptr->oppose_fire > v) return FALSE;
                }
-               else if (!IS_OPPOSE_FIRE())
+               else if (!is_oppose_fire(creature_ptr))
                {
                        msg_print(_("火への耐性がついた気がする!", "You feel resistant to fire!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->oppose_fire && !music_singing(MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
+               if (creature_ptr->oppose_fire && !music_singing(creature_ptr, MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
                {
                        msg_print(_("火への耐性が薄れた気がする。", "You feel less resistant to fire."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->oppose_fire = v;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
        creature_ptr->redraw |= (PR_STATUS);
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的冷気耐性の継続時間をセットする / Set "p_ptr->oppose_cold", notice observable changes
+ * @brief 一時的冷気耐性の継続時間をセットする / Set "oppose_cold", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2582,47 +2387,42 @@ bool set_oppose_cold(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
-
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->oppose_cold && !do_dec)
                {
                        if (creature_ptr->oppose_cold > v) return FALSE;
                }
-               else if (!IS_OPPOSE_COLD())
+               else if (!is_oppose_cold(creature_ptr))
                {
                        msg_print(_("冷気への耐性がついた気がする!", "You feel resistant to cold!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
+               if (creature_ptr->oppose_cold && !music_singing(creature_ptr, MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
                {
                        msg_print(_("冷気への耐性が薄れた気がする。", "You feel less resistant to cold."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->oppose_cold = v;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
        creature_ptr->redraw |= (PR_STATUS);
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 一時的毒耐性の継続時間をセットする / Set "p_ptr->oppose_pois", notice observable changes
+ * @brief 一時的毒耐性の継続時間をセットする / Set "oppose_pois", notice observable changes
  * @param v 継続時間
  * @param do_dec 現在の継続時間より長い値のみ上書きする
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
@@ -2631,48 +2431,42 @@ bool set_oppose_pois(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
-
        if ((creature_ptr->pclass == CLASS_NINJA) && (creature_ptr->lev > 44)) v = 1;
        if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
                if (creature_ptr->oppose_pois && !do_dec)
                {
                        if (creature_ptr->oppose_pois > v) return FALSE;
                }
-               else if (!IS_OPPOSE_POIS())
+               else if (!is_oppose_pois(creature_ptr))
                {
                        msg_print(_("毒への耐性がついた気がする!", "You feel resistant to poison!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (creature_ptr->oppose_pois && !music_singing(MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
+               if (creature_ptr->oppose_pois && !music_singing(creature_ptr, MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
                {
                        msg_print(_("毒への耐性が薄れた気がする。", "You feel less resistant to poison."));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
        creature_ptr->oppose_pois = v;
-
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
        creature_ptr->redraw |= (PR_STATUS);
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 朦朧の継続時間をセットする / Set "p_ptr->stun", notice observable changes
+ * @brief 朦朧の継続時間をセットする / Set "stun", notice observable changes
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  * @details
@@ -2683,71 +2477,49 @@ bool set_stun(player_type *creature_ptr, TIME_EFFECT v)
        int old_aux, new_aux;
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
-
        if (creature_ptr->is_dead) return FALSE;
        if (PRACE_IS_(creature_ptr, RACE_GOLEM) || ((creature_ptr->pclass == CLASS_BERSERKER) && (creature_ptr->lev > 34))) v = 0;
 
-       /* Knocked out */
        if (creature_ptr->stun > 100)
        {
                old_aux = 3;
        }
-
-       /* Heavy stun */
        else if (creature_ptr->stun > 50)
        {
                old_aux = 2;
        }
-
-       /* Stun */
        else if (creature_ptr->stun > 0)
        {
                old_aux = 1;
        }
-
-       /* None */
        else
        {
                old_aux = 0;
        }
 
-       /* Knocked out */
        if (v > 100)
        {
                new_aux = 3;
        }
-
-       /* Heavy stun */
        else if (v > 50)
        {
                new_aux = 2;
        }
-
-       /* Stun */
        else if (v > 0)
        {
                new_aux = 1;
        }
-
-       /* None */
        else
        {
                new_aux = 0;
        }
 
-       /* Increase cut */
        if (new_aux > old_aux)
        {
-               /* Describe the state */
                switch (new_aux)
                {
-                       /* Stun */
                        case 1: msg_print(_("意識がもうろうとしてきた。", "You have been stunned.")); break;
-
-                       /* Heavy stun */
                        case 2: msg_print(_("意識がひどくもうろうとしてきた。", "You have been heavily stunned.")); break;
-
-                       /* Knocked out */
                        case 3: msg_print(_("頭がクラクラして意識が遠のいてきた。", "You have been knocked out.")); break;
                }
 
@@ -2769,9 +2541,10 @@ bool set_stun(player_type *creature_ptr, TIME_EFFECT v)
                                if (!creature_ptr->sustain_wis) (void)do_dec_stat(creature_ptr, A_WIS);
                        }
                }
+
                if (creature_ptr->special_defense & KATA_MASK)
                {
-                       msg_print(_("型が崩れた。", "Your posture gets loose."));
+                       msg_print(_("型が崩れた。", "You lose your stance."));
                        creature_ptr->special_defense &= ~(KATA_MASK);
                        creature_ptr->update |= (PU_BONUS);
                        creature_ptr->update |= (PU_MONSTERS);
@@ -2780,50 +2553,36 @@ bool set_stun(player_type *creature_ptr, TIME_EFFECT v)
                        creature_ptr->action = ACTION_NONE;
                }
 
-               /* Sniper */
-               if (creature_ptr->concent) reset_concentration(TRUE);
-
-               /* Hex */
-               if (hex_spelling_any()) stop_hex_spell_all();
+               if (creature_ptr->concent) reset_concentration(creature_ptr, TRUE);
+               if (hex_spelling_any(creature_ptr)) stop_hex_spell_all(creature_ptr);
 
                notice = TRUE;
        }
-
-       /* Decrease cut */
        else if (new_aux < old_aux)
        {
-               /* Describe the state */
-               switch (new_aux)
+               if (new_aux == 0)
                {
-                       /* None */
-               case 0:
                        msg_print(_("やっと朦朧状態から回復した。", "You are no longer stunned."));
-
-                       if (disturb_state) disturb(FALSE, FALSE);
-                       break;
+                       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
                }
 
                notice = TRUE;
        }
 
-       /* Use the value */
        creature_ptr->stun = v;
 
-       /* No change */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-
-       /* Redraw the "stun" */
        creature_ptr->redraw |= (PR_STUN);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*!
- * @brief 出血の継続時間をセットする / Set "p_ptr->cut", notice observable changes
+ * @brief 出血の継続時間をセットする / Set "cut", notice observable changes
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  * @details
@@ -2834,7 +2593,6 @@ bool set_cut(player_type *creature_ptr, TIME_EFFECT v)
        int old_aux, new_aux;
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
-
        if (creature_ptr->is_dead) return FALSE;
 
        if ((creature_ptr->prace == RACE_GOLEM ||
@@ -2844,132 +2602,86 @@ bool set_cut(player_type *creature_ptr, TIME_EFFECT v)
            !creature_ptr->mimic_form)
                v = 0;
 
-       /* Mortal wound */
        if (creature_ptr->cut > 1000)
        {
                old_aux = 7;
        }
-
-       /* Deep gash */
        else if (creature_ptr->cut > 200)
        {
                old_aux = 6;
        }
-
-       /* Severe cut */
        else if (creature_ptr->cut > 100)
        {
                old_aux = 5;
        }
-
-       /* Nasty cut */
        else if (creature_ptr->cut > 50)
        {
                old_aux = 4;
        }
-
-       /* Bad cut */
        else if (creature_ptr->cut > 25)
        {
                old_aux = 3;
        }
-
-       /* Light cut */
        else if (creature_ptr->cut > 10)
        {
                old_aux = 2;
        }
-
-       /* Graze */
        else if (creature_ptr->cut > 0)
        {
                old_aux = 1;
        }
-
-       /* None */
        else
        {
                old_aux = 0;
        }
 
-       /* Mortal wound */
        if (v > 1000)
        {
                new_aux = 7;
        }
-
-       /* Deep gash */
        else if (v > 200)
        {
                new_aux = 6;
        }
-
-       /* Severe cut */
        else if (v > 100)
        {
                new_aux = 5;
        }
-
-       /* Nasty cut */
        else if (v > 50)
        {
                new_aux = 4;
        }
-
-       /* Bad cut */
        else if (v > 25)
        {
                new_aux = 3;
        }
-
-       /* Light cut */
        else if (v > 10)
        {
                new_aux = 2;
        }
-
-       /* Graze */
        else if (v > 0)
        {
                new_aux = 1;
        }
-
-       /* None */
        else
        {
                new_aux = 0;
        }
 
-       /* Increase cut */
        if (new_aux > old_aux)
        {
-               /* Describe the state */
                switch (new_aux)
                {
-                       /* Graze */
                        case 1: msg_print(_("かすり傷を負ってしまった。", "You have been given a graze.")); break;
-
-                       /* Light cut */
                        case 2: msg_print(_("軽い傷を負ってしまった。", "You have been given a light cut.")); break;
-
-                       /* Bad cut */
                        case 3: msg_print(_("ひどい傷を負ってしまった。", "You have been given a bad cut.")); break;
-
-                       /* Nasty cut */
                        case 4: msg_print(_("大変な傷を負ってしまった。", "You have been given a nasty cut.")); break;
-
-                       /* Severe cut */
                        case 5: msg_print(_("重大な傷を負ってしまった。", "You have been given a severe cut.")); break;
-
-                       /* Deep gash */
                        case 6: msg_print(_("ひどい深手を負ってしまった。", "You have been given a deep gash.")); break;
-
-                       /* Mortal wound */
                        case 7: msg_print(_("致命的な傷を負ってしまった。", "You have been given a mortal wound.")); break;
                }
 
                notice = TRUE;
-
                if (randint1(1000) < v || one_in_(16))
                {
                        if (!creature_ptr->sustain_chr)
@@ -2979,47 +2691,36 @@ bool set_cut(player_type *creature_ptr, TIME_EFFECT v)
                        }
                }
        }
-
-       /* Decrease cut */
        else if (new_aux < old_aux)
        {
-               /* Describe the state */
-               switch (new_aux)
+               if (new_aux == 0)
                {
-                       /* None */
-                       case 0:
                        msg_format(_("やっと%s。", "You are no longer bleeding."), creature_ptr->prace == RACE_ANDROID ? "怪我が直った" : "出血が止まった");
-
-                       if (disturb_state) disturb(FALSE, FALSE);
-                       break;
+                       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
                }
 
                notice = TRUE;
        }
 
-       /* Use the value */
        creature_ptr->cut = v;
+       if (!notice) return FALSE;
 
-       /* No change */
-       if (!notice) return (FALSE);
-
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-
-       /* Redraw the "cut" */
        creature_ptr->redraw |= (PR_CUT);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
+
 /*!
- * @brief 空腹状態をセットする / Set "p_ptr->food", notice observable changes
+ * @brief 空腹状態をセットする / Set "food", notice observable changes
  * @param v 継続時間
  * @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
  * @details
  * Set "", notice observable changes\n
  *\n
- * The "p_ptr->food" variable can get as large as 20000, allowing the
+ * The "food" variable can get as large as 20000, allowing the
  * addition of the most "filling" item, Elvish Waybread, which adds
  * 7500 food units, without overflowing the 32767 maximum limit.\n
  *\n
@@ -3044,166 +2745,115 @@ bool set_food(player_type *creature_ptr, TIME_EFFECT v)
 
        bool notice = FALSE;
        v = (v > 20000) ? 20000 : (v < 0) ? 0 : v;
-
-       /* Fainting / Starving */
        if (creature_ptr->food < PY_FOOD_FAINT)
        {
                old_aux = 0;
        }
-
-       /* Weak */
        else if (creature_ptr->food < PY_FOOD_WEAK)
        {
                old_aux = 1;
        }
-
-       /* Hungry */
        else if (creature_ptr->food < PY_FOOD_ALERT)
        {
                old_aux = 2;
        }
-
-       /* Normal */
        else if (creature_ptr->food < PY_FOOD_FULL)
        {
                old_aux = 3;
        }
-
-       /* Full */
        else if (creature_ptr->food < PY_FOOD_MAX)
        {
                old_aux = 4;
        }
-
-       /* Gorged */
        else
        {
                old_aux = 5;
        }
 
-       /* Fainting / Starving */
        if (v < PY_FOOD_FAINT)
        {
                new_aux = 0;
        }
-
-       /* Weak */
        else if (v < PY_FOOD_WEAK)
        {
                new_aux = 1;
        }
-
-       /* Hungry */
        else if (v < PY_FOOD_ALERT)
        {
                new_aux = 2;
        }
-
-       /* Normal */
        else if (v < PY_FOOD_FULL)
        {
                new_aux = 3;
        }
-
-       /* Full */
        else if (v < PY_FOOD_MAX)
        {
                new_aux = 4;
        }
-
-       /* Gorged */
        else
        {
                new_aux = 5;
        }
 
        if (old_aux < 1 && new_aux > 0)
-               chg_virtue(V_PATIENCE, 2);
+               chg_virtue(creature_ptr, V_PATIENCE, 2);
        else if (old_aux < 3 && (old_aux != new_aux))
-               chg_virtue(V_PATIENCE, 1);
+               chg_virtue(creature_ptr, V_PATIENCE, 1);
        if (old_aux == 2)
-               chg_virtue(V_TEMPERANCE, 1);
+               chg_virtue(creature_ptr, V_TEMPERANCE, 1);
        if (old_aux == 0)
-               chg_virtue(V_TEMPERANCE, -1);
+               chg_virtue(creature_ptr, V_TEMPERANCE, -1);
 
-       /* Food increase */
        if (new_aux > old_aux)
        {
-               /* Describe the state */
                switch (new_aux)
                {
-                       /* Weak */
                        case 1: msg_print(_("まだ空腹で倒れそうだ。", "You are still weak.")); break;
-
-                       /* Hungry */
                        case 2: msg_print(_("まだ空腹だ。", "You are still hungry.")); break;
-
-                       /* Normal */
                        case 3: msg_print(_("空腹感がおさまった。", "You are no longer hungry.")); break;
-
-                       /* Full */
                        case 4: msg_print(_("満腹だ!", "You are full!")); break;
 
-                       /* Bloated */
                        case 5:
                        msg_print(_("食べ過ぎだ!", "You have gorged yourself!"));
-                       chg_virtue(V_HARMONY, -1);
-                       chg_virtue(V_PATIENCE, -1);
-                       chg_virtue(V_TEMPERANCE, -2);
-
+                       chg_virtue(creature_ptr, V_HARMONY, -1);
+                       chg_virtue(creature_ptr, V_PATIENCE, -1);
+                       chg_virtue(creature_ptr, V_TEMPERANCE, -2);
                        break;
                }
 
-               /* Change */
                notice = TRUE;
        }
-
-       /* Food decrease */
        else if (new_aux < old_aux)
        {
-               /* Describe the state */
                switch (new_aux)
                {
-                       /* Fainting / Starving */
                        case 0: msg_print(_("あまりにも空腹で気を失ってしまった!", "You are getting faint from hunger!")); break;
-
-                       /* Weak */
                        case 1: msg_print(_("お腹が空いて倒れそうだ。", "You are getting weak from hunger!")); break;
-
-                       /* Hungry */
                        case 2: msg_print(_("お腹が空いてきた。", "You are getting hungry.")); break;
-
-                       /* Normal */
                        case 3: msg_print(_("満腹感がなくなった。", "You are no longer full.")); break;
-
-                       /* Full */
                        case 4: msg_print(_("やっとお腹がきつくなくなった。", "You are no longer gorged.")); break;
                }
 
                if (creature_ptr->wild_mode && (new_aux < 2))
                {
-                       change_wild_mode(FALSE);
+                       change_wild_mode(creature_ptr, FALSE);
                }
 
-               /* Change */
                notice = TRUE;
        }
 
-       /* Use the value */
        creature_ptr->food = v;
+       if (!notice) return FALSE;
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
-
-       if (disturb_state) disturb(FALSE, FALSE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
        creature_ptr->update |= (PU_BONUS);
-
-       /* Redraw hunger */
        creature_ptr->redraw |= (PR_HUNGER);
-       handle_stuff();
-       return (TRUE);
+       handle_stuff(creature_ptr);
+
+       return TRUE;
 }
 
+
 /*!
  * @brief プレイヤーの基本能力値を増加させる / Increases a stat by one randomized level -RAK-
  * @param stat 上昇させるステータスID
@@ -3214,59 +2864,43 @@ bool set_food(player_type *creature_ptr, TIME_EFFECT v)
  */
 bool inc_stat(player_type *creature_ptr, int stat)
 {
-       BASE_STATUS value, gain;
+       BASE_STATUS gain;
+       BASE_STATUS value = creature_ptr->stat_cur[stat];
 
-       /* Then augment the current/max stat */
-       value = creature_ptr->stat_cur[stat];
-
-       /* Cannot go above 18/100 */
        if (value < creature_ptr->stat_max_max[stat])
        {
-               /* Gain one (sometimes two) points */
                if (value < 18)
                {
                        gain = ((randint0(100) < 75) ? 1 : 2);
                        value += gain;
                }
-
-               /* Gain 1/6 to 1/3 of distance to 18/100 */
                else if (value < (creature_ptr->stat_max_max[stat]-2))
                {
-                       /* Approximate gain value */
                        gain = (((creature_ptr->stat_max_max[stat]) - value) / 2 + 3) / 2;
                        if (gain < 1) gain = 1;
 
-                       /* Apply the bonus */
                        value += randint1(gain) + gain / 2;
-
-                       /* Maximal value */
                        if (value > (creature_ptr->stat_max_max[stat]-1)) value = creature_ptr->stat_max_max[stat]-1;
                }
-
-               /* Gain one point at a time */
                else
                {
                        value++;
                }
 
-               /* Save the new value */
                creature_ptr->stat_cur[stat] = value;
-
-               /* Bring up the maximum too */
                if (value > creature_ptr->stat_max[stat])
                {
                        creature_ptr->stat_max[stat] = value;
                }
-               creature_ptr->update |= (PU_BONUS);
 
-               /* Success */
-               return (TRUE);
+               creature_ptr->update |= (PU_BONUS);
+               return TRUE;
        }
 
-       /* Nothing to gain */
-       return (FALSE);
+       return FALSE;
 }
 
+
 /*!
  * @brief プレイヤーの基本能力値を減少させる / Decreases a stat by an amount indended to vary from 0 to 100 percent.
  * @param stat 減少させるステータスID
@@ -3286,21 +2920,14 @@ bool inc_stat(player_type *creature_ptr, int stat)
  */
 bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent)
 {
-       BASE_STATUS cur, max;
-       int loss, same;
+       int loss;
        bool res = FALSE;
 
-       /* Acquire current value */
-       cur = creature_ptr->stat_cur[stat];
-       max = creature_ptr->stat_max[stat];
-
-       /* Note when the values are identical */
-       same = (cur == max);
-
-       /* Damage "current" value */
+       BASE_STATUS cur = creature_ptr->stat_cur[stat];
+       BASE_STATUS max = creature_ptr->stat_max[stat];
+       int same = (cur == max);
        if (cur > 3)
        {
-               /* Handle "low" values */
                if (cur <= 18)
                {
                        if (amount > 90) cur--;
@@ -3308,44 +2935,29 @@ bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent)
                        if (amount > 20) cur--;
                        cur--;
                }
-
-               /* Handle "high" values */
                else
                {
-                       /* Hack -- Decrement by a random amount between one-quarter */
-                       /* and one-half of the stat bonus times the percentage, with a */
-                       /* minimum damage of half the percentage. -CWS */
                        loss = (((cur-18) / 2 + 1) / 2 + 1);
                        if (loss < 1) loss = 1;
 
-                       /* Randomize the loss */
                        loss = ((randint1(loss) + loss) * amount) / 100;
-
-                       /* Maximal loss */
                        if (loss < amount/2) loss = amount/2;
 
-                       /* Lose some points */
                        cur = cur - loss;
-
-                       /* Hack -- Only reduce stat to 17 sometimes */
                        if (cur < 18) cur = (amount <= 20) ? 18 : 17;
                }
 
-               /* Prevent illegal values */
                if (cur < 3) cur = 3;
 
-               /* Something happened */
                if (cur != creature_ptr->stat_cur[stat]) res = TRUE;
        }
 
-       /* Damage "max" value */
        if (permanent && (max > 3))
        {
-               chg_virtue(V_SACRIFICE, 1);
+               chg_virtue(creature_ptr, V_SACRIFICE, 1);
                if (stat == A_WIS || stat == A_INT)
-                       chg_virtue(V_ENLIGHTEN, -2);
+                       chg_virtue(creature_ptr, V_ENLIGHTEN, -2);
 
-               /* Handle "low" values */
                if (max <= 18)
                {
                        if (amount > 90) max--;
@@ -3353,37 +2965,25 @@ bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent)
                        if (amount > 20) max--;
                        max--;
                }
-
-               /* Handle "high" values */
                else
                {
-                       /* Hack -- Decrement by a random amount between one-quarter */
-                       /* and one-half of the stat bonus times the percentage, with a */
-                       /* minimum damage of half the percentage. -CWS */
                        loss = (((max-18) / 2 + 1) / 2 + 1);
                        loss = ((randint1(loss) + loss) * amount) / 100;
                        if (loss < amount/2) loss = amount/2;
 
-                       /* Lose some points */
                        max = max - loss;
-
-                       /* Hack -- Only reduce stat to 17 sometimes */
                        if (max < 18) max = (amount <= 20) ? 18 : 17;
                }
 
-               /* Hack -- keep it clean */
                if (same || (max < cur)) max = cur;
 
-               /* Something happened */
                if (max != creature_ptr->stat_max[stat]) res = TRUE;
        }
 
        if (res)
        {
-               /* Actually set the stat to its new value. */
                creature_ptr->stat_cur[stat] = cur;
                creature_ptr->stat_max[stat] = max;
-
                creature_ptr->redraw |= (PR_STATS);
                creature_ptr->update |= (PU_BONUS);
        }
@@ -3399,19 +2999,15 @@ bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent)
  */
 bool res_stat(player_type *creature_ptr, int stat)
 {
-       /* Restore if needed */
        if (creature_ptr->stat_cur[stat] != creature_ptr->stat_max[stat])
        {
                creature_ptr->stat_cur[stat] = creature_ptr->stat_max[stat];
                creature_ptr->update |= (PU_BONUS);
                creature_ptr->redraw |= (PR_STATS);
-
-               /* Success */
-               return (TRUE);
+               return TRUE;
        }
 
-       /* Nothing to restore */
-       return (FALSE);
+       return FALSE;
 }
 
 
@@ -3421,23 +3017,21 @@ bool res_stat(player_type *creature_ptr, int stat)
 bool hp_player(player_type *creature_ptr, int num)
 {
        int vir;
-       vir = virtue_number(V_VITALITY);
+       vir = virtue_number(creature_ptr, V_VITALITY);
 
-       if(num <= 0) return (FALSE);
+       if(num <= 0) return FALSE;
 
        if(vir)
        {
                num = num * (creature_ptr->virtues[vir - 1] + 1250) / 1250;
        }
-       /* Healing needed */
+
        if (creature_ptr->chp < creature_ptr->mhp)
        {
                if ((num > 0) && (creature_ptr->chp < (creature_ptr->mhp/3)))
-                       chg_virtue(V_TEMPERANCE, 1);
-               /* Gain hitpoints */
-               creature_ptr->chp += num;
+                       chg_virtue(creature_ptr, V_TEMPERANCE, 1);
 
-               /* Enforce maximum */
+               creature_ptr->chp += num;
                if (creature_ptr->chp >= creature_ptr->mhp)
                {
                        creature_ptr->chp = creature_ptr->mhp;
@@ -3445,38 +3039,28 @@ bool hp_player(player_type *creature_ptr, int num)
                }
 
                creature_ptr->redraw |= (PR_HP);
-
                creature_ptr->window |= (PW_PLAYER);
-
-               /* Heal 0-4 */
                if (num < 5)
                {
                        msg_print(_("少し気分が良くなった。", "You feel a little better."));
                }
-
-               /* Heal 5-14 */
                else if (num < 15)
                {
                        msg_print(_("気分が良くなった。", "You feel better."));
                }
-
-               /* Heal 15-34 */
                else if (num < 35)
                {
                        msg_print(_("とても気分が良くなった。", "You feel much better."));
                }
-
-               /* Heal 35+ */
                else
                {
                        msg_print(_("ひじょうに気分が良くなった。", "You feel very good."));
                }
 
-               return (TRUE);
+               return TRUE;
        }
 
-       /* Ignore */
-       return (FALSE);
+       return FALSE;
 }
 
 
@@ -3485,26 +3069,25 @@ bool hp_player(player_type *creature_ptr, int num)
  */
 static concptr desc_stat_pos[] =
 {
-       _("強く", "strong"),
-       _("知的に", "smart"),
-       _("賢く", "wise"),
-       _("器用に", "dextrous"),
-       _("健康に", "healthy"),
-       _("美しく", "cute")
+       _("強く", "stronger"),
+       _("知的に", "smarter"),
+       _("賢く", "wiser"),
+       _("器用に", "more dextrous"),
+       _("健康に", "healthier"),
+       _("美しく", "cuter")
 };
 
-
 /*
  * Array of stat "descriptions"
  */
 static concptr desc_stat_neg[] =
 {
-       _("弱く", "weak"),
-       _("無知に", "stupid"),
-       _("愚かに", "naive"),
-       _("不器用に", "clumsy"),
-       _("不健康に", "sickly"),
-       _("醜く", "ugly")
+       _("弱く", "weaker"),
+       _("無知に", "stupider"),
+       _("愚かに", "more naive"),
+       _("不器用に", "clumsier"),
+       _("不健康に", "more sickly"),
+       _("醜く", "uglier")
 };
 
 
@@ -3526,27 +3109,22 @@ bool do_dec_stat(player_type *creature_ptr, int stat)
                case A_CHR: if (creature_ptr->sustain_chr) sust = TRUE; break;
        }
 
-       /* Sustain */
        if (sust && (!ironman_nightmare || randint0(13)))
        {
                msg_format(_("%sなった気がしたが、すぐに元に戻った。", "You feel %s for a moment, but the feeling passes."),
                                        desc_stat_neg[stat]);
 
-               /* Notice effect */
-               return (TRUE);
+               return TRUE;
        }
 
-       /* Attempt to reduce the stat */
-       if (dec_stat(p_ptr, stat, 10, (ironman_nightmare && !randint0(13))))
+       if (dec_stat(creature_ptr, stat, 10, (ironman_nightmare && !randint0(13))))
        {
-               msg_format(_("ひどく%sなった気がする。", "You feel very %s."), desc_stat_neg[stat]);
+               msg_format(_("ひどく%sなった気がする。", "You feel %s."), desc_stat_neg[stat]);
 
-               /* Notice effect */
-               return (TRUE);
+               return TRUE;
        }
 
-       /* Nothing obvious */
-       return (FALSE);
+       return FALSE;
 }
 
 
@@ -3555,15 +3133,13 @@ bool do_dec_stat(player_type *creature_ptr, int stat)
  */
 bool do_res_stat(player_type *creature_ptr, int stat)
 {
-       /* Attempt to increase */
        if (res_stat(creature_ptr, stat))
        {
-               msg_format(_("元通りに%sなった気がする。", "You feel less %s."), desc_stat_pos[stat]);
-               return (TRUE);
+               msg_format(_("元通りに%sなった気がする。", "You feel %s."), desc_stat_pos[stat]);
+               return TRUE;
        }
 
-       /* Nothing obvious */
-       return (FALSE);
+       return FALSE;
 }
 
 
@@ -3572,42 +3148,33 @@ bool do_res_stat(player_type *creature_ptr, int stat)
  */
 bool do_inc_stat(player_type *creature_ptr, int stat)
 {
-       bool res;
-
-       /* Restore strength */
-       res = res_stat(creature_ptr, stat);
-
-       /* Attempt to increase */
+       bool res = res_stat(creature_ptr, stat);
        if (inc_stat(creature_ptr, stat))
        {
                if (stat == A_WIS)
                {
-                       chg_virtue(V_ENLIGHTEN, 1);
-                       chg_virtue(V_FAITH, 1);
+                       chg_virtue(creature_ptr, V_ENLIGHTEN, 1);
+                       chg_virtue(creature_ptr, V_FAITH, 1);
                }
                else if (stat == A_INT)
                {
-                       chg_virtue(V_KNOWLEDGE, 1);
-                       chg_virtue(V_ENLIGHTEN, 1);
+                       chg_virtue(creature_ptr, V_KNOWLEDGE, 1);
+                       chg_virtue(creature_ptr, V_ENLIGHTEN, 1);
                }
                else if (stat == A_CON)
-                       chg_virtue(V_VITALITY, 1);
-
-               msg_format(_("ワーオ!とても%sなった!", "Wow!  You feel very %s!"), desc_stat_pos[stat]);
+                       chg_virtue(creature_ptr, V_VITALITY, 1);
 
-               return (TRUE);
+               msg_format(_("ワーオ!とても%sなった!", "Wow! You feel %s!"), desc_stat_pos[stat]);
+               return TRUE;
        }
 
-       /* Restoration worked */
        if (res)
        {
-               msg_format(_("元通りに%sなった気がする。", "You feel less %s."), desc_stat_pos[stat]);
-
-               return (TRUE);
+               msg_format(_("元通りに%sなった気がする。", "You feel %s."), desc_stat_pos[stat]);
+               return TRUE;
        }
 
-       /* Nothing obvious */
-       return (FALSE);
+       return FALSE;
 }
 
 
@@ -3616,90 +3183,64 @@ bool do_inc_stat(player_type *creature_ptr, int stat)
  */
 bool restore_level(player_type *creature_ptr)
 {
-       /* Restore experience */
        if (creature_ptr->exp < creature_ptr->max_exp)
        {
                msg_print(_("経験値が戻ってきた気がする。", "You feel your experience returning."));
-
-               /* Restore the experience */
                creature_ptr->exp = creature_ptr->max_exp;
-
-               /* Check the experience */
-               check_experience();
-
-               /* Did something */
-               return (TRUE);
+               check_experience(creature_ptr);
+               return TRUE;
        }
 
-       /* No effect */
-       return (FALSE);
+       return FALSE;
 }
 
+
 /*
  * Forget everything
  */
-bool lose_all_info(void)
+bool lose_all_info(player_type *creature_ptr)
 {
-       int i;
-
-       chg_virtue(V_KNOWLEDGE, -5);
-       chg_virtue(V_ENLIGHTEN, -5);
-
-       /* Forget info about objects */
-       for (i = 0; i < INVEN_TOTAL; i++)
+       chg_virtue(creature_ptr, V_KNOWLEDGE, -5);
+       chg_virtue(creature_ptr, V_ENLIGHTEN, -5);
+       for (int i = 0; i < INVEN_TOTAL; i++)
        {
-               object_type *o_ptr = &p_ptr->inventory_list[i];
+               object_type *o_ptr = &creature_ptr->inventory_list[i];
                if (!o_ptr->k_idx) continue;
+               if (OBJECT_IS_FULL_KNOWN(o_ptr)) continue;
 
-               /* Allow "protection" by the MENTAL flag */
-               if (o_ptr->ident & (IDENT_MENTAL)) continue;
-
-               /* Remove "default inscriptions" */
                o_ptr->feeling = FEEL_NONE;
-
-               /* Hack -- Clear the "empty" flag */
                o_ptr->ident &= ~(IDENT_EMPTY);
-
-               /* Hack -- Clear the "known" flag */
                o_ptr->ident &= ~(IDENT_KNOWN);
-
-               /* Hack -- Clear the "felt" flag */
                o_ptr->ident &= ~(IDENT_SENSE);
        }
-       p_ptr->update |= (PU_BONUS);
-       p_ptr->update |= (PU_COMBINE | PU_REORDER);
 
-       p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
-
-       /* Mega-Hack -- Forget the map */
-       wiz_dark();
-
-       /* It worked */
-       return (TRUE);
+       creature_ptr->update |= (PU_BONUS);
+       creature_ptr->update |= (PU_COMBINE | PU_REORDER);
+       creature_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
+       wiz_dark(creature_ptr);
+       return TRUE;
 }
 
 
-void do_poly_wounds(void)
+void do_poly_wounds(player_type *creature_ptr)
 {
-       /* Changed to always provide at least _some_ healing */
-       s16b wounds = p_ptr->cut;
-       s16b hit_p = (p_ptr->mhp - p_ptr->chp);
-       s16b change = damroll(p_ptr->lev, 5);
+       s16b wounds = creature_ptr->cut;
+       s16b hit_p = (creature_ptr->mhp - creature_ptr->chp);
+       s16b change = damroll(creature_ptr->lev, 5);
        bool Nasty_effect = one_in_(5);
-
        if (!(wounds || hit_p || Nasty_effect)) return;
 
        msg_print(_("傷がより軽いものに変化した。", "Your wounds are polymorphed into less serious ones."));
-       hp_player(p_ptr, change);
+       hp_player(creature_ptr, change);
        if (Nasty_effect)
        {
                msg_print(_("新たな傷ができた!", "A new wound was created!"));
-               take_hit(DAMAGE_LOSELIFE, change / 2, _("変化した傷", "a polymorphed wound"), -1);
-               set_cut(p_ptr,change);
+               take_hit(creature_ptr, DAMAGE_LOSELIFE, change / 2, _("変化した傷", "a polymorphed wound"), -1);
+               set_cut(creature_ptr,change);
        }
        else
        {
-               set_cut(p_ptr,p_ptr->cut - (change / 2));
+               set_cut(creature_ptr,creature_ptr->cut - (change / 2));
        }
 }
 
@@ -3707,98 +3248,83 @@ void do_poly_wounds(void)
 /*
  * Change player race
  */
-void change_race(CHARACTER_IDX new_race, concptr effect_msg)
+void change_race(player_type *creature_ptr, CHARACTER_IDX new_race, concptr effect_msg)
 {
        concptr title = race_info[new_race].title;
-       int  old_race = p_ptr->prace;
-
+       int  old_race = creature_ptr->prace;
 #ifdef JP
        msg_format("あなたは%s%sに変化した!", effect_msg, title);
 #else
-       msg_format("You current_world_ptr->game_turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
+       msg_format("You turn into %s %s%s!", (!effect_msg[0] && is_a_vowel(title[0]) ? "an" : "a"), effect_msg, title);
 #endif
 
-       chg_virtue(V_CHANCE, 2);
-
-       if (p_ptr->prace < 32)
+       chg_virtue(creature_ptr, V_CHANCE, 2);
+       if (creature_ptr->prace < 32)
        {
-               p_ptr->old_race1 |= 1L << p_ptr->prace;
+               creature_ptr->old_race1 |= 1L << creature_ptr->prace;
        }
        else
        {
-               p_ptr->old_race2 |= 1L << (p_ptr->prace - 32);
+               creature_ptr->old_race2 |= 1L << (creature_ptr->prace - 32);
        }
-       p_ptr->prace = new_race;
-       rp_ptr = &race_info[p_ptr->prace];
 
-       /* Experience factor */
-       p_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
+       creature_ptr->prace = new_race;
+       rp_ptr = &race_info[creature_ptr->prace];
+       creature_ptr->expfact = rp_ptr->r_exp + cp_ptr->c_exp;
 
-       /*
-        * The speed bonus of Klackons and Sprites are disabled
-        * and the experience penalty is decreased.
-        */
-       if (((p_ptr->pclass == CLASS_MONK) || (p_ptr->pclass == CLASS_FORCETRAINER) || (p_ptr->pclass == CLASS_NINJA)) && ((p_ptr->prace == RACE_KLACKON) || (p_ptr->prace == RACE_SPRITE)))
-               p_ptr->expfact -= 15;
+       bool is_special_class = creature_ptr->pclass == CLASS_MONK;
+       is_special_class |= creature_ptr->pclass == CLASS_FORCETRAINER;
+       is_special_class |= creature_ptr->pclass == CLASS_NINJA;
+       bool is_special_race = creature_ptr->prace == RACE_KLACKON;
+       is_special_race |= creature_ptr->prace == RACE_SPRITE;
+       if (is_special_class && is_special_race)
+               creature_ptr->expfact -= 15;
 
-       /* Get character's height and weight */
-       get_height_weight();
+       get_height_weight(creature_ptr);
 
-       /* Hitdice */
-       if (p_ptr->pclass == CLASS_SORCERER)
-               p_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
+       if (creature_ptr->pclass == CLASS_SORCERER)
+               creature_ptr->hitdie = rp_ptr->r_mhp/2 + cp_ptr->c_mhp + ap_ptr->a_mhp;
        else
-               p_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
-
-       roll_hitdice(p_ptr, 0L);
-
-       /* The experience level may be modified */
-       check_experience();
-
-       p_ptr->redraw |= (PR_BASIC);
-
-       p_ptr->update |= (PU_BONUS);
+               creature_ptr->hitdie = rp_ptr->r_mhp + cp_ptr->c_mhp + ap_ptr->a_mhp;
 
-       handle_stuff();
+       roll_hitdice(creature_ptr, 0L);
+       check_experience(creature_ptr);
+       creature_ptr->redraw |= (PR_BASIC);
+       creature_ptr->update |= (PU_BONUS);
+       handle_stuff(creature_ptr);
 
-       /* Load an autopick preference file */
-       if (old_race != p_ptr->prace) autopick_load_pref(FALSE);
+       if (old_race != creature_ptr->prace) autopick_load_pref(creature_ptr, FALSE);
 
-       /* Player's graphic tile may change */
-       lite_spot(p_ptr->y, p_ptr->x);
+       lite_spot(creature_ptr, creature_ptr->y, creature_ptr->x);
 }
 
 
-void do_poly_self(void)
+void do_poly_self(player_type *creature_ptr)
 {
-       int power = p_ptr->lev;
+       int power = creature_ptr->lev;
 
        msg_print(_("あなたは変化の訪れを感じた...", "You feel a change coming over you..."));
-       chg_virtue(V_CHANCE, 1);
+       chg_virtue(creature_ptr, V_CHANCE, 1);
 
-       if ((power > randint0(20)) && one_in_(3) && (p_ptr->prace != RACE_ANDROID))
+       if ((power > randint0(20)) && one_in_(3) && (creature_ptr->prace != RACE_ANDROID))
        {
                char effect_msg[80] = "";
                CHARACTER_IDX new_race;
 
-               /* Some form of racial polymorph... */
                power -= 10;
-
                if ((power > randint0(5)) && one_in_(4))
                {
-                       /* sex change */
                        power -= 2;
-
-                       if (p_ptr->psex == SEX_MALE)
+                       if (creature_ptr->psex == SEX_MALE)
                        {
-                               p_ptr->psex = SEX_FEMALE;
-                               sp_ptr = &sex_info[p_ptr->psex];
+                               creature_ptr->psex = SEX_FEMALE;
+                               sp_ptr = &sex_info[creature_ptr->psex];
                                sprintf(effect_msg, _("女性の", "female "));
                        }
                        else
                        {
-                               p_ptr->psex = SEX_MALE;
-                               sp_ptr = &sex_info[p_ptr->psex];
+                               creature_ptr->psex = SEX_MALE;
+                               sp_ptr = &sex_info[creature_ptr->psex];
                                sprintf(effect_msg, _("男性の", "male "));
                        }
                }
@@ -3806,22 +3332,18 @@ void do_poly_self(void)
                if ((power > randint0(30)) && one_in_(5))
                {
                        int tmp = 0;
-
-                       /* Harmful deformity */
                        power -= 15;
-
                        while (tmp < A_MAX)
                        {
                                if (one_in_(2))
                                {
-                                       (void)dec_stat(p_ptr, tmp, randint1(6) + 6, one_in_(3));
+                                       (void)dec_stat(creature_ptr, tmp, randint1(6) + 6, one_in_(3));
                                        power -= 1;
                                }
                                tmp++;
                        }
 
-                       /* Deformities are discriminated against! */
-                       (void)dec_stat(p_ptr, A_CHR, randint1(6), TRUE);
+                       (void)dec_stat(creature_ptr, A_CHR, randint1(6), TRUE);
 
                        if (effect_msg[0])
                        {
@@ -3837,10 +3359,9 @@ void do_poly_self(void)
 
                while ((power > randint0(20)) && one_in_(10))
                {
-                       /* Polymorph into a less mutated form */
                        power -= 10;
 
-                       if (!lose_mutation(0))
+                       if (!lose_mutation(creature_ptr, 0))
                        msg_print(_("奇妙なくらい普通になった気がする。", "You feel oddly normal."));
                }
 
@@ -3848,28 +3369,26 @@ void do_poly_self(void)
                {
                        new_race = (CHARACTER_IDX)randint0(MAX_RACES);
                }
-               while ((new_race == p_ptr->prace) || (new_race == RACE_ANDROID));
+               while ((new_race == creature_ptr->prace) || (new_race == RACE_ANDROID));
 
-               change_race(new_race, effect_msg);
+               change_race(creature_ptr, new_race, effect_msg);
        }
 
        if ((power > randint0(30)) && one_in_(6))
        {
                int tmp = 0;
-
-               /* Abomination! */
                power -= 20;
-               msg_format(_("%sの構成が変化した!", "Your internal organs are rearranged!"), p_ptr->prace == RACE_ANDROID ? "機械" : "内臓");
+               msg_format(_("%sの構成が変化した!", "Your internal organs are rearranged!"), creature_ptr->prace == RACE_ANDROID ? "機械" : "内臓");
 
                while (tmp < A_MAX)
                {
-                       (void)dec_stat(p_ptr, tmp, randint1(6) + 6, one_in_(3));
+                       (void)dec_stat(creature_ptr, tmp, randint1(6) + 6, one_in_(3));
                        tmp++;
                }
                if (one_in_(6))
                {
                        msg_print(_("現在の姿で生きていくのは困難なようだ!", "You find living difficult in your present form!"));
-                       take_hit(DAMAGE_LOSELIFE, damroll(randint1(10), p_ptr->lev), _("致命的な突然変異", "a lethal mutation"), -1);
+                       take_hit(creature_ptr, DAMAGE_LOSELIFE, damroll(randint1(10), creature_ptr->lev), _("致命的な突然変異", "a lethal mutation"), -1);
 
                        power -= 10;
                }
@@ -3879,74 +3398,67 @@ void do_poly_self(void)
        {
                power -= 10;
 
-               get_max_stats();
-               roll_hitdice(p_ptr, 0L);
+               get_max_stats(creature_ptr);
+               roll_hitdice(creature_ptr, 0L);
        }
 
        while ((power > randint0(15)) && one_in_(3))
        {
                power -= 7;
-               (void)gain_mutation(p_ptr, 0);
+               (void)gain_mutation(creature_ptr, 0);
        }
 
        if (power > randint0(5))
        {
                power -= 5;
-               do_poly_wounds();
+               do_poly_wounds(creature_ptr);
        }
 
-       /* Note: earlier deductions may have left power < 0 already. */
        while (power > 0)
        {
-               status_shuffle();
+               status_shuffle(creature_ptr);
                power--;
        }
 }
 
+
 /*
  * Gain experience
  */
-void gain_exp_64(s32b amount, u32b amount_frac)
+void gain_exp_64(player_type *creature_ptr, s32b amount, u32b amount_frac)
 {
-       if (p_ptr->is_dead) return;
-
-       if (p_ptr->prace == RACE_ANDROID) return;
+       if (creature_ptr->is_dead) return;
+       if (creature_ptr->prace == RACE_ANDROID) return;
 
-       /* Gain some experience */
-       s64b_add(&(p_ptr->exp), &(p_ptr->exp_frac), amount, amount_frac);
+       s64b_add(&(creature_ptr->exp), &(creature_ptr->exp_frac), amount, amount_frac);
 
-       /* Slowly recover from experience drainage */
-       if (p_ptr->exp < p_ptr->max_exp)
+       if (creature_ptr->exp < creature_ptr->max_exp)
        {
-               /* Gain max experience (20%) (was 10%) */
-               p_ptr->max_exp += amount / 5;
+               creature_ptr->max_exp += amount / 5;
        }
 
-       /* Check Experience */
-       check_experience();
+       check_experience(creature_ptr);
 }
 
 
 /*
  * Gain experience
  */
-void gain_exp(s32b amount)
+void gain_exp(player_type *creature_ptr, s32b amount)
 {
-       gain_exp_64(amount, 0L);
+       gain_exp_64(creature_ptr, amount, 0L);
 }
 
 
-void calc_android_exp(void)
+void calc_android_exp(player_type *creature_ptr)
 {
-       int i;
        u32b total_exp = 0;
-       if (p_ptr->is_dead) return;
-
-       if (p_ptr->prace != RACE_ANDROID) return;
+       if (creature_ptr->is_dead) return;
+       if (creature_ptr->prace != RACE_ANDROID) return;
 
-       for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
+       for (int i = INVEN_RARM; i < INVEN_TOTAL; i++)
        {
-               object_type *o_ptr = &p_ptr->inventory_list[i];
+               object_type *o_ptr = &creature_ptr->inventory_list[i];
                object_type forge;
                object_type *q_ptr = &forge;
                u32b value, exp;
@@ -3954,8 +3466,8 @@ void calc_android_exp(void)
 
                if ((i == INVEN_RIGHT) || (i == INVEN_LEFT) || (i == INVEN_NECK) || (i == INVEN_LITE)) continue;
                if (!o_ptr->k_idx) continue;
-               object_wipe(q_ptr);
 
+               object_wipe(q_ptr);
                object_copy(q_ptr, o_ptr);
                q_ptr->discount = 0;
                q_ptr->curse_flags = 0L;
@@ -3976,14 +3488,12 @@ void calc_android_exp(void)
 
                        if (!object_is_weapon_ammo(o_ptr))
                        {
-                               /* For armors */
                                if (total_flags < 15000) fake_level = 10;
                                else if (total_flags < 35000) fake_level = 25;
                                else fake_level = 40;
                        }
                        else
                        {
-                               /* For weapons */
                                if (total_flags < 20000) fake_level = 10;
                                else if (total_flags < 45000) fake_level = 25;
                                else fake_level = 40;
@@ -3993,9 +3503,8 @@ void calc_android_exp(void)
                }
 
                value = object_value_real(q_ptr);
-
                if (value <= 0) continue;
-               if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (p_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
+               if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (creature_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
                if (value > 5000000L) value = 5000000L;
                if ((o_ptr->tval == TV_DRAG_ARMOR) || (o_ptr->tval == TV_CARD)) level /= 2;
 
@@ -4020,32 +3529,27 @@ void calc_android_exp(void)
                        if (value > 100000L)
                                exp += (value - 100000L) / 4  * level;
                }
-               if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (has_melee_weapon(i))) || (i == INVEN_BOW)) total_exp += exp / 48;
+               if ((((i == INVEN_RARM) || (i == INVEN_LARM)) && (has_melee_weapon(creature_ptr, i))) || (i == INVEN_BOW)) total_exp += exp / 48;
                else total_exp += exp / 16;
                if (i == INVEN_BODY) total_exp += exp / 32;
        }
-       p_ptr->exp = p_ptr->max_exp = total_exp;
 
-       /* Check Experience */
-       check_experience();
+       creature_ptr->exp = creature_ptr->max_exp = total_exp;
+       check_experience(creature_ptr);
 }
 
 
 /*
  * Lose experience
  */
-void lose_exp(s32b amount)
+void lose_exp(player_type *creature_ptr, s32b amount)
 {
-       if (p_ptr->prace == RACE_ANDROID) return;
+       if (creature_ptr->prace == RACE_ANDROID) return;
+       if (amount > creature_ptr->exp) amount = creature_ptr->exp;
 
-       /* Never drop below zero experience */
-       if (amount > p_ptr->exp) amount = p_ptr->exp;
+       creature_ptr->exp -= amount;
 
-       /* Lose some experience */
-       p_ptr->exp -= amount;
-
-       /* Check Experience */
-       check_experience();
+       check_experience(creature_ptr);
 }
 
 
@@ -4053,184 +3557,165 @@ void lose_exp(s32b amount)
  * Drain experience
  * If resisted to draining, return FALSE
  */
-bool drain_exp(s32b drain, s32b slip, int hold_exp_prob)
+bool drain_exp(player_type *creature_ptr, s32b drain, s32b slip, int hold_exp_prob)
 {
-       /* Androids and their mimics are never drained */
-       if (p_ptr->prace == RACE_ANDROID) return FALSE;
+       if (creature_ptr->prace == RACE_ANDROID) return FALSE;
 
-       if (p_ptr->hold_exp && (randint0(100) < hold_exp_prob))
+       if (creature_ptr->hold_exp && (randint0(100) < hold_exp_prob))
        {
-               /* Hold experience */
                msg_print(_("しかし自己の経験値を守りきった!", "You keep hold of your experience!"));
                return FALSE;
        }
 
-       /* Hold experience failed */
-       if (p_ptr->hold_exp)
+       if (creature_ptr->hold_exp)
        {
                msg_print(_("経験値を少し吸い取られた気がする!", "You feel your experience slipping away!"));
-               lose_exp(slip);
+               lose_exp(creature_ptr, slip);
        }
        else
        {
                msg_print(_("経験値が体から吸い取られた気がする!", "You feel your experience draining away!"));
-               lose_exp(drain);
+               lose_exp(creature_ptr, drain);
        }
 
        return TRUE;
 }
 
 
-bool set_ultimate_res(TIME_EFFECT v, bool do_dec)
+bool set_ultimate_res(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
 
-       if (p_ptr->is_dead) return FALSE;
+       if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
-               if (p_ptr->ult_res && !do_dec)
+               if (creature_ptr->ult_res && !do_dec)
                {
-                       if (p_ptr->ult_res > v) return FALSE;
+                       if (creature_ptr->ult_res > v) return FALSE;
                }
-               else if (!p_ptr->ult_res)
+               else if (!creature_ptr->ult_res)
                {
                        msg_print(_("あらゆることに対して耐性がついた気がする!", "You feel resistant!"));
                        notice = TRUE;
                }
        }
 
-       /* Shut */
        else
        {
-               if (p_ptr->ult_res)
+               if (creature_ptr->ult_res)
                {
                        msg_print(_("あらゆることに対する耐性が薄れた気がする。", "You feel less resistant"));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
-       p_ptr->ult_res = v;
-       p_ptr->redraw |= (PR_STATUS);
+       creature_ptr->ult_res = v;
+       creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       p_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       creature_ptr->update |= (PU_BONUS);
+       handle_stuff(creature_ptr);
+
+       return TRUE;
 }
 
-bool set_tim_res_nether(TIME_EFFECT v, bool do_dec)
+
+bool set_tim_res_nether(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
 
-       if (p_ptr->is_dead) return FALSE;
+       if (creature_ptr->is_dead) return FALSE;
 
-       /* Open */
        if (v)
        {
-               if (p_ptr->tim_res_nether && !do_dec)
+               if (creature_ptr->tim_res_nether && !do_dec)
                {
-                       if (p_ptr->tim_res_nether > v) return FALSE;
+                       if (creature_ptr->tim_res_nether > v) return FALSE;
                }
-               else if (!p_ptr->tim_res_nether)
+               else if (!creature_ptr->tim_res_nether)
                {
                        msg_print(_("地獄の力に対して耐性がついた気がする!", "You feel nether resistant!"));
                        notice = TRUE;
                }
        }
 
-       /* Shut */
        else
        {
-               if (p_ptr->tim_res_nether)
+               if (creature_ptr->tim_res_nether)
                {
                        msg_print(_("地獄の力に対する耐性が薄れた気がする。", "You feel less nether resistant"));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
-       p_ptr->tim_res_nether = v;
-       p_ptr->redraw |= (PR_STATUS);
+       creature_ptr->tim_res_nether = v;
+       creature_ptr->redraw |= (PR_STATUS);
 
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       p_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       creature_ptr->update |= (PU_BONUS);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
-bool set_tim_res_time(TIME_EFFECT v, bool do_dec)
+
+bool set_tim_res_time(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
 {
        bool notice = FALSE;
        v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
+       if (creature_ptr->is_dead) return FALSE;
 
-       if (p_ptr->is_dead) return FALSE;
-
-       /* Open */
        if (v)
        {
-               if (p_ptr->tim_res_time && !do_dec)
+               if (creature_ptr->tim_res_time && !do_dec)
                {
-                       if (p_ptr->tim_res_time > v) return FALSE;
+                       if (creature_ptr->tim_res_time > v) return FALSE;
                }
-               else if (!p_ptr->tim_res_time)
+               else if (!creature_ptr->tim_res_time)
                {
                        msg_print(_("時間逆転の力に対して耐性がついた気がする!", "You feel time resistant!"));
                        notice = TRUE;
                }
        }
-
-       /* Shut */
        else
        {
-               if (p_ptr->tim_res_time)
+               if (creature_ptr->tim_res_time)
                {
                        msg_print(_("時間逆転の力に対する耐性が薄れた気がする。", "You feel less time resistant"));
                        notice = TRUE;
                }
        }
 
-       /* Use the value */
-       p_ptr->tim_res_time = v;
-       p_ptr->redraw |= (PR_STATUS);
-
-       /* Nothing to notice */
-       if (!notice) return (FALSE);
+       creature_ptr->tim_res_time = v;
+       creature_ptr->redraw |= (PR_STATUS);
+       if (!notice) return FALSE;
 
-       if (disturb_state) disturb(FALSE, FALSE);
-       p_ptr->update |= (PU_BONUS);
-       handle_stuff();
-       return (TRUE);
+       if (disturb_state) disturb(creature_ptr, FALSE, FALSE);
+       creature_ptr->update |= (PU_BONUS);
+       handle_stuff(creature_ptr);
+       return TRUE;
 }
 
 
 /*
  * Choose a warrior-mage elemental attack. -LM-
  */
-bool choose_ele_attack(void)
+bool choose_ele_attack(player_type *creature_ptr)
 {
-       int num;
-
-       char choice;
-
-       if (!has_melee_weapon(INVEN_RARM) && !has_melee_weapon(INVEN_LARM))
+       if (!has_melee_weapon(creature_ptr, INVEN_RARM) && !has_melee_weapon(creature_ptr, INVEN_LARM))
        {
                msg_format(_("武器を持たないと魔法剣は使えない。", "You cannot use temporary branding with no weapon."));
                return FALSE;
        }
-       screen_save();
 
-       num = (p_ptr->lev - 20) / 5;
+       screen_save();
+       int num = (creature_ptr->lev - 20) / 5;
        c_prt(TERM_RED,    _("        a) 焼棄", "        a) Fire Brand"), 2, 14);
 
        if (num >= 2) 
@@ -4260,24 +3745,25 @@ bool choose_ele_attack(void)
        prt("", 1, 0);
        prt(_("        どの元素攻撃をしますか?", "        Choose a temporary elemental brand "), 1, 14);
 
-       choice = inkey();
+       char choice = inkey();
 
        if ((choice == 'a') || (choice == 'A')) 
-               set_ele_attack(p_ptr, ATTACK_FIRE, p_ptr->lev/2 + randint1(p_ptr->lev/2));
+               set_ele_attack(creature_ptr, ATTACK_FIRE, creature_ptr->lev/2 + randint1(creature_ptr->lev/2));
        else if (((choice == 'b') || (choice == 'B')) && (num >= 2))
-               set_ele_attack(p_ptr, ATTACK_COLD, p_ptr->lev/2 + randint1(p_ptr->lev/2));
+               set_ele_attack(creature_ptr, ATTACK_COLD, creature_ptr->lev/2 + randint1(creature_ptr->lev/2));
        else if (((choice == 'c') || (choice == 'C')) && (num >= 3))
-               set_ele_attack(p_ptr, ATTACK_POIS, p_ptr->lev/2 + randint1(p_ptr->lev/2));
+               set_ele_attack(creature_ptr, ATTACK_POIS, creature_ptr->lev/2 + randint1(creature_ptr->lev/2));
        else if (((choice == 'd') || (choice == 'D')) && (num >= 4))
-               set_ele_attack(p_ptr, ATTACK_ACID, p_ptr->lev/2 + randint1(p_ptr->lev/2));
+               set_ele_attack(creature_ptr, ATTACK_ACID, creature_ptr->lev/2 + randint1(creature_ptr->lev/2));
        else if (((choice == 'e') || (choice == 'E')) && (num >= 5))
-               set_ele_attack(p_ptr, ATTACK_ELEC, p_ptr->lev/2 + randint1(p_ptr->lev/2));
+               set_ele_attack(creature_ptr, ATTACK_ELEC, creature_ptr->lev/2 + randint1(creature_ptr->lev/2));
        else
        {
                msg_print(_("魔法剣を使うのをやめた。", "You cancel the temporary branding."));
                screen_load();
                return FALSE;
        }
+
        screen_load();
        return TRUE;
 }
@@ -4286,15 +3772,14 @@ bool choose_ele_attack(void)
 /*
  * Choose a elemental immune. -LM-
  */
-bool choose_ele_immune(TIME_EFFECT immune_turn)
+bool choose_ele_immune(player_type *creature_ptr, TIME_EFFECT immune_turn)
 {
-       char choice;
        screen_save();
 
-       c_prt(TERM_RED,    _("        a) 火炎", "        a) Immune Fire"), 2, 14);
-       c_prt(TERM_L_WHITE,_("        b) 冷気", "        b) Immune Cold"), 3, 14);
-       c_prt(TERM_L_DARK, _("        c) 酸", "        c) Immune Acid"), 4, 14);
-       c_prt(TERM_BLUE,   _("        d) 電撃", "        d) Immune Elec"), 5, 14);
+       c_prt(TERM_RED,    _("        a) 火炎", "        a) Immunity to fire"), 2, 14);
+       c_prt(TERM_L_WHITE,_("        b) 冷気", "        b) Immunity to cold"), 3, 14);
+       c_prt(TERM_L_DARK, _("        c) 酸", "        c) Immunity to acid"), 4, 14);
+       c_prt(TERM_BLUE,   _("        d) 電撃", "        d) Immunity to elec"), 5, 14);
 
        prt("", 6, 14);
        prt("", 7, 14);
@@ -4302,25 +3787,60 @@ bool choose_ele_immune(TIME_EFFECT immune_turn)
        prt("", 9, 14);
 
        prt("", 1, 0);
-       prt(_("        どの元素の免疫をつけますか?", "        Choose a temporary elemental immune "), 1, 14);
+       prt(_("        どの元素の免疫をつけますか?", "        Choose a temporary elemental immunity "), 1, 14);
 
-       choice = inkey();
+       char choice = inkey();
 
        if ((choice == 'a') || (choice == 'A')) 
-               set_ele_immune(p_ptr, DEFENSE_FIRE, immune_turn);
+               set_ele_immune(creature_ptr, DEFENSE_FIRE, immune_turn);
        else if ((choice == 'b') || (choice == 'B'))
-               set_ele_immune(p_ptr, DEFENSE_COLD, immune_turn);
+               set_ele_immune(creature_ptr, DEFENSE_COLD, immune_turn);
        else if ((choice == 'c') || (choice == 'C'))
-               set_ele_immune(p_ptr, DEFENSE_ACID, immune_turn);
+               set_ele_immune(creature_ptr, DEFENSE_ACID, immune_turn);
        else if ((choice == 'd') || (choice == 'D'))
-               set_ele_immune(p_ptr, DEFENSE_ELEC, immune_turn);
+               set_ele_immune(creature_ptr, DEFENSE_ELEC, immune_turn);
        else
        {
-               msg_print(_("免疫を付けるのをやめた。", "You cancel the temporary immune."));
+               msg_print(_("免疫を付けるのをやめた。", "You cancel the temporary immunity."));
                screen_load();
                return FALSE;
        }
+
        screen_load();
        return TRUE;
 }
 
+bool_hack drop_weapons(player_type *creature_ptr)
+{
+       INVENTORY_IDX slot = 0;
+       object_type *o_ptr = NULL;
+
+       if (creature_ptr->wild_mode) return FALSE;
+
+       msg_print(NULL);
+       if (has_melee_weapon(creature_ptr, INVEN_RARM))
+       {
+               slot = INVEN_RARM;
+               o_ptr = &creature_ptr->inventory_list[INVEN_RARM];
+
+               if (has_melee_weapon(creature_ptr, INVEN_LARM) && one_in_(2))
+               {
+                       o_ptr = &creature_ptr->inventory_list[INVEN_LARM];
+                       slot = INVEN_LARM;
+               }
+       }
+       else if (has_melee_weapon(creature_ptr, INVEN_LARM))
+       {
+               o_ptr = &creature_ptr->inventory_list[INVEN_LARM];
+               slot = INVEN_LARM;
+       }
+
+       if (slot && !object_is_cursed(o_ptr))
+       {
+               msg_print(_("武器を落としてしまった!", "You drop your weapon!"));
+               drop_from_inventory(creature_ptr, slot, 1);
+               return TRUE;
+       }
+
+       return FALSE;
+}