OSDN Git Service

[Refactor] #37353 ref_item()をget_item()の置換向けに修正。
[hengband/hengband.git] / src / spells1.c
index 3da57c3..0430f78 100644 (file)
@@ -15,6 +15,7 @@
 #include "cmd-pet.h"
 #include "trap.h"
 #include "object-curse.h"
+#include "player-damage.h"
 
 
 static int rakubadam_m; /*!< 振り落とされた際のダメージ量 */
@@ -376,16 +377,16 @@ u16b bolt_pict(POSITION y, POSITION x, POSITION ny, POSITION nx, EFFECT_ID typ)
  */
 sint project_path(u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg)
 {
-       int y, x;
+       POSITION y, x;
 
        int n = 0;
        int k = 0;
 
        /* Absolute */
-       int ay, ax;
+       POSITION ay, ax;
 
        /* Offsets */
-       int sy, sx;
+       POSITION sy, sx;
 
        /* Fractions */
        int frac;
@@ -904,7 +905,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                c_ptr->mimic = old_mimic;
 
-                               /* Notice */
                                note_spot(y, x);
 
                                /* Redraw */
@@ -996,7 +996,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        c_ptr->info |= CAVE_OBJECT;
                        c_ptr->mimic = feat_glyph;
 
-                       /* Notice */
                        note_spot(y, x);
 
                        /* Redraw */
@@ -1075,7 +1074,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        {
                                c_ptr->info |= (CAVE_GLOW);
 
-                               /* Notice */
                                note_spot(y, x);
 
                                /* Redraw */
@@ -1139,7 +1137,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                        /* Forget */
                                        c_ptr->info &= ~(CAVE_MARK);
 
-                                       /* Notice */
                                        note_spot(y, x);
                                }
 
@@ -1148,7 +1145,6 @@ static bool project_f(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
 
                                update_local_illumination(y, x);
 
-                               /* Notice */
                                if (player_can_see_bold(y, x)) obvious = TRUE;
 
                                /* Mega-Hack -- Update the monster in the affected grid */
@@ -1483,7 +1479,6 @@ static bool project_o(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                                                /* Identify */
                                                object_known(o_ptr);
 
-                                               /* Notice */
                                                if (known && (o_ptr->marked & OM_FOUND))
                                                {
                                                        msg_print(_("カチッと音がした!", "Click!"));
@@ -1747,7 +1742,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
        /* Get the monster possessive ("his"/"her"/"its") */
        monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
 
-       if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) disturb(1, 1);
+       if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) disturb(TRUE, TRUE);
 
        /* Analyze the damage type */
        switch (typ)
@@ -4863,7 +4858,7 @@ static bool project_m(MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_P
                        /* Generate treasure, etc */
                        monster_death(c_ptr->m_idx, FALSE);
 
-                       /* Delete the monster */
+
                        delete_monster_idx(c_ptr->m_idx);
 
                        if (sad)
@@ -5217,7 +5212,7 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO
 
                project(0, 0, t_y, t_x, dam, typ, (PROJECT_STOP|PROJECT_KILL|PROJECT_REFLECTABLE), monspell);
 
-               disturb(1, 1);
+               disturb(TRUE, TRUE);
                return TRUE;
        }
 
@@ -6233,8 +6228,7 @@ static bool project_p(MONSTER_IDX who, cptr who_name, int r, POSITION y, POSITIO
        }
 
 
-       /* Disturb */
-       disturb(1, 1);
+       disturb(TRUE, TRUE);
 
 
        if ((p_ptr->special_defense & NINJA_KAWARIMI) && dam && who && (who != p_ptr->riding))