OSDN Git Service

[Refactor] Renamed project_o() to affect_item()
authorHourier <hourier@users.sourceforge.jp>
Mon, 27 Apr 2020 12:18:28 +0000 (21:18 +0900)
committerHourier <hourier@users.sourceforge.jp>
Mon, 27 Apr 2020 12:18:28 +0000 (21:18 +0900)
src/Makefile.am
src/effect/effect-item.c
src/effect/effect-item.h
src/spells1.c

index 16ff307..53c284d 100644 (file)
@@ -158,6 +158,9 @@ hengband_SOURCES = \
        \
        rumor.h rumor.c \
        \
+       effect/effect-feature.c effect/effect-feature.h \
+       effect/effect-item.c effect/effect-item.h \
+       \
        spells.h \
        spells1.c spells2.c spells3.c \
        spells-diceroll.c spells-diceroll.h \
index 9b4ca42..d50307e 100644 (file)
@@ -33,7 +33,7 @@
  * We return "TRUE" if the effect of the projection is "obvious".
  * </pre>
  */
-bool project_o(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
+bool affect_item(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ)
 {
        grid_type *g_ptr = &caster_ptr->current_floor_ptr->grid_array[y][x];
 
index b4d58b4..5802304 100644 (file)
@@ -1,3 +1,3 @@
 #pragma once
 
-bool project_o(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ);
+bool affect_item(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ);
index 3b95163..27c8319 100644 (file)
@@ -4308,7 +4308,7 @@ bool project(player_type *caster_ptr, MONSTER_IDX who, POSITION rad, POSITION y,
                                }
                        }
 
-                       if (project_o(caster_ptr, 0, 0, y, x, dam, GF_SEEKER))notice = TRUE;
+                       if (affect_item(caster_ptr, 0, 0, y, x, dam, GF_SEEKER))notice = TRUE;
                        if (!is_mirror_grid(&caster_ptr->current_floor_ptr->grid_array[y][x]))
                                continue;
 
@@ -4412,7 +4412,7 @@ bool project(player_type *caster_ptr, MONSTER_IDX who, POSITION rad, POSITION y,
                                }
                        }
 
-                       if (project_o(caster_ptr, 0, 0, y, x, dam, GF_SUPER_RAY))notice = TRUE;
+                       if (affect_item(caster_ptr, 0, 0, y, x, dam, GF_SUPER_RAY))notice = TRUE;
                        if (!cave_have_flag_bold(caster_ptr->current_floor_ptr, y, x, FF_PROJECT))
                        {
                                if (second_step)continue;
@@ -4691,11 +4691,11 @@ bool project(player_type *caster_ptr, MONSTER_IDX who, POSITION rad, POSITION y,
                        if (breath)
                        {
                                int d = dist_to_line(y, x, y1, x1, by, bx);
-                               if (project_o(caster_ptr, who, d, y, x, dam, typ)) notice = TRUE;
+                               if (affect_item(caster_ptr, who, d, y, x, dam, typ)) notice = TRUE;
                        }
                        else
                        {
-                               if (project_o(caster_ptr, who, dist, y, x, dam, typ)) notice = TRUE;
+                               if (affect_item(caster_ptr, who, dist, y, x, dam, typ)) notice = TRUE;
                        }
                }
        }
@@ -5069,7 +5069,7 @@ bool binding_field(player_type *caster_ptr, HIT_POINT dam)
                        {
                                if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y, x))
                                {
-                                       (void)project_o(caster_ptr, 0, 0, y, x, dam, GF_MANA);
+                                       (void)affect_item(caster_ptr, 0, 0, y, x, dam, GF_MANA);
                                }
                        }
                }