OSDN Git Service

[Refactor] #37353 cmd4.c を cmd-dump.c に改名して関数整理.
[hengband/hengband.git] / src / monster-status.c
index ff3c24c..200a2dd 100644 (file)
@@ -1,16 +1,24 @@
 #include "angband.h"
+#include "util.h"
+
+#include "cmd-dump.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "grid.h"
 #include "monster.h"
 #include "monster-status.h"
 #include "monster-spell.h"
 #include "monster-process.h"
+#include "spells.h"
 #include "spells-summon.h"
 #include "monsterrace-hook.h"
 #include "object-curse.h"
 #include "artifact.h"
 #include "avatar.h"
 #include "files.h"
+#include "player-effects.h"
+#include "view-mainwindow.h"
+#include "world.h"
 
 
 /*!
@@ -226,7 +234,7 @@ void mproc_init(void)
        for (cmi = 0; cmi < MAX_MTIMED; cmi++) current_floor_ptr->mproc_max[cmi] = 0;
 
        /* Process the monsters (backwards) */
-       for (i = m_max - 1; i >= 1; i--)
+       for (i = current_floor_ptr->m_max - 1; i >= 1; i--)
        {
                /* Access the monster */
                m_ptr = &current_floor_ptr->m_list[i];
@@ -1275,7 +1283,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
                else if (!m_ptr->ml)
                {
 #ifdef JP
-                       if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
+                       if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (p_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
                                msg_format("せっかくだから%sを殺した。", m_name);
                        else
                                msg_format("%sを殺した。", m_name);
@@ -1301,7 +1309,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
                        else
                        {
 #ifdef JP
-                               if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
+                               if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (p_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
                                        msg_format("せっかくだから%sを倒した。", m_name);
                                else
                                        msg_format("%sを倒した。", m_name);
@@ -1315,7 +1323,7 @@ bool mon_take_hit(MONSTER_IDX m_idx, HIT_POINT dam, bool *fear, concptr note)
                else
                {
 #ifdef JP
-                       if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
+                       if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (p_ptr->inventory_list[INVEN_BOW].name1 == ART_CRIMSON))
                                msg_format("せっかくだから%sを葬り去った。", m_name);
                        else
                                msg_format("%sを葬り去った。", m_name);