{
bool old_target_pet = target_pet;
target_pet = TRUE;
- if (!get_aim_dir(&dir))
+ if (!get_aim_dir(user_ptr, &dir))
{
target_pet = old_target_pet;
return;
int i, t, n = 0;
DIRECTION dir;
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
object_flags(o_ptr, flgs);
{
case ACT_SUNLIGHT:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
msg_print(_("太陽光線が放たれた。", "A line of sunlight appears."));
(void)lite_line(user_ptr, dir, damroll(6, 8));
break;
case ACT_BO_MISS_1:
{
msg_print(_("それは眩しいくらいに明るく輝いている...", "It glows extremely brightly..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_bolt(user_ptr, GF_MISSILE, dir, damroll(2, 6));
break;
}
case ACT_BA_POIS_1:
{
msg_print(_("それは濃緑色に脈動している...", "It throbs deep green..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_POIS, dir, 12, 3);
break;
}
case ACT_BO_ELEC_1:
{
msg_print(_("それは火花に覆われた...", "It is covered in sparks..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_bolt(user_ptr, GF_ELEC, dir, damroll(4, 8));
break;
}
case ACT_BO_ACID_1:
{
msg_print(_("それは酸に覆われた...", "It is covered in acid..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_bolt(user_ptr, GF_ACID, dir, damroll(5, 8));
break;
}
case ACT_BO_COLD_1:
{
msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_bolt(user_ptr, GF_COLD, dir, damroll(6, 8));
break;
}
case ACT_BO_FIRE_1:
{
msg_print(_("それは炎に覆われた...", "It is covered in fire..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_bolt(user_ptr, GF_FIRE, dir, damroll(9, 8));
break;
}
case ACT_BA_COLD_1:
{
msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_COLD, dir, 48, 2);
break;
}
case ACT_BA_COLD_2:
{
msg_print(_("それは青く激しく輝いた...", "It glows an intense blue..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_COLD, dir, 100, 2);
break;
}
case ACT_BA_COLD_3:
{
msg_print(_("明るく白色に輝いている...", "It glows bright white..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_COLD, dir, 400, 3);
break;
}
case ACT_BA_FIRE_1:
{
msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_FIRE, dir, 72, 2);
break;
}
case ACT_BA_FIRE_2:
{
msg_format(_("%sから炎が吹き出した...", "The %s rages in fire..."), name);
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_FIRE, dir, 120, 3);
break;
}
case ACT_BA_FIRE_3:
{
msg_print(_("深赤色に輝いている...", "It glows deep red..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_FIRE, dir, 300, 3);
break;
}
case ACT_BA_FIRE_4:
{
msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_FIRE, dir, 100, 2);
break;
}
case ACT_BA_ELEC_2:
{
msg_print(_("電気がパチパチ音を立てた...", "It crackles with electricity..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_ELEC, dir, 100, 3);
break;
}
case ACT_BA_ELEC_3:
{
msg_print(_("深青色に輝いている...", "It glows deep blue..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_ELEC, dir, 500, 3);
break;
}
case ACT_BA_ACID_1:
{
msg_print(_("それは黒く激しく輝いた...", "It glows an intense black..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_ACID, dir, 100, 2);
break;
}
case ACT_BA_NUKE_1:
{
msg_print(_("それは緑に激しく輝いた...", "It glows an intense green..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_NUKE, dir, 100, 2);
break;
}
case ACT_HYPODYNAMIA_1:
{
msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
if (hypodynamic_bolt(user_ptr, dir, 100))
break;
}
case ACT_HYPODYNAMIA_2:
{
msg_print(_("黒く輝いている...", "It glows black..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
hypodynamic_bolt(user_ptr, dir, 120);
break;
}
case ACT_DRAIN_1:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
for (dummy = 0; dummy < 3; dummy++)
{
if (hypodynamic_bolt(user_ptr, dir, 50))
case ACT_BO_MISS_2:
{
msg_print(_("魔法のトゲが現れた...", "It grows magical spikes..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_bolt(user_ptr, GF_ARROW, dir, 150);
break;
}
case ACT_DRAIN_2:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
for (dummy = 0; dummy < 3; dummy++)
{
if (hypodynamic_bolt(user_ptr, dir, 100))
case ACT_ROCKET:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
msg_print(_("ロケットを発射した!", "You launch a rocket!"));
fire_ball(user_ptr, GF_ROCKET, dir, 250 + plev * 3, 2);
break;
case ACT_BA_MISS_3:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
fire_breath(user_ptr, GF_MISSILE, dir, 300, 4);
break;
case ACT_BO_MANA:
{
msg_format(_("%sに魔法のトゲが現れた...", "The %s grows magical spikes..."), name);
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_bolt(user_ptr, GF_ARROW, dir, 150);
break;
}
case ACT_BA_WATER:
{
msg_format(_("%sが深い青色に鼓動している...", "The %s throbs deep blue..."), name);
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_WATER, dir, 200, 3);
break;
}
case ACT_BA_DARK:
{
msg_format(_("%sが深い闇に覆われた...", "The %s is coverd in pitch-darkness..."), name);
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_DARK, dir, 250, 4);
break;
}
case ACT_BA_MANA:
{
msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_MANA, dir, 250, 4);
break;
}
case ACT_BIZARRE:
{
msg_format(_("%sは漆黒に輝いた...", "The %s glows intensely black..."), name);
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
ring_of_power(user_ptr, dir);
break;
}
while (attempts--)
{
- scatter(user_ptr->current_floor_ptr, &y, &x, user_ptr->y, user_ptr->x, 4, 0);
+ scatter(user_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;
}
case ACT_BLADETURNER:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
fire_breath(user_ptr, GF_MISSILE, dir, 300, 4);
msg_print(_("鎧が様々な色に輝いた...", "Your armor glows many colours..."));
case ACT_BR_FIRE:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_breath(user_ptr, GF_FIRE, dir, 200, 2);
if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
{
case ACT_BR_COLD:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_breath(user_ptr, GF_COLD, dir, 200, 2);
if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
{
case ACT_CONFUSE:
{
msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
confuse_monster(user_ptr, dir, 20);
break;
}
case ACT_TELE_AWAY:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
(void)fire_beam(user_ptr, GF_AWAY_ALL, dir, plev);
break;
}
case ACT_CHARM_ANIMAL:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
(void)charm_animal(user_ptr, dir, plev);
break;
}
case ACT_CHARM_UNDEAD:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
(void)control_one_undead(user_ptr, dir, plev);
break;
}
case ACT_CHARM_OTHER:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
(void)charm_monster(user_ptr, dir, plev * 2);
break;
}
msg_format(_("%sが黒く輝いた...", "The %s grows black."), name);
if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ACID))
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_ACID, dir, 100, 2);
}
(void)set_oppose_acid(user_ptr, randint1(20) + 20, FALSE);
msg_format(_("%sが赤く輝いた...", "The %s grows red."), name);
if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_FIRE, dir, 100, 2);
}
(void)set_oppose_fire(user_ptr, randint1(20) + 20, FALSE);
msg_format(_("%sが白く輝いた...", "The %s grows white."), name);
if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_COLD, dir, 100, 2);
}
(void)set_oppose_cold(user_ptr, randint1(20) + 20, FALSE);
msg_format(_("%sが青く輝いた...", "The %s grows blue."), name);
if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ELEC))
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
fire_ball(user_ptr, GF_ELEC, dir, 100, 2);
}
(void)set_oppose_elec(user_ptr, randint1(20) + 20, FALSE);
case ACT_STONE_MUD:
{
msg_print(_("鼓動している...", "It pulsates..."));
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
wall_to_mud(user_ptr, dir, 20 + randint1(30));
break;
}
case ACT_TELEKINESIS:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(user_ptr, &dir)) return FALSE;
msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
fetch(user_ptr, dir, 500, TRUE);
break;
project_length = tdis + 1;
/* Get a direction (or cancel) */
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
/* Predict the "target" location */
tx = creature_ptr->x + 99 * ddx[dir];
ty = creature_ptr->y + 99 * ddy[dir];
/* Check for "target request" */
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(creature_ptr))
{
tx = target_col;
ty = target_row;
if (tval == TV_ROD)
{
if ((sval >= SV_ROD_MIN_DIRECTION) && (sval != SV_ROD_HAVOC) && (sval != SV_ROD_AGGRAVATE) && (sval != SV_ROD_PESTICIDE))
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
rod_effect(creature_ptr, sval, dir, &use_charge, powerful, TRUE);
if (!use_charge) return FALSE;
}
else if (tval == TV_WAND)
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
wand_effect(creature_ptr, sval, dir, powerful, TRUE);
}
else
m_idx = caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx;
if (!m_idx) break;
if (!player_has_los_bold(caster_ptr, target_row, target_col)) break;
- if (!projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
+ if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
dispel_monster_status(m_idx);
break;
}
case MS_ROCKET:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("ロケットを発射した。", "You fire a rocket."));
fire_rocket(caster_ptr, GF_ROCKET, dir, damage, 2);
break;
case MS_SHOOT:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("矢を放った。", "You fire an arrow."));
fire_bolt(caster_ptr, GF_ARROW, dir, damage);
break;
break;
case MS_BR_ACID:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("酸のブレスを吐いた。", "You breathe acid."));
fire_breath(caster_ptr, GF_ACID, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_ELEC:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("稲妻のブレスを吐いた。", "You breathe lightning."));
fire_breath(caster_ptr, GF_ELEC, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_FIRE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("火炎のブレスを吐いた。", "You breathe fire."));
fire_breath(caster_ptr, GF_FIRE, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_COLD:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("冷気のブレスを吐いた。", "You breathe frost."));
fire_breath(caster_ptr, GF_COLD, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_POIS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("ガスのブレスを吐いた。", "You breathe gas."));
fire_breath(caster_ptr, GF_POIS, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_NETHER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("地獄のブレスを吐いた。", "You breathe nether."));
fire_breath(caster_ptr, GF_NETHER, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_LITE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("閃光のブレスを吐いた。", "You breathe light."));
fire_breath(caster_ptr, GF_LITE, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_DARK:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("暗黒のブレスを吐いた。", "You breathe darkness."));
fire_breath(caster_ptr, GF_DARK, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_CONF:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("混乱のブレスを吐いた。", "You breathe confusion."));
fire_breath(caster_ptr, GF_CONFUSION, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_SOUND:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("轟音のブレスを吐いた。", "You breathe sound."));
fire_breath(caster_ptr, GF_SOUND, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_CHAOS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("カオスのブレスを吐いた。", "You breathe chaos."));
fire_breath(caster_ptr, GF_CHAOS, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_DISEN:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("劣化のブレスを吐いた。", "You breathe disenchantment."));
fire_breath(caster_ptr, GF_DISENCHANT, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_NEXUS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("因果混乱のブレスを吐いた。", "You breathe nexus."));
fire_breath(caster_ptr, GF_NEXUS, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_TIME:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
fire_breath(caster_ptr, GF_TIME, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_INERTIA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
fire_breath(caster_ptr, GF_INERTIAL, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_GRAVITY:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));
fire_breath(caster_ptr, GF_GRAVITY, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_SHARDS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
fire_breath(caster_ptr, GF_SHARDS, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_PLASMA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
fire_breath(caster_ptr, GF_PLASMA, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_FORCE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
fire_breath(caster_ptr, GF_FORCE, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BR_MANA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
fire_breath(caster_ptr, GF_MANA, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BALL_NUKE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("放射能球を放った。", "You cast a ball of radiation."));
fire_ball(caster_ptr, GF_NUKE, dir, damage, 2);
break;
case MS_BR_NUKE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
fire_breath(caster_ptr, GF_NUKE, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BALL_CHAOS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("純ログルスを放った。", "You invoke a raw Logrus."));
fire_ball(caster_ptr, GF_CHAOS, dir, damage, 4);
break;
case MS_BR_DISI:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
fire_breath(caster_ptr, GF_DISINTEGRATE, dir, damage, (plev > 35 ? 3 : 2));
break;
case MS_BALL_ACID:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("アシッド・ボールの呪文を唱えた。", "You cast an acid ball."));
fire_ball(caster_ptr, GF_ACID, dir, damage, 2);
break;
case MS_BALL_ELEC:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("サンダー・ボールの呪文を唱えた。", "You cast a lightning ball."));
fire_ball(caster_ptr, GF_ELEC, dir, damage, 2);
break;
case MS_BALL_FIRE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("ファイア・ボールの呪文を唱えた。", "You cast a fire ball."));
fire_ball(caster_ptr, GF_FIRE, dir, damage, 2);
break;
case MS_BALL_COLD:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("アイス・ボールの呪文を唱えた。", "You cast a frost ball."));
fire_ball(caster_ptr, GF_COLD, dir, damage, 2);
break;
case MS_BALL_POIS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("悪臭雲の呪文を唱えた。", "You cast a stinking cloud."));
fire_ball(caster_ptr, GF_POIS, dir, damage, 2);
break;
case MS_BALL_NETHER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("地獄球の呪文を唱えた。", "You cast a nether ball."));
fire_ball(caster_ptr, GF_NETHER, dir, damage, 2);
break;
case MS_BALL_WATER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("流れるような身振りをした。", "You gesture fluidly."));
fire_ball(caster_ptr, GF_WATER, dir, damage, 4);
break;
case MS_BALL_MANA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("魔力の嵐の呪文を念じた。", "You invoke a mana storm."));
fire_ball(caster_ptr, GF_MANA, dir, damage, 4);
break;
case MS_BALL_DARK:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("暗黒の嵐の呪文を念じた。", "You invoke a darkness storm."));
fire_ball(caster_ptr, GF_DARK, dir, damage, 4);
break;
case MS_DRAIN_MANA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball_hide(caster_ptr, GF_DRAIN_MANA, dir, randint1(plev*3)+plev, 0);
break;
case MS_MIND_BLAST:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball_hide(caster_ptr, GF_MIND_BLAST, dir, damage, 0);
break;
case MS_BRAIN_SMASH:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball_hide(caster_ptr, GF_BRAIN_SMASH, dir, damage, 0);
break;
case MS_CAUSE_1:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball_hide(caster_ptr, GF_CAUSE_1, dir, damage, 0);
break;
case MS_CAUSE_2:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball_hide(caster_ptr, GF_CAUSE_2, dir, damage, 0);
break;
case MS_CAUSE_3:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball_hide(caster_ptr, GF_CAUSE_3, dir, damage, 0);
break;
case MS_CAUSE_4:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball_hide(caster_ptr, GF_CAUSE_4, dir, damage, 0);
break;
case MS_BOLT_ACID:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("アシッド・ボルトの呪文を唱えた。", "You cast an acid bolt."));
fire_bolt(caster_ptr, GF_ACID, dir, damage);
break;
case MS_BOLT_ELEC:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("サンダー・ボルトの呪文を唱えた。", "You cast a lightning bolt."));
fire_bolt(caster_ptr, GF_ELEC, dir, damage);
break;
case MS_BOLT_FIRE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("ファイア・ボルトの呪文を唱えた。", "You cast a fire bolt."));
fire_bolt(caster_ptr, GF_FIRE, dir, damage);
break;
case MS_BOLT_COLD:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("アイス・ボルトの呪文を唱えた。", "You cast a frost bolt."));
fire_bolt(caster_ptr, GF_COLD, dir, damage);
break;
case MS_STARBURST:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("スターバーストの呪文を念じた。", "You invoke a starburst."));
fire_ball(caster_ptr, GF_LITE, dir, damage, 4);
break;
case MS_BOLT_NETHER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("地獄の矢の呪文を唱えた。", "You cast a nether bolt."));
fire_bolt(caster_ptr, GF_NETHER, dir, damage);
break;
case MS_BOLT_WATER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("ウォーター・ボルトの呪文を唱えた。", "You cast a water bolt."));
fire_bolt(caster_ptr, GF_WATER, dir, damage);
break;
case MS_BOLT_MANA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("魔力の矢の呪文を唱えた。", "You cast a mana bolt."));
fire_bolt(caster_ptr, GF_MANA, dir, damage);
break;
case MS_BOLT_PLASMA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("プラズマ・ボルトの呪文を唱えた。", "You cast a plasma bolt."));
fire_bolt(caster_ptr, GF_PLASMA, dir, damage);
break;
case MS_BOLT_ICE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("極寒の矢の呪文を唱えた。", "You cast a ice bolt."));
fire_bolt(caster_ptr, GF_ICE, dir, damage);
break;
case MS_MAGIC_MISSILE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("マジック・ミサイルの呪文を唱えた。", "You cast a magic missile."));
fire_bolt(caster_ptr, GF_MISSILE, dir, damage);
break;
case MS_SCARE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("恐ろしげな幻覚を作り出した。", "You cast a fearful illusion."));
fear_monster(caster_ptr, dir, plev+10);
break;
case MS_BLIND:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
confuse_monster(caster_ptr, dir, plev * 2);
break;
case MS_CONF:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("誘惑的な幻覚をつくり出した。", "You cast a mesmerizing illusion."));
confuse_monster(caster_ptr, dir, plev * 2);
break;
case MS_SLOW:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
slow_monster(caster_ptr, dir, plev);
break;
case MS_SLEEP:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
sleep_monster(caster_ptr, dir, plev);
break;
case MS_SPEED:
break;
case MS_HAND_DOOM:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
fire_ball_hide(caster_ptr, GF_HAND_DOOM, dir, 200, 0);
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
if (!caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx) break;
if (!player_has_los_bold(caster_ptr, target_row, target_col)) break;
- if (!projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
+ if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
m_ptr = &caster_ptr->current_floor_ptr->m_list[caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx];
r_ptr = &r_info[m_ptr->r_idx];
monster_desc(m_name, m_ptr, 0);
break;
}
case MS_TELE_AWAY:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
(void)fire_beam(caster_ptr, GF_AWAY_ALL, dir, plev);
break;
break;
case MS_PSY_SPEAR:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
else msg_print(_("光の剣を放った。", "You throw a psycho-spear."));
(void)fire_beam(caster_ptr, GF_PSY_SPEAR, dir, damage);
break;
!object_is_aware(o_ptr))
{
/* Get a direction, allow cancel */
- if (!get_aim_dir(&dir)) return;
+ if (!get_aim_dir(creature_ptr, &dir)) return;
}
if (object_is_aware(o_ptr) && (o_ptr->sval == SV_WAND_HEAL_MONSTER
|| o_ptr->sval == SV_WAND_HASTE_MONSTER))
target_pet = TRUE;
- if (!get_aim_dir(&dir))
+ if (!get_aim_dir(creature_ptr, &dir))
{
target_pet = old_target_pet;
return;
project_length = tdis + 1;
/* Get a direction (or cancel) */
- if (!get_aim_dir(&dir))
+ if (!get_aim_dir(shooter_ptr, &dir))
{
free_turn(shooter_ptr);
ty = shooter_ptr->y + 99 * ddy[dir];
/* Check for "target request" */
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(shooter_ptr))
{
tx = target_col;
ty = target_row;
}
/* Get projection path length */
- tdis = project_path(shooter_ptr->current_floor_ptr, path_g, project_length, shooter_ptr->y, shooter_ptr->x, ty, tx, PROJECT_PATH | PROJECT_THRU) - 1;
+ tdis = project_path(shooter_ptr, path_g, project_length, shooter_ptr->y, shooter_ptr->x, ty, tx, PROJECT_PATH | PROJECT_THRU) - 1;
project_length = 0; /* reset to default */
}
/* Hack -- check line of sight */
- if (los(floor_ptr, subject_ptr->y, subject_ptr->x, y, x))
+ if (los(subject_ptr, subject_ptr->y, subject_ptr->x, y, x))
{
cave_view_hack(floor_ptr, g_ptr, y, x);
return wall;
* when you or the pet can see the other.
*/
if (m_ptr->nickname &&
- ((player_has_los_bold(master_ptr, m_ptr->fy, m_ptr->fx) && projectable(master_ptr->current_floor_ptr, master_ptr->y, master_ptr->x, m_ptr->fy, m_ptr->fx)) ||
- (los(master_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, master_ptr->y, master_ptr->x) && projectable(master_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, master_ptr->y, master_ptr->x))))
+ ((player_has_los_bold(master_ptr, m_ptr->fy, m_ptr->fx) && projectable(master_ptr, master_ptr->y, master_ptr->x, m_ptr->fy, m_ptr->fx)) ||
+ (los(master_ptr, m_ptr->fy, m_ptr->fx, master_ptr->y, master_ptr->x) && projectable(master_ptr, m_ptr->fy, m_ptr->fx, master_ptr->y, master_ptr->x))))
{
if (dis > 3) continue;
}
{
for (j = 1000; j > 0; j--)
{
- scatter(master_ptr->current_floor_ptr, &cy, &cx, master_ptr->y, master_ptr->x, d, 0);
+ scatter(master_ptr, &cy, &cx, master_ptr->y, master_ptr->x, d, 0);
if (monster_can_enter(cy, cx, &r_info[party_mon[i].r_idx], 0)) break;
}
if (j) break;
/*!
* @brief LOS(Line Of Sight / 視線が通っているか)の判定を行う。
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param y1 始点のy座標
* @param x1 始点のx座標
* @param y2 終点のy座標
*\n
* Use the "update_view()" function to determine player line-of-sight.\n
*/
-bool los(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+bool los(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
/* Delta */
POSITION dx, dy;
/* if (!in_bounds(floor_ptr, y1, x1)) return FALSE; */
/* if (!in_bounds(floor_ptr, y2, x2)) return FALSE; */
-
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
/* Directly South/North */
if (!dx)
{
*
* This is slightly (but significantly) different from "los(y1,x1,y2,x2)".
*/
-bool projectable(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
+bool projectable(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2)
{
POSITION y, x;
u16b grid_g[512];
/* Check the projection path */
- grid_n = project_path(floor_ptr, grid_g, (project_length ? project_length : MAX_RANGE), y1, x1, y2, x2, 0);
+ grid_n = project_path(player_ptr, grid_g, (project_length ? project_length : MAX_RANGE), y1, x1, y2, x2, 0);
/* Identical grid */
if (!grid_n) return TRUE;
/*!
* @brief 特殊な部屋地形向けにモンスターを配置する / Hack -- Place some sleeping monsters near the given location
+ * @param player_ptr プレーヤーへの参照ポインタ
* @param y1 モンスターを配置したいマスの中心Y座標
* @param x1 モンスターを配置したいマスの中心X座標
* @param num 配置したいモンスターの数
* @details
* Only really called by some of the "vault" routines.
*/
-void vault_monsters(floor_type *floor_ptr, POSITION y1, POSITION x1, int num)
+void vault_monsters(player_type *player_ptr, POSITION y1, POSITION x1, int num)
{
int k, i;
POSITION y, x;
grid_type *g_ptr;
/* Try to summon "num" monsters "near" the given location */
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
for (k = 0; k < num; k++)
{
/* Try nine locations */
int d = 1;
/* Pick a nearby location */
- scatter(floor_ptr, &y, &x, y1, x1, d, 0);
+ scatter(player_ptr, &y, &x, y1, x1, d, 0);
/* Require "empty" floor grids */
- g_ptr = &floor_ptr->grid_array[y][x];
+ g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
if (!cave_empty_grid(g_ptr)) continue;
/* Place the monster (allow groups) */
* by "update_view_los()", and very different from the one used by "los()".
* </pre>
*/
-sint project_path(floor_type *floor_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg)
+sint project_path(player_type *player_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg)
{
POSITION y, x;
full = half << 1;
/* Vertical */
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
if (ay > ax)
{
/* Let m = ((dx/dy) * full) = (dx * dx * 2) */
if (flg & (PROJECT_STOP))
{
if ((n > 0) &&
- (player_bold(p_ptr, y, x) || floor_ptr->grid_array[y][x].m_idx != 0))
+ (player_bold(player_ptr, y, x) || floor_ptr->grid_array[y][x].m_idx != 0))
break;
}
if (flg & (PROJECT_STOP))
{
if ((n > 0) &&
- (player_bold(p_ptr, y, x) || floor_ptr->grid_array[y][x].m_idx != 0))
+ (player_bold(player_ptr, y, x) || floor_ptr->grid_array[y][x].m_idx != 0))
break;
}
if (flg & (PROJECT_STOP))
{
if ((n > 0) &&
- (player_bold(p_ptr, y, x) || floor_ptr->grid_array[y][x].m_idx != 0))
+ (player_bold(player_ptr, y, x) || floor_ptr->grid_array[y][x].m_idx != 0))
break;
}
*
* Currently the "m" parameter is unused.
*/
-void scatter(floor_type *floor_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode)
+void scatter(player_type *player_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode)
{
POSITION nx, ny;
/* Pick a location */
+ floor_type *floor_ptr = player_ptr->current_floor_ptr;
while (TRUE)
{
/* Pick a new location */
if (mode & PROJECT_LOS)
{
- if (los(floor_ptr, y, x, ny, nx)) break;
+ if (los(player_ptr, y, x, ny, nx)) break;
}
else
{
- if (projectable(floor_ptr, y, x, ny, nx)) break;
+ if (projectable(player_ptr, y, x, ny, nx)) break;
}
}
extern void forget_flow(floor_type *floor_ptr);
extern void place_random_stairs(player_type *player_ptr, POSITION y, POSITION x);
-extern bool los(floor_type* floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-extern bool projectable(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
+extern bool los(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
+extern bool projectable(player_type *player_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
extern int project_length;
-extern void vault_monsters(floor_type *floor_ptr, POSITION y1, POSITION x1, int num);
+extern void vault_monsters(player_type *player_ptr, POSITION y1, POSITION x1, int num);
extern bool cave_valid_bold(floor_type *floor_ptr, POSITION y, POSITION x);
extern void cave_set_feat(player_type *player_ptr, POSITION y, POSITION x, FEAT_IDX feat);
extern void place_random_door(player_type *player_ptr, POSITION y, POSITION x, bool room);
#define PROJECT_PATH 0x2000 /*!< 遠隔攻撃特性: / Only used for printing project path */
#define PROJECT_FAST 0x4000 /*!< 遠隔攻撃特性: / Hide "visual" of flying bolts until blast */
#define PROJECT_LOS 0x8000 /*!< 遠隔攻撃特性: / */
-extern sint project_path(floor_type *floor_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
+extern sint project_path(player_type *player_ptr, u16b *gp, POSITION range, POSITION y1, POSITION x1, POSITION y2, POSITION x2, BIT_FLAGS flg);
extern void set_floor(floor_type *floor_ptr, POSITION x, POSITION y);
extern void place_object(player_type *owner_ptr, POSITION y, POSITION x, BIT_FLAGS mode);
extern void delete_monster(floor_type *floor_ptr, POSITION y, POSITION x);
extern void compact_objects(floor_type *floor_ptr, int size);
extern void vault_traps(player_type *player_ptr, POSITION y, POSITION x, POSITION yd, POSITION xd, int num);
-extern void scatter(floor_type *floor_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
+extern void scatter(player_type *player_ptr, POSITION *yp, POSITION *xp, POSITION y, POSITION x, POSITION d, BIT_FLAGS mode);
*/
#define is_seen(A) \
((bool)((A)->ml && (!ignore_unview || p_ptr->phase_out || \
- (player_can_see_bold(p_ptr, (A)->fy, (A)->fx) && projectable(p_ptr->current_floor_ptr, p_ptr->y, p_ptr->x, (A)->fy, (A)->fx)))))
+ (player_can_see_bold(p_ptr, (A)->fy, (A)->fx) && projectable(p_ptr, p_ptr->y, p_ptr->x, (A)->fy, (A)->fx)))))
break;
case 1:
/* Mindblast */
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
if (randint1(100) < plev * 2)
fire_beam(caster_ptr, GF_PSI, dir, damroll(3 + ((plev - 1) / 4), (3 + plev / 15)));
/* Domination */
if (plev < 30)
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball(caster_ptr, GF_DOMINATION, dir, plev, 0);
}
break;
case 5:
/* Fist of Force --- not 'true' TK */
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball(caster_ptr, GF_TELEKINESIS, dir, damroll(8 + ((plev - 5) / 4), 8),
(plev > 20 ? (plev - 20) / 8 + 1 : 0));
break;
case 10:
/* Telekinesis */
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fetch(caster_ptr, dir, plev * 15, FALSE);
break;
case 11:
/* Psychic Drain */
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
b = damroll(plev / 2, 6);
break;
case 12:
/* psycho-spear */
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_beam(caster_ptr, GF_PSY_SPEAR, dir, randint1(plev*3)+plev*3);
break;
switch (spell)
{
case 0:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball(caster_ptr, GF_MISSILE, dir, damroll(3 + ((plev - 1) / 5) + boost / 12, 4), 0);
break;
case 1:
break;
case 3:
project_length = plev / 8 + 3;
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_beam(caster_ptr, GF_MISSILE, dir, damroll(5 + ((plev - 1) / 5) + boost / 10, 5));
break;
return shock_power(caster_ptr);
break;
case 8:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball(caster_ptr, GF_MISSILE, dir, damroll(10, 6) + plev * 3 / 2 + boost * 3 / 5, (plev < 30) ? 2 : 3);
break;
case 9:
m_idx = caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx;
if (!m_idx) break;
if (!player_has_los_bold(caster_ptr, target_row, target_col)) break;
- if (!projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
+ if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
dispel_monster_status(m_idx);
break;
}
fire_ball(caster_ptr, GF_FIRE, 0, 200 + (2 * plev) + boost * 2, 10);
break;
case 12:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_beam(caster_ptr, GF_MANA, dir, damroll(10 + (plev / 2) + boost * 3 / 10, 15));
break;
}
break;
case 2:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
if (plev > 9 && is_mirror_grid(&caster_ptr->current_floor_ptr->grid_array[caster_ptr->y][caster_ptr->x])) {
fire_beam(caster_ptr, GF_LITE, dir, damroll(3 + ((plev - 1) / 5), 4));
}
break;
/* banishing mirror */
case 7:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
(void)fire_beam(caster_ptr, GF_AWAY_ALL, dir, plev);
break;
/* mirror clashing */
case 8:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball(caster_ptr, GF_SHARDS, dir, damroll(8 + ((plev - 5) / 4), 8),
(plev > 20 ? (plev - 20) / 8 + 1 : 0));
break;
break;
/* seeker ray */
case 10:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_beam(caster_ptr, GF_SEEKER, dir, damroll(11 + (plev - 5) / 4, 8));
break;
/* seal of mirror */
break;
/* super ray */
case 13:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_beam(caster_ptr, GF_SUPER_RAY, dir, 150 + randint1(2 * plev));
break;
/* illusion light */
}
case 6:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
(void)stasis_monster(caster_ptr, dir);
break;
}
if (!m_idx) break;
if (m_idx == caster_ptr->riding) break;
if (!player_has_los_bold(caster_ptr, target_row, target_col)) break;
- if (!projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
+ if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
m_ptr = &caster_ptr->current_floor_ptr->m_list[m_idx];
monster_desc(m_name, m_ptr, 0);
msg_format(_("%sを引き戻した。", "You pull back %s."), m_name);
- path_n = project_path(caster_ptr->current_floor_ptr, path_g, MAX_RANGE, target_row, target_col, caster_ptr->y, caster_ptr->x, 0);
+ path_n = project_path(caster_ptr, path_g, MAX_RANGE, target_row, target_col, caster_ptr->y, caster_ptr->x, 0);
ty = target_row, tx = target_col;
for (i = 1; i < path_n; i++)
{
break;
}
case 13:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
fire_ball(caster_ptr, GF_OLD_CONF, dir, plev*3, 3);
break;
case 14:
project_length = -1;
- if (!get_aim_dir(&dir))
+ if (!get_aim_dir(caster_ptr, &dir))
{
project_length = 0;
return FALSE;
while (attempts--)
{
- scatter(caster_ptr->current_floor_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, 0);
+ scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, 0);
if (!player_bold(caster_ptr, y, x)) break;
}
/*!
* @brief モンスターが敵に接近するための方向を決める /
* Calculate the direction to the next enemy
+ * @param target_ptr プレーヤーへの参照ポインタ
* @param m_idx モンスターの参照ID
* @param mm 移動するべき方角IDを返す参照ポインタ
* @return 方向が確定した場合TRUE、接近する敵がそもそもいない場合FALSEを返す
*/
-static bool get_enemy_dir(MONSTER_IDX m_idx, int *mm)
+static bool get_enemy_dir(player_type *target_ptr, MONSTER_IDX m_idx, int *mm)
{
int i;
POSITION x = 0, y = 0;
int start;
int plus = 1;
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[m_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
monster_type *t_ptr;
- if (p_ptr->riding_t_m_idx && player_bold(p_ptr, m_ptr->fy, m_ptr->fx))
+ if (target_ptr->riding_t_m_idx && player_bold(target_ptr, m_ptr->fy, m_ptr->fx))
{
- y = p_ptr->current_floor_ptr->m_list[p_ptr->riding_t_m_idx].fy;
- x = p_ptr->current_floor_ptr->m_list[p_ptr->riding_t_m_idx].fx;
+ y = floor_ptr->m_list[target_ptr->riding_t_m_idx].fy;
+ x = floor_ptr->m_list[target_ptr->riding_t_m_idx].fx;
}
- else if (is_pet(m_ptr) && p_ptr->pet_t_m_idx)
+ else if (is_pet(m_ptr) && target_ptr->pet_t_m_idx)
{
- y = p_ptr->current_floor_ptr->m_list[p_ptr->pet_t_m_idx].fy;
- x = p_ptr->current_floor_ptr->m_list[p_ptr->pet_t_m_idx].fx;
+ y = floor_ptr->m_list[target_ptr->pet_t_m_idx].fy;
+ x = floor_ptr->m_list[target_ptr->pet_t_m_idx].fx;
}
else
{
- if (p_ptr->phase_out)
+ if (target_ptr->phase_out)
{
- start = randint1(p_ptr->current_floor_ptr->m_max-1)+p_ptr->current_floor_ptr->m_max;
+ start = randint1(floor_ptr->m_max-1)+floor_ptr->m_max;
if(randint0(2)) plus = -1;
}
- else start = p_ptr->current_floor_ptr->m_max + 1;
+ else start = floor_ptr->m_max + 1;
/* Scan thru all monsters */
- for (i = start; ((i < start + p_ptr->current_floor_ptr->m_max) && (i > start - p_ptr->current_floor_ptr->m_max)); i+=plus)
+ for (i = start; ((i < start + floor_ptr->m_max) && (i > start - floor_ptr->m_max)); i+=plus)
{
- MONSTER_IDX dummy = (i % p_ptr->current_floor_ptr->m_max);
+ MONSTER_IDX dummy = (i % floor_ptr->m_max);
if (!dummy) continue;
t_idx = dummy;
- t_ptr = &p_ptr->current_floor_ptr->m_list[t_idx];
+ t_ptr = &floor_ptr->m_list[t_idx];
/* The monster itself isn't a target */
if (t_ptr == m_ptr) continue;
if (is_pet(m_ptr))
{
/* Hack -- only fight away from player */
- if (p_ptr->pet_follow_distance < 0)
+ if (target_ptr->pet_follow_distance < 0)
{
/* No fighting near player */
- if (t_ptr->cdis <= (0 - p_ptr->pet_follow_distance))
+ if (t_ptr->cdis <= (0 - target_ptr->pet_follow_distance))
{
continue;
}
}
/* Hack -- no fighting away from player */
- else if ((m_ptr->cdis < t_ptr->cdis) && (t_ptr->cdis > p_ptr->pet_follow_distance))
+ else if ((m_ptr->cdis < t_ptr->cdis) && (t_ptr->cdis > target_ptr->pet_follow_distance))
{
continue;
}
if (!are_enemies(m_ptr, t_ptr)) continue;
/* Monster must be projectable if we can't pass through walls */
- if (((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != p_ptr->riding) || p_ptr->pass_wall)) ||
- ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != p_ptr->riding)))
+ if (((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != target_ptr->riding) || target_ptr->pass_wall)) ||
+ ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != target_ptr->riding)))
{
- if (!in_disintegration_range(p_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
+ if (!in_disintegration_range(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
}
else
{
- if (!projectable(p_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
+ if (!projectable(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
}
/* OK -- we've got a target */
/*!
* @brief モンスターがプレイヤーに向けて遠距離攻撃を行うことが可能なマスを走査する /
* Search spell castable grid
+ * @param target_ptr プレーヤーへの参照ポインタ
* @param m_idx モンスターの参照ID
* @param yp 適したマスのY座標を返す参照ポインタ
* @param xp 適したマスのX座標を返す参照ポインタ
* @return 有効なマスがあった場合TRUEを返す
*/
-static bool get_moves_aux2(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
+static bool get_moves_aux2(player_type *target_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
{
int i, best = 999;
POSITION y, x, y1, x1;
bool can_open_door = FALSE;
int now_cost;
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[m_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
/* Monster location */
x1 = m_ptr->fx;
/* Monster can already cast spell to player */
- if (projectable(p_ptr->current_floor_ptr, y1, x1, p_ptr->y, p_ptr->x)) return FALSE;
+ if (projectable(target_ptr, y1, x1, target_ptr->y, target_ptr->x)) return FALSE;
/* Set current grid cost */
- now_cost = p_ptr->current_floor_ptr->grid_array[y1][x1].cost;
+ now_cost = floor_ptr->grid_array[y1][x1].cost;
if (now_cost == 0) now_cost = 999;
/* Can monster bash or open doors? */
x = x1 + ddx_ddd[i];
/* Ignore locations off of edge */
- if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) continue;
+ if (!in_bounds2(floor_ptr, y, x)) continue;
/* Simply move to player */
- if (player_bold(p_ptr, y, x)) return FALSE;
+ if (player_bold(target_ptr, y, x)) return FALSE;
- g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
+ g_ptr = &floor_ptr->grid_array[y][x];
cost = g_ptr->cost;
/* Monster cannot kill or pass walls */
- if (!(((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != p_ptr->riding) || p_ptr->pass_wall)) || ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != p_ptr->riding))))
+ if (!(((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != target_ptr->riding) || target_ptr->pass_wall)) || ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != target_ptr->riding))))
{
if (cost == 0) continue;
if (!can_open_door && is_closed_door(g_ptr->feat)) continue;
if (now_cost < cost) continue;
- if (!projectable(p_ptr->current_floor_ptr, y, x, p_ptr->y, p_ptr->x)) continue;
+ if (!projectable(target_ptr, y, x, target_ptr->y, target_ptr->x)) continue;
/* Accept louder sounds */
if (best < cost) continue;
* being close enough to chase directly. I have no idea what will\n
* happen if you combine "smell" with low "aaf" values.\n
*/
-static bool get_moves_aux(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp, bool no_flow)
+static bool get_moves_aux(player_type *target_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp, bool no_flow)
{
int i, best;
POSITION y, x, y1, x1;
grid_type *g_ptr;
bool use_scent = FALSE;
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[m_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
/* Can monster cast attack spell? */
r_ptr->a_ability_flags2 & (RF6_ATTACK_MASK))
{
/* Can move spell castable grid? */
- if (get_moves_aux2(m_idx, yp, xp)) return TRUE;
+ if (get_moves_aux2(target_ptr, m_idx, yp, xp)) return TRUE;
}
/* Monster can't flow */
if (no_flow) return FALSE;
/* Monster can go through rocks */
- if ((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != p_ptr->riding) || p_ptr->pass_wall)) return FALSE;
- if ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != p_ptr->riding)) return FALSE;
+ if ((r_ptr->flags2 & RF2_PASS_WALL) && ((m_idx != target_ptr->riding) || target_ptr->pass_wall)) return FALSE;
+ if ((r_ptr->flags2 & RF2_KILL_WALL) && (m_idx != target_ptr->riding)) return FALSE;
/* Monster location */
y1 = m_ptr->fy;
x1 = m_ptr->fx;
/* Hack -- Player can see us, run towards him */
- if (player_has_los_bold(p_ptr, y1, x1) && projectable(p_ptr->current_floor_ptr, p_ptr->y, p_ptr->x, y1, x1)) return FALSE;
+ if (player_has_los_bold(target_ptr, y1, x1) && projectable(target_ptr, target_ptr->y, target_ptr->x, y1, x1)) return FALSE;
/* Monster grid */
- g_ptr = &p_ptr->current_floor_ptr->grid_array[y1][x1];
+ g_ptr = &floor_ptr->grid_array[y1][x1];
/* If we can hear noises, advance towards them */
if (g_ptr->cost)
else if (g_ptr->when)
{
/* Too old smell */
- if (p_ptr->current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].when - g_ptr->when > 127) return FALSE;
+ if (floor_ptr->grid_array[target_ptr->y][target_ptr->x].when - g_ptr->when > 127) return FALSE;
use_scent = TRUE;
best = 0;
x = x1 + ddx_ddd[i];
/* Ignore locations off of edge */
- if (!in_bounds2(p_ptr->current_floor_ptr, y, x)) continue;
+ if (!in_bounds2(floor_ptr, y, x)) continue;
- g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
+ g_ptr = &floor_ptr->grid_array[y][x];
/* We're following a scent trail */
if (use_scent)
}
/* Hack -- Save the "twiddled" location */
- (*yp) = p_ptr->y + 16 * ddy_ddd[i];
- (*xp) = p_ptr->x + 16 * ddx_ddd[i];
+ (*yp) = target_ptr->y + 16 * ddy_ddd[i];
+ (*xp) = target_ptr->x + 16 * ddx_ddd[i];
}
/* No legal move (?) */
/*!
* @brief モンスターが逃げ込める安全な地点を返す /
* Choose a "safe" location near a monster for it to run toward.
+ * @param target_ptr プレーヤーへの参照ポインタ
* @param m_idx モンスターの参照ID
* @param yp 移動先のマスのY座標を返す参照ポインタ
* @param xp 移動先のマスのX座標を返す参照ポインタ
*\n
* Return TRUE if a safe location is available.\n
*/
-static bool find_safety(MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
+static bool find_safety(player_type *target_ptr, MONSTER_IDX m_idx, POSITION *yp, POSITION *xp)
{
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[m_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
POSITION fy = m_ptr->fy;
POSITION fx = m_ptr->fx;
x = fx + dx;
/* Skip illegal locations */
- if (!in_bounds(p_ptr->current_floor_ptr, y, x)) continue;
+ if (!in_bounds(floor_ptr, y, x)) continue;
- g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
+ g_ptr = &floor_ptr->grid_array[y][x];
/* Skip locations in a wall */
- if (!monster_can_cross_terrain(g_ptr->feat, &r_info[m_ptr->r_idx], (m_idx == p_ptr->riding) ? CEM_RIDING : 0)) continue;
+ if (!monster_can_cross_terrain(g_ptr->feat, &r_info[m_ptr->r_idx], (m_idx == target_ptr->riding) ? CEM_RIDING : 0)) continue;
/* Check for "availability" (if monsters can flow) */
if (!(m_ptr->mflag2 & MFLAG2_NOFLOW))
if (g_ptr->dist == 0) continue;
/* Ignore too-distant grids */
- if (g_ptr->dist > p_ptr->current_floor_ptr->grid_array[fy][fx].dist + 2 * d) continue;
+ if (g_ptr->dist > floor_ptr->grid_array[fy][fx].dist + 2 * d) continue;
}
/* Check for absence of shot (more or less) */
- if (!projectable(p_ptr->current_floor_ptr, p_ptr->y, p_ptr->x, y, x))
+ if (!projectable(target_ptr, target_ptr->y, target_ptr->x, y, x))
{
/* Calculate distance from player */
- dis = distance(y, x, p_ptr->y, p_ptr->x);
+ dis = distance(y, x, target_ptr->y, target_ptr->x);
/* Remember if further than previous */
if (dis > gdis)
if (!monster_can_enter(y, x, r_ptr, 0)) continue;
/* Check for hidden, available grid */
- if (!projectable(floor_ptr, target_ptr->y, target_ptr->x, y, x) && clean_shot(target_ptr, fy, fx, y, x, FALSE))
+ if (!projectable(target_ptr, target_ptr->y, target_ptr->x, y, x) && clean_shot(target_ptr, fy, fx, y, x, FALSE))
{
/* Calculate distance from player */
dis = distance(y, x, target_ptr->y, target_ptr->x);
/* The monster must be an enemy, and in LOS */
if (t_m_idx &&
are_enemies(m_ptr, &floor_ptr->m_list[t_m_idx]) &&
- los(floor_ptr, m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x) &&
- projectable(floor_ptr, m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x))
+ los(target_ptr, m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x) &&
+ projectable(target_ptr, m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x))
{
/* Extract the "pseudo-direction" */
y = m_ptr->fy - m_ptr->target_y;
if (!done && !will_run && is_hostile(m_ptr) &&
(r_ptr->flags1 & RF1_FRIENDS) &&
- ((los(floor_ptr, m_ptr->fy, m_ptr->fx, target_ptr->y, target_ptr->x) && projectable(floor_ptr, m_ptr->fy, m_ptr->fx, target_ptr->y, target_ptr->x)) ||
+ ((los(target_ptr, m_ptr->fy, m_ptr->fx, target_ptr->y, target_ptr->x) && projectable(target_ptr, m_ptr->fy, m_ptr->fx, target_ptr->y, target_ptr->x)) ||
(floor_ptr->grid_array[m_ptr->fy][m_ptr->fx].dist < MAX_SIGHT / 2)))
{
/*
if (!done)
{
/* Flow towards the player */
- (void)get_moves_aux(m_idx, &y2, &x2, no_flow);
+ (void)get_moves_aux(target_ptr, m_idx, &y2, &x2, no_flow);
/* Extract the "pseudo-direction" */
y = m_ptr->fy - y2;
int tmp_y = (-y);
/* Try to find safe place */
- if (find_safety(m_idx, &y, &x))
+ if (find_safety(target_ptr, m_idx, &y, &x))
{
/* Attempt to avoid the player */
if (!no_flow)
if (see_m)
{
if ((r_ptr->flags2 & RF2_CAN_SPEAK) && (m_ptr->r_idx != MON_GRIP) && (m_ptr->r_idx != MON_WOLF) && (m_ptr->r_idx != MON_FANG) &&
- player_has_los_bold(target_ptr, m_ptr->fy, m_ptr->fx) && projectable(target_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, target_ptr->y, target_ptr->x))
+ player_has_los_bold(target_ptr, m_ptr->fy, m_ptr->fx) && projectable(target_ptr, m_ptr->fy, m_ptr->fx, target_ptr->y, target_ptr->x))
{
msg_format(_("%^s「ピンチだ!退却させてもらう!」", "%^s says 'It is the pinch! I will retreat'."), m_name);
}
if ((ap_r_ptr->flags2 & RF2_CAN_SPEAK) && aware &&
one_in_(SPEAK_CHANCE) &&
player_has_los_bold(target_ptr, oy, ox) &&
- projectable(target_ptr->current_floor_ptr, oy, ox, target_ptr->y, target_ptr->x))
+ projectable(target_ptr, oy, ox, target_ptr->y, target_ptr->x))
{
GAME_TEXT m_name[MAX_NLEN];
char monmessage[1024];
/* The monster must be an enemy, and projectable */
if (t_m_idx && are_enemies(m_ptr, &target_ptr->current_floor_ptr->m_list[t_m_idx]) &&
- projectable(target_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x))
+ projectable(target_ptr, m_ptr->fy, m_ptr->fx, m_ptr->target_y, m_ptr->target_x))
{
counterattack = TRUE;
}
mm[0] = mm[1] = mm[2] = mm[3] = 5;
/* Look for an enemy */
- if (!get_enemy_dir(m_idx, mm))
+ if (!get_enemy_dir(target_ptr, m_idx, mm))
{
/* Find the player if necessary */
if (avoid || lonely || distant)
mm[0] = mm[1] = mm[2] = mm[3] = 5;
/* Look for an enemy */
- get_enemy_dir(m_idx, mm);
+ get_enemy_dir(target_ptr, m_idx, mm);
}
/* Normal movement */
else
/* Possible disturb */
if (m_ptr->ml &&
(disturb_move ||
- (disturb_near && (m_ptr->mflag & MFLAG_VIEW) && projectable(target_ptr->current_floor_ptr, target_ptr->y, target_ptr->x, m_ptr->fy, m_ptr->fx)) ||
+ (disturb_near && (m_ptr->mflag & MFLAG_VIEW) && projectable(target_ptr, target_ptr->y, target_ptr->x, m_ptr->fy, m_ptr->fx)) ||
(disturb_high && ap_r_ptr->r_tkills && ap_r_ptr->level >= target_ptr->lev)))
{
if (is_hostile(m_ptr))
/* mspells1.c */
extern bool clean_shot(player_type *target_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2, bool is_friend);
-extern bool summon_possible(floor_type *floor_ptr, POSITION y1, POSITION x1);
-extern bool raise_possible(floor_type *floor_ptr, monster_type *m_ptr);
+extern bool summon_possible(player_type *target_ptr, POSITION y1, POSITION x1);
+extern bool raise_possible(player_type *target_ptr, monster_type *m_ptr);
extern bool dispel_check(player_type *creature_ptr, MONSTER_IDX m_idx);
extern bool spell_is_inate(SPELL_IDX spell);
extern bool make_attack_spell(MONSTER_IDX m_idx, player_type *target_ptr);
extern void breath(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, EFFECT_ID typ, int dam_hp, POSITION rad, bool breath, int monspell, int target_type);
/* mspells2.c */
-extern void get_project_point(floor_type *floor_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg);
+extern void get_project_point(player_type *target_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg);
extern bool monst_spell_monst(player_type *target_ptr, MONSTER_IDX m_idx);
/* mspells3.c */
target_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
current_world_ptr->timewalk_m_idx = 0;
- if (vs_player || (player_has_los_bold(target_ptr, m_ptr->fy, m_ptr->fx) && projectable(target_ptr->current_floor_ptr, target_ptr->y, target_ptr->x, m_ptr->fy, m_ptr->fx)))
+ if (vs_player || (player_has_los_bold(target_ptr, m_ptr->fy, m_ptr->fx) && projectable(target_ptr, target_ptr->y, target_ptr->x, m_ptr->fy, m_ptr->fx)))
{
msg_print(_("「時は動きだす…」", "You feel time flowing around you once more."));
msg_print(NULL);
do
{
- scatter(floor_ptr, &wy, &wx, y, x, 20, 0);
+ scatter(p_ptr, &wy, &wx, y, x, 20, 0);
} while (!(in_bounds(floor_ptr, wy, wx) && cave_empty_bold2(floor_ptr, wy, wx)) && --attempts);
if (attempts > 0)
}
/* Disturb on appearance */
- if (disturb_near && (projectable(subject_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, subject_ptr->y, subject_ptr->x) && projectable(subject_ptr->current_floor_ptr, subject_ptr->y, subject_ptr->x, m_ptr->fy, m_ptr->fx)))
+ if (disturb_near && (projectable(subject_ptr, m_ptr->fy, m_ptr->fx, subject_ptr->y, subject_ptr->x) && projectable(subject_ptr, subject_ptr->y, subject_ptr->x, m_ptr->fy, m_ptr->fx)))
{
if (disturb_pets || is_hostile(m_ptr))
disturb(subject_ptr, TRUE, TRUE);
if (!in_bounds(p_ptr->current_floor_ptr, ny, nx)) continue;
/* Require "line of projection" */
- if (!projectable(p_ptr->current_floor_ptr, y, x, ny, nx)) continue;
+ if (!projectable(p_ptr, y, x, ny, nx)) continue;
if (r_idx > 0)
{
{
POSITION mx, my;
- scatter(p_ptr->current_floor_ptr, &my, &mx, hy, hx, 4, 0);
+ scatter(p_ptr, &my, &mx, hy, hx, 4, 0);
/* Walls and Monsters block flow */
if (!cave_empty_bold2(p_ptr->current_floor_ptr, my, mx)) continue;
for(j = 0; j < n; j++)
{
POSITION nx, ny, d = 7;
- scatter(p_ptr->current_floor_ptr, &ny, &nx, y, x, d, 0);
+ scatter(p_ptr, &ny, &nx, y, x, d, 0);
(void)place_monster_one(place_monster_m_idx, ny, nx, r_ptr->reinforce_id[i], mode);
}
}
MONRACE_IDX z;
/* Pick a location */
- scatter(p_ptr->current_floor_ptr, &ny, &nx, y, x, d, 0);
+ scatter(p_ptr, &ny, &nx, y, x, d, 0);
/* Require empty grids */
if (!cave_empty_bold2(p_ptr->current_floor_ptr, ny, nx)) continue;
for (attempts = randint1(10) + 5; attempts; attempts--)
{
- scatter(p_ptr->current_floor_ptr, &cy, &cx, y, x, 5, 0);
+ scatter(p_ptr, &cy, &cx, y, x, 5, 0);
(void)summon_specific(m_idx, cy, cx, p_ptr->current_floor_ptr->dun_level + 5, SUMMON_KIN, PM_ALLOW_GROUP);
/*!
* @brief モンスターにとって所定の地点が召還に相応しい地点かどうかを返す。 /
* Determine if there is a space near the player in which a summoned creature can appear
- * @param floor_ptr 現在フロアへの参照ポインタ
+ * @param target_ptr プレーヤーへの参照ポインタ
* @param y1 判定を行いたいマスのY座標
* @param x1 判定を行いたいマスのX座標
* @return 召還に相応しいならばTRUEを返す
*/
-bool summon_possible(floor_type *floor_ptr, POSITION y1, POSITION x1)
+bool summon_possible(player_type *target_ptr, POSITION y1, POSITION x1)
{
POSITION y, x;
/* Start at the player's location, and check 2 grids in each dir */
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
for (y = y1 - 2; y <= y1 + 2; y++)
{
for (x = x1 - 2; x <= x1 + 2; x++)
if (pattern_tile(y, x)) continue;
/* Require empty floor grid in line of projection */
- if (cave_empty_bold(floor_ptr, y, x) && projectable(floor_ptr, y1, x1, y, x) && projectable(floor_ptr, y, x, y1, x1)) return TRUE;
+ if (cave_empty_bold(floor_ptr, y, x) && projectable(target_ptr, y1, x1, y, x) && projectable(target_ptr, y, x, y1, x1)) return TRUE;
}
}
/*!
* @brief モンスターにとって死者復活を行うべき状態かどうかを返す /
* Determine if there is a space near the player in which a summoned creature can appear
- * @param floor_type 現在フロアへの参照ポインタ
+ * @param target_ptr プレーヤーへの参照ポインタ
* @param m_ptr 判定を行いたいモンスターの構造体参照ポインタ
* @return 死者復活が有効な状態ならばTRUEを返す。
*/
-bool raise_possible(floor_type *floor_ptr, monster_type *m_ptr)
+bool raise_possible(player_type *target_ptr, monster_type *m_ptr)
{
POSITION y = m_ptr->fy;
POSITION x = m_ptr->fx;
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
for (POSITION xx = x - 5; xx <= x + 5; xx++)
{
grid_type *g_ptr;
for (POSITION yy = y - 5; yy <= y + 5; yy++)
{
if (distance(y, x, yy, xx) > 5) continue;
- if (!los(floor_ptr, y, x, yy, xx)) continue;
- if (!projectable(floor_ptr, y, x, yy, xx)) continue;
+ if (!los(target_ptr, y, x, yy, xx)) continue;
+ if (!projectable(target_ptr, y, x, yy, xx)) continue;
g_ptr = &floor_ptr->grid_array[yy][xx];
/* Scan the pile of objects */
/* Check the projection path */
floor_type *floor_ptr = target_ptr->current_floor_ptr;
u16b grid_g[512];
- int grid_n = grid_n = project_path(floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, 0);
+ int grid_n = grid_n = project_path(target_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, 0);
/* No grid is ever projectable from itself */
if (!grid_n) return FALSE;
* @return 有効な座標があった場合TRUEを返す
*/
static bool adjacent_grid_check(player_type *target_ptr, monster_type *m_ptr, POSITION *yp, POSITION *xp,
- int f_flag, bool (*path_check)(floor_type *, POSITION, POSITION, POSITION, POSITION))
+ int f_flag, bool (*path_check)(player_type *, POSITION, POSITION, POSITION, POSITION))
{
static int tonari_y[4][8] = {{-1, -1, -1, 0, 0, 1, 1, 1},
{-1, -1, -1, 0, 0, 1, 1, 1},
/* Skip this feature */
if (!cave_have_flag_grid(g_ptr, f_flag)) continue;
- if (path_check(floor_ptr, m_ptr->fy, m_ptr->fx, next_y, next_x))
+ if (path_check(target_ptr, m_ptr->fy, m_ptr->fx, next_y, next_x))
{
*yp = next_y;
*xp = next_x;
y_br_lite = y;
x_br_lite = x;
- if (los(floor_ptr, m_ptr->fy, m_ptr->fx, y_br_lite, x_br_lite))
+ if (los(target_ptr, m_ptr->fy, m_ptr->fx, y_br_lite, x_br_lite))
{
feature_type *f_ptr = &f_info[floor_ptr->grid_array[y_br_lite][x_br_lite].feat];
/* Check path */
bool do_spell = DO_SPELL_NONE;
- if (projectable(floor_ptr, m_ptr->fy, m_ptr->fx, y, x))
+ if (projectable(target_ptr, m_ptr->fy, m_ptr->fx, y, x))
{
feature_type *f_ptr = &f_info[floor_ptr->grid_array[y][x].feat];
if ((f4 & RF4_BR_DISI) && (m_ptr->cdis < MAX_RANGE/2) &&
in_disintegration_range(floor_ptr, m_ptr->fy, m_ptr->fx, y, x) &&
- (one_in_(10) || (projectable(floor_ptr, y, x, m_ptr->fy, m_ptr->fx) && one_in_(2))))
+ (one_in_(10) || (projectable(target_ptr, y, x, m_ptr->fy, m_ptr->fx) && one_in_(2))))
{
do_spell = DO_SPELL_BR_DISI;
success = TRUE;
}
else if ((f4 & RF4_BR_LITE) && (m_ptr->cdis < MAX_RANGE/2) &&
- los(floor_ptr, m_ptr->fy, m_ptr->fx, y, x) && one_in_(5))
+ los(target_ptr, m_ptr->fy, m_ptr->fx, y, x) && one_in_(5))
{
do_spell = DO_SPELL_BR_LITE;
success = TRUE;
else if ((f5 & RF5_BA_LITE) && (m_ptr->cdis <= MAX_RANGE))
{
POSITION by = y, bx = x;
- get_project_point(floor_ptr, m_ptr->fy, m_ptr->fx, &by, &bx, 0L);
- if ((distance(by, bx, y, x) <= 3) && los(floor_ptr, by, bx, y, x) && one_in_(5))
+ get_project_point(target_ptr, m_ptr->fy, m_ptr->fx, &by, &bx, 0L);
+ if ((distance(by, bx, y, x) <= 3) && los(target_ptr, by, bx, y, x) && one_in_(5))
{
do_spell = DO_SPELL_BA_LITE;
success = TRUE;
if (((f4 & RF4_SUMMON_MASK) ||
(f5 & RF5_SUMMON_MASK) ||
(f6 & RF6_SUMMON_MASK)) &&
- !(summon_possible(floor_ptr, y, x)))
+ !(summon_possible(target_ptr, y, x)))
{
/* Remove summoning spells */
f4 &= ~(RF4_SUMMON_MASK);
}
/* Check for a possible raise dead */
- if ((f6 & RF6_RAISE_DEAD) && !raise_possible(floor_ptr, m_ptr))
+ if ((f6 & RF6_RAISE_DEAD) && !raise_possible(target_ptr, m_ptr))
{
/* Remove raise dead spell */
f6 &= ~(RF6_RAISE_DEAD);
/* Special moves restriction */
if (f6 & RF6_SPECIAL)
{
- if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(floor_ptr, y, x))
+ if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(target_ptr, y, x))
{
f6 &= ~(RF6_SPECIAL);
}
/* Check the projection path */
floor_type *floor_ptr = target_ptr->current_floor_ptr;
u16b grid_g[512];
- int grid_n = project_path(floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, PROJECT_THRU);
+ int grid_n = project_path(target_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, PROJECT_THRU);
/* No grid is ever projectable from itself */
if (!grid_n) return FALSE;
/* Check the projection path */
u16b grid_g[512];
- int grid_n = project_path(master_ptr->current_floor_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, flg);
+ int grid_n = project_path(master_ptr, grid_g, MAX_RANGE, y1, x1, y2, x2, flg);
/* Project along the path */
int i;
}
else if (flg & PROJECT_LOS)
{
- if (los(master_ptr->current_floor_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
- if (los(master_ptr->current_floor_ptr, y1, x1, master_ptr->y, master_ptr->x) && (distance(y1, x1, master_ptr->y, master_ptr->x) <= rad)) hityou = TRUE;
+ if (los(master_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
+ if (los(master_ptr, y1, x1, master_ptr->y, master_ptr->x) && (distance(y1, x1, master_ptr->y, master_ptr->x) <= rad)) hityou = TRUE;
}
else
{
- if (projectable(master_ptr->current_floor_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
- if (projectable(master_ptr->current_floor_ptr, y1, x1, master_ptr->y, master_ptr->x) && (distance(y1, x1, master_ptr->y, master_ptr->x) <= rad)) hityou = TRUE;
+ if (projectable(master_ptr, y1, x1, y2, x2) && (distance(y1, x1, y2, x2) <= rad)) hit2 = TRUE;
+ if (projectable(master_ptr, y1, x1, master_ptr->y, master_ptr->x) && (distance(y1, x1, master_ptr->y, master_ptr->x) <= rad)) hityou = TRUE;
}
}
else
POSITION gx[1024], gy[1024];
POSITION gm[32];
POSITION gm_rad = rad;
- breath_shape(master_ptr->current_floor_ptr, grid_g, grid_n, &grids, gx, gy, gm, &gm_rad, rad, y1, x1, y, x, typ);
+ breath_shape(master_ptr, grid_g, grid_n, &grids, gx, gy, gm, &gm_rad, rad, y1, x1, y, x, typ);
for (i = 0; i < grids; i++)
{
/*!
* @brief モンスターが特殊能力の目標地点を決める処理 /
* Get the actual center point of ball spells (rad > 1) (originally from TOband)
+ * @param target_ptr プレーヤーへの参照ポインタ
* @param sy 始点のY座標
* @param sx 始点のX座標
* @param ty 目標Y座標を返す参照ポインタ
* @param flg 判定のフラグ配列
* @return なし
*/
-void get_project_point(floor_type *floor_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg)
+void get_project_point(player_type *target_ptr, POSITION sy, POSITION sx, POSITION *ty, POSITION *tx, BIT_FLAGS flg)
{
u16b path_g[128];
- int path_n = project_path(floor_ptr, path_g, MAX_RANGE, sy, sx, *ty, *tx, flg);
+ int path_n = project_path(target_ptr, path_g, MAX_RANGE, sy, sx, *ty, *tx, flg);
*ty = sy;
*tx = sx;
sx = GRID_X(path_g[i]);
/* Hack -- Balls explode before reaching walls */
- if (!cave_have_flag_bold(floor_ptr, sy, sx, FF_PROJECT)) break;
+ if (!cave_have_flag_bold(target_ptr->current_floor_ptr, sy, sx, FF_PROJECT)) break;
*ty = sy;
*tx = sx;
t_ptr = &floor_ptr->m_list[target_idx];
/* Cancel if not projectable (for now) */
- if ((m_idx == target_idx) || !projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
+ if ((m_idx == target_idx) || !projectable(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
{
target_idx = 0;
}
}
/* Allow only summoning etc.. if not projectable */
- else if (!projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
+ else if (!projectable(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
{
f4 &= (RF4_INDIRECT_MASK);
f5 &= (RF5_INDIRECT_MASK);
if ((m_idx == target_idx) || !are_enemies(m_ptr, t_ptr)) continue;
/* Monster must be projectable */
- if (!projectable(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
+ if (!projectable(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx)) continue;
/* Get it */
success = TRUE;
if (f4 & RF4_BR_LITE)
{
- if (!los(floor_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
+ if (!los(target_ptr, m_ptr->fy, m_ptr->fx, t_ptr->fy, t_ptr->fx))
f4 &= ~(RF4_BR_LITE);
}
POSITION real_y = y;
POSITION real_x = x;
- get_project_point(floor_ptr, m_ptr->fy, m_ptr->fx, &real_y, &real_x, 0L);
+ get_project_point(target_ptr, m_ptr->fy, m_ptr->fx, &real_y, &real_x, 0L);
- if (projectable(floor_ptr, real_y, real_x, target_ptr->y, target_ptr->x))
+ if (projectable(target_ptr, real_y, real_x, target_ptr->y, target_ptr->x))
{
int dist = distance(real_y, real_x, target_ptr->y, target_ptr->x);
}
else if (f5 & RF5_BA_LITE)
{
- if ((distance(real_y, real_x, target_ptr->y, target_ptr->x) <= 4) && los(floor_ptr, real_y, real_x, target_ptr->y, target_ptr->x))
+ if ((distance(real_y, real_x, target_ptr->y, target_ptr->x) <= 4) && los(target_ptr, real_y, real_x, target_ptr->y, target_ptr->x))
f5 &= ~(RF5_BA_LITE);
}
}
POSITION real_y = y;
POSITION real_x = x;
- get_project_point(floor_ptr, m_ptr->fy, m_ptr->fx, &real_y, &real_x, PROJECT_STOP);
- if (projectable(floor_ptr, real_y, real_x, target_ptr->y, target_ptr->x) && (distance(real_y, real_x, target_ptr->y, target_ptr->x) <= 2))
+ get_project_point(target_ptr, m_ptr->fy, m_ptr->fx, &real_y, &real_x, PROJECT_STOP);
+ if (projectable(target_ptr, real_y, real_x, target_ptr->y, target_ptr->x) && (distance(real_y, real_x, target_ptr->y, target_ptr->x) <= 2))
f4 &= ~(RF4_ROCKET);
}
if (((f4 & RF4_SUMMON_MASK) ||
(f5 & RF5_SUMMON_MASK) ||
(f6 & RF6_SUMMON_MASK)) &&
- !(summon_possible(floor_ptr, t_ptr->fy, t_ptr->fx)))
+ !(summon_possible(target_ptr, t_ptr->fy, t_ptr->fx)))
{
/* Remove summoning spells */
f4 &= ~(RF4_SUMMON_MASK);
}
/* Check for a possible raise dead */
- if ((f6 & RF6_RAISE_DEAD) && !raise_possible(floor_ptr, m_ptr))
+ if ((f6 & RF6_RAISE_DEAD) && !raise_possible(target_ptr, m_ptr))
{
/* Remove raise dead spell */
f6 &= ~(RF6_RAISE_DEAD);
/* Special moves restriction */
if (f6 & RF6_SPECIAL)
{
- if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(floor_ptr, t_ptr->fy, t_ptr->fx))
+ if ((m_ptr->r_idx == MON_ROLENTO) && !summon_possible(target_ptr, t_ptr->fy, t_ptr->fx))
{
f6 &= ~(RF6_SPECIAL);
}
m_idx = floor_ptr->grid_array[target_row][target_col].m_idx;
if (!m_idx) break;
if (!player_has_los_bold(caster_ptr, target_row, target_col)) break;
- if (!projectable(floor_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
+ if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
dispel_monster_status(m_idx);
break;
}
case MS_ROCKET:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("ロケットを発射した。", "You fire a rocket."));
damage = monspell_bluemage_damage(caster_ptr, (MS_ROCKET), plev, DAM_ROLL);
break;
case MS_SHOOT:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("矢を放った。", "You fire an arrow."));
damage = monspell_bluemage_damage(caster_ptr, (MS_SHOOT), plev, DAM_ROLL);
case MS_XXX4:
break;
case MS_BR_ACID:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("酸のブレスを吐いた。", "You breathe acid."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_ACID), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_ACID, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_ELEC:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("稲妻のブレスを吐いた。", "You breathe lightning."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_ELEC), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_ELEC, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_FIRE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("火炎のブレスを吐いた。", "You breathe fire."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_FIRE), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_FIRE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_COLD:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("冷気のブレスを吐いた。", "You breathe frost."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_COLD), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_COLD, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_POIS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("ガスのブレスを吐いた。", "You breathe gas."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_POIS), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_POIS, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_NETHER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("地獄のブレスを吐いた。", "You breathe nether."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NETHER), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_NETHER, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_LITE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("閃光のブレスを吐いた。", "You breathe light."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_LITE), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_LITE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_DARK:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("暗黒のブレスを吐いた。", "You breathe darkness."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DARK), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_DARK, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_CONF:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("混乱のブレスを吐いた。", "You breathe confusion."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_CONF), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_CONFUSION, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_SOUND:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("轟音のブレスを吐いた。", "You breathe sound."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_SOUND), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_SOUND, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_CHAOS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("カオスのブレスを吐いた。", "You breathe chaos."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_CHAOS), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_CHAOS, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_DISEN:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("劣化のブレスを吐いた。", "You breathe disenchantment."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DISEN), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_DISENCHANT, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_NEXUS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("因果混乱のブレスを吐いた。", "You breathe nexus."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NEXUS), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_NEXUS, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_TIME:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("時間逆転のブレスを吐いた。", "You breathe time."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_TIME), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_TIME, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_INERTIA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("遅鈍のブレスを吐いた。", "You breathe inertia."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_INERTIA), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_INERTIAL, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_GRAVITY:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("重力のブレスを吐いた。", "You breathe gravity."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_GRAVITY), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_GRAVITY, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_SHARDS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("破片のブレスを吐いた。", "You breathe shards."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_SHARDS), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_SHARDS, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_PLASMA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("プラズマのブレスを吐いた。", "You breathe plasma."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_PLASMA), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_PLASMA, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_FORCE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("フォースのブレスを吐いた。", "You breathe force."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_FORCE), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_FORCE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BR_MANA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("魔力のブレスを吐いた。", "You breathe mana."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_MANA), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_MANA, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BALL_NUKE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("放射能球を放った。", "You cast a ball of radiation."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_NUKE), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_NUKE, dir, damage, 2);
break;
case MS_BR_NUKE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("放射性廃棄物のブレスを吐いた。", "You breathe toxic waste."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_NUKE), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_NUKE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BALL_CHAOS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("純ログルスを放った。", "You invoke a raw Logrus."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_CHAOS), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_CHAOS, dir, damage, 4);
break;
case MS_BR_DISI:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("分解のブレスを吐いた。", "You breathe disintegration."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BR_DISI), plev, DAM_ROLL);
fire_breath(caster_ptr, GF_DISINTEGRATE, dir, damage, (plev > 40 ? 3 : 2));
break;
case MS_BALL_ACID:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("アシッド・ボールの呪文を唱えた。", "You cast an acid ball."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_ACID), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_ACID, dir, damage, 2);
break;
case MS_BALL_ELEC:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("サンダー・ボールの呪文を唱えた。", "You cast a lightning ball."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_ELEC), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_ELEC, dir, damage, 2);
break;
case MS_BALL_FIRE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("ファイア・ボールの呪文を唱えた。", "You cast a fire ball."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_FIRE), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_FIRE, dir, damage, 2);
break;
case MS_BALL_COLD:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("アイス・ボールの呪文を唱えた。", "You cast a frost ball."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_COLD), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_COLD, dir, damage, 2);
break;
case MS_BALL_POIS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("悪臭雲の呪文を唱えた。", "You cast a stinking cloud."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_POIS), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_POIS, dir, damage, 2);
break;
case MS_BALL_NETHER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("地獄球の呪文を唱えた。", "You cast a nether ball."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_NETHER), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_NETHER, dir, damage, 2);
break;
case MS_BALL_WATER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("流れるような身振りをした。", "You gesture fluidly."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_WATER), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_WATER, dir, damage, 4);
break;
case MS_BALL_MANA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("魔力の嵐の呪文を念じた。", "You invoke a mana storm."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_MANA), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_MANA, dir, damage, 4);
break;
case MS_BALL_DARK:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("暗黒の嵐の呪文を念じた。", "You invoke a darkness storm."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BALL_DARK), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_DARK, dir, damage, 4);
break;
case MS_DRAIN_MANA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
damage = monspell_bluemage_damage(caster_ptr, (MS_DRAIN_MANA), plev, DAM_ROLL);
fire_ball_hide(caster_ptr, GF_DRAIN_MANA, dir, damage, 0);
break;
case MS_MIND_BLAST:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
damage = monspell_bluemage_damage(caster_ptr, (MS_MIND_BLAST), plev, DAM_ROLL);
fire_ball_hide(caster_ptr, GF_MIND_BLAST, dir, damage, 0);
break;
case MS_BRAIN_SMASH:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
damage = monspell_bluemage_damage(caster_ptr, (MS_BRAIN_SMASH), plev, DAM_ROLL);
fire_ball_hide(caster_ptr, GF_BRAIN_SMASH, dir, damage, 0);
break;
case MS_CAUSE_1:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_1), plev, DAM_ROLL);
fire_ball_hide(caster_ptr, GF_CAUSE_1, dir, damage, 0);
break;
case MS_CAUSE_2:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_2), plev, DAM_ROLL);
fire_ball_hide(caster_ptr, GF_CAUSE_2, dir, damage, 0);
break;
case MS_CAUSE_3:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_3), plev, DAM_ROLL);
fire_ball_hide(caster_ptr, GF_CAUSE_3, dir, damage, 0);
break;
case MS_CAUSE_4:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
damage = monspell_bluemage_damage(caster_ptr, (MS_CAUSE_4), plev, DAM_ROLL);
fire_ball_hide(caster_ptr, GF_CAUSE_4, dir, damage, 0);
break;
case MS_BOLT_ACID:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("アシッド・ボルトの呪文を唱えた。", "You cast an acid bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ACID), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_ACID, dir, damage);
break;
case MS_BOLT_ELEC:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("サンダー・ボルトの呪文を唱えた。", "You cast a lightning bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ELEC), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_ELEC, dir, damage);
break;
case MS_BOLT_FIRE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("ファイア・ボルトの呪文を唱えた。", "You cast a fire bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_FIRE), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_FIRE, dir, damage);
break;
case MS_BOLT_COLD:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("アイス・ボルトの呪文を唱えた。", "You cast a frost bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_COLD), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_COLD, dir, damage);
break;
case MS_STARBURST:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("スターバーストの呪文を念じた。", "You invoke a starburst."));
damage = monspell_bluemage_damage(caster_ptr, (MS_STARBURST), plev, DAM_ROLL);
fire_ball(caster_ptr, GF_LITE, dir, damage, 4);
break;
case MS_BOLT_NETHER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("地獄の矢の呪文を唱えた。", "You cast a nether bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_NETHER), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_NETHER, dir, damage);
break;
case MS_BOLT_WATER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("ウォーター・ボルトの呪文を唱えた。", "You cast a water bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_WATER), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_WATER, dir, damage);
break;
case MS_BOLT_MANA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("魔力の矢の呪文を唱えた。", "You cast a mana bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_MANA), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_MANA, dir, damage);
break;
case MS_BOLT_PLASMA:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("プラズマ・ボルトの呪文を唱えた。", "You cast a plasma bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_PLASMA), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_PLASMA, dir, damage);
break;
case MS_BOLT_ICE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("極寒の矢の呪文を唱えた。", "You cast a ice bolt."));
damage = monspell_bluemage_damage(caster_ptr, (MS_BOLT_ICE), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_ICE, dir, damage);
break;
case MS_MAGIC_MISSILE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("マジック・ミサイルの呪文を唱えた。", "You cast a magic missile."));
damage = monspell_bluemage_damage(caster_ptr, (MS_MAGIC_MISSILE), plev, DAM_ROLL);
fire_bolt(caster_ptr, GF_MISSILE, dir, damage);
break;
case MS_SCARE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("恐ろしげな幻覚を作り出した。", "You cast a fearful illusion."));
fear_monster(caster_ptr, dir, plev+10);
break;
case MS_BLIND:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
confuse_monster(caster_ptr, dir, plev * 2);
break;
case MS_CONF:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("誘惑的な幻覚をつくり出した。", "You cast a mesmerizing illusion."));
confuse_monster(caster_ptr, dir, plev * 2);
break;
case MS_SLOW:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
slow_monster(caster_ptr, dir, plev);
break;
case MS_SLEEP:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
sleep_monster(caster_ptr, dir, plev);
break;
case MS_SPEED:
break;
case MS_HAND_DOOM:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
fire_ball_hide(caster_ptr, GF_HAND_DOOM, dir, plev * 3, 0);
if (!target_set(caster_ptr, TARGET_KILL)) return FALSE;
if (!floor_ptr->grid_array[target_row][target_col].m_idx) break;
if (!player_has_los_bold(caster_ptr, target_row, target_col)) break;
- if (!projectable(floor_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
+ if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) break;
m_ptr = &floor_ptr->m_list[floor_ptr->grid_array[target_row][target_col].m_idx];
r_ptr = &r_info[m_ptr->r_idx];
monster_desc(m_name, m_ptr, 0);
break;
}
case MS_TELE_AWAY:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
(void)fire_beam(caster_ptr, GF_AWAY_ALL, dir, 100);
break;
break;
case MS_PSY_SPEAR:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
msg_print(_("光の剣を放った。", "You throw a psycho-spear."));
damage = monspell_bluemage_damage(caster_ptr, (MS_PSY_SPEAR), plev, DAM_ROLL);
dummy_hp = (m_ptr->hp + 1) / 2;
dummy_maxhp = m_ptr->maxhp / 2;
- if (floor_ptr->inside_arena || target_ptr->phase_out || !summon_possible(floor_ptr, m_ptr->fy, m_ptr->fx))
+ if (floor_ptr->inside_arena || target_ptr->phase_out || !summon_possible(target_ptr, m_ptr->fy, m_ptr->fx))
return -1;
delete_monster_idx(floor_ptr->grid_array[m_ptr->fy][m_ptr->fx].m_idx);
int count = 0;
for (int k = 0; k < 30; k++)
{
- if (!summon_possible(floor_ptr, cy, cx) || !cave_empty_bold(floor_ptr, cy, cx))
+ if (!summon_possible(target_ptr, cy, cx) || !cave_empty_bold(floor_ptr, cy, cx))
{
int j;
for (j = 100; j > 0; j--)
{
- scatter(floor_ptr, &cy, &cx, y, x, 2, 0);
+ scatter(target_ptr, &cy, &cx, y, x, 2, 0);
if (cave_empty_bold(floor_ptr, cy, cx)) break;
}
switch (power)
{
case MUT1_SPIT_ACID:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
stop_mouth(creature_ptr);
msg_print(_("酸を吐きかけた...", "You spit acid..."));
fire_ball(creature_ptr, GF_ACID, dir, lvl, 1 + (lvl / 30));
break;
case MUT1_BR_FIRE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
stop_mouth(creature_ptr);
msg_print(_("あなたは火炎のブレスを吐いた...", "You breathe fire..."));
fire_breath(creature_ptr, GF_FIRE, dir, lvl * 2, 1 + (lvl / 20));
break;
case MUT1_HYPN_GAZE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
msg_print(_("あなたの目は幻惑的になった...", "Your eyes look mesmerizing..."));
(void)charm_monster(creature_ptr, dir, lvl);
break;
case MUT1_TELEKINES:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
msg_print(_("集中している...", "You concentrate..."));
fetch(creature_ptr, dir, lvl * 10, TRUE);
break;
break;
case MUT1_MIND_BLST:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
msg_print(_("集中している...", "You concentrate..."));
fire_bolt(creature_ptr, GF_PSI, dir, damroll(3 + ((lvl - 1) / 5), 3));
break;
case MUT1_SWAP_POS:
project_length = -1;
- if (!get_aim_dir(&dir))
+ if (!get_aim_dir(creature_ptr, &dir))
{
project_length = 0;
return FALSE;
break;
case MUT1_LASER_EYE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
fire_beam(creature_ptr, GF_LITE, dir, 2 * lvl);
break;
* the object can combine, stack, or be placed. Artifacts will try very\n
* hard to be placed, including "teleporting" to a useful grid if needed.\n
*/
-OBJECT_IDX drop_near(player_type *owner_type, object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION x)
+OBJECT_IDX drop_near(player_type *owner_ptr, object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION x)
{
int i, k, d, s;
/* Default */
by = y;
bx = x;
- floor_type *floor_ptr = owner_type->current_floor_ptr;
+ floor_type *floor_ptr = owner_ptr->current_floor_ptr;
/* Scan local grids */
for (dy = -3; dy <= 3; dy++)
{
if (!in_bounds(floor_ptr, ty, tx)) continue;
/* Require line of projection */
- if (!projectable(floor_ptr, y, x, ty, tx)) continue;
+ if (!projectable(owner_ptr, y, x, ty, tx)) continue;
/* Obtain grid */
g_ptr = &floor_ptr->grid_array[ty][tx];
/* Mega-Hack -- no message if "dropped" by player */
/* Message when an object falls under the player */
- if (chance && player_bold(owner_type, by, bx))
+ if (chance && player_bold(owner_ptr, by, bx))
{
msg_print(_("何かが足下に転がってきた。", "You feel something roll beneath your feet."));
}
while (to_ruin--)
{
- scatter(floor_ptr, &r_y, &r_x, creature_ptr->y, creature_ptr->x, 4, 0);
+ scatter(creature_ptr, &r_y, &r_x, creature_ptr->y, creature_ptr->x, 4, 0);
if (pattern_tile(r_y, r_x) &&
(f_info[floor_ptr->grid_array[r_y][r_x].feat].subtype != PATTERN_TILE_WRECKED))
while (cave_perma_bold(floor_ptr, y, x) || floor_ptr->grid_array[y][x].o_idx || (floor_ptr->grid_array[y][x].info & CAVE_OBJECT))
{
/* Pick a location */
- scatter(floor_ptr, &ny, &nx, y, x, 1, 0);
+ scatter(player_ptr, &ny, &nx, y, x, 1, 0);
/* Stagger */
y = ny; x = nx;
}
case CLASS_PALADIN:
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
fire_beam(creature_ptr, is_good_realm(creature_ptr->realm1) ? GF_HOLY_FIRE : GF_HELL_FIRE,
dir, plev * 3);
break;
{
if (command == -3)
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
project_length = 1;
fire_beam(creature_ptr, GF_PHOTO, dir, 1);
}
{
if (command == -3)
{
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
(void)fire_ball_hide(creature_ptr, GF_CHARM_LIVING, dir, creature_ptr->lev, 0);
}
else if (command == -4)
break;
case RACE_HALF_GIANT:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
(void)wall_to_mud(creature_ptr, dir, 20 + randint1(30));
break;
break;
case RACE_CYCLOPS:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
msg_print(_("巨大な岩を投げた。", "You throw a huge boulder."));
fire_bolt(creature_ptr, GF_MISSILE, dir, (3 * plev) / 2);
break;
case RACE_YEEK:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
stop_mouth(creature_ptr);
msg_print(_("身の毛もよだつ叫び声を上げた!", "You make a horrible scream!"));
(void)fear_monster(creature_ptr, dir, plev);
break;
case RACE_KLACKON:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
stop_mouth(creature_ptr);
msg_print(_("酸を吐いた。", "You spit acid."));
if (plev < 25) fire_bolt(creature_ptr, GF_ACID, dir, plev);
break;
case RACE_KOBOLD:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
msg_print(_("毒のダーツを投げた。", "You throw a dart of poison."));
fire_bolt(creature_ptr, GF_POIS, dir, plev);
break;
break;
case RACE_DARK_ELF:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
msg_print(_("マジック・ミサイルを放った。", "You cast a magic missile."));
fire_bolt_or_beam(creature_ptr, 10, GF_MISSILE, dir, damroll(3 + ((plev - 1) / 5), 4));
break;
break;
case RACE_MIND_FLAYER:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
msg_print(_("あなたは集中し、目が赤く輝いた...", "You concentrate and your eyes glow red..."));
fire_bolt(creature_ptr, GF_PSI, dir, plev);
break;
case RACE_IMP:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
if (plev >= 30)
{
msg_print(_("ファイア・ボールを放った。", "You cast a ball of fire."));
break;
case RACE_SPECTRE:
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
stop_mouth(creature_ptr);
msg_print(_("あなたはおどろおどろしい叫び声をあげた!", "You emit an eldritch howl!"));
(void)fear_monster(creature_ptr, dir, plev);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr) - 10, GF_ELEC, dir, damroll(dice, sides));
}
{
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
wizard_lock(caster_ptr, dir);
}
{
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
destroy_door(caster_ptr, dir);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
wall_to_mud(caster_ptr, dir, 20 + randint1(30));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
msg_print(_("光線が放たれた。", "A line of light appears."));
lite_line(caster_ptr, dir, damroll(6, 8));
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_beam(caster_ptr, GF_AWAY_ALL, dir, power);
}
{
int type;
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
switch (randint1(4))
{
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr) - 10, GF_MISSILE, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_MISSILE, dir, damroll(dice, sides) + base, rad);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_FIRE, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_DISINTEGRATE, dir, damroll(dice, sides), 0);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
cast_wonder(caster_ptr, dir);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_CHAOS, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_beam(caster_ptr, GF_MANA, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_FIRE, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_beam(caster_ptr, GF_AWAY_ALL, dir, power);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_CHAOS, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
poly_monster(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_DISINTEGRATE, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
msg_print(_("ロケット発射!", "You launch a rocket!"));
fire_rocket(caster_ptr, GF_ROCKET, dir, dam, rad);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_beam(caster_ptr, GF_GRAVITY, dir, damroll(dice, sides));
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_MANA, dir, dam, rad);
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_CHAOS, dir, dam, rad);
}
if (info) return info_damage(dice, sides, 0);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr) - 10, GF_ELEC, dir, damroll(dice, sides));
}
}
if (info) return info_power(power);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fear_monster(caster_ptr, dir, power);
}
}
if (info) return info_multi_damage_dice(dice, sides);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_blast(caster_ptr, GF_LITE, dir, dice, sides, 10, 3);
}
}
if (info) return info_power(power);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_AWAY_EVIL, dir, power, 0);
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_HOLY_FIRE, dir, damroll(dice, sides) + base, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt(caster_ptr, GF_ELEC, dir, dam);
}
}
{
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
destroy_door(caster_ptr, dir);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
stasis_evil(caster_ptr, dir);
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_LITE, dir, dam, rad);
}
while (attempt--)
{
- scatter(caster_ptr->current_floor_ptr, &my, &mx, caster_ptr->y, caster_ptr->x, 4, 0);
+ scatter(caster_ptr, &my, &mx, caster_ptr->y, caster_ptr->x, 4, 0);
/* Require empty grids */
if (cave_empty_bold2(caster_ptr->current_floor_ptr, my, mx)) break;
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr) - 10, GF_MISSILE, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fear_monster(caster_ptr, dir, power);
stun_monster(caster_ptr, dir, power);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_NETHER, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_HELL_FIRE, dir, damroll(dice, sides) + base, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
control_one_demon(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_PLASMA, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_FIRE, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_NETHER, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_PLASMA, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_NEXUS, dir, dam, rad);
}
}
{
if (cast)
{
- if (!get_aim_dir(&dir))
+ if (!get_aim_dir(caster_ptr, &dir))
return NULL;
else
msg_print(_("<破滅の手>を放った!", "You invoke the Hand of Doom!"));
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_NETHER, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball_hide(caster_ptr, GF_BLOOD_CURSE, dir, dam, rad);
take_hit(caster_ptr, DAMAGE_USELIFE, 20 + randint1(30), _("血の呪い", "Blood curse"), -1);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
/*
* A radius-0 ball may (1) be aimed at
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_POIS, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
sleep_monster(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fear_monster(caster_ptr, dir, plev);
stun_monster(caster_ptr, dir, plev);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
control_one_undead(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_HYPODYNAMIA, dir, damroll(dice, sides) + base, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_NETHER, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball_hide(caster_ptr, GF_GENOCIDE, dir, power, 0);
}
{
HIT_POINT dam = base + damroll(dice, sides);
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
if (hypodynamic_bolt(caster_ptr, dir, dam))
{
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
cast_invoke_spirits(caster_ptr, dir);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr), GF_DARK, dir, damroll(dice, sides));
}
{
int i;
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
chg_virtue(caster_ptr, V_SACRIFICE, -1);
chg_virtue(caster_ptr, V_VITALITY, -1);
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_DARK, dir, dam, rad);
}
{
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
death_ray(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_HELL_FIRE, dir, dam, rad);
take_hit(caster_ptr, DAMAGE_USELIFE, 20 + randint1(30), _("地獄の劫火の呪文を唱えた疲労", "the strain of casting Hellfire"), -1);
do
{
msg_print(_("復讐の時だ!", "Time to revenge!"));
- } while (!get_aim_dir(&dir));
+ } while (!get_aim_dir(caster_ptr, &dir));
fire_ball(caster_ptr, GF_HELL_FIRE, dir, power, 1);
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);
}
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++)
{
if (!cave_player_teleportable_bold(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;
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball_hide(caster_ptr, GF_WOUNDS, dir, damroll(dice, sides), 0);
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball_hide(caster_ptr, GF_WOUNDS, dir, damroll(dice, sides), 0);
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball_hide(caster_ptr, GF_WOUNDS, dir, damroll(dice, sides), 0);
}
}
{
project_length = range;
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_beam(caster_ptr, GF_ELEC, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
charm_animal(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
wall_to_mud(caster_ptr, dir, 20 + randint1(30));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr) - 10, GF_COLD, dir, damroll(dice, sides));
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt_or_beam(caster_ptr, beam_chance(caster_ptr) - 10, GF_FIRE, dir, damroll(dice, sides));
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
msg_print(_("太陽光線が現れた。", "A line of sunlight appears."));
lite_line(caster_ptr, dir, damroll(6, 8));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_COLD, dir, dam, rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_ELEC, dir, dam, rad);
break;
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_WATER, dir, dam, rad);
}
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_bolt(caster_ptr, GF_SOUND, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_beam(caster_ptr, GF_SOUND, dir, damroll(dice, sides));
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_ball(caster_ptr, GF_SOUND, dir, damroll(dice, sides), rad);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
confuse_monster(caster_ptr, dir, power);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
sleep_monster(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
slow_monster(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_beam(caster_ptr, GF_AWAY_ALL, dir, power);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
charm_monster(caster_ptr, dir, plev);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fetch(caster_ptr, dir, weight, FALSE);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fire_beam(caster_ptr, GF_AWAY_ALL, dir, power);
}
if (cast)
{
- if (!get_aim_dir(&dir)) return NULL;
+ if (!get_aim_dir(caster_ptr, &dir)) return NULL;
fetch(caster_ptr, dir, weight, FALSE);
}
bool old_target_pet = target_pet;
target_pet = TRUE;
- result = get_aim_dir(&dir);
+ result = get_aim_dir(caster_ptr, &dir);
/* Restore target_pet option */
target_pet = old_target_pet;
/* HACK -- No range limit */
project_length = -1;
- result = get_aim_dir(&dir);
+ result = get_aim_dir(caster_ptr, &dir);
/* Restore range to default */
project_length = 0;
bool old_target_pet = target_pet;
target_pet = TRUE;
- result = get_aim_dir(&dir);
+ result = get_aim_dir(caster_ptr, &dir);
/* Restore target_pet option */
target_pet = old_target_pet;
place_object(player_ptr, yval, xval, 0L);
/* Let's guard the treasure well */
- vault_monsters(floor_ptr, yval, xval, randint0(2) + 3);
+ vault_monsters(player_ptr, yval, xval, randint0(2) + 3);
/* Traps naturally */
vault_traps(player_ptr, yval, xval, 4, 4, randint0(3) + 2);
}
/* Place a monster in the room */
- vault_monsters(floor_ptr, yval, xval, 1);
+ vault_monsters(player_ptr, yval, xval, 1);
break;
}
}
/* Monsters to guard the "treasure" */
- vault_monsters(floor_ptr, yval, xval, randint1(3) + 2);
+ vault_monsters(player_ptr, yval, xval, randint1(3) + 2);
/* Object (80%) */
if (randint0(100) < 80)
place_secret_door(player_ptr, yval - 3 + (randint1(2) * 2), xval + 3, door_type);
/* Monsters */
- vault_monsters(floor_ptr, yval, xval - 2, randint1(2));
- vault_monsters(floor_ptr, yval, xval + 2, randint1(2));
+ vault_monsters(player_ptr, yval, xval - 2, randint1(2));
+ vault_monsters(player_ptr, yval, xval + 2, randint1(2));
/* Objects */
if (one_in_(3)) place_object(player_ptr, yval, xval - 2, 0L);
}
/* Monsters just love mazes. */
- vault_monsters(floor_ptr, yval, xval - 5, randint1(3));
- vault_monsters(floor_ptr, yval, xval + 5, randint1(3));
+ vault_monsters(player_ptr, yval, xval - 5, randint1(3));
+ vault_monsters(player_ptr, yval, xval + 5, randint1(3));
/* Traps make them entertaining. */
vault_traps(player_ptr, yval, xval - 3, 2, 8, randint1(3));
vault_objects(player_ptr, yval, xval, 2 + randint1(2));
/* Gotta have some monsters. */
- vault_monsters(floor_ptr, yval + 1, xval - 4, randint1(4));
- vault_monsters(floor_ptr, yval + 1, xval + 4, randint1(4));
- vault_monsters(floor_ptr, yval - 1, xval - 4, randint1(4));
- vault_monsters(floor_ptr, yval - 1, xval + 4, randint1(4));
+ vault_monsters(player_ptr, yval + 1, xval - 4, randint1(4));
+ vault_monsters(player_ptr, yval + 1, xval + 4, randint1(4));
+ vault_monsters(player_ptr, yval - 1, xval - 4, randint1(4));
+ vault_monsters(player_ptr, yval - 1, xval + 4, randint1(4));
break;
}
place_object(player_ptr, y0, x0, 0L);
/* Let's guard the treasure well */
- vault_monsters(floor_ptr, y0, x0, randint0(2) + 3);
+ vault_monsters(player_ptr, y0, x0, randint0(2) + 3);
/* Traps naturally */
vault_traps(player_ptr, y0, x0, 4, 4, randint0(3) + 2);
m_ptr = &kohmon_ptr->current_floor_ptr->m_list[i];
if (!monster_is_valid(m_ptr)) continue;
if (!((m_ptr->r_idx == MON_SUKE) || (m_ptr->r_idx == MON_KAKU))) continue;
- if (!los(kohmon_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, kohmon_ptr->y, kohmon_ptr->x)) continue;
- if (!projectable(kohmon_ptr->current_floor_ptr, m_ptr->fy, m_ptr->fx, kohmon_ptr->y, kohmon_ptr->x)) continue;
+ if (!los(kohmon_ptr, m_ptr->fy, m_ptr->fx, kohmon_ptr->y, kohmon_ptr->x)) continue;
+ if (!projectable(kohmon_ptr, m_ptr->fy, m_ptr->fx, kohmon_ptr->y, kohmon_ptr->x)) continue;
count++;
break;
}
/* spells1.c */
extern bool in_disintegration_range(floor_type *floor_ptr, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
-extern void breath_shape(floor_type *floor_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ);
+extern void breath_shape(player_type *caster_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ);
extern POSITION dist_to_line(POSITION y, POSITION x, POSITION y1, POSITION x1, POSITION y2, POSITION x2);
#define PROJECT_WHO_UNCTRL_POWER -1 /*!< 魔法効果の自然発生要因: 名状し難い力の解放 */
/*!
* @brief 汎用的なビーム/ボルト/ボール系によるモンスターへの効果処理 / Handle a beam/bolt/ball causing damage to a monster.
+ * @param caster_ptr プレーヤーへの参照ポインタ
* @param who 魔法を発動したモンスター(0ならばプレイヤー) / Index of "source" monster (zero for "player")
* @param r 効果半径(ビーム/ボルト = 0 / ボール = 1以上) / Radius of explosion (0 = beam/bolt, 1 to 9 = ball)
* @param y 目標Y座標 / Target y location (or location to travel "towards")
* "flg" was added.
* </pre>
*/
-
-
-static bool project_m(player_type *caster_ptr, floor_type *floor_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, bool see_s_msg)
+static bool project_m(player_type *caster_ptr, MONSTER_IDX who, POSITION r, POSITION y, POSITION x, HIT_POINT dam, EFFECT_ID typ, BIT_FLAGS flg, bool see_s_msg)
{
int tmp;
+ floor_type *floor_ptr = caster_ptr->current_floor_ptr;
grid_type *g_ptr = &floor_ptr->grid_array[y][x];
monster_type *m_ptr = &floor_ptr->m_list[g_ptr->m_idx];
if (seen) obvious = TRUE;
/* PSI only works if the monster can see you! -- RG */
- if (!(los(floor_ptr, m_ptr->fy, m_ptr->fx, caster_ptr->y, caster_ptr->x)))
+ if (!(los(caster_ptr, m_ptr->fy, m_ptr->fx, caster_ptr->y, caster_ptr->x)))
{
if (seen_msg)
msg_format(_("%sはあなたが見えないので影響されない!", "%^s can't see you, and isn't affected!"), m_name);
t_y = target_ptr->current_floor_ptr->m_list[who].fy - 1 + randint1(3);
t_x = target_ptr->current_floor_ptr->m_list[who].fx - 1 + randint1(3);
max_attempts--;
- } while (max_attempts && in_bounds2u(target_ptr->current_floor_ptr, t_y, t_x) && !projectable(target_ptr->current_floor_ptr, target_ptr->y, target_ptr->x, t_y, t_x));
+ } while (max_attempts && in_bounds2u(target_ptr->current_floor_ptr, t_y, t_x) && !projectable(target_ptr, target_ptr->y, target_ptr->x, t_y, t_x));
if (max_attempts < 1)
{
/*
* breath shape
*/
-void breath_shape(floor_type *floor_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ)
+void breath_shape(player_type *caster_ptr, u16b *path_g, int dist, int *pgrids, POSITION *gx, POSITION *gy, POSITION *gm, POSITION *pgm_rad, POSITION rad, POSITION y1, POSITION x1, POSITION y2, POSITION x2, EFFECT_ID typ)
{
POSITION by = y1;
POSITION bx = x1;
int path_n = 0;
int mdis = distance(y1, x1, y2, x2) + rad;
+ floor_type *floor_ptr = caster_ptr->current_floor_ptr;
while (bdis <= mdis)
{
POSITION x, y;
case GF_LITE:
case GF_LITE_WEAK:
/* Lights are stopped by opaque terrains */
- if (!los(floor_ptr, by, bx, y, x)) continue;
+ if (!los(caster_ptr, by, bx, y, x)) continue;
break;
case GF_DISINTEGRATE:
/* Disintegration are stopped only by perma-walls */
break;
default:
/* Ball explosions are stopped by walls */
- if (!projectable(floor_ptr, by, bx, y, x)) continue;
+ if (!projectable(caster_ptr, by, bx, y, x)) continue;
break;
}
/* Calculate the projection path */
- path_n = project_path(caster_ptr->current_floor_ptr, path_g, (project_length ? project_length : MAX_RANGE), y1, x1, y2, x2, flg);
+ path_n = project_path(caster_ptr, path_g, (project_length ? project_length : MAX_RANGE), y1, x1, y2, x2, flg);
handle_stuff(caster_ptr);
/* Giga-Hack SEEKER & SUPER_RAY */
remove_mirror(caster_ptr, y, x);
next_mirror(caster_ptr, &oy, &ox, y, x);
- path_n = i + project_path(caster_ptr->current_floor_ptr, &(path_g[i + 1]), (project_length ? project_length : MAX_RANGE), y, x, oy, ox, flg);
+ path_n = i + project_path(caster_ptr, &(path_g[i + 1]), (project_length ? project_length : MAX_RANGE), y, x, oy, ox, flg);
for (j = last_i; j <= i; j++)
{
y = GRID_Y(path_g[j]);
x = GRID_X(path_g[j]);
- if (project_m(caster_ptr, caster_ptr->current_floor_ptr, 0, 0, y, x, dam, GF_SEEKER, flg, TRUE)) notice = TRUE;
+ if (project_m(caster_ptr, 0, 0, y, x, dam, GF_SEEKER, flg, TRUE)) notice = TRUE;
if (!who && (project_m_n == 1) && !jump) {
if (caster_ptr->current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0)
{
POSITION py, px;
py = GRID_Y(path_g[i]);
px = GRID_X(path_g[i]);
- if (project_m(caster_ptr, caster_ptr->current_floor_ptr, 0, 0, py, px, dam, GF_SEEKER, flg, TRUE))
+ if (project_m(caster_ptr, 0, 0, py, px, dam, GF_SEEKER, flg, TRUE))
notice = TRUE;
if (!who && (project_m_n == 1) && !jump) {
if (caster_ptr->current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0)
path_n = i;
second_step = i + 1;
- path_n += project_path(caster_ptr->current_floor_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y - 1, x - 1, flg);
- path_n += project_path(caster_ptr->current_floor_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y - 1, x, flg);
- path_n += project_path(caster_ptr->current_floor_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y - 1, x + 1, flg);
- path_n += project_path(caster_ptr->current_floor_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y, x - 1, flg);
- path_n += project_path(caster_ptr->current_floor_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y, x + 1, flg);
- path_n += project_path(caster_ptr->current_floor_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y + 1, x - 1, flg);
- path_n += project_path(caster_ptr->current_floor_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y + 1, x, flg);
- path_n += project_path(caster_ptr->current_floor_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y + 1, x + 1, flg);
+ path_n += project_path(caster_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y - 1, x - 1, flg);
+ path_n += project_path(caster_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y - 1, x, flg);
+ path_n += project_path(caster_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y - 1, x + 1, flg);
+ path_n += project_path(caster_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y, x - 1, flg);
+ path_n += project_path(caster_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y, x + 1, flg);
+ path_n += project_path(caster_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y + 1, x - 1, flg);
+ path_n += project_path(caster_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y + 1, x, flg);
+ path_n += project_path(caster_ptr, &(path_g[path_n + 1]), (project_length ? project_length : MAX_RANGE), y, x, y + 1, x + 1, flg);
}
}
{
POSITION py = GRID_Y(path_g[i]);
POSITION px = GRID_X(path_g[i]);
- (void)project_m(caster_ptr, caster_ptr->current_floor_ptr, 0, 0, py, px, dam, GF_SUPER_RAY, flg, TRUE);
+ (void)project_m(caster_ptr, 0, 0, py, px, dam, GF_SUPER_RAY, flg, TRUE);
if (!who && (project_m_n == 1) && !jump) {
if (caster_ptr->current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx > 0) {
monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[caster_ptr->current_floor_ptr->grid_array[project_m_y][project_m_x].m_idx];
{
flg &= ~(PROJECT_HIDE);
- breath_shape(caster_ptr->current_floor_ptr, path_g, dist, &grids, gx, gy, gm, &gm_rad, rad, y1, x1, by, bx, typ);
+ breath_shape(caster_ptr, path_g, dist, &grids, gx, gy, gm, &gm_rad, rad, y1, x1, by, bx, typ);
}
else
{
case GF_LITE:
case GF_LITE_WEAK:
/* Lights are stopped by opaque terrains */
- if (!los(caster_ptr->current_floor_ptr, by, bx, y, x)) continue;
+ if (!los(caster_ptr, by, bx, y, x)) continue;
break;
case GF_DISINTEGRATE:
/* Disintegration are stopped only by perma-walls */
break;
default:
/* Ball explosions are stopped by walls */
- if (!projectable(caster_ptr->current_floor_ptr, by, bx, y, x)) continue;
+ if (!projectable(caster_ptr, by, bx, y, x)) continue;
break;
}
if (flg & PROJECT_KILL)
{
see_s_msg = (who > 0) ? is_seen(&caster_ptr->current_floor_ptr->m_list[who]) :
- (!who ? TRUE : (player_can_see_bold(caster_ptr, y1, x1) && projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, y1, x1)));
+ (!who ? TRUE : (player_can_see_bold(caster_ptr, y1, x1) && projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y1, x1)));
}
/* Check features */
t_y = y_saver - 1 + randint1(3);
t_x = x_saver - 1 + randint1(3);
max_attempts--;
- } while (max_attempts && in_bounds2u(caster_ptr->current_floor_ptr, t_y, t_x) && !projectable(caster_ptr->current_floor_ptr, y, x, t_y, t_x));
+ } while (max_attempts && in_bounds2u(caster_ptr->current_floor_ptr, t_y, t_x) && !projectable(caster_ptr, y, x, t_y, t_x));
if (max_attempts < 1)
{
}
/* Affect the monster in the grid */
- if (project_m(caster_ptr, caster_ptr->current_floor_ptr, who, effective_dist, y, x, dam, typ, flg, see_s_msg)) notice = TRUE;
+ if (project_m(caster_ptr, who, effective_dist, y, x, dam, typ, flg, see_s_msg)) notice = TRUE;
}
distance(caster_ptr->y, caster_ptr->x, y, x) <= MAX_RANGE &&
distance(caster_ptr->y, caster_ptr->x, y, x) != 0 &&
player_has_los_bold(caster_ptr, y, x) &&
- 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))
{
mirror_y[mirror_num] = y;
mirror_x[mirror_num] = x;
centersign*((point_x[2] - x)*(point_y[0] - y)
- (point_y[2] - y)*(point_x[0] - x)) >= 0)
{
- if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, y, x))
+ if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y, x))
{
/* Visual effects */
if (!(caster_ptr->blind)
centersign*((point_x[2] - x)*(point_y[0] - y)
- (point_y[2] - y)*(point_x[0] - x)) >= 0)
{
- if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, y, x))
+ if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y, x))
{
(void)project_f(caster_ptr, 0, 0, y, x, dam, GF_MANA);
}
centersign*((point_x[2] - x)*(point_y[0] - y)
- (point_y[2] - y)*(point_x[0] - x)) >= 0)
{
- if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, y, x))
+ if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y, x))
{
(void)project_o(caster_ptr, 0, 0, y, x, dam, GF_MANA);
}
centersign*((point_x[2] - x)*(point_y[0] - y)
- (point_y[2] - y)*(point_x[0] - x)) >= 0)
{
- if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, y, x))
+ if (player_has_los_bold(caster_ptr, y, x) && projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y, x))
{
- (void)project_m(caster_ptr, caster_ptr->current_floor_ptr, 0, 0, y, x, dam, GF_MANA,
+ (void)project_m(caster_ptr, 0, 0, y, x, dam, GF_MANA,
(PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP), TRUE);
}
}
if (!is_mirror_grid(&caster_ptr->current_floor_ptr->grid_array[y][x]))
continue;
- if (!project_m(caster_ptr, caster_ptr->current_floor_ptr, 0, 0, y, x, dam, GF_GENOCIDE,
+ if (!project_m(caster_ptr, 0, 0, y, x, dam, GF_GENOCIDE,
(PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP), TRUE))
continue;
x = m_ptr->fx;
/* Require line of sight */
- if (!player_has_los_bold(caster_ptr, y, x) || !projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, y, x)) continue;
+ if (!player_has_los_bold(caster_ptr, y, x) || !projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y, x)) continue;
/* Mark the monster */
m_ptr->mflag |= (MFLAG_LOS);
while (attempts--)
{
- scatter(caster_ptr->current_floor_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, PROJECT_LOS);
+ scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, PROJECT_LOS);
if (!cave_have_flag_bold(caster_ptr->current_floor_ptr, y, x, FF_PROJECT)) continue;
if (!player_bold(caster_ptr, y, x)) break;
}
POSITION ty = caster_ptr->y + 99 * ddy[dir];
/* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(caster_ptr))
{
flg &= ~(PROJECT_STOP);
tx = target_col;
POSITION ty = caster_ptr->y + 99 * ddy[dir];
/* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(caster_ptr))
{
tx = target_col;
ty = target_row;
POSITION ty = caster_ptr->y + 99 * ddy[dir];
BIT_FLAGS flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(caster_ptr))
{
flg &= ~(PROJECT_STOP);
tx = target_col;
bool teleport_swap(player_type *caster_ptr, DIRECTION dir)
{
POSITION tx, ty;
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(caster_ptr))
{
tx = target_col;
ty = target_row;
POSITION tx = caster_ptr->x + ddx[dir];
POSITION ty = caster_ptr->y + ddy[dir];
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(caster_ptr))
{
tx = target_col;
ty = target_row;
return;
}
- if (!get_aim_dir(&dir)) return;
+ if (!get_aim_dir(caster_ptr, &dir)) return;
if (line_chaos)
fire_beam(caster_ptr, chaos_type, dir, 250);
else
{
while (attempts--)
{
- scatter(caster_ptr->current_floor_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, 0);
+ scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 4, 0);
if (!cave_have_flag_bold(caster_ptr->current_floor_ptr, y, x, FF_PROJECT)) continue;
{
while (TRUE)
{
- scatter(caster_ptr->current_floor_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 10, 0);
+ scatter(caster_ptr, &y, &x, caster_ptr->y, caster_ptr->x, 10, 0);
if (!player_bold(caster_ptr, y, x)) break;
}
project_length = 5;
DIRECTION dir;
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(attacker_ptr, &dir)) return FALSE;
/* Use the given direction */
int tx = attacker_ptr->x + project_length * ddx[dir];
int ty = attacker_ptr->y + project_length * ddy[dir];
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(attacker_ptr))
{
tx = target_col;
ty = target_row;
if (in_bounds(floor_ptr, ty, tx)) tm_idx = floor_ptr->grid_array[ty][tx].m_idx;
u16b path_g[32];
- int path_n = project_path(floor_ptr, path_g, project_length, attacker_ptr->y, attacker_ptr->x, ty, tx, PROJECT_STOP | PROJECT_KILL);
+ int path_n = project_path(attacker_ptr, path_g, project_length, attacker_ptr->y, attacker_ptr->x, ty, tx, PROJECT_STOP | PROJECT_KILL);
project_length = 0;
/* No need to move */
if (d >= 9) continue;
floor_type *floor_ptr = caster_ptr->current_floor_ptr;
- if (!in_bounds(floor_ptr, y, x) || !projectable(floor_ptr, caster_ptr->y, caster_ptr->x, y, x)
+ if (!in_bounds(floor_ptr, y, x) || !projectable(caster_ptr, caster_ptr->y, caster_ptr->x, y, x)
|| !cave_have_flag_bold(floor_ptr, y, x, FF_PROJECT)) continue;
break;
bool cast_wrath_of_the_god(player_type *caster_ptr, HIT_POINT dam, POSITION rad)
{
DIRECTION dir;
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
/* Use the given direction */
POSITION tx = caster_ptr->x + 99 * ddx[dir];
POSITION ty = caster_ptr->y + 99 * ddy[dir];
/* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(caster_ptr))
{
tx = target_col;
ty = target_row;
{
msg_print(_("《恋人》だ。", "It's the Lovers."));
- if (get_aim_dir(&dir))
+ if (get_aim_dir(caster_ptr, &dir))
{
charm_monster(caster_ptr, dir, MIN(caster_ptr->lev, 20));
}
concptr Type_desc = ((Type == GF_COLD) ? _("冷気", "cold") : _("炎", "fire"));
DIRECTION dir;
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
if (randint1(100) < creature_ptr->lev)
{
bool android_inside_weapon(player_type *creature_ptr)
{
DIRECTION dir;
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
if (creature_ptr->lev < 10)
{
{
DIRECTION dir;
int type = (one_in_(2) ? GF_NETHER : GF_FIRE);
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(creature_ptr, &dir)) return FALSE;
stop_mouth(creature_ptr);
msg_format(_("あなたは%sのブレスを吐いた。", "You breathe %s."), ((type == GF_NETHER) ? _("地獄", "nether") : _("火炎", "fire")));
fire_breath(creature_ptr, type, dir, creature_ptr->lev * 3, (creature_ptr->lev / 15) + 1);
is_followable &= old_cdis <= MAX_SIGHT;
is_followable &= !current_world_ptr->timewalk_m_idx;
is_followable &= !tracer_ptr->phase_out;
- is_followable &= los(tracer_ptr->current_floor_ptr, tracer_ptr->y, tracer_ptr->x, oldfy, oldfx);
+ is_followable &= los(tracer_ptr, tracer_ptr->y, tracer_ptr->x, oldfy, oldfx);
if (!is_followable) return;
bool follow = FALSE;
MONSTER_IDX target_m_idx = caster_ptr->current_floor_ptr->grid_array[target_row][target_col].m_idx;
if (!target_m_idx) return TRUE;
if (!player_has_los_bold(caster_ptr, target_row, target_col)) return TRUE;
- if (!projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) return TRUE;
+ if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, target_row, target_col)) return TRUE;
monster_type *m_ptr;
monster_race *r_ptr;
}
POSITION ty, tx;
- if (dir == 5 && target_okay())
+ if (dir == 5 && target_okay(caster_ptr))
{
tx = target_col;
ty = target_row;
msg_print(_("そこはあなたの視界に入っていません。", "You have no direct line of sight to that location."));
return;
}
- else if (!projectable(caster_ptr->current_floor_ptr, caster_ptr->y, caster_ptr->x, ty, tx))
+ else if (!projectable(caster_ptr, caster_ptr->y, caster_ptr->x, ty, tx))
{
msg_print(_("そこは壁の向こうです。", "You have no direct line of sight to that location."));
return;
project_length = 1;
DIRECTION dir;
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(caster_ptr, &dir)) return FALSE;
POSITION y = caster_ptr->y + ddy[dir];
POSITION x = caster_ptr->x + ddx[dir];
bool fire_crimson(player_type *shooter_ptr)
{
DIRECTION dir;
- if (!get_aim_dir(&dir)) return FALSE;
+ if (!get_aim_dir(shooter_ptr, &dir)) return FALSE;
/* Use the given direction */
POSITION tx = shooter_ptr->x + 99 * ddx[dir];
POSITION ty = shooter_ptr->y + 99 * ddy[dir];
/* Hack -- Use an actual "target" */
- if ((dir == 5) && target_okay())
+ if ((dir == 5) && target_okay(shooter_ptr))
{
tx = target_col;
ty = target_row;
* Future versions may restrict the ability to target "trappers"
* and "mimics", but the semantics is a little bit weird.
*/
-bool target_able(MONSTER_IDX m_idx)
+bool target_able(player_type *creature_ptr, MONSTER_IDX m_idx)
{
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[m_idx];
+ floor_type *floor_ptr = creature_ptr->current_floor_ptr;
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
/* Monster must be alive */
if (!monster_is_valid(m_ptr)) return FALSE;
/* Hack -- no targeting hallucinations */
- if (p_ptr->image) return FALSE;
+ if (creature_ptr->image) return FALSE;
/* Monster must be visible */
if (!m_ptr->ml) return FALSE;
- if (p_ptr->riding && (p_ptr->riding == m_idx)) return TRUE;
+ if (creature_ptr->riding && (creature_ptr->riding == m_idx)) return TRUE;
/* Monster must be projectable */
- if (!projectable(p_ptr->current_floor_ptr, p_ptr->y, p_ptr->x, m_ptr->fy, m_ptr->fx)) return FALSE;
+ if (!projectable(creature_ptr, creature_ptr->y, creature_ptr->x, m_ptr->fy, m_ptr->fx)) return FALSE;
/* Hack -- Never target trappers */
/* if (CLEAR_ATTR && (CLEAR_CHAR)) return FALSE; */
*
* We return TRUE if the target is "okay" and FALSE otherwise.
*/
-bool target_okay(void)
+bool target_okay(player_type *creature_ptr)
{
/* Accept stationary targets */
if (target_who < 0) return TRUE;
if (target_who > 0)
{
/* Accept reasonable targets */
- if (target_able(target_who))
+ if (target_able(creature_ptr, target_who))
{
- monster_type *m_ptr = &p_ptr->current_floor_ptr->m_list[target_who];
+ monster_type *m_ptr = &creature_ptr->current_floor_ptr->m_list[target_who];
/* Acquire monster location */
target_row = m_ptr->fy;
*
* Return the number of target_able monsters in the set.
*/
-static void target_set_prepare(BIT_FLAGS mode)
+static void target_set_prepare(player_type *creature_ptr, BIT_FLAGS mode)
{
POSITION y, x;
POSITION min_hgt, max_hgt, min_wid, max_wid;
if (mode & TARGET_KILL)
{
/* Inner range */
- min_hgt = MAX((p_ptr->y - MAX_RANGE), 0);
- max_hgt = MIN((p_ptr->y + MAX_RANGE), p_ptr->current_floor_ptr->height - 1);
- min_wid = MAX((p_ptr->x - MAX_RANGE), 0);
- max_wid = MIN((p_ptr->x + MAX_RANGE), p_ptr->current_floor_ptr->width - 1);
+ min_hgt = MAX((creature_ptr->y - MAX_RANGE), 0);
+ max_hgt = MIN((creature_ptr->y + MAX_RANGE), creature_ptr->current_floor_ptr->height - 1);
+ min_wid = MAX((creature_ptr->x - MAX_RANGE), 0);
+ max_wid = MIN((creature_ptr->x + MAX_RANGE), creature_ptr->current_floor_ptr->width - 1);
}
else /* not targetting */
{
/* Require "interesting" contents */
if (!target_set_accept(y, x)) continue;
- g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
+ g_ptr = &creature_ptr->current_floor_ptr->grid_array[y][x];
/* Require target_able monsters for "TARGET_KILL" */
- if ((mode & (TARGET_KILL)) && !target_able(g_ptr->m_idx)) continue;
+ if ((mode & (TARGET_KILL)) && !target_able(creature_ptr, g_ptr->m_idx)) continue;
- if ((mode & (TARGET_KILL)) && !target_pet && is_pet(&p_ptr->current_floor_ptr->m_list[g_ptr->m_idx])) continue;
+ if ((mode & (TARGET_KILL)) && !target_pet && is_pet(&creature_ptr->current_floor_ptr->m_list[g_ptr->m_idx])) continue;
/* Save the location */
tmp_pos.x[tmp_pos.n] = x;
ang_sort(tmp_pos.x, tmp_pos.y, tmp_pos.n, ang_sort_comp_importance, ang_sort_swap_distance);
}
- if (p_ptr->riding && target_pet && (tmp_pos.n > 1) && (mode & (TARGET_KILL)))
+ if (creature_ptr->riding && target_pet && (tmp_pos.n > 1) && (mode & (TARGET_KILL)))
{
POSITION tmp;
}
}
-void target_set_prepare_look(void){
- target_set_prepare(TARGET_LOOK);
+void target_set_prepare_look(player_type *creature_ptr)
+{
+ target_set_prepare(creature_ptr, TARGET_LOOK);
}
}
/* Prepare the "temp" array */
- target_set_prepare(mode);
+ target_set_prepare(creature_ptr, mode);
/* Start near the player */
m = 0;
g_ptr = &floor_ptr->grid_array[y][x];
/* Allow target */
- if (target_able(g_ptr->m_idx))
+ if (target_able(creature_ptr, g_ptr->m_idx))
{
strcpy(info, _("q止 t決 p自 o現 +次 -前", "q,t,p,o,+,-,<dir>"));
}
{
char cheatinfo[30];
sprintf(cheatinfo, " LOS:%d, PROJECTABLE:%d",
- los(floor_ptr, creature_ptr->y, creature_ptr->x, y, x), projectable(floor_ptr, creature_ptr->y, creature_ptr->x, y, x));
+ los(creature_ptr, creature_ptr->y, creature_ptr->x, y, x), projectable(creature_ptr, creature_ptr->y, creature_ptr->x, y, x));
strcat(info, cheatinfo);
}
case '5':
case '0':
{
- if (target_able(g_ptr->m_idx))
+ if (target_able(creature_ptr, g_ptr->m_idx))
{
health_track(creature_ptr, g_ptr->m_idx);
target_who = g_ptr->m_idx;
handle_stuff(creature_ptr);
/* Recalculate interesting grids */
- target_set_prepare(mode);
+ target_set_prepare(creature_ptr, mode);
y = creature_ptr->y;
x = creature_ptr->x;
int u = tmp_pos.x[m];
/* Recalculate interesting grids */
- target_set_prepare(mode);
+ target_set_prepare(creature_ptr, mode);
/* Look at interesting grids */
flag = TRUE;
handle_stuff(creature_ptr);
/* Recalculate interesting grids */
- target_set_prepare(mode);
+ target_set_prepare(creature_ptr, mode);
/* Look at boring grids */
flag = FALSE;
if ((y >= panel_row_min+hgt) || (y < panel_row_min) ||
(x >= panel_col_min+wid) || (x < panel_col_min))
{
- if (change_panel(creature_ptr, dy, dx)) target_set_prepare(mode);
+ if (change_panel(creature_ptr, dy, dx)) target_set_prepare(creature_ptr, mode);
}
/* Slide into legality */
{
char cheatinfo[100];
sprintf(cheatinfo, " LOS:%d, PROJECTABLE:%d, SPECIAL:%d",
- los(floor_ptr, creature_ptr->y, creature_ptr->x, y, x),
- projectable(floor_ptr, creature_ptr->y, creature_ptr->x, y, x), g_ptr->special);
+ los(creature_ptr, creature_ptr->y, creature_ptr->x, y, x),
+ projectable(creature_ptr, creature_ptr->y, creature_ptr->x, y, x), g_ptr->special);
strcat(info, cheatinfo);
}
handle_stuff(creature_ptr);
/* Recalculate interesting grids */
- target_set_prepare(mode);
+ target_set_prepare(creature_ptr, mode);
y = creature_ptr->y;
x = creature_ptr->x;
if ((y >= panel_row_min + hgt) || (y < panel_row_min) ||
(x >= panel_col_min + wid) || (x < panel_col_min))
{
- if (change_panel(creature_ptr, dy, dx)) target_set_prepare(mode);
+ if (change_panel(creature_ptr, dy, dx)) target_set_prepare(creature_ptr, mode);
}
/* Slide into legality */
*
* Note that confusion over-rides any (explicit?) user choice.
*/
-bool get_aim_dir(DIRECTION *dp)
+bool get_aim_dir(player_type *creature_ptr, DIRECTION *dp)
{
DIRECTION dir;
char command;
dir = command_dir;
/* Hack -- auto-target if requested */
- if (use_old_target && target_okay()) dir = 5;
+ if (use_old_target && target_okay(creature_ptr)) dir = 5;
if (repeat_pull(&code))
{
/* Confusion? */
/* Verify */
- if (!(code == 5 && !target_okay()))
+ if (!(code == 5 && !target_okay(creature_ptr)))
{
/* return TRUE; */
dir = (DIRECTION)code;
while (!dir)
{
/* Choose a prompt */
- if (!target_okay())
+ if (!target_okay(creature_ptr))
{
p = _("方向 ('*'でターゲット選択, ESCで中断)? ", "Direction ('*' to choose a target, Escape to cancel)? ");
}
case ' ':
case '\r':
{
- if (target_set(p_ptr, TARGET_KILL)) dir = 5;
+ if (target_set(creature_ptr, TARGET_KILL)) dir = 5;
break;
}
}
/* Verify requested targets */
- if ((dir == 5) && !target_okay()) dir = 0;
+ if ((dir == 5) && !target_okay(creature_ptr)) dir = 0;
/* Error */
if (!dir) bell();
command_dir = dir;
/* Check for confusion */
- if (p_ptr->confused)
+ if (creature_ptr->confused)
{
/* Random direction */
dir = ddd[randint0(8)];
while (!dir)
{
/* Choose a prompt */
- if (!target_okay())
+ if (!target_okay(creature_ptr))
{
p = _("方向 ('*'でターゲット選択, ESCで中断)? ", "Direction ('*' to choose a target, Escape to cancel)? ");
}
}
/* Verify requested targets */
- if ((dir == 5) && !target_okay()) dir = 0;
+ if ((dir == 5) && !target_okay(creature_ptr)) dir = 0;
/* Error */
if (!dir) bell();
command_dir = dir;
/* Check for confusion */
- if (p_ptr->confused)
+ if (creature_ptr->confused)
{
/* Random direction */
dir = ddd[randint0(8)];
/* xtra2.c */
extern void panel_bounds_center(void);
extern void verify_panel(void);
-extern bool target_able(MONSTER_IDX m_idx);
-extern bool target_okay(void);
+extern bool target_able(player_type *creature_ptr, MONSTER_IDX m_idx);
+extern bool target_okay(player_type *creature_ptr);
/*
* target_set用関数の利用用途フラグ / Bit flags for the "target_set" function
#define TARGET_XTRA 0x04 /*!< 現在未使用 / Currently unused flag */
#define TARGET_GRID 0x08 /*!< 全てのマス対象にする(現在未使用) / Select from all grids */
extern bool target_set(player_type *creature_ptr, BIT_FLAGS mode);
-extern void target_set_prepare_look(void);
-extern bool get_aim_dir(DIRECTION *dp);
+extern void target_set_prepare_look(player_type *creature_ptr);
+extern bool get_aim_dir(player_type *creature_ptr, DIRECTION *dp);
extern bool get_hack_dir(player_type *creature_ptr, DIRECTION *dp);
extern bool get_direction(player_type *creature_ptr, DIRECTION *dp, bool allow_under, bool with_steed);
extern bool get_rep_dir(DIRECTION *dp, bool under);
if (!in_bounds(trapped_ptr->current_floor_ptr, y1, x1)) continue;
/* Require line of projection */
- if (!projectable(trapped_ptr->current_floor_ptr, trapped_ptr->y, trapped_ptr->x, y1, x1)) continue;
+ if (!projectable(trapped_ptr, trapped_ptr->y, trapped_ptr->x, y1, x1)) continue;
if (summon_specific(0, y1, x1, lev, SUMMON_ARMAGE_EVIL, (PM_NO_PET)))
evil_idx = hack_m_idx_ii;
Term_clear();
- target_set_prepare_look();//モンスター一覧を生成,ソート
+ target_set_prepare_look(player_ptr);//モンスター一覧を生成,ソート
print_monster_list(player_ptr->current_floor_ptr, 0, 0, h);
Term_fresh();
Term_activate(old);
/* Get projection path */
floor_type *floor_ptr = player_ptr->current_floor_ptr;
- path_n = project_path(floor_ptr, path_g, (project_length ? project_length : MAX_RANGE), player_ptr->y, player_ptr->x, y, x, PROJECT_PATH | PROJECT_THRU);
+ path_n = project_path(player_ptr, path_g, (project_length ? project_length : MAX_RANGE), player_ptr->y, player_ptr->x, y, x, PROJECT_PATH | PROJECT_THRU);
player_ptr->redraw |= (PR_MAP);
handle_stuff(player_ptr);
r_ptr = &r_info[m_ptr->r_idx];
/* Monster spells (only powerful ones)*/
- if (projectable(creature_ptr->current_floor_ptr, my, mx, yy, xx))
+ if (projectable(creature_ptr, my, mx, yy, xx))
{
BIT_FLAGS f4 = r_ptr->flags4;
BIT_FLAGS f5 = r_ptr->a_ability_flags1;
while (--attempts)
{
- scatter(caster_ptr->current_floor_ptr, &wy, &wx, caster_ptr->y, caster_ptr->x, 3, 0);
+ scatter(caster_ptr, &wy, &wx, caster_ptr->y, caster_ptr->x, 3, 0);
if (cave_empty_bold(caster_ptr->current_floor_ptr, wy, wx)) break;
}