take_turn(p_ptr, 100);
if (pickup) mpe_mode |= MPE_DO_PICKUP;
- (void)move_player_effect(p_ptr->y, p_ptr->x, mpe_mode);
+ (void)move_player_effect(p_ptr, p_ptr->y, p_ptr->x, mpe_mode);
}
return FALSE;
}
- if (!pattern_seq(p_ptr->y, p_ptr->x, y, x)) return FALSE;
+ if (!pattern_seq(p_ptr, p_ptr->y, p_ptr->x, y, x)) return FALSE;
if (g_ptr->m_idx)
{
return FALSE;
}
- if (!pattern_seq(p_ptr->y, p_ptr->x, y, x)) return FALSE;
+ if (!pattern_seq(p_ptr, p_ptr->y, p_ptr->x, y, x)) return FALSE;
if (!player_can_ride_aux(g_ptr, TRUE))
{
p_ptr->redraw |= (PR_MAP | PR_EXTRA);
p_ptr->redraw |= (PR_UHEALTH);
- (void)move_player_effect(y, x, MPE_HANDLE_STUFF | MPE_ENERGY_USE | MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
+ (void)move_player_effect(p_ptr, y, x, MPE_HANDLE_STUFF | MPE_ENERGY_USE | MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
return TRUE;
}
}
if (sy && !p_ptr->is_dead)
- (void)move_player_effect(p_ptr->y, p_ptr->x, MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
+ (void)move_player_effect(p_ptr, p_ptr->y, p_ptr->x, MPE_DONT_PICKUP | MPE_DONT_SWAP_MON);
return fall_dam;
}
if (player_can_enter(current_floor_ptr->grid_array[y][x].feat, 0) && !is_trap(current_floor_ptr->grid_array[y][x].feat) && !current_floor_ptr->grid_array[y][x].m_idx)
{
msg_print(NULL);
- (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+ (void)move_player_effect(p_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
}
break;
}
else
{
/* sound(SOUND_WALK); */
- if (!move_player_effect(ny, nx, MPE_DONT_PICKUP)) break;
+ if (!move_player_effect(p_ptr, ny, nx, MPE_DONT_PICKUP)) break;
}
/* Possible disturb */
* @param n_x プレイヤーの移動先X座標
* @return 移動処理が可能である場合(可能な場合に選択した場合)TRUEを返す。
*/
-bool pattern_seq(POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x)
+bool pattern_seq(player_type *creature_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x)
{
feature_type *cur_f_ptr = &f_info[current_floor_ptr->grid_array[c_y][c_x].feat];
feature_type *new_f_ptr = &f_info[current_floor_ptr->grid_array[n_y][n_x].feat];
if (pattern_type_new == PATTERN_TILE_START)
{
- if (!is_pattern_tile_cur && !p_ptr->confused && !p_ptr->stun && !p_ptr->image)
+ if (!is_pattern_tile_cur && !creature_ptr->confused && !creature_ptr->stun && !creature_ptr->image)
{
if (get_check(_("パターンの上を歩き始めると、全てを歩かなければなりません。いいですか?",
"If you start walking the Pattern, you must walk the whole way. Ok? ")))
ok_move = PATTERN_TILE_1;
break;
default:
- if (p_ptr->wizard)
+ if (creature_ptr->wizard)
msg_format(_("おかしなパターン歩行、%d。", "Funny Pattern walking, %d."), pattern_type_cur);
return TRUE; /* Goof-up */
if (!is_hostile(m_ptr) &&
!(creature_ptr->confused || creature_ptr->image || !m_ptr->ml || creature_ptr->stun ||
((creature_ptr->muta2 & MUT2_BERS_RAGE) && creature_ptr->shero)) &&
- pattern_seq(creature_ptr->y, creature_ptr->x, y, x) && (p_can_enter || p_can_kill_walls))
+ pattern_seq(p_ptr, creature_ptr->y, creature_ptr->x, y, x) && (p_can_enter || p_can_kill_walls))
{
/* Disturb the monster */
(void)set_monster_csleep(g_ptr->m_idx, 0);
}
/* Normal movement */
- if (oktomove && !pattern_seq(creature_ptr->y, creature_ptr->x, y, x))
+ if (oktomove && !pattern_seq(p_ptr, creature_ptr->y, creature_ptr->x, y, x))
{
if (!(creature_ptr->confused || creature_ptr->stun || creature_ptr->image))
{
extern bool move_player_effect(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mpe_mode);
extern void py_pickup_aux(OBJECT_IDX o_idx);
-extern bool pattern_seq(POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x);
+extern bool pattern_seq(player_type *creature_ptr, POSITION c_y, POSITION c_x, POSITION n_y, POSITION n_x);
extern bool trap_can_be_ignored(player_type *creature_ptr, FEAT_IDX feat);
extern void search(player_type *creature_ptr);
extern void carry(bool pickup);
if (player_can_enter(current_floor_ptr->grid_array[y][x].feat, 0) && !is_trap(current_floor_ptr->grid_array[y][x].feat) && !current_floor_ptr->grid_array[y][x].m_idx)
{
msg_print(NULL);
- (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+ (void)move_player_effect(p_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
}
}
break;
/* Player can move forward? */
if (player_can_enter(g_ptr->feat, 0))
{
- if (!move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
+ if (!move_player_effect(p_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP)) break;
}
else
{
}
/* Move the player to the safe location */
- (void)move_player_effect(sy, sx, MPE_DONT_PICKUP);
+ (void)move_player_effect(p_ptr, sy, sx, MPE_DONT_PICKUP);
}
/* Important -- no wall on player */
sound(SOUND_TELEPORT);
/* Swap the player and monster */
- (void)move_player_effect(ty, tx, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+ (void)move_player_effect(p_ptr, ty, tx, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
/* Success */
return TRUE;
msg_format("『こっちだぁ、%s』", p_ptr->name);
#endif
- (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+ (void)move_player_effect(p_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
return TRUE;
}
}
sound(SOUND_TELEPORT);
- (void)move_player_effect(y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+ (void)move_player_effect(p_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
}
/* Destroy the wall */
cave_alter_feat(y, x, FF_HURT_ROCK);
- (void)move_player_effect(y, x, MPE_DONT_PICKUP);
+ (void)move_player_effect(p_ptr, y, x, MPE_DONT_PICKUP);
return TRUE;
}