#include "monster/monster-death.h"
#include "monster/monster-status.h"
#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster-update.h"
-#include "monster/monster2.h"
#include "mspell/monster-spell.h"
#include "object-enchant/artifact.h"
#include "object-enchant/tr-types.h"
#include "monster/monster-description-types.h"
#include "monster/monster-death.h"
#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster-remover.h"
#include "monster/monster-status.h"
#include "monster/monster-update.h"
-#include "monster/monster2.h"
#include "object-enchant/special-object-flags.h"
#include "object/object-generator.h"
#include "object/object-kind-hook.h"
{
int i;
int max_num = master_ptr->wild_mode ? 1 : MAX_PARTY_MON;
-
+ floor_type *floor_ptr = master_ptr->current_floor_ptr;
for (i = 0; i < max_num; i++)
{
POSITION cy = 0, cx = 0;
if (i == 0)
{
- m_idx = m_pop(master_ptr);
+ m_idx = m_pop(floor_ptr);
master_ptr->riding = m_idx;
if (m_idx)
{
}
if (j) break;
}
- m_idx = (d == 6) ? 0 : m_pop(master_ptr);
+ m_idx = (d == 6) ? 0 : m_pop(floor_ptr);
}
if (m_idx)
#include "monster-race/race-indice-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster2.h"
#include "mutation/mutation.h"
#include "object-enchant/artifact.h"
{
MONSTER_IDX m_idx;
monster_type *m_ptr;
- m_idx = m_pop(creature_ptr);
+ m_idx = m_pop(floor_ptr);
if (i != m_idx)
{
note(format(_("モンスター配置エラー (%d <> %d)", "Monster allocation error (%d <> %d)"), i, m_idx));
grid_type *g_ptr;
MONSTER_IDX m_idx;
monster_type *m_ptr;
- m_idx = m_pop(player_ptr);
+ m_idx = m_pop(floor_ptr);
if (i != m_idx) return 162;
m_ptr = &floor_ptr->m_list[m_idx];
#include "monster/monster-description-types.h"
#include "monster/monster-death.h"
#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster-remover.h"
#include "monster/monster-status.h"
-#include "monster/monster2.h"
#include "mspell/monster-spell.h"
#include "pet/pet-fall-off.h"
#include "player/player-class.h"
#include "monster-race/race-indice-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster-status.h"
#include "monster/monster-update.h"
#include "monster/monster-util.h"
if ((r_ptr->flags1 & RF1_UNIQUE) || (r_ptr->flags7 & RF7_NAZGUL) || (r_ptr->level < 10))
mode &= ~PM_KAGE;
- g_ptr->m_idx = m_pop(player_ptr);
+ g_ptr->m_idx = m_pop(floor_ptr);
hack_m_idx_ii = g_ptr->m_idx;
if (!g_ptr->m_idx)
return FALSE;
msg_format(_("%^s%s", "%^s %s"), m_name, monmessage);
}
}
+
+/*!
+ * @brief モンスターの目標地点をセットする / Set the target of counter attack
+ * @param m_ptr モンスターの参照ポインタ
+ * @param y 目標y座標
+ * @param x 目標x座標
+ * @return なし
+ */
+void set_target(monster_type *m_ptr, POSITION y, POSITION x)
+{
+ m_ptr->target_y = y;
+ m_ptr->target_x = x;
+}
+
+/*!
+ * @brief モンスターの目標地点をリセットする / Reset the target of counter attack
+ * @param m_ptr モンスターの参照ポインタ
+ * @return なし
+ */
+void reset_target(monster_type *m_ptr) { set_target(m_ptr, 0, 0); }
#pragma once
-#include "system/angband.h"
#include "monster/monster-processor-util.h"
+#include "system/angband.h"
+#include "system/monster-type-definition.h"
bool process_monster_movement(player_type *target_ptr, turn_flags *turn_flags_ptr, MONSTER_IDX m_idx, DIRECTION *mm, POSITION oy, POSITION ox, int *count);
void process_speak_sound(player_type *target_ptr, MONSTER_IDX m_idx, POSITION oy, POSITION ox, bool aware);
+void set_target(monster_type *m_ptr, POSITION y, POSITION x);
+void reset_target(monster_type *m_ptr);
#include "autopick/autopick-pref-processor.h"
#include "cmd-io/cmd-dump.h"
#include "cmd/cmd-draw.h"
+#include "core/speed-table.h"
#include "core/stuff-handler.h"
#include "dungeon/dungeon.h"
#include "floor/floor.h"
#include "main/sound-definitions-table.h"
#include "monster-attack/monster-attack-effect.h"
#include "monster-attack/monster-attack-types.h"
+#include "monster-race/monster-race-hook.h"
#include "monster-race/race-flags-ability2.h"
#include "monster-race/race-flags-resistance.h"
#include "monster-race/race-flags1.h"
#include "monster-race/race-flags4.h"
#include "monster-race/race-flags7.h"
#include "monster-race/race-flags8.h"
-#include "monster-race/monster-race-hook.h"
#include "monster-race/race-indice-types.h"
-#include "core/speed-table.h"
-#include "monster/monster-describer.h"
#include "monster/monster-death.h"
+#include "monster/monster-describer.h"
#include "monster/monster-description-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-generator.h"
+#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster-processor.h"
#include "monster/monster-remover.h"
#include "monster/monster-update.h"
#include "monster/monster-util.h"
-#include "monster/monster-info.h"
#include "monster/monster2.h"
#include "monster/place-monster-types.h"
#include "monster/smart-learn-types.h"
#define HORDE_NOEVIL 0x02 /*!< (未実装フラグ)HORDE生成でEVILなモンスターの生成を禁止する? */
/*!
- * @brief モンスターの目標地点をセットする / Set the target of counter attack
- * @param m_ptr モンスターの参照ポインタ
- * @param y 目標y座標
- * @param x 目標x座標
- * @return なし
- */
-void set_target(monster_type *m_ptr, POSITION y, POSITION x)
-{
- m_ptr->target_y = y;
- m_ptr->target_x = x;
-}
-
-/*!
- * @brief モンスターの目標地点をリセットする / Reset the target of counter attack
- * @param m_ptr モンスターの参照ポインタ
- * @return なし
- */
-void reset_target(monster_type *m_ptr) { set_target(m_ptr, 0, 0); }
-
-/*!
- * todo ここには本来floor_type*を追加したいが、monster.hにfloor.hの参照を追加するとコンパイルエラーが出るので保留
* @brief モンスター配列の空きを探す / Acquires and returns the index of a "free" monster.
* @return 利用可能なモンスター配列の添字
* @details
* This routine should almost never fail, but it *can* happen.
*/
-MONSTER_IDX m_pop(player_type *player_ptr)
+MONSTER_IDX m_pop(floor_type *floor_ptr)
{
/* Normal allocation */
- floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (floor_ptr->m_max < current_world_ptr->max_m_idx) {
MONSTER_IDX i = floor_ptr->m_max;
floor_ptr->m_max++;
#include "floor/floor.h"
#include "system/monster-type-definition.h"
-void set_target(monster_type *m_ptr, POSITION y, POSITION x);
-void reset_target(monster_type *m_ptr);
-MONSTER_IDX m_pop(player_type *player_ptr);
+MONSTER_IDX m_pop(floor_type *floor_ptr);
#define GMN_ARENA 0x00000001 //!< 賭け闘技場向け生成
MONRACE_IDX get_mon_num(player_type *player_ptr, DEPTH level, BIT_FLAGS option);
#include "monster/monster-description-types.h"
#include "monster/monster-flag-types.h"
#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster-status.h"
-#include "monster/monster2.h"
#include "monster/smart-learn-types.h"
#include "mspell/assign-monster-spell.h"
#include "mspell/monster-spell.h"
#include "monster/monster-describer.h"
#include "monster/monster-description-types.h"
#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster-status.h"
-#include "monster/monster2.h"
#include "mspell/assign-monster-spell.h"
#include "mspell/monster-spell.h"
#include "pet/pet-util.h"
#include "monster/monster-describer.h"
#include "monster/monster-description-types.h"
#include "monster/monster-info.h"
+#include "monster/monster-move.h"
#include "monster/monster-remover.h"
#include "monster/monster-status.h"
#include "monster/monster-update.h"
-#include "monster/monster2.h"
#include "monster/smart-learn-types.h"
#include "object-enchant/tr-types.h"
#include "object/object-flags.h"