*/
bool monster_near_player(floor_type *floor_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx)
{
- monster_type *m_ptr = &floor_ptr->m_list[m_idx];
- monster_type *t_ptr = &floor_ptr->m_list[t_idx];
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
return (m_ptr->cdis <= MAX_SIGHT) || (t_ptr->cdis <= MAX_SIGHT);
}
concptr type_s;
bool smart_learn_aux = TRUE;
floor_type *floor_ptr = target_ptr->current_floor_ptr;
- monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
bool known = monster_near_player(floor_ptr, m_idx, t_idx);
bool see_either = see_monster(target_ptr->current_floor_ptr, m_idx) || see_monster(target_ptr->current_floor_ptr, t_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
HIT_POINT spell_RF5_BA_FIRE(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
HIT_POINT dam, rad;
- monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
+ monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
if (m_ptr->r_idx == MON_ROLENTO)
{
HIT_POINT spell_RF5_MIND_BLAST(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
floor_type *floor_ptr = target_ptr->current_floor_ptr;
- monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
bool seen = (!target_ptr->blind && m_ptr->ml);
HIT_POINT dam;
GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN];
*/
void spell_badstatus_message(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, concptr msg1, concptr msg2, concptr msg3, concptr msg4, bool resist, bool saving_throw, int TARGET_TYPE)
{
- bool see_either = see_monster(target_ptr->current_floor_ptr, m_idx) || see_monster(target_ptr->current_floor_ptr, t_idx);
- bool see_t = see_monster(target_ptr->current_floor_ptr, t_idx);
- bool known = monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ bool see_either = see_monster(floor_ptr, m_idx) || see_monster(floor_ptr, t_idx);
+ bool see_t = see_monster(floor_ptr, t_idx);
+ bool known = monster_near_player(floor_ptr, m_idx, t_idx);
GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN];
monster_name(m_idx, m_name);
monster_name(t_idx, t_name);
}
else
{
- target_ptr->current_floor_ptr->monster_noise = TRUE;
+ floor_ptr->monster_noise = TRUE;
}
}
*/
void spell_RF5_SCARE(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
monster_race *tr_ptr = &r_info[t_ptr->r_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
if (TARGET_TYPE == MONSTER_TO_PLAYER)
*/
void spell_RF5_BLIND(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
- monster_race *tr_ptr = &r_info[t_ptr->r_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
+ monster_race *tr_ptr = &r_info[t_ptr->r_idx];
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
if (TARGET_TYPE == MONSTER_TO_PLAYER)
*/
void spell_RF5_CONF(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
monster_race *tr_ptr = &r_info[t_ptr->r_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
if (TARGET_TYPE == MONSTER_TO_PLAYER)
*/
void spell_RF5_SLOW(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
monster_race *tr_ptr = &r_info[t_ptr->r_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
if (TARGET_TYPE == MONSTER_TO_PLAYER)
*/
void spell_RF5_HOLD(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
monster_race *tr_ptr = &r_info[t_ptr->r_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
if (TARGET_TYPE == MONSTER_TO_PLAYER)
{
floor_type *floor_ptr = target_ptr->current_floor_ptr;
bool see_m = see_monster(floor_ptr, m_idx);
- monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
GAME_TEXT m_name[MAX_NLEN];
monster_name(m_idx, m_name);
*/
void spell_RF6_HEAL(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool seen = (!target_ptr->blind && m_ptr->ml);
GAME_TEXT m_name[MAX_NLEN];
monster_name(m_idx, m_name);
/* Cancel fear */
(void)set_monster_monfear(m_idx, 0);
- if (see_monster(target_ptr->current_floor_ptr, m_idx))
+ if (see_monster(floor_ptr, m_idx))
msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), m_name);
}
*/
void spell_RF6_INVULNER(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
+ monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
bool seen = (!target_ptr->blind && m_ptr->ml);
monspell_message_base(target_ptr, m_idx, t_idx,
if (TARGET_TYPE == MONSTER_TO_PLAYER)
disturb(target_ptr, TRUE, TRUE);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
if (teleport_barrier(target_ptr, m_idx))
{
- if (see_monster(target_ptr->current_floor_ptr, m_idx))
+ if (see_monster(floor_ptr, m_idx))
msg_format(_("魔法のバリアが%^sのテレポートを邪魔した。",
"Magic barrier obstructs teleporting of %^s."), m_name);
return;
}
- if (see_monster(target_ptr->current_floor_ptr, m_idx))
+ if (see_monster(floor_ptr, m_idx))
msg_format(_("%^sが瞬時に消えた。", "%^s blinks away."), m_name);
teleport_away(target_ptr, m_idx, 10, 0L);
GAME_TEXT m_name[MAX_NLEN];
monster_name(m_idx, m_name);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
if (TARGET_TYPE == MONSTER_TO_PLAYER)
disturb(target_ptr, TRUE, TRUE);
if (teleport_barrier(target_ptr, m_idx))
{
- if (see_monster(target_ptr->current_floor_ptr, m_idx))
+ if (see_monster(floor_ptr, m_idx))
msg_format(_("魔法のバリアが%^sのテレポートを邪魔した。",
"Magic barrier obstructs teleporting of %^s."), m_name);
return;
}
- if (see_monster(target_ptr->current_floor_ptr, m_idx))
+ if (see_monster(floor_ptr, m_idx))
msg_format(_("%^sがテレポートした。", "%^s teleports away."), m_name);
teleport_away_followable(target_ptr, m_idx);
{
HIT_POINT dam = -1;
floor_type *floor_ptr = target_ptr->current_floor_ptr;
- monster_type *m_ptr = &floor_ptr->m_list[m_idx];
- monster_type *t_ptr = &floor_ptr->m_list[t_idx];
- monster_race *tr_ptr = &r_info[t_ptr->r_idx];
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
+ monster_race *tr_ptr = &r_info[t_ptr->r_idx];
bool monster_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
bool monster_to_monster = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool direct = player_bold(target_ptr, y, x);
HIT_POINT spell_RF6_SPECIAL(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
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 *m_ptr = &floor_ptr->m_list[m_idx];
+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
disturb(target_ptr, TRUE, TRUE);
switch (m_ptr->r_idx)
void spell_RF6_TELE_TO(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
floor_type *floor_ptr = target_ptr->current_floor_ptr;
- monster_type *m_ptr = &floor_ptr->m_list[m_idx];
- monster_type *t_ptr = &floor_ptr->m_list[t_idx];
- monster_race *tr_ptr = &r_info[t_ptr->r_idx];
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
+ monster_race *tr_ptr = &r_info[t_ptr->r_idx];
simple_monspell_message(target_ptr, m_idx, t_idx,
_("%^sがあなたを引き戻した。", "%^s commands you to return."),
if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
{
if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
- if (see_monster(target_ptr->current_floor_ptr, t_idx))
+ if (see_monster(floor_ptr, t_idx))
{
msg_format(_("%^sには効果がなかった。", "%^s is unaffected!"), t_name);
}
else if (tr_ptr->level > randint1(100))
{
if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
- if (see_monster(target_ptr->current_floor_ptr, t_idx))
+ if (see_monster(floor_ptr, t_idx))
{
msg_format(_("%^sは耐性を持っている!", "%^s resists!"), t_name);
}
*/
void spell_RF6_TELE_AWAY(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
- monster_race *tr_ptr = &r_info[t_ptr->r_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
+ monster_race *tr_ptr = &r_info[t_ptr->r_idx];
simple_monspell_message(target_ptr, m_idx, t_idx,
_("%^sにテレポートさせられた。", "%^s teleports you away."),
if ((tr_ptr->flags1 & RF1_UNIQUE) || (tr_ptr->flagsr & RFR_RES_ALL))
{
if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
- if (see_monster(target_ptr->current_floor_ptr, t_idx))
+ if (see_monster(floor_ptr, t_idx))
{
msg_format(_("%^sには効果がなかった。", "%^s is unaffected!"), t_name);
}
else if (tr_ptr->level > randint1(100))
{
if (is_original_ap_and_seen(t_ptr)) tr_ptr->r_flagsr |= RFR_RES_TELE;
- if (see_monster(target_ptr->current_floor_ptr, t_idx))
+ if (see_monster(floor_ptr, t_idx))
{
msg_format(_("%^sは耐性を持っている!", "%^s resists!"), t_name);
}
*/
void spell_RF6_TELE_LEVEL(player_type *target_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
- monster_race *tr_ptr = &r_info[t_ptr->r_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
+ monster_race *tr_ptr = &r_info[t_ptr->r_idx];
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool resist, saving_throw;
if (TARGET_TYPE == MONSTER_TO_PLAYER)
*/
void spell_RF6_DARKNESS(player_type *target_ptr, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
- monster_type *t_ptr = &target_ptr->current_floor_ptr->m_list[t_idx];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ monster_type *t_ptr = &floor_ptr->m_list[t_idx];
+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
bool can_use_lite_area = FALSE;
bool monster_to_monster = TARGET_TYPE == MONSTER_TO_MONSTER;
bool monster_to_player = TARGET_TYPE == MONSTER_TO_PLAYER;
_("%^sが辺りを明るく照らした。", "%^s cast a spell to light up."),
TARGET_TYPE);
- if (see_monster(target_ptr->current_floor_ptr, t_idx) && monster_to_monster)
+ if (see_monster(floor_ptr, t_idx) && monster_to_monster)
{
msg_format(_("%^sは白い光に包まれた。", "%^s is surrounded by a white light."), t_name);
}
_("%^sが暗闇の中で手を振った。", "%^s gestures in shadow."),
TARGET_TYPE);
- if (see_monster(target_ptr->current_floor_ptr, t_idx) && monster_to_monster)
+ if (see_monster(floor_ptr, t_idx) && monster_to_monster)
{
msg_format(_("%^sは暗闇に包まれた。", "%^s is surrounded by darkness."), t_name);
}
*/
void spell_RF6_FORGET(player_type *target_ptr, MONSTER_IDX m_idx)
{
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(target_ptr->current_floor_ptr, m_idx);
GAME_TEXT m_name[MAX_NLEN];
monster_name(m_idx, m_name);
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];
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
int count = 0;
GAME_TEXT m_name[MAX_NLEN], t_name[MAX_NLEN], m_poss[80];
monster_name(m_idx, m_name);
monster_desc(m_poss, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE);
disturb(target_ptr, TRUE, TRUE);
- bool known = monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx);
- bool see_either = see_monster(target_ptr->current_floor_ptr, m_idx) || see_monster(target_ptr->current_floor_ptr, t_idx);
+ bool known = monster_near_player(floor_ptr, m_idx, t_idx);
+ bool see_either = see_monster(floor_ptr, m_idx) || see_monster(floor_ptr, t_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
if (target_ptr->blind && count && mon_to_player)
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
- if (known && !see_monster(target_ptr->current_floor_ptr, t_idx) && count && mon_to_mon)
+ if (known && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
}
int count = 0;
floor_type *floor_ptr = target_ptr->current_floor_ptr;
monster_type *m_ptr = &floor_ptr->m_list[m_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
if (target_ptr->blind && count && mon_to_player)
msg_print(_("重厚な足音が近くで聞こえる。", "You hear heavy steps nearby."));
- if (monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx) && !see_monster(target_ptr->current_floor_ptr, t_idx) && count && mon_to_mon)
+ if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
}
floor_type *floor_ptr = target_ptr->current_floor_ptr;
int count = 0;
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < 1; k++)
floor_type *floor_ptr = target_ptr->current_floor_ptr;
int count = 0;
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_6; k++)
if (target_ptr->blind && count && mon_to_player)
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
- if (monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
+ if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
}
TARGET_TYPE);
int count = 0;
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_6; k++)
if (target_ptr->blind && count && mon_to_player)
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
- if (monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx) && !see_monster(target_ptr->current_floor_ptr, t_idx) && count && mon_to_mon)
- target_ptr->current_floor_ptr->monster_noise = TRUE;
+ if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
+ floor_ptr->monster_noise = TRUE;
}
int count = 0;
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
for (int k = 0; k < S_NUM_6; k++)
{
count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP);
if (target_ptr->blind && count && mon_to_player)
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
- if (monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx) && !see_monster(target_ptr->current_floor_ptr, t_idx) && count && mon_to_mon)
- target_ptr->current_floor_ptr->monster_noise = TRUE;
+ if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
+ floor_ptr->monster_noise = TRUE;
}
TARGET_TYPE);
int count = 0;
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_4; k++)
if (target_ptr->blind && count && mon_to_player)
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
- floor_type *floor_ptr = target_ptr->current_floor_ptr;
if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
}
TARGET_TYPE);
int count = 0;
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_4; k++)
if (target_ptr->blind && count && mon_to_player)
msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
- floor_type *floor_ptr = target_ptr->current_floor_ptr;
if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
}
num += r_ptr->level / 40;
}
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
int count = 0;
for (int k = 0; k < num; k++)
{
}
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
- if (monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx) && !see_monster(target_ptr->current_floor_ptr, t_idx) && count && mon_to_mon)
+ if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
}
_("%^sは魔法で混沌の宮廷から悪魔を召喚した!", "%^s magically summons a demon from the Courts of Chaos!"),
TARGET_TYPE);
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
int count = 0;
for (int k = 0; k < 1; k++)
{
if (target_ptr->blind && count)
msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
- floor_type *floor_ptr = target_ptr->current_floor_ptr;
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
_("%sが魔法でアンデッドを召喚した。", "%^s magically summons undead."),
TARGET_TYPE);
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
int count = 0;
for (int k = 0; k < 1; k++)
{
if (target_ptr->blind && count)
msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
- floor_type *floor_ptr = target_ptr->current_floor_ptr;
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
_("%^sが魔法でドラゴンを召喚した!", "%^s magically summons a dragon!"),
TARGET_TYPE);
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
int count = 0;
for (int k = 0; k < 1; k++)
{
if (target_ptr->blind && count)
msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
- floor_type *floor_ptr = target_ptr->current_floor_ptr;
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
_("%sが魔法でアンデッドを召喚した。", "%^s magically summons undead."),
TARGET_TYPE);
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
for (int k = 0; k < S_NUM_6; k++)
{
if (mon_to_player)
TARGET_TYPE);
floor_type *floor_ptr = target_ptr->current_floor_ptr;
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
int count = 0;
TARGET_TYPE);
int count = 0;
- DEPTH rlev = monster_level_idx(m_idx);
+ floor_type *floor_ptr = target_ptr->current_floor_ptr;
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
for (int k = 0; k < S_NUM_4; k++)
msg_print(_("不死の者が近くに現れるのが聞こえた。", "You hear immortal beings appear nearby."));
}
- if (monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx) && !see_monster(target_ptr->current_floor_ptr, t_idx) && count && mon_to_mon)
- target_ptr->current_floor_ptr->monster_noise = TRUE;
+ if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
+ floor_ptr->monster_noise = TRUE;
}
TARGET_TYPE);
floor_type *floor_ptr = target_ptr->current_floor_ptr;
- monster_type *m_ptr = &floor_ptr->m_list[m_idx];
- DEPTH rlev = monster_level_idx(m_idx);
+ monster_type *m_ptr = &floor_ptr->m_list[m_idx];
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
bool uniques_are_summoned = FALSE;
uniques_are_summoned ? _("力強いもの", "powerful things") : _("もの", "things"));
}
- if (monster_near_player(target_ptr->current_floor_ptr, m_idx, t_idx) && !see_monster(target_ptr->current_floor_ptr, t_idx) && count && mon_to_mon)
+ if (monster_near_player(floor_ptr, m_idx, t_idx) && !see_monster(floor_ptr, t_idx) && count && mon_to_mon)
floor_ptr->monster_noise = TRUE;
}
*/
HIT_POINT monspell_damage(player_type *target_ptr, int SPELL_NUM, MONSTER_IDX m_idx, int TYPE)
{
- monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
- monster_race *r_ptr = &r_info[m_ptr->r_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];
int hp;
- DEPTH rlev = monster_level_idx(m_idx);
+ DEPTH rlev = monster_level_idx(floor_ptr, m_idx);
int shoot_dd = r_ptr->blow[0].d_dice;
int shoot_ds = r_ptr->blow[0].d_side;
hp = (TYPE == DAM_ROLL) ? m_ptr->hp : m_ptr->max_maxhp;
- return monspell_damage_base(target_ptr, SPELL_NUM, hp, rlev, monster_is_powerful(target_ptr->current_floor_ptr, m_idx), shoot_dd, shoot_ds, 0, TYPE);
+ return monspell_damage_base(target_ptr, SPELL_NUM, hp, rlev, monster_is_powerful(floor_ptr, m_idx), shoot_dd, shoot_ds, 0, TYPE);
}