OSDN Git Service

[Refactor] #38997 identify_fully() にplayer_type * 引数を追加 / Added player_type * argumen...
[hengband/hengband.git] / src / cmd / cmd-activate.c
index f76a278..e76347d 100644 (file)
@@ -466,7 +466,7 @@ void exe_activate(player_type *user_ptr, INVENTORY_IDX item)
                        for (i = 0; i < max_pet; i++)
                        {
                                pet_ctr = who[i];
-                               teleport_monster_to(pet_ctr, user_ptr->y, user_ptr->x, 100, TELEPORT_PASSIVE);
+                               teleport_monster_to(user_ptr, pet_ctr, user_ptr->y, user_ptr->x, 100, TELEPORT_PASSIVE);
                        }
 
                        /* Free the "who" array */
@@ -714,7 +714,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        {
                if (!get_aim_dir(&dir)) return FALSE;
                msg_print(_("太陽光線が放たれた。", "A line of sunlight appears."));
-               (void)lite_line(dir, damroll(6, 8));
+               (void)lite_line(user_ptr, dir, damroll(6, 8));
                break;
        }
 
@@ -858,7 +858,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        {
                msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
                if (!get_aim_dir(&dir)) return FALSE;
-               if (hypodynamic_bolt(dir, 100))
+               if (hypodynamic_bolt(user_ptr, dir, 100))
                        break;
        }
 
@@ -866,7 +866,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        {
                msg_print(_("黒く輝いている...", "It glows black..."));
                if (!get_aim_dir(&dir)) return FALSE;
-               hypodynamic_bolt(dir, 120);
+               hypodynamic_bolt(user_ptr, dir, 120);
                break;
        }
 
@@ -875,7 +875,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
                if (!get_aim_dir(&dir)) return FALSE;
                for (dummy = 0; dummy < 3; dummy++)
                {
-                       if (hypodynamic_bolt(dir, 50))
+                       if (hypodynamic_bolt(user_ptr, dir, 50))
                                hp_player(user_ptr, 50);
                }
                break;
@@ -900,7 +900,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
                if (!get_aim_dir(&dir)) return FALSE;
                for (dummy = 0; dummy < 3; dummy++)
                {
-                       if (hypodynamic_bolt(dir, 100))
+                       if (hypodynamic_bolt(user_ptr, dir, 100))
                                hp_player(user_ptr, 100);
                }
                break;
@@ -987,7 +987,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        {
                msg_format(_("%sが眩しい光で輝いた...", "The %s gleams with blinding light..."), name);
                fire_ball(user_ptr, GF_LITE, 0, 300, 6);
-               confuse_monsters(3 * user_ptr->lev / 2);
+               confuse_monsters(user_ptr, 3 * user_ptr->lev / 2);
                break;
        }
 
@@ -1011,7 +1011,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
 
                        while (attempts--)
                        {
-                               scatter(&y, &x, user_ptr->y, user_ptr->x, 4, 0);
+                               scatter(user_ptr->current_floor_ptr, &y, &x, user_ptr->y, user_ptr->x, 4, 0);
                                if (!cave_have_flag_bold(user_ptr->current_floor_ptr, y, x, FF_PROJECT)) continue;
                                if (!player_bold(user_ptr, y, x)) break;
                        }
@@ -1081,7 +1081,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        case ACT_SLEEP:
        {
                msg_print(_("深青色に輝いている...", "It glows deep blue..."));
-               sleep_monsters_touch();
+               sleep_monsters_touch(user_ptr);
                break;
        }
 
@@ -1093,7 +1093,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
 
        case ACT_TERROR:
        {
-               turn_monsters(40 + user_ptr->lev);
+               turn_monsters(user_ptr, 40 + user_ptr->lev);
                break;
        }
 
@@ -1133,7 +1133,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
                if (hex_spelling_any(user_ptr)) stop_hex_spell_all(user_ptr);
                msg_print(_("あなたは力強い突風を吹き鳴らした。周囲の敵が震え上っている!",
                        "You wind a mighty blast; your enemies tremble!"));
-               (void)turn_monsters((3 * user_ptr->lev / 2) + 10);
+               (void)turn_monsters(user_ptr, (3 * user_ptr->lev / 2) + 10);
                break;
        }
 
@@ -1156,33 +1156,33 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        case ACT_CHARM_ANIMAL:
        {
                if (!get_aim_dir(&dir)) return FALSE;
-               (void)charm_animal(dir, plev);
+               (void)charm_animal(user_ptr, dir, plev);
                break;
        }
 
        case ACT_CHARM_UNDEAD:
        {
                if (!get_aim_dir(&dir)) return FALSE;
-               (void)control_one_undead(dir, plev);
+               (void)control_one_undead(user_ptr, dir, plev);
                break;
        }
 
        case ACT_CHARM_OTHER:
        {
                if (!get_aim_dir(&dir)) return FALSE;
-               (void)charm_monster(dir, plev * 2);
+               (void)charm_monster(user_ptr, dir, plev * 2);
                break;
        }
 
        case ACT_CHARM_ANIMALS:
        {
-               (void)charm_animals(plev * 2);
+               (void)charm_animals(user_ptr, plev * 2);
                break;
        }
 
        case ACT_CHARM_OTHERS:
        {
-               charm_monsters(plev * 2);
+               charm_monsters(user_ptr, plev * 2);
                break;
        }
 
@@ -1462,14 +1462,14 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
                msg_print(_("明るく輝いている...", "It glows brightly..."));
                detect_all(user_ptr, DETECT_RAD_DEFAULT);
                probing(user_ptr);
-               identify_fully(FALSE);
+               identify_fully(user_ptr, FALSE);
                break;
        }
 
        case ACT_ID_FULL:
        {
                msg_print(_("黄色く輝いている...", "It glows yellow..."));
-               identify_fully(FALSE);
+               identify_fully(user_ptr, FALSE);
                break;
        }
 
@@ -1502,7 +1502,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        case ACT_DEST_DOOR:
        {
                msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
-               destroy_doors_touch();
+               destroy_doors_touch(user_ptr);
                break;
        }
 
@@ -1510,7 +1510,7 @@ bool activate_artifact(player_type *user_ptr, object_type *o_ptr)
        {
                msg_print(_("鼓動している...", "It pulsates..."));
                if (!get_aim_dir(&dir)) return FALSE;
-               wall_to_mud(dir, 20 + randint1(30));
+               wall_to_mud(user_ptr, dir, 20 + randint1(30));
                break;
        }