* @param t_idx 呪文を受けるモンスターID。プレイヤーの場合はdummyで0とする。
* @param TARGET_TYPE プレイヤーを対象とする場合MONSTER_TO_PLAYER、モンスターを対象とする場合MONSTER_TO_MONSTER
*/
-void spell_RF5_SCARE(MONSTER_IDX m_idx, MONSTER_IDX t_idx, int TARGET_TYPE)
+void spell_RF5_SCARE(MONSTER_IDX m_idx, player_type *target_ptr, MONSTER_IDX t_idx, int TARGET_TYPE)
{
- monster_type *t_ptr = &p_ptr->current_floor_ptr->m_list[t_idx];
+ 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);
bool resist, saving_throw;
if (TARGET_TYPE == MONSTER_TO_PLAYER)
{
- resist = p_ptr->resist_fear;
- saving_throw = (randint0(100 + rlev / 2) < p_ptr->skill_sav);
+ resist = target_ptr->resist_fear;
+ saving_throw = (randint0(100 + rlev / 2) < target_ptr->skill_sav);
spell_badstatus_message(m_idx, t_idx,
_("%^sが何かをつぶやくと、恐ろしげな音が聞こえた。", "%^s mumbles, and you hear scary noises."),
_("%^sが恐ろしげな幻覚を作り出した。", "%^s casts a fearful illusion."),
if (!resist && !saving_throw)
{
- (void)set_afraid(p_ptr, p_ptr->afraid + randint0(4) + 4);
+ (void)set_afraid(target_ptr, target_ptr->afraid + randint0(4) + 4);
}
learn_spell(MS_SCARE);
update_smart_learn(m_idx, DRS_FEAR);
case RF5_SPELL_START + 24: return spell_RF5_BO_PLAS(y, x, m_idx, 0, MONSTER_TO_PLAYER); /* RF5_BO_PLAS */
case RF5_SPELL_START + 25: return spell_RF5_BO_ICEE(y, x, m_idx, 0, MONSTER_TO_PLAYER); /* RF5_BO_ICEE */
case RF5_SPELL_START + 26: return spell_RF5_MISSILE(y, x, m_idx, 0, MONSTER_TO_PLAYER); /* RF5_MISSILE */
- case RF5_SPELL_START + 27: spell_RF5_SCARE(m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_SCARE */
+ case RF5_SPELL_START + 27: spell_RF5_SCARE(m_idx, p_ptr, 0, MONSTER_TO_PLAYER); break; /* RF5_SCARE */
case RF5_SPELL_START + 28: spell_RF5_BLIND(m_idx, p_ptr, 0, MONSTER_TO_PLAYER); break; /* RF5_BLIND */
case RF5_SPELL_START + 29: spell_RF5_CONF(m_idx, p_ptr, 0, MONSTER_TO_PLAYER); break; /* RF5_CONF */
case RF5_SPELL_START + 30: spell_RF5_SLOW(m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_SLOW */
case RF5_SPELL_START + 24: return spell_RF5_BO_PLAS(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); /* RF5_BO_PLAS */
case RF5_SPELL_START + 25: return spell_RF5_BO_ICEE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); /* RF5_BO_ICEE */
case RF5_SPELL_START + 26: return spell_RF5_MISSILE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); /* RF5_MISSILE */
- case RF5_SPELL_START + 27: spell_RF5_SCARE(m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_SCARE */
+ case RF5_SPELL_START + 27: spell_RF5_SCARE(m_idx, p_ptr, t_idx, MONSTER_TO_MONSTER); break; /* RF5_SCARE */
case RF5_SPELL_START + 28: spell_RF5_BLIND(m_idx, p_ptr, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BLIND */
case RF5_SPELL_START + 29: spell_RF5_CONF(m_idx, p_ptr, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CONF */
case RF5_SPELL_START + 30: spell_RF5_SLOW(m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_SLOW */