OSDN Git Service

[Refactor] #38997 is_known_trap() とis_hidden_door()にplayer_type * 引数を追加 / Added playe...
[hengband/hengband.git] / src / realm-hissatsu.c
index 69ee1ad..4e5b53d 100644 (file)
@@ -47,7 +47,7 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                if (cast)
                {
                        project_length = 2;
-                       if (!get_aim_dir(&dir)) return NULL;
+                       if (!get_aim_dir(caster_ptr, &dir)) return NULL;
 
                        project_hook(caster_ptr, GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL);
                }
@@ -210,13 +210,13 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
 
                        py_attack(caster_ptr, y, x, 0);
 
-                       if (!player_can_enter(caster_ptr, caster_ptr->current_floor_ptr->grid_array[y][x].feat, 0) || is_trap(caster_ptr->current_floor_ptr->grid_array[y][x].feat))
+                       if (!player_can_enter(caster_ptr, caster_ptr->current_floor_ptr->grid_array[y][x].feat, 0) || is_trap(caster_ptr, caster_ptr->current_floor_ptr->grid_array[y][x].feat))
                                break;
 
                        y += ddy[dir];
                        x += ddx[dir];
 
-                       if (player_can_enter(caster_ptr, caster_ptr->current_floor_ptr->grid_array[y][x].feat, 0) && !is_trap(caster_ptr->current_floor_ptr->grid_array[y][x].feat) && !caster_ptr->current_floor_ptr->grid_array[y][x].m_idx)
+                       if (player_can_enter(caster_ptr, caster_ptr->current_floor_ptr->grid_array[y][x].feat, 0) && !is_trap(caster_ptr, caster_ptr->current_floor_ptr->grid_array[y][x].feat) && !caster_ptr->current_floor_ptr->grid_array[y][x].m_idx)
                        {
                                msg_print(NULL);
                                (void)move_player_effect(caster_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
@@ -307,13 +307,13 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                                monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[m_idx];
                                GAME_TEXT m_name[MAX_NLEN];
 
-                               monster_desc(m_name, m_ptr, 0);
+                               monster_desc(caster_ptr, m_name, m_ptr, 0);
 
                                for (i = 0; i < 5; i++)
                                {
                                        y += ddy[dir];
                                        x += ddx[dir];
-                                       if (cave_empty_bold(p_ptr->current_floor_ptr, y, x))
+                                       if (cave_empty_bold(caster_ptr->current_floor_ptr, y, x))
                                        {
                                                ty = y;
                                                tx = x;
@@ -329,8 +329,8 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                                        m_ptr->fx = tx;
 
                                        update_monster(caster_ptr, m_idx, TRUE);
-                                       lite_spot(oy, ox);
-                                       lite_spot(ty, tx);
+                                       lite_spot(caster_ptr, oy, ox);
+                                       lite_spot(caster_ptr, ty, tx);
 
                                        if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
                                                caster_ptr->update |= (PU_MON_LITE);
@@ -377,7 +377,7 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                        if (!cave_have_flag_bold(caster_ptr->current_floor_ptr, y, x, FF_HURT_ROCK)) break;
 
                        /* Destroy the feature */
-                       cave_alter_feat(y, x, FF_HURT_ROCK);
+                       cave_alter_feat(caster_ptr, y, x, FF_HURT_ROCK);
                        caster_ptr->update |= (PU_FLOW);
                }
                break;
@@ -549,7 +549,7 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                                        {
                                                GAME_TEXT m_name[MAX_NLEN];
 
-                                               monster_desc(m_name, m_ptr, 0);
+                                               monster_desc(caster_ptr, m_name, m_ptr, 0);
                                                msg_format(_("%sには効果がない!", "%s is unharmed!"), m_name);
                                        }
                                        else py_attack(caster_ptr, y, x, HISSATSU_SEKIRYUKA);
@@ -588,7 +588,7 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                        int total_damage = 0, basedam, i;
                        BIT_FLAGS flgs[TR_FLAG_SIZE];
                        object_type *o_ptr;
-                       if (!get_aim_dir(&dir)) return NULL;
+                       if (!get_aim_dir(caster_ptr, &dir)) return NULL;
                        msg_print(_("武器を大きく振り下ろした。", "You swing your weapon downward."));
                        for (i = 0; i < 2; i++)
                        {
@@ -693,10 +693,10 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                                update_monster(caster_ptr, m_idx, TRUE);
 
                                /* Redraw the old spot */
-                               lite_spot(y, x);
+                               lite_spot(caster_ptr, y, x);
 
                                /* Redraw the new spot */
-                               lite_spot(ny, nx);
+                               lite_spot(caster_ptr, ny, nx);
 
                                /* Player can move forward? */
                                if (player_can_enter(caster_ptr, g_ptr->feat, 0))
@@ -779,7 +779,7 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                                command_dir = 0;
 
                                caster_ptr->redraw |= PR_MANA;
-                               handle_stuff();
+                               handle_stuff(caster_ptr);
                        } while (caster_ptr->csp > mana_cost_per_monster);
 
                        if (is_new) return NULL;
@@ -800,9 +800,9 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
 
                        if (!tgt_pt(caster_ptr, &x, &y)) return NULL;
 
-                       if (!cave_player_teleportable_bold(y, x, 0L) ||
+                       if (!cave_player_teleportable_bold(caster_ptr, y, x, 0L) ||
                                (distance(y, x, caster_ptr->y, caster_ptr->x) > MAX_SIGHT / 2) ||
-                               !projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, y, x))
+                               !projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y, x))
                        {
                                msg_print(_("失敗!", "You cannot move to that place!"));
                                break;
@@ -825,7 +825,7 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                {
                        POSITION x, y;
 
-                       if (!get_rep_dir(&dir, FALSE)) return NULL;
+                       if (!get_rep_dir(caster_ptr, &dir, FALSE)) return NULL;
 
                        y = caster_ptr->y + ddy[dir];
                        x = caster_ptr->x + ddx[dir];
@@ -835,7 +835,7 @@ concptr do_hissatsu_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mo
                                py_attack(caster_ptr, y, x, 0);
                                if (caster_ptr->current_floor_ptr->grid_array[y][x].m_idx)
                                {
-                                       handle_stuff();
+                                       handle_stuff(caster_ptr);
                                        py_attack(caster_ptr, y, x, 0);
                                }
                        }