OSDN Git Service

[Refactor] #37353 ゲームバランス定数を gamevalue.h へ整理。 / Move constant value in game to gameva...
[hengband/hengband.git] / src / mspells2.c
index 910bc96..07b2d5a 100644 (file)
@@ -94,7 +94,7 @@ static bool breath_direct(POSITION y1, POSITION x1, POSITION y2, POSITION x2, PO
        bool hit2 = FALSE;
        bool hityou = FALSE;
 
-       int flg;
+       BIT_FLAGS flg;
 
        switch (typ)
        {
@@ -191,7 +191,7 @@ static bool breath_direct(POSITION y1, POSITION x1, POSITION y2, POSITION x2, PO
  * @param flg 判定のフラグ配列
  * @return なし
  */
-void get_project_point(int sy, int sx, int *ty, int *tx, int flg)
+void get_project_point(int sy, int sx, int *ty, int *tx, BIT_FLAGS flg)
 {
        u16b path_g[128];
        int  path_n, i;
@@ -259,7 +259,7 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
        int i, k;
        MONSTER_IDX t_idx = 0;
        int thrown_spell;
-       int dam = 0;
+       HIT_POINT dam = 0;
        int start;
        int plus = 1;
 
@@ -276,14 +276,11 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
        monster_type *t_ptr = NULL;
 
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
-       monster_race *tr_ptr = NULL;
 
        u32b f4, f5, f6;
 
        bool see_m = is_seen(m_ptr);
        bool maneable = player_has_los_bold(m_ptr->fy, m_ptr->fx);
-       bool see_t;
-       bool see_either;
        bool pet = is_pet(m_ptr);
 
        bool in_no_magic_dungeon = (d_info[dungeon_type].flags1 & DF1_NO_MAGIC) && dun_level
@@ -382,7 +379,6 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
        /* OK -- we've got a target */
        y = t_ptr->fy;
        x = t_ptr->fx;
-       tr_ptr = &r_info[t_ptr->r_idx];
 
        /* Forget old counter attack target */
        reset_target(m_ptr);
@@ -684,9 +680,6 @@ bool monst_spell_monst(MONSTER_IDX m_idx)
        /* Choose a spell to cast */
        thrown_spell = spell[randint0(num)];
 
-       see_t = is_seen(t_ptr);
-       see_either = (see_m || see_t);
-
        if (p_ptr->riding && (m_idx == p_ptr->riding)) disturb(1, 1);
 
        /* Check for spell failure (inate attacks never fail) */