*/
#include "angband.h"
+#include "util.h"
+
+#include "cmd-pet.h"
+#include "floor.h"
+#include "grid.h"
#include "quest.h"
#include "realm-hex.h"
#include "player-move.h"
+#include "player-class.h"
#include "monster.h"
#include "monster-status.h"
#include "monster-spell.h"
+#include "spells.h"
+#include "dungeon.h"
+#include "world.h"
+#include "view-mainwindow.h"
/*!
* @brief モンスターが敵対モンスターにビームを当てること可能かを判定する /
f6 = r_ptr->a_ability_flags2;
/* Target is given for pet? */
- if (pet_t_m_idx && pet)
+ if (p_ptr->pet_t_m_idx && pet)
{
- target_idx = pet_t_m_idx;
+ target_idx = p_ptr->pet_t_m_idx;
t_ptr = ¤t_floor_ptr->m_list[target_idx];
/* Cancel if not projectable (for now) */
/* Cancel if neither enemy nor a given target */
if ((m_idx == target_idx) ||
- ((target_idx != pet_t_m_idx) && !are_enemies(m_ptr, t_ptr)))
+ ((target_idx != p_ptr->pet_t_m_idx) && !are_enemies(m_ptr, t_ptr)))
{
target_idx = 0;
}
if (p_ptr->inside_battle)
{
- start = randint1(m_max-1) + m_max;
+ start = randint1(current_floor_ptr->m_max-1) + current_floor_ptr->m_max;
if (randint0(2)) plus = -1;
}
- else start = m_max + 1;
+ else start = current_floor_ptr->m_max + 1;
/* Scan thru all monsters */
- for (i = start; ((i < start + m_max) && (i > start - m_max)); i += plus)
+ for (i = start; ((i < start + current_floor_ptr->m_max) && (i > start - current_floor_ptr->m_max)); i += plus)
{
- MONSTER_IDX dummy = (i % m_max);
+ MONSTER_IDX dummy = (i % current_floor_ptr->m_max);
if (!dummy) continue;
target_idx = dummy;
p_ptr->mane_spell[p_ptr->mane_num] = thrown_spell - RF4_SPELL_START;
p_ptr->mane_dam[p_ptr->mane_num] = dam;
p_ptr->mane_num++;
- new_mane = TRUE;
+ p_ptr->new_mane = TRUE;
p_ptr->redraw |= (PR_IMITATION);
}