OSDN Git Service

Changed Japanese translation for "New" to match what was suggested in hengbandforosx...
[hengbandforosx/hengbandosx.git] / src / mspells2.c
index c5a6890..7298ad0 100644 (file)
 #include "projection.h"
 #include "quest.h"
 #include "realm-hex.h"
+#include "player-move.h"
+#include "monster.h"
+#include "monster-status.h"
+#include "monster-spell.h"
 
 /*!
  * @brief モンスターが敵対モンスターにビームを当てること可能かを判定する /
@@ -230,10 +234,8 @@ static bool dispel_check_monster(MONSTER_IDX m_idx, MONSTER_IDX t_idx)
 {
        monster_type *t_ptr = &current_floor_ptr->m_list[t_idx];
 
-       /* Invulnabilty */
        if (MON_INVULNER(t_ptr)) return TRUE;
 
-       /* Speed */
        if (t_ptr->mspeed < 135)
        {
                if (MON_FAST(t_ptr)) return TRUE;
@@ -361,8 +363,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
                        target_idx = dummy;
                        t_ptr = &current_floor_ptr->m_list[target_idx];
 
-                       /* Skip dead monsters */
-                       if (!t_ptr->r_idx) continue;
+                       if (!monster_is_valid(t_ptr)) continue;
 
                        /* Monster must be 'an enemy' */
                        if ((m_idx == target_idx) || !are_enemies(m_ptr, t_ptr)) continue;
@@ -705,7 +706,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
        dam = monspell_to_monster(thrown_spell, y, x, m_idx, target_idx);
        if (dam < 0) return FALSE;
 
-       if (m_ptr->ml && maneable && !world_monster && !p_ptr->blind && (p_ptr->pclass == CLASS_IMITATOR))
+       if (m_ptr->ml && maneable && !current_world_ptr->timewalk_m_idx && !p_ptr->blind && (p_ptr->pclass == CLASS_IMITATOR))
        {
                if (thrown_spell != 167) /* Not RF6_SPECIAL */
                {