OSDN Git Service

[Refactor] #38997 do_cmd_write_nikki() に player_type * 引数を追加.
[hengband/hengband.git] / src / spells1.c
index 18ec2c3..3ca4871 100644 (file)
  */
 
 #include "angband.h"
+#include "core.h"
+#include "util.h"
+
 #include "cmd-pet.h"
+#include "cmd-dump.h"
+#include "floor.h"
 #include "trap.h"
+#include "autopick.h"
 #include "object-curse.h"
 #include "player-damage.h"
+#include "player-effects.h"
+#include "player-race.h"
+#include "player-class.h"
 
 #include "monster.h"
 #include "monster-status.h"
+#include "monster-spell.h"
+#include "spells.h"
+#include "spells-status.h"
 #include "spells-diceroll.h"
 #include "spells-summon.h"
 #include "monsterrace-hook.h"
 
 #include "melee.h"
 #include "world.h"
-#include "projection.h"
 #include "mutation.h"
 #include "rooms.h"
 #include "artifact.h"
 #include "avatar.h"
 #include "player-status.h"
+#include "player-move.h"
 #include "realm-hex.h"
+#include "realm-song.h"
 #include "object-hook.h"
+#include "object-broken.h"
+#include "object-flavor.h"
+#include "quest.h"
 #include "term.h"
 #include "grid.h"
 #include "feature.h"
+#include "view-mainwindow.h"
+#include "dungeon.h"
 
 
 static int rakubadam_m; /*!< 振り落とされた際のダメージ量 */
 static int rakubadam_p; /*!< 落馬した際のダメージ量 */
+bool sukekaku;
 
 int project_length = 0; /*!< 投射の射程距離 */
 
+int cap_mon;
+int cap_mspeed;
+HIT_POINT cap_hp;
+HIT_POINT cap_maxhp;
+STR_OFFSET cap_nickname;
+
+/*!
+ * @brief 歌、剣術、呪術領域情報テーブル
+ */
+const magic_type technic_info[NUM_TECHNIC][32] =
+{
+       {
+               /* Music */
+               { 1,  1,  10,   2},
+               { 2,  1,  10,   2},
+               { 3,  2,  20,   3},
+               { 4,  2,  20,   4},
+               { 5,  2,  20,   6},
+               { 7,  4,  30,   8},
+               { 9,  3,  30,   10},
+               { 10, 2,  30,   12},
+
+               { 12,  3,   40,   20},
+               { 15, 16,  42,   35},
+               { 17, 18,  40,   25},
+               { 18,  2,  45,   30},
+               { 23,  8,  50,   38},
+               { 28, 30,  50,   41},
+               { 33, 35,  60,   42},
+               { 38, 35,  70,   46},
+
+               { 10,  4,  20,   13},
+               { 22,  5,  30,   26},
+               { 23,  3,  35,   27},
+               { 26,  28,  37,   29},
+               { 32,  37,  41,   36},
+               { 33,  22,  43,   40},
+               { 37,  35,  46,   42},
+               { 45,  60,  50,   56},
+
+               { 23,  18,  20,   23},
+               { 30,  30,  30,   26},
+               { 33,  65,  41,   30},
+               { 37,  35,  43,   35},
+               { 40,  30,  46,   50},
+               { 42,  75,  50,   68},
+               { 45,  58,  62,   73},
+               { 49,  48,  70,  200}
+       },
+
+       {
+               /* Hissatsu */
+               { 1,   15,   0,   0},
+               { 3,   10,   0,   0},
+               { 6,   15,   0,   0},
+               { 9,    8,   0,   0},
+               { 10,  12,   0,   0},
+               { 12,  25,   0,   0},
+               { 14,   7,   0,   0},
+               { 17,  20,   0,   0},
+
+               { 19,  10,   0,   0},
+               { 22,  20,   0,   0},
+               { 24,  30,   0,   0},
+               { 25,  10,   0,   0},
+               { 27,  15,   0,   0},
+               { 29,  45,   0,   0},
+               { 32,  70,   0,   0},
+               { 35,  50,   0,   0},
+
+               { 18,  40,   0,   0},
+               { 22,  22,   0,   0},
+               { 24,  30,   0,   0},
+               { 26,  35,   0,   0},
+               { 30,  30,   0,   0},
+               { 32,  60,   0,   0},
+               { 36,  40,   0,   0},
+               { 39,  80,   0,   0},
+
+               { 26,  20,   0,   0},
+               { 29,  40,   0,   0},
+               { 31,  35,   0,   0},
+               { 36,  80,   0,   0},
+               { 39, 100,   0,   0},
+               { 42, 110,   0,   0},
+               { 45, 130,   0,   0},
+               { 50, 255,   0,   0}
+       },
+
+       {
+               /* Hex */
+               {  1,  2, 20,   2},
+               {  1,  2, 20,   2},
+               {  3,  2, 30,   3},
+               {  5,  3, 30,   4},
+               {  7,  3, 40,   6},
+               {  8, 10, 60,   8},
+               {  9,  3, 30,  10},
+               { 10,  5, 40,  12},
+
+               { 12,  8, 40,  15},
+               { 12,  9, 35,  15},
+               { 15, 10, 50,  20},
+               { 20, 12, 45,  35},
+               { 25, 15, 50,  50},
+               { 30, 12, 60,  70},
+               { 35, 10, 60,  80},
+               { 40, 16, 70, 100},
+
+               { 15,  8, 20,  20},
+               { 18, 15, 50,  20},
+               { 22, 10, 65,  35},
+               { 25, 28, 70,  50},
+               { 28, 10, 70,  60},
+               { 30, 20, 60,  60},
+               { 36, 22, 70,  80},
+               { 40, 28, 70, 100},
+
+               {  5,  6, 35,   5},
+               { 22, 24, 70,  40},
+               { 25,  2, 65,  50},
+               { 32, 20, 50,  70},
+               { 35, 35, 70,  80},
+               { 38, 32, 70,  90},
+               { 42, 24, 70, 120},
+               { 46, 45, 80, 200}
+       },
+};
+
 
 
 /*!
@@ -339,8 +487,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                /* Destroy the wall */
                                cave_alter_feat(y, x, FF_HURT_ROCK);
-
-                               /* Update some things */
                                p_ptr->update |= (PU_FLOW);
                        }
 
@@ -440,7 +586,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                if (p_ptr->special_defense & NINJA_S_STEALTH)
                                {
-                                       if (player_bold(y, x)) set_superstealth(FALSE);
+                                       if (player_bold(y, x)) set_superstealth(p_ptr, FALSE);
                                }
                        }
 
@@ -451,7 +597,7 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                case GF_DARK_WEAK:
                case GF_DARK:
                {
-                       bool do_dark = !p_ptr->inside_battle && !is_mirror_grid(g_ptr);
+                       bool do_dark = !p_ptr->phase_out && !is_mirror_grid(g_ptr);
                        int j;
 
                        /* Turn off the light. */
@@ -526,8 +672,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                /* Destroy the wall */
                                cave_alter_feat(y, x, FF_HURT_ROCK);
-
-                               /* Update some things */
                                p_ptr->update |= (PU_FLOW);
                        }
                        break;
@@ -553,8 +697,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                /* Destroy the wall */
                                cave_alter_feat(y, x, FF_HURT_ROCK);
-
-                               /* Update some things */
                                p_ptr->update |= (PU_FLOW);
                        }
                        break;
@@ -651,8 +793,6 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                /* Get the "plural"-ness */
                bool plural = (o_ptr->number > 1);
 #endif
-
-               /* Acquire next object */
                next_o_idx = o_ptr->next_o_idx;
                object_flags(o_ptr, flgs);
 
@@ -842,7 +982,7 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        int i;
                                        BIT_FLAGS mode = 0L;
 
-                                       if (!who || is_pet(&m_list[who]))
+                                       if (!who || is_pet(&current_floor_ptr->m_list[who]))
                                                mode |= PM_FORCE_PET;
 
                                        for (i = 0; i < o_ptr->number ; i++)
@@ -997,8 +1137,8 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
        grid_type *g_ptr = &current_floor_ptr->grid_array[y][x];
 
-       monster_type *m_ptr = &m_list[g_ptr->m_idx];
-       monster_type *caster_ptr = (who > 0) ? &m_list[who] : NULL;
+       monster_type *m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
+       monster_type *caster_ptr = (who > 0) ? &current_floor_ptr->m_list[who] : NULL;
 
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
@@ -1014,7 +1154,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        bool obvious = FALSE;
 
        /* Can the player know about this effect? */
-       bool known = ((m_ptr->cdis <= MAX_SIGHT) || p_ptr->inside_battle);
+       bool known = ((m_ptr->cdis <= MAX_SIGHT) || p_ptr->phase_out);
 
        /* Were the effects "irrelevant"? */
        bool skipped = FALSE;
@@ -1577,7 +1717,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        dam /= 3;
 
                                        /*
-                                        * Powerful demons & undead can turn a mindcrafter's
+                                        * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
                                         * attacks back on them
                                         */
                                        if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
@@ -1590,36 +1730,36 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                                        "%^ss corrupted mind backlashes your attack!")), m_name);
 
                                                /* Saving throw */
-                                               if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+                                               if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
                                                {
                                                        msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
                                                }
                                                else
                                                {
                                                        /* Injure +/- confusion */
-                                                       monster_desc(killer, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
-                                                       take_hit(DAMAGE_ATTACK, dam, killer, -1);  /* has already been /3 */
-                                                       if (one_in_(4) && !CHECK_MULTISHADOW())
+                                                       monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
+                                                       take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, -1);  /* has already been /3 */
+                                                       if (one_in_(4) && !CHECK_MULTISHADOW(p_ptr))
                                                        {
                                                                switch (randint1(4))
                                                                {
                                                                        case 1:
-                                                                               set_confused(p_ptr->confused + 3 + randint1(dam));
+                                                                               set_confused(p_ptr, p_ptr->confused + 3 + randint1(dam));
                                                                                break;
                                                                        case 2:
-                                                                               set_stun(p_ptr->stun + randint1(dam));
+                                                                               set_stun(p_ptr, p_ptr->stun + randint1(dam));
                                                                                break;
                                                                        case 3:
                                                                        {
                                                                                if (r_ptr->flags3 & RF3_NO_FEAR)
                                                                                        note = _("には効果がなかった。", " is unaffected.");
                                                                                else
-                                                                                       set_afraid(p_ptr->afraid + 3 + randint1(dam));
+                                                                                       set_afraid(p_ptr, p_ptr->afraid + 3 + randint1(dam));
                                                                                break;
                                                                        }
                                                                        default:
                                                                                if (!p_ptr->free_act)
-                                                                                       (void)set_paralyzed(p_ptr->paralyzed + randint1(dam));
+                                                                                       (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint1(dam));
                                                                                break;
                                                                }
                                                        }
@@ -1668,7 +1808,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        dam /= 3;
 
                                        /*
-                                        * Powerful demons & undead can turn a mindcrafter's
+                                        * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
                                         * attacks back on them
                                         */
                                        if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
@@ -1680,15 +1820,15 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                        (seen ? "%^s's corrupted mind backlashes your attack!" : 
                                                                        "%^ss corrupted mind backlashes your attack!")), m_name);
                                                /* Saving throw */
-                                               if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+                                               if ((randint0(100 + r_ptr->level / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
                                                {
                                                        msg_print(_("あなたは効力を跳ね返した!", "You resist the effects!"));
                                                }
                                                else
                                                {
                                                        /* Injure + mana drain */
-                                                       monster_desc(killer, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
-                                                       if (!CHECK_MULTISHADOW())
+                                                       monster_desc(killer, m_ptr, MD_WRONGDOER_NAME);
+                                                       if (!CHECK_MULTISHADOW(p_ptr))
                                                        {
                                                                msg_print(_("超能力パワーを吸いとられた!", "Your psychic energy is drained!"));
                                                                p_ptr->csp -= damroll(5, dam) / 2;
@@ -1696,7 +1836,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                                p_ptr->redraw |= PR_MANA;
                                                                p_ptr->window |= (PW_SPELL);
                                                        }
-                                                       take_hit(DAMAGE_ATTACK, dam, killer, -1);  /* has already been /3 */
+                                                       take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, -1);  /* has already been /3 */
                                                }
                                                dam = 0;
                                        }
@@ -1776,7 +1916,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        do_conf = 0;
 
                                        /*
-                                        * Powerful demons & undead can turn a mindcrafter's
+                                        * Powerful demons & undead can current_world_ptr->game_turn a mindcrafter's
                                         * attacks back on them
                                         */
                                        if ((r_ptr->flags3 & (RF3_UNDEAD | RF3_DEMON)) &&
@@ -1799,17 +1939,17 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                        switch (randint1(4))
                                                        {
                                                                case 1:
-                                                                       set_stun(p_ptr->stun + dam / 2);
+                                                                       set_stun(p_ptr, p_ptr->stun + dam / 2);
                                                                        break;
                                                                case 2:
-                                                                       set_confused(p_ptr->confused + dam / 2);
+                                                                       set_confused(p_ptr, p_ptr->confused + dam / 2);
                                                                        break;
                                                                default:
                                                                {
                                                                        if (r_ptr->flags3 & RF3_NO_FEAR)
                                                                                note = _("には効果がなかった。", " is unaffected.");
                                                                        else
-                                                                               set_afraid(p_ptr->afraid + dam);
+                                                                               set_afraid(p_ptr, p_ptr->afraid + dam);
                                                                }
                                                        }
                                                }
@@ -2026,29 +2166,29 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                if (!who)
                                {
-                                       chg_virtue(V_VITALITY, 1);
+                                       chg_virtue(p_ptr, V_VITALITY, 1);
 
                                        if (r_ptr->flags1 & RF1_UNIQUE)
-                                               chg_virtue(V_INDIVIDUALISM, 1);
+                                               chg_virtue(p_ptr, V_INDIVIDUALISM, 1);
 
                                        if (is_friendly(m_ptr))
-                                               chg_virtue(V_HONOUR, 1);
+                                               chg_virtue(p_ptr, V_HONOUR, 1);
                                        else if (!(r_ptr->flags3 & RF3_EVIL))
                                        {
                                                if (r_ptr->flags3 & RF3_GOOD)
-                                                       chg_virtue(V_COMPASSION, 2);
+                                                       chg_virtue(p_ptr, V_COMPASSION, 2);
                                                else
-                                                       chg_virtue(V_COMPASSION, 1);
+                                                       chg_virtue(p_ptr, V_COMPASSION, 1);
                                        }
 
                                        if (r_ptr->flags3 & RF3_ANIMAL)
-                                               chg_virtue(V_NATURE, 1);
+                                               chg_virtue(p_ptr, V_NATURE, 1);
                                }
 
                                if (m_ptr->r_idx == MON_LEPER)
                                {
                                        heal_leper = TRUE;
-                                       if (!who) chg_virtue(V_COMPASSION, 5);
+                                       if (!who) chg_virtue(p_ptr, V_COMPASSION, 5);
                                }
 
                                /* Redraw (later) if needed */
@@ -2077,9 +2217,9 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                if (!who)
                                {
                                        if (r_ptr->flags1 & RF1_UNIQUE)
-                                               chg_virtue(V_INDIVIDUALISM, 1);
+                                               chg_virtue(p_ptr, V_INDIVIDUALISM, 1);
                                        if (is_friendly(m_ptr))
-                                               chg_virtue(V_HONOUR, 1);
+                                               chg_virtue(p_ptr, V_HONOUR, 1);
                                }
 
                                /* No "real" damage */
@@ -2201,13 +2341,13 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        case GF_CHARM:
                        {
                                int vir;
-                               vir = virtue_number(V_HARMONY);
+                               vir = virtue_number(p_ptr, V_HARMONY);
                                if (vir)
                                {
                                        dam += p_ptr->virtues[vir-1]/10;
                                }
 
-                               vir = virtue_number(V_INDIVIDUALISM);
+                               vir = virtue_number(p_ptr, V_INDIVIDUALISM);
                                if (vir)
                                {
                                        dam -= p_ptr->virtues[vir-1]/20;
@@ -2236,9 +2376,9 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        note = _("は突然友好的になったようだ!", " suddenly seems friendly!");
                                        set_pet(m_ptr);
 
-                                       chg_virtue(V_INDIVIDUALISM, -1);
+                                       chg_virtue(p_ptr, V_INDIVIDUALISM, -1);
                                        if (r_ptr->flags3 & RF3_ANIMAL)
-                                               chg_virtue(V_NATURE, 1);
+                                               chg_virtue(p_ptr, V_NATURE, 1);
                                }
 
                                /* No "real" damage */
@@ -2252,13 +2392,13 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                int vir;
                                if (seen) obvious = TRUE;
 
-                               vir = virtue_number(V_UNLIFE);
+                               vir = virtue_number(p_ptr, V_UNLIFE);
                                if (vir)
                                {
                                        dam += p_ptr->virtues[vir-1]/10;
                                }
 
-                               vir = virtue_number(V_INDIVIDUALISM);
+                               vir = virtue_number(p_ptr, V_INDIVIDUALISM);
                                if (vir)
                                {
                                        dam -= p_ptr->virtues[vir-1]/20;
@@ -2295,13 +2435,13 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                int vir;
                                if (seen) obvious = TRUE;
 
-                               vir = virtue_number(V_UNLIFE);
+                               vir = virtue_number(p_ptr, V_UNLIFE);
                                if (vir)
                                {
                                        dam += p_ptr->virtues[vir-1]/10;
                                }
 
-                               vir = virtue_number(V_INDIVIDUALISM);
+                               vir = virtue_number(p_ptr, V_INDIVIDUALISM);
                                if (vir)
                                {
                                        dam -= p_ptr->virtues[vir-1]/20;
@@ -2338,13 +2478,13 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                int vir;
                                if (seen) obvious = TRUE;
 
-                               vir = virtue_number(V_NATURE);
+                               vir = virtue_number(p_ptr, V_NATURE);
                                if (vir)
                                {
                                        dam += p_ptr->virtues[vir-1]/10;
                                }
 
-                               vir = virtue_number(V_INDIVIDUALISM);
+                               vir = virtue_number(p_ptr, V_INDIVIDUALISM);
                                if (vir)
                                {
                                        dam -= p_ptr->virtues[vir-1]/20;
@@ -2370,7 +2510,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        note = _("はなついた。", " is tamed!");
                                        set_pet(m_ptr);
                                        if (r_ptr->flags3 & RF3_ANIMAL)
-                                               chg_virtue(V_NATURE, 1);
+                                               chg_virtue(p_ptr, V_NATURE, 1);
                                }
 
                                /* No "real" damage */
@@ -2383,16 +2523,16 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        {
                                int vir;
 
-                               vir = virtue_number(V_UNLIFE);
+                               vir = virtue_number(p_ptr, V_UNLIFE);
                                if (seen) obvious = TRUE;
 
-                               vir = virtue_number(V_UNLIFE);
+                               vir = virtue_number(p_ptr, V_UNLIFE);
                                if (vir)
                                {
                                        dam -= p_ptr->virtues[vir-1]/10;
                                }
 
-                               vir = virtue_number(V_INDIVIDUALISM);
+                               vir = virtue_number(p_ptr, V_INDIVIDUALISM);
                                if (vir)
                                {
                                        dam -= p_ptr->virtues[vir-1]/20;
@@ -2420,7 +2560,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        note = _("を支配した。", " is tamed!");
                                        set_pet(m_ptr);
                                        if (r_ptr->flags3 & RF3_ANIMAL)
-                                               chg_virtue(V_NATURE, 1);
+                                               chg_virtue(p_ptr, V_NATURE, 1);
                                }
 
                                /* No "real" damage */
@@ -2982,7 +3122,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        else
                                        {
                                                msg_format(_("%sから精神エネルギーを吸いとった。", "You draw psychic energy from %s."), m_name);
-                                               (void)hp_player(dam);
+                                               (void)hp_player(p_ptr, dam);
                                        }
                                }
                                else
@@ -3336,7 +3476,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                if (genocide_aux(g_ptr->m_idx, dam, !who, (r_ptr->level + 1) / 2, _("モンスター消滅", "Genocide One")))
                                {
                                        if (seen_msg) msg_format(_("%sは消滅した!", "%^s disappered!"), m_name);
-                                       chg_virtue(V_VITALITY, -1);
+                                       chg_virtue(p_ptr, V_VITALITY, -1);
                                        return TRUE;
                                }
 
@@ -3473,15 +3613,15 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        if (p_ptr->riding && (g_ptr->m_idx == p_ptr->riding)) do_poly = FALSE;
 
        /* "Unique" and "quest" monsters can only be "killed" by the player. */
-       if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->inside_battle)
+       if (((r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) || (r_ptr->flags7 & RF7_NAZGUL)) && !p_ptr->phase_out)
        {
                if (who && (dam > m_ptr->hp)) dam = m_ptr->hp;
        }
 
        if (!who && slept)
        {
-               if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_COMPASSION, -1);
-               if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(V_HONOUR, -1);
+               if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(p_ptr, V_COMPASSION, -1);
+               if (!(r_ptr->flags3 & RF3_EVIL) || one_in_(5)) chg_virtue(p_ptr, V_HONOUR, -1);
        }
 
        /* Modify the damage */
@@ -3586,7 +3726,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        }
 
                        /* Hack -- Get new monster */
-                       m_ptr = &m_list[g_ptr->m_idx];
+                       m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
 
                        /* Hack -- Get new race */
                        r_ptr = &r_info[m_ptr->r_idx];
@@ -3599,7 +3739,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                        note = _("が消え去った!", " disappears!");
 
-                       if (!who) chg_virtue(V_VALOUR, -1);
+                       if (!who) chg_virtue(p_ptr, V_VALOUR, -1);
 
                        /* Teleport */
                        teleport_away(g_ptr->m_idx, do_dist,
@@ -3660,7 +3800,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                }
                                else
                                {
-                                       mon_fight = TRUE;
+                                       current_floor_ptr->monster_noise = TRUE;
                                }
                        }
 
@@ -3691,7 +3831,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        }
                        else
                        {
-                               mon_fight = TRUE;
+                               current_floor_ptr->monster_noise = TRUE;
                        }
 
                        /* Hack -- handle sleep */
@@ -3708,7 +3848,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        char m2_name[MAX_NLEN];
 
                        monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
-                       do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_HEAL_LEPER, m2_name);
+                       do_cmd_write_nikki(p_ptr, NIKKI_NAMED_PET, RECORD_NAMED_PET_HEAL_LEPER, m2_name);
                }
 
                delete_monster_idx(g_ptr->m_idx);
@@ -3761,7 +3901,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                blood_curse_to_enemy(who);
        }
 
-       if (p_ptr->inside_battle)
+       if (p_ptr->phase_out)
        {
                p_ptr->health_who = g_ptr->m_idx;
                p_ptr->redraw |= (PR_HEALTH);
@@ -3911,16 +4051,16 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                {
                        do
                        {
-                               t_y = m_list[who].fy - 1 + randint1(3);
-                               t_x = m_list[who].fx - 1 + randint1(3);
+                               t_y = current_floor_ptr->m_list[who].fy - 1 + randint1(3);
+                               t_x = current_floor_ptr->m_list[who].fx - 1 + randint1(3);
                                max_attempts--;
                        }
                        while (max_attempts && in_bounds2u(t_y, t_x) && !projectable(p_ptr->y, p_ptr->x, t_y, t_x));
 
                        if (max_attempts < 1)
                        {
-                               t_y = m_list[who].fy;
-                               t_x = m_list[who].fx;
+                               t_y = current_floor_ptr->m_list[who].fy;
+                               t_x = current_floor_ptr->m_list[who].fx;
                        }
                }
                else
@@ -3948,7 +4088,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
 
        if (who > 0)
        {
-               m_ptr = &m_list[who];
+               m_ptr = &current_floor_ptr->m_list[who];
                rlev = (((&r_info[m_ptr->r_idx])->level >= 1) ? (&r_info[m_ptr->r_idx])->level : 1);
                monster_desc(m_name, m_ptr, 0);
 
@@ -3971,15 +4111,13 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        strcpy(killer, _("罠", "a trap"));
                        break;
                }
-
-               /* Paranoia */
                strcpy(m_name, killer);
        }
 
        /* Analyze the damage */
        switch (typ)
        {
-               /* Standard damage -- hurts inventory too */
+               /* Standard damage -- hurts p_ptr->inventory_list too */
                case GF_ACID:
                {
                        if (fuzzy) msg_print(_("酸で攻撃された!", "You are hit by acid!"));                    
@@ -3987,7 +4125,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        break;
                }
 
-               /* Standard damage -- hurts inventory too */
+               /* Standard damage -- hurts p_ptr->inventory_list too */
                case GF_FIRE:
                {
                        if (fuzzy) msg_print(_("火炎で攻撃された!", "You are hit by fire!"));
@@ -3995,7 +4133,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        break;
                }
 
-               /* Standard damage -- hurts inventory too */
+               /* Standard damage -- hurts p_ptr->inventory_list too */
                case GF_COLD:
                {
                        if (fuzzy) msg_print(_("冷気で攻撃された!", "You are hit by cold!"));
@@ -4003,7 +4141,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        break;
                }
 
-               /* Standard damage -- hurts inventory too */
+               /* Standard damage -- hurts p_ptr->inventory_list too */
                case GF_ELEC:
                {
                        if (fuzzy) msg_print(_("電撃で攻撃された!", "You are hit by lightning!"));
@@ -4020,16 +4158,16 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        if (p_ptr->resist_pois) dam = (dam + 2) / 3;
                        if (double_resist) dam = (dam + 2) / 3;
 
-                       if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW())
+                       if ((!(double_resist || p_ptr->resist_pois)) && one_in_(HURT_CHANCE) && !CHECK_MULTISHADOW(p_ptr))
                        {
-                               do_dec_stat(A_CON);
+                               do_dec_stat(p_ptr, A_CON);
                        }
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
 
-                       if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
+                       if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW(p_ptr))
                        {
-                               set_poisoned(p_ptr->poisoned + randint0(dam) + 10);
+                               set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
                        }
                        break;
                }
@@ -4042,18 +4180,18 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
 
                        if (p_ptr->resist_pois) dam = (2 * dam + 2) / 5;
                        if (double_resist) dam = (2 * dam + 2) / 5;
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
-                       if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW())
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+                       if (!(double_resist || p_ptr->resist_pois) && !CHECK_MULTISHADOW(p_ptr))
                        {
-                               set_poisoned(p_ptr->poisoned + randint0(dam) + 10);
+                               set_poisoned(p_ptr, p_ptr->poisoned + randint0(dam) + 10);
 
                                if (one_in_(5)) /* 6 */
                                {
                                        msg_print(_("奇形的な変身を遂げた!", "You undergo a freakish metamorphosis!"));
                                        if (one_in_(4)) /* 4 */
-                                               do_poly_self();
+                                               do_poly_self(p_ptr);
                                        else
-                                               mutate_player();
+                                               status_shuffle();
                                }
 
                                if (one_in_(6))
@@ -4068,7 +4206,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_MISSILE:
                {
                        if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4080,7 +4218,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                dam /= 2;
                        else if (p_ptr->align < -10)
                                dam *= 2;
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4089,7 +4227,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
                        if (p_ptr->align > 10)
                                dam *= 2;
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4100,12 +4238,12 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                msg_print(_("何か鋭いもので攻撃された!", "You are hit by something sharp!"));
                        }
-                       else if ((inventory[INVEN_RARM].name1 == ART_ZANTETSU) || (inventory[INVEN_LARM].name1 == ART_ZANTETSU))
+                       else if ((p_ptr->inventory_list[INVEN_RARM].name1 == ART_ZANTETSU) || (p_ptr->inventory_list[INVEN_LARM].name1 == ART_ZANTETSU))
                        {
                                msg_print(_("矢を斬り捨てた!", "You cut down the arrow!"));
                                break;
                        }
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4113,12 +4251,12 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_PLASMA:
                {
                        if (fuzzy) msg_print(_("何かとても熱いもので攻撃された!", "You are hit by something *HOT*!"));
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
 
-                       if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+                       if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
                        {
                                int plus_stun = (randint1((dam > 40) ? 35 : (dam * 3 / 4 + 5)));
-                               (void)set_stun(p_ptr->stun + plus_stun);
+                               (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
                        }
 
                        if (!(p_ptr->resist_fire || IS_OPPOSE_FIRE() || p_ptr->immune_fire))
@@ -4135,22 +4273,22 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        if (fuzzy) msg_print(_("地獄の力で攻撃された!", "You are hit by nether forces!"));
                        if (p_ptr->resist_neth)
                        {
-                               if (!prace_is_(RACE_SPECTRE))
+                               if (!PRACE_IS_(p_ptr, RACE_SPECTRE))
                                {
                                        dam *= 6; dam /= (randint1(4) + 7);
                                }
                        }
-                       else if (!CHECK_MULTISHADOW()) drain_exp(200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
+                       else if (!CHECK_MULTISHADOW(p_ptr)) drain_exp(p_ptr, 200 + (p_ptr->exp / 100), 200 + (p_ptr->exp / 1000), 75);
 
-                       if (prace_is_(RACE_SPECTRE) && !CHECK_MULTISHADOW())
+                       if (PRACE_IS_(p_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("気分がよくなった。", "You feel invigorated!"));
-                               hp_player(dam / 4);
+                               hp_player(p_ptr, dam / 4);
                                learn_spell(monspell);
                        }
                        else
                        {
-                               get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                               get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        }
 
                        break;
@@ -4160,15 +4298,15 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_WATER:
                {
                        if (fuzzy) msg_print(_("何か湿ったもので攻撃された!", "You are hit by something wet!"));
-                       if (!CHECK_MULTISHADOW())
+                       if (!CHECK_MULTISHADOW(p_ptr))
                        {
                                if (!p_ptr->resist_sound && !p_ptr->resist_water)
                                {
-                                       set_stun(p_ptr->stun + randint1(40));
+                                       set_stun(p_ptr, p_ptr->stun + randint1(40));
                                }
                                if (!p_ptr->resist_conf && !p_ptr->resist_water)
                                {
-                                       set_confused(p_ptr->confused + randint1(5) + 5);
+                                       set_confused(p_ptr, p_ptr->confused + randint1(5) + 5);
                                }
 
                                if (one_in_(5) && !p_ptr->resist_water)
@@ -4179,7 +4317,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                if (p_ptr->resist_water) get_damage /= 4;
                        }
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4192,24 +4330,24 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                dam *= 6; dam /= (randint1(4) + 7);
                        }
 
-                       if (!CHECK_MULTISHADOW())
+                       if (!CHECK_MULTISHADOW(p_ptr))
                        {
                                if (!p_ptr->resist_conf)
                                {
-                                       (void)set_confused(p_ptr->confused + randint0(20) + 10);
+                                       (void)set_confused(p_ptr, p_ptr->confused + randint0(20) + 10);
                                }
                                if (!p_ptr->resist_chaos)
                                {
-                                       (void)set_image(p_ptr->image + randint1(10));
+                                       (void)set_image(p_ptr, p_ptr->image + randint1(10));
                                        if (one_in_(3))
                                        {
                                                msg_print(_("あなたの身体はカオスの力で捻じ曲げられた!", "Your body is twisted by chaos!"));
-                                               (void)gain_random_mutation(0);
+                                               (void)gain_mutation(p_ptr, 0);
                                        }
                                }
                                if (!p_ptr->resist_neth && !p_ptr->resist_chaos)
                                {
-                                       drain_exp(5000 + (p_ptr->exp / 100), 500 + (p_ptr->exp / 1000), 75);
+                                       drain_exp(p_ptr, 5000 + (p_ptr->exp / 100), 500 + (p_ptr->exp / 1000), 75);
                                }
 
                                if (!p_ptr->resist_chaos || one_in_(9))
@@ -4219,7 +4357,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                }
                        }
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4231,9 +4369,9 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                dam *= 6; dam /= (randint1(4) + 7);
                        }
-                       else if (!CHECK_MULTISHADOW())
+                       else if (!CHECK_MULTISHADOW(p_ptr))
                        {
-                               (void)set_cut(p_ptr->cut + dam);
+                               (void)set_cut(p_ptr,p_ptr->cut + dam);
                        }
 
                        if (!p_ptr->resist_shard || one_in_(13))
@@ -4241,7 +4379,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                inven_damage(set_cold_destroy, 2);
                        }
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4253,10 +4391,10 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                dam *= 5; dam /= (randint1(4) + 7);
                        }
-                       else if (!CHECK_MULTISHADOW())
+                       else if (!CHECK_MULTISHADOW(p_ptr))
                        {
                                int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
-                               (void)set_stun(p_ptr->stun + plus_stun);
+                               (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
                        }
 
                        if (!p_ptr->resist_sound || one_in_(13))
@@ -4264,7 +4402,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                inven_damage(set_cold_destroy, 2);
                        }
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4276,11 +4414,11 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                dam *= 5; dam /= (randint1(4) + 7);
                        }
-                       else if (!CHECK_MULTISHADOW())
+                       else if (!CHECK_MULTISHADOW(p_ptr))
                        {
-                               (void)set_confused(p_ptr->confused + randint1(20) + 10);
+                               (void)set_confused(p_ptr, p_ptr->confused + randint1(20) + 10);
                        }
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4292,11 +4430,11 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                dam *= 6; dam /= (randint1(4) + 7);
                        }
-                       else if (!CHECK_MULTISHADOW())
+                       else if (!CHECK_MULTISHADOW(p_ptr))
                        {
                                (void)apply_disenchant(0);
                        }
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4308,11 +4446,11 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                dam *= 6; dam /= (randint1(4) + 7);
                        }
-                       else if (!CHECK_MULTISHADOW())
+                       else if (!CHECK_MULTISHADOW(p_ptr))
                        {
                                apply_nexus(m_ptr);
                        }
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4320,11 +4458,11 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_FORCE:
                {
                        if (fuzzy) msg_print(_("運動エネルギーで攻撃された!", "You are hit by kinetic force!"));
-                       if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+                       if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
                        {
-                               (void)set_stun(p_ptr->stun + randint1(20));
+                               (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
                        }
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4333,18 +4471,18 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_ROCKET:
                {
                        if (fuzzy) msg_print(_("爆発があった!", "There is an explosion!"));
-                       if (!p_ptr->resist_sound && !CHECK_MULTISHADOW())
+                       if (!p_ptr->resist_sound && !CHECK_MULTISHADOW(p_ptr))
                        {
-                               (void)set_stun(p_ptr->stun + randint1(20));
+                               (void)set_stun(p_ptr, p_ptr->stun + randint1(20));
                        }
 
                        if (p_ptr->resist_shard)
                        {
                                dam /= 2;
                        }
-                       else if (!CHECK_MULTISHADOW())
+                       else if (!CHECK_MULTISHADOW(p_ptr))
                        {
-                               (void)set_cut(p_ptr->cut + (dam / 2));
+                               (void)set_cut(p_ptr,p_ptr->cut + (dam / 2));
                        }
 
                        if (!p_ptr->resist_shard || one_in_(12))
@@ -4352,7 +4490,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                inven_damage(set_cold_destroy, 3);
                        }
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4360,8 +4498,8 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_INERTIAL:
                {
                        if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
-                       if (!CHECK_MULTISHADOW()) (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       if (!CHECK_MULTISHADOW(p_ptr)) (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4373,25 +4511,25 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                dam *= 4; dam /= (randint1(4) + 7);
                        }
-                       else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
+                       else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
                        {
-                               (void)set_blind(p_ptr->blind + randint1(5) + 2);
+                               (void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
                        }
 
-                       if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
+                       if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
                        {
-                               if (!CHECK_MULTISHADOW()) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
+                               if (!CHECK_MULTISHADOW(p_ptr)) msg_print(_("光で肉体が焦がされた!", "The light scorches your flesh!"));
                                dam *= 2;
                        }
-                       else if (prace_is_(RACE_S_FAIRY))
+                       else if (PRACE_IS_(p_ptr, RACE_S_FAIRY))
                        {
                                dam = dam * 4 / 3;
                        }
 
                        if (p_ptr->wraith_form) dam *= 2;
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
 
-                       if (p_ptr->wraith_form && !CHECK_MULTISHADOW())
+                       if (p_ptr->wraith_form && !CHECK_MULTISHADOW(p_ptr))
                        {
                                p_ptr->wraith_form = 0;
                                msg_print(_("閃光のため非物質的な影の存在でいられなくなった。",
@@ -4413,13 +4551,13 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                dam *= 4; dam /= (randint1(4) + 7);
 
-                               if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
+                               if (PRACE_IS_(p_ptr, RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form) dam = 0;
                        }
-                       else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW())
+                       else if (!blind && !p_ptr->resist_blind && !CHECK_MULTISHADOW(p_ptr))
                        {
-                               (void)set_blind(p_ptr->blind + randint1(5) + 2);
+                               (void)set_blind(p_ptr, p_ptr->blind + randint1(5) + 2);
                        }
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4433,7 +4571,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                dam /= (randint1(4) + 7);
                                msg_print(_("時間が通り過ぎていく気がする。", "You feel as if time is passing you by."));
                        }
-                       else if (!CHECK_MULTISHADOW())
+                       else if (!CHECK_MULTISHADOW(p_ptr))
                        {
                                switch (randint1(10))
                                {
@@ -4441,7 +4579,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                        {
                                                if (p_ptr->prace == RACE_ANDROID) break;
                                                msg_print(_("人生が逆戻りした気がする。", "You feel life has clocked back."));
-                                               lose_exp(100 + (p_ptr->exp / 100) * MON_DRAIN_LIFE);
+                                               lose_exp(p_ptr, 100 + (p_ptr->exp / 100) * MON_DRAIN_LIFE);
                                                break;
                                        }
 
@@ -4482,7 +4620,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                }
                        }
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4492,15 +4630,15 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        if (fuzzy) msg_print(_("何か重いもので攻撃された!", "You are hit by something heavy!"));
                                msg_print(_("周辺の重力がゆがんだ。", "Gravity warps around you."));
 
-                       if (!CHECK_MULTISHADOW())
+                       if (!CHECK_MULTISHADOW(p_ptr))
                        {
                                teleport_player(5, TELEPORT_PASSIVE);
                                if (!p_ptr->levitation)
-                                       (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+                                       (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
                                if (!(p_ptr->resist_sound || p_ptr->levitation))
                                {
                                        int plus_stun = (randint1((dam > 90) ? 35 : (dam / 3 + 5)));
-                                       (void)set_stun(p_ptr->stun + plus_stun);
+                                       (void)set_stun(p_ptr, p_ptr->stun + plus_stun);
                                }
                        }
                        if (p_ptr->levitation)
@@ -4513,7 +4651,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                inven_damage(set_cold_destroy, 2);
                        }
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4522,7 +4660,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                {
                        if (fuzzy) msg_print(_("純粋なエネルギーで攻撃された!", "You are hit by pure energy!"));
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4530,7 +4668,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                {
                        if (fuzzy) msg_print(_("何らかの攻撃によって気分がよくなった。", "You are hit by something invigorating!"));
 
-                       (void)hp_player(dam);
+                       (void)hp_player(p_ptr, dam);
                        dam = 0;
                        break;
                }
@@ -4538,7 +4676,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_OLD_SPEED:
                {
                        if (fuzzy) msg_print(_("何かで攻撃された!", "You are hit by something!"));
-                       (void)set_fast(p_ptr->fast + randint1(5), FALSE);
+                       (void)set_fast(p_ptr, p_ptr->fast + randint1(5), FALSE);
                        dam = 0;
                        break;
                }
@@ -4546,7 +4684,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_OLD_SLOW:
                {
                        if (fuzzy) msg_print(_("何か遅いもので攻撃された!", "You are hit by something slow!"));
-                       (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+                       (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
                        break;
                }
 
@@ -4559,10 +4697,10 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        {
                                msg_print(_("恐ろしい光景が頭に浮かんできた。", "A horrible vision enters your mind."));
                                /* Have some nightmares */
-                               sanity_blast(NULL, FALSE);
+                               sanity_blast(p_ptr, NULL, FALSE);
                        }
 
-                       set_paralyzed(p_ptr->paralyzed + dam);
+                       set_paralyzed(p_ptr, p_ptr->paralyzed + dam);
                        dam = 0;
                        break;
                }
@@ -4573,7 +4711,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_SUPER_RAY:
                {
                        if (fuzzy) msg_print(_("魔法のオーラで攻撃された!", "You are hit by an aura of magic!"));
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        break;
                }
 
@@ -4581,7 +4719,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                case GF_PSY_SPEAR:
                {
                        if (fuzzy) msg_print(_("エネルギーの塊で攻撃された!", "You are hit by an energy!"));
-                       get_damage = take_hit(DAMAGE_FORCE, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_FORCE, dam, killer, monspell);
                        break;
                }
 
@@ -4590,7 +4728,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                {
                        if (fuzzy) msg_print(_("何かが空からあなたの頭上に落ちてきた!", "Something falls from the sky on you!"));
 
-                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        if (!p_ptr->resist_shard || one_in_(13))
                        {
                                if (!p_ptr->immune_fire) inven_damage(set_fire_destroy, 2);
@@ -4605,15 +4743,15 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                {
                        if (fuzzy) msg_print(_("何か鋭く冷たいもので攻撃された!", "You are hit by something sharp and cold!"));
                        get_damage = cold_dam(dam, killer, monspell, FALSE);
-                       if (!CHECK_MULTISHADOW())
+                       if (!CHECK_MULTISHADOW(p_ptr))
                        {
                                if (!p_ptr->resist_shard)
                                {
-                                       (void)set_cut(p_ptr->cut + damroll(5, 8));
+                                       (void)set_cut(p_ptr,p_ptr->cut + damroll(5, 8));
                                }
                                if (!p_ptr->resist_sound)
                                {
-                                       (void)set_stun(p_ptr->stun + randint1(15));
+                                       (void)set_stun(p_ptr, p_ptr->stun + randint1(15));
                                }
 
                                if ((!(p_ptr->resist_cold || IS_OPPOSE_COLD())) || one_in_(12))
@@ -4633,7 +4771,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                        if (p_ptr->mimic_form)
                        {
                                if (!(mimic_info[p_ptr->mimic_form].MIMIC_FLAGS & MIMIC_IS_NONLIVING))
-                                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        }
                        else
                        {
@@ -4654,7 +4792,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                /* Hurt a lot */
                                default:
                                {
-                                       get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                                       get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                                        break;
                                }
                        }
@@ -4666,7 +4804,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                /* Drain mana */
                case GF_DRAIN_MANA:
                {
-                       if (CHECK_MULTISHADOW())
+                       if (CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("攻撃は幻影に命中し、あなたには届かなかった。", "The attack hits Shadow, you are unharmed!"));
                        }
@@ -4725,25 +4863,25 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                /* Mind blast */
                case GF_MIND_BLAST:
                {
-                       if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW())
+                       if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
                                learn_spell(monspell);
                        }
                        else
                        {
-                               if (!CHECK_MULTISHADOW())
+                               if (!CHECK_MULTISHADOW(p_ptr))
                                {
                                        msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
 
                                        if (!p_ptr->resist_conf)
                                        {
-                                               (void)set_confused(p_ptr->confused + randint0(4) + 4);
+                                               (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
                                        }
 
                                        if (!p_ptr->resist_chaos && one_in_(3))
                                        {
-                                               (void)set_image(p_ptr->image + randint0(250) + 150);
+                                               (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
                                        }
 
                                        p_ptr->csp -= 50;
@@ -4755,7 +4893,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                        p_ptr->redraw |= PR_MANA;
                                }
 
-                               get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                               get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        }
                        break;
                }
@@ -4763,14 +4901,14 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                /* Brain smash */
                case GF_BRAIN_SMASH:
                {
-                       if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW())
+                       if ((randint0(100 + rlev / 2) < MAX(5, p_ptr->skill_sav)) && !CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
                                learn_spell(monspell);
                        }
                        else
                        {
-                               if (!CHECK_MULTISHADOW())
+                               if (!CHECK_MULTISHADOW(p_ptr))
                                {
                                        msg_print(_("霊的エネルギーで精神が攻撃された。", "Your mind is blasted by psyonic energy."));
 
@@ -4783,31 +4921,31 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                                        p_ptr->redraw |= PR_MANA;
                                }
 
-                               get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
-                               if (!CHECK_MULTISHADOW())
+                               get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+                               if (!CHECK_MULTISHADOW(p_ptr))
                                {
                                        if (!p_ptr->resist_blind)
                                        {
-                                               (void)set_blind(p_ptr->blind + 8 + randint0(8));
+                                               (void)set_blind(p_ptr, p_ptr->blind + 8 + randint0(8));
                                        }
                                        if (!p_ptr->resist_conf)
                                        {
-                                               (void)set_confused(p_ptr->confused + randint0(4) + 4);
+                                               (void)set_confused(p_ptr, p_ptr->confused + randint0(4) + 4);
                                        }
                                        if (!p_ptr->free_act)
                                        {
-                                               (void)set_paralyzed(p_ptr->paralyzed + randint0(4) + 4);
+                                               (void)set_paralyzed(p_ptr, p_ptr->paralyzed + randint0(4) + 4);
                                        }
-                                       (void)set_slow(p_ptr->slow + randint0(4) + 4, FALSE);
+                                       (void)set_slow(p_ptr, p_ptr->slow + randint0(4) + 4, FALSE);
 
                                        while (randint0(100 + rlev / 2) > (MAX(5, p_ptr->skill_sav)))
-                                               (void)do_dec_stat(A_INT);
+                                               (void)do_dec_stat(p_ptr, A_INT);
                                        while (randint0(100 + rlev / 2) > (MAX(5, p_ptr->skill_sav)))
-                                               (void)do_dec_stat(A_WIS);
+                                               (void)do_dec_stat(p_ptr, A_WIS);
 
                                        if (!p_ptr->resist_chaos)
                                        {
-                                               (void)set_image(p_ptr->image + randint0(250) + 150);
+                                               (void)set_image(p_ptr, p_ptr->image + randint0(250) + 150);
                                        }
                                }
                        }
@@ -4817,15 +4955,15 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                /* cause 1 */
                case GF_CAUSE_1:
                {
-                       if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+                       if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
                                learn_spell(monspell);
                        }
                        else
                        {
-                               if (!CHECK_MULTISHADOW()) curse_equipment(15, 0);
-                               get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                               if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(15, 0);
+                               get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        }
                        break;
                }
@@ -4833,15 +4971,15 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                /* cause 2 */
                case GF_CAUSE_2:
                {
-                       if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+                       if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
                                learn_spell(monspell);
                        }
                        else
                        {
-                               if (!CHECK_MULTISHADOW()) curse_equipment(25, MIN(rlev / 2 - 15, 5));
-                               get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                               if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(25, MIN(rlev / 2 - 15, 5));
+                               get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        }
                        break;
                }
@@ -4849,15 +4987,15 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                /* cause 3 */
                case GF_CAUSE_3:
                {
-                       if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+                       if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
                                learn_spell(monspell);
                        }
                        else
                        {
-                               if (!CHECK_MULTISHADOW()) curse_equipment(33, MIN(rlev / 2 - 15, 15));
-                               get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
+                               if (!CHECK_MULTISHADOW(p_ptr)) curse_equipment(33, MIN(rlev / 2 - 15, 15));
+                               get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
                        }
                        break;
                }
@@ -4865,15 +5003,15 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                /* cause 4 */
                case GF_CAUSE_4:
                {
-                       if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW())
+                       if ((randint0(100 + rlev / 2) < p_ptr->skill_sav) && !(m_ptr->r_idx == MON_KENSHIROU) && !CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("しかし秘孔を跳ね返した!", "You resist the effects!"));
                                learn_spell(monspell);
                        }
                        else
                        {
-                               get_damage = take_hit(DAMAGE_ATTACK, dam, killer, monspell);
-                               if (!CHECK_MULTISHADOW()) (void)set_cut(p_ptr->cut + damroll(10, 10));
+                               get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, killer, monspell);
+                               if (!CHECK_MULTISHADOW(p_ptr)) (void)set_cut(p_ptr,p_ptr->cut + damroll(10, 10));
                        }
                        break;
                }
@@ -4881,22 +5019,22 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
                /* Hand of Doom */
                case GF_HAND_DOOM:
                {
-                       if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW())
+                       if ((randint0(100 + rlev/2) < p_ptr->skill_sav) && !CHECK_MULTISHADOW(p_ptr))
                        {
                                msg_print(_("しかし効力を跳ね返した!", "You resist the effects!"));
                                learn_spell(monspell);
                        }
                        else
                        {
-                               if (!CHECK_MULTISHADOW())
+                               if (!CHECK_MULTISHADOW(p_ptr))
                                {
                                        msg_print(_("あなたは命が薄まっていくように感じた!", "You feel your life fade away!"));
                                        curse_equipment(40, 20);
                                }
 
-                               get_damage = take_hit(DAMAGE_ATTACK, dam, m_name, monspell);
+                               get_damage = take_hit(p_ptr, DAMAGE_ATTACK, dam, m_name, monspell);
 
-                               if (p_ptr->chp < 1) p_ptr->chp = 1; /* Paranoia */
+                               if (p_ptr->chp < 1) p_ptr->chp = 1;
                        }
                        break;
                }
@@ -4924,7 +5062,7 @@ static bool project_p(MONSTER_IDX who, concptr who_name, int r, POSITION y, POSI
 
                msg_format(_("攻撃が%s自身を傷つけた!", "The attack of %s has wounded %s!"), m_name, m_name_self);
                project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1);
-               if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
+               if (p_ptr->tim_eyeeye) set_tim_eyeeye(p_ptr, p_ptr->tim_eyeeye-5, TRUE);
        }
 
        if (p_ptr->riding && dam > 0)
@@ -5280,7 +5418,7 @@ void breath_shape(u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *g
  * @param x 目標X座標 / Target x location (or location to travel "towards")
  * @param dam 基本威力 / Base damage roll to apply to affected monsters (or player)
  * @param typ 効果属性 / Type of damage to apply to monsters (and objects)
- * @param flg 効果フラグ / Extra bit flags (see PROJECT_xxxx in "defines.h")
+ * @param flg 効果フラグ / Extra bit flags (see PROJECT_xxxx)
  * @param monspell 効果元のモンスター魔法ID
  * @return 何か一つでも効力があればTRUEを返す / TRUE if any "effects" of the projection were observed, else FALSE
  * @details
@@ -5503,9 +5641,9 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
        /* Start at monster */
        else if (who > 0)
        {
-               x1 = m_list[who].fx;
-               y1 = m_list[who].fy;
-               monster_desc(who_name, &m_list[who], MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+               x1 = current_floor_ptr->m_list[who].fx;
+               y1 = current_floor_ptr->m_list[who].fy;
+               monster_desc(who_name, &current_floor_ptr->m_list[who], MD_WRONGDOER_NAME);
        }
 
        else
@@ -5673,7 +5811,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                                        if (project_m(0, 0, y, x, dam, GF_SEEKER, flg, TRUE)) notice = TRUE;
                                        if (!who && (project_m_n == 1) && !jump) {
                                                if (current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0) {
-                                                       monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
+                                                       monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
 
                                                        if (m_ptr->ml)
                                                        {
@@ -5697,7 +5835,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                        if (!who && (project_m_n == 1) && !jump) {
                                if (current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0)
                                {
-                                       monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
+                                       monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
 
                                        if (m_ptr->ml)
                                        {
@@ -5826,7 +5964,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                        (void)project_m(0, 0, py, px, dam, GF_SUPER_RAY, flg, TRUE);
                        if(!who && (project_m_n == 1) && !jump){
                                if(current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx >0 ){
-                                       monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
+                                       monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
 
                                        if (m_ptr->ml)
                                        {
@@ -6038,7 +6176,6 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                        /* Dump everything with this radius */
                        for (i = gm[t]; i < gm[t+1]; i++)
                        {
-                               /* Extract the location */
                                y = gy[i];
                                x = gx[i];
 
@@ -6083,7 +6220,6 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                        /* Erase the explosion drawn above */
                        for (i = 0; i < grids; i++)
                        {
-                               /* Extract the location */
                                y = gy[i];
                                x = gx[i];
 
@@ -6106,7 +6242,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
 
        if (flg & PROJECT_KILL)
        {
-               see_s_msg = (who > 0) ? is_seen(&m_list[who]) :
+               see_s_msg = (who > 0) ? is_seen(&current_floor_ptr->m_list[who]) :
                        (!who ? TRUE : (player_can_see_bold(y1, x1) && projectable(p_ptr->y, p_ptr->x, y1, x1)));
        }
 
@@ -6204,7 +6340,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                        /* A single bolt may be reflected */
                        if (grids <= 1)
                        {
-                               monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[y][x].m_idx];
+                               monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
                                monster_race *ref_ptr = &r_info[m_ptr->r_idx];
 
                                if ((flg & PROJECT_REFLECTABLE) && current_floor_ptr->grid_array[y][x].m_idx && (ref_ptr->flags2 & RF2_REFLECTING) &&
@@ -6350,7 +6486,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
                        /* Track if possible */
                        if (current_floor_ptr->grid_array[y][x].m_idx > 0)
                        {
-                               monster_type *m_ptr = &m_list[current_floor_ptr->grid_array[y][x].m_idx];
+                               monster_type *m_ptr = &current_floor_ptr->m_list[current_floor_ptr->grid_array[y][x].m_idx];
 
                                if (m_ptr->ml)
                                {
@@ -6441,7 +6577,7 @@ bool project(MONSTER_IDX who, POSITION rad, POSITION y, POSITION x, HIT_POINT da
        {
                GAME_TEXT m_name[MAX_NLEN];
 
-               monster_desc(m_name, &m_list[p_ptr->riding], 0);
+               monster_desc(m_name, &current_floor_ptr->m_list[p_ptr->riding], 0);
 
                if (rakubadam_m > 0)
                {