OSDN Git Service

[Refactor] #38997 confuse_monsters()、charm_monsters()、charm_animals()、stun_monsters...
[hengband/hengband.git] / src / realm-death.c
index 1aca17f..0a14fc1 100644 (file)
@@ -4,6 +4,7 @@
 #include "spells-summon.h"
 #include "spells-status.h"
 #include "spells-object.h"
+#include "spells-diceroll.h"
 #include "avatar.h"
 #include "player-status.h"
 #include "player-effects.h"
@@ -193,7 +194,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               control_one_undead(dir, plev);
+                               control_one_undead(caster_ptr, dir, plev);
                        }
                }
                break;
@@ -239,7 +240,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               fire_bolt_or_beam(beam_chance(caster_ptr), GF_NETHER, dir, damroll(dice, sides));
+                               fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_NETHER, dir, damroll(dice, sides));
                        }
                }
                break;
@@ -309,7 +310,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               if (hypodynamic_bolt(dir, dam))
+                               if (hypodynamic_bolt(caster_ptr, dir, dam))
                                {
                                        chg_virtue(caster_ptr, V_SACRIFICE, -1);
                                        chg_virtue(caster_ptr, V_VITALITY, -1);
@@ -344,7 +345,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                {
                        if (cast)
                        {
-                               animate_dead(0, caster_ptr->y, caster_ptr->x);
+                               animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
                        }
                }
                break;
@@ -412,7 +413,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               fire_bolt_or_beam(beam_chance(caster_ptr), GF_DARK, dir, damroll(dice, sides));
+                               fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_DARK, dir, damroll(dice, sides));
                        }
                }
                break;
@@ -469,7 +470,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                                for (i = 0; i < 3; i++)
                                {
-                                       if (hypodynamic_bolt(dir, dam))
+                                       if (hypodynamic_bolt(caster_ptr, dir, dam))
                                                hp_player(caster_ptr, dam);
                                }
                        }
@@ -487,7 +488,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (cast)
                        {
-                               dispel_living(randint1(sides));
+                               dispel_living(caster_ptr, randint1(sides));
                        }
                }
                break;
@@ -520,7 +521,7 @@ concptr do_death_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                if (!get_aim_dir(&dir)) return NULL;
 
-                               death_ray(dir, plev);
+                               death_ray(caster_ptr, dir, plev);
                        }
                }
                break;