dam = damroll(4, 8);
if (monster_to_player || t_idx == p_ptr->riding)
- teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
+ teleport_player_to(p_ptr, m_ptr->fy, m_ptr->fx, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
else
teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
if (TARGET_TYPE == MONSTER_TO_PLAYER)
{
- teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
+ teleport_player_to(p_ptr, m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
learn_spell(MS_TELE_TO);
}
else if (TARGET_TYPE == MONSTER_TO_MONSTER)
if (!resists_tele)
{
if (t_idx == p_ptr->riding)
- teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
+ teleport_player_to(p_ptr, m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
else
teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100, TELEPORT_PASSIVE);
}
if (flag && randint0(plev * plev / 2))
{
- teleport_player_to(y, x, 0L);
+ teleport_player_to(caster_ptr, y, x, 0L);
}
else
{
break;
}
project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
- teleport_player_to(y, x, 0L);
+ teleport_player_to(caster_ptr, y, x, 0L);
}
break;
case 4: case 5:
{
- teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
+ teleport_player_to(p_ptr, m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
break;
}
extern bool teleport_player_aux(player_type *creature_ptr, POSITION dis, BIT_FLAGS mode);
extern void teleport_player(POSITION dis, BIT_FLAGS mode);
extern void teleport_player_away(MONSTER_IDX m_idx, POSITION dis);
-extern void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode);
+extern void teleport_player_to(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mode);
extern void teleport_away_followable(MONSTER_IDX m_idx);
extern bool teleport_level_other(player_type *creature_ptr);
extern void teleport_level(player_type *creature_ptr, MONSTER_IDX m_idx);
}
/* Move player before updating the monster */
- if (!player_bold(p_ptr, ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
+ if (!player_bold(p_ptr, ty, tx)) teleport_player_to(p_ptr, ty, tx, TELEPORT_NONMAGICAL);
update_monster(p_ptr->current_floor_ptr->grid_array[ny][nx].m_idx, TRUE);
/* Found a monster */
msg_format(_("素早く%sの懐に入り込んだ!", "You quickly jump in and attack %s!"), m_name);
}
- if (!player_bold(p_ptr, ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
+ if (!player_bold(p_ptr, ty, tx)) teleport_player_to(p_ptr, ty, tx, TELEPORT_NONMAGICAL);
moved = TRUE;
tmp_mdeath = py_attack(p_ptr, ny, nx, HISSATSU_NYUSIN);
break;
}
- if (!moved && !player_bold(p_ptr, ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
+ if (!moved && !player_bold(p_ptr, ty, tx)) teleport_player_to(p_ptr, ty, tx, TELEPORT_NONMAGICAL);
if (mdeath) *mdeath = tmp_mdeath;
return TRUE;
* This function allows teleporting into vaults (!)
* </pre>
*/
-void teleport_player_to(POSITION ny, POSITION nx, BIT_FLAGS mode)
+void teleport_player_to(player_type *creature_ptr, POSITION ny, POSITION nx, BIT_FLAGS mode)
{
POSITION y, x;
POSITION dis = 0, ctr = 0;
- if (p_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
+ if (creature_ptr->anti_tele && !(mode & TELEPORT_NONMAGICAL))
{
msg_print(_("不思議な力がテレポートを防いだ!", "A mysterious force prevents you from teleporting!"));
return;
{
y = (POSITION)rand_spread(ny, dis);
x = (POSITION)rand_spread(nx, dis);
- if (in_bounds(p_ptr->current_floor_ptr, y, x)) break;
+ if (in_bounds(creature_ptr->current_floor_ptr, y, x)) break;
}
/* Accept any grid when wizard mode */
- if (current_world_ptr->wizard && !(mode & TELEPORT_PASSIVE) && (!p_ptr->current_floor_ptr->grid_array[y][x].m_idx || (p_ptr->current_floor_ptr->grid_array[y][x].m_idx == p_ptr->riding))) break;
+ if (current_world_ptr->wizard && !(mode & TELEPORT_PASSIVE) && (!creature_ptr->current_floor_ptr->grid_array[y][x].m_idx || (creature_ptr->current_floor_ptr->grid_array[y][x].m_idx == creature_ptr->riding))) break;
/* Accept teleportable floor grids */
if (cave_player_teleportable_bold(y, x, mode)) break;
}
sound(SOUND_TELEPORT);
- (void)move_player_effect(p_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
+ (void)move_player_effect(creature_ptr, y, x, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
}
teleport_player(200, TELEPORT_PASSIVE);
msg_print(_("失敗!", "Failed!"));
}
- else teleport_player_to(m_ptr->fy, m_ptr->fx, 0L);
+ else teleport_player_to(p_ptr, m_ptr->fy, m_ptr->fx, 0L);
p_ptr->energy_need += ENERGY_NEED();
}
}
}
else
{
- teleport_player_to(y, x, 0L);
+ teleport_player_to(p_ptr, y, x, 0L);
/* Success */
return TRUE;
{
POSITION x = 0, y = 0;
if (!tgt_pt(&x, &y)) return FALSE;
- teleport_player_to(y, x, TELEPORT_NONMAGICAL);
+ teleport_player_to(p_ptr, y, x, TELEPORT_NONMAGICAL);
return (TRUE);
}
if (!target_who) return;
/* Teleport to the target */
- teleport_player_to(target_row, target_col, TELEPORT_NONMAGICAL);
+ teleport_player_to(p_ptr, target_row, target_col, TELEPORT_NONMAGICAL);
}