OSDN Git Service

[Refactor] #38997 fire_meteor() にplayer_type * 引数を追加 / Added player_type * argument...
authorHourier <hourier@users.sourceforge.jp>
Mon, 6 Jan 2020 13:42:10 +0000 (22:42 +0900)
committerHourier <hourier@users.sourceforge.jp>
Mon, 6 Jan 2020 13:42:10 +0000 (22:42 +0900)
src/chest.c
src/spells.h
src/spells2.c

index f7532d6..48a9b35 100644 (file)
@@ -216,7 +216,7 @@ void chest_trap(player_type *target_ptr, POSITION y, POSITION x, OBJECT_IDX o_id
                msg_print(_("鳥の群れがあなたを取り巻いた!", "A storm of birds swirls around you!"));
 
                for (i = 0; i < randint1(3) + 3; i++)
-                       (void)fire_meteor(-1, GF_FORCE, y, x, o_ptr->pval / 5, 7);
+                       (void)fire_meteor(target_ptr, -1, GF_FORCE, y, x, o_ptr->pval / 5, 7);
 
                for (i = 0; i < randint1(5) + o_ptr->pval / 5; i++)
                {
@@ -233,7 +233,7 @@ void chest_trap(player_type *target_ptr, POSITION y, POSITION x, OBJECT_IDX o_id
                        msg_print(_("炎と硫黄の雲の中に悪魔が姿を現した!", "Demons materialize in clouds of fire and brimstone!"));
                        for (i = 0; i < randint1(3) + 2; i++)
                        {
-                               (void)fire_meteor(-1, GF_FIRE, y, x, 10, 5);
+                               (void)fire_meteor(target_ptr, -1, GF_FIRE, y, x, 10, 5);
                                (void)summon_specific(0, y, x, mon_level, SUMMON_DEMON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
                        }
                }
@@ -303,7 +303,7 @@ void chest_trap(player_type *target_ptr, POSITION y, POSITION x, OBJECT_IDX o_id
                                        (void)do_dec_stat(target_ptr, A_WIS);
                                        (void)do_dec_stat(target_ptr, A_CHR);
                                }
-                               else (void)fire_meteor(-1, GF_NETHER, y, x, 150, 1);
+                               else (void)fire_meteor(target_ptr, -1, GF_NETHER, y, x, 150, 1);
                        }
                }
        }
index 57890aa..edf17b3 100644 (file)
@@ -201,7 +201,7 @@ extern bool fire_ball(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT
 extern bool fire_breath(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
 extern bool fire_rocket(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
 extern bool fire_ball_hide(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam, POSITION rad);
-extern bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
+extern bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, EFFECT_ID typ, POSITION x, POSITION y, HIT_POINT dam, POSITION rad);
 extern bool fire_bolt(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_POINT dam);
 extern bool fire_blast(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, DICE_NUMBER dd, DICE_SID ds, int num, int dev);
 extern void call_chaos(player_type *caster_ptr);
index 26ded34..cf83796 100644 (file)
@@ -2151,12 +2151,12 @@ bool fire_ball_hide(player_type *caster_ptr, EFFECT_ID typ, DIRECTION dir, HIT_P
  * Option to hurt the player.
  * </pre>
  */
-bool fire_meteor(MONSTER_IDX who, EFFECT_ID typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
+bool fire_meteor(player_type *caster_ptr, MONSTER_IDX who, EFFECT_ID typ, POSITION y, POSITION x, HIT_POINT dam, POSITION rad)
 {
        BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
 
        /* Analyze the "target" and the caster. */
-       return (project(p_ptr, who, rad, y, x, dam, typ, flg, -1));
+       return (project(caster_ptr, who, rad, y, x, dam, typ, flg, -1));
 }