From: nothere Date: Fri, 4 Jul 2003 14:47:33 +0000 (+0000) Subject: 乗馬中のプレイヤーが'B'系の投げ落としを受けた場合は両方にダメージが行 X-Git-Tag: v2.1.2~1311 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=7a9caf2b85b1b18b92ddaa2435af350ec0eacb32;p=hengband%2Fhengband.git 乗馬中のプレイヤーが'B'系の投げ落としを受けた場合は両方にダメージが行 くように変更. --- diff --git a/src/mspells1.c b/src/mspells1.c index c9c54f661..1ed3d638f 100644 --- a/src/mspells1.c +++ b/src/mspells1.c @@ -3556,13 +3556,15 @@ msg_format("%^s } else { - int dam = damroll(4, 8); int get_damage = 0; + bool fear; /* dummy */ + #ifdef JP msg_format("%^s¤¬¤¢¤Ê¤¿¤òÄϤó¤Ç¶õÃ椫¤éÅꤲÍ¤¿¡£", m_name); #else msg_format("%^s holds you, and drops from the sky.", m_name); #endif + dam = damroll(4, 8); teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE); sound(SOUND_FALL); @@ -3604,6 +3606,8 @@ msg_format("%^s project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1); set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE); } + + if (p_ptr->riding) mon_take_hit_mon(p_ptr->riding, dam, &fear, NULL, m_idx); } break; } diff --git a/src/mspells2.c b/src/mspells2.c index 68e23e2f4..136489504 100644 --- a/src/mspells2.c +++ b/src/mspells2.c @@ -3287,6 +3287,8 @@ bool monst_spell_monst(int m_idx) if (t_idx == p_ptr->riding) teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE); else teleport_monster_to(t_idx, m_ptr->fy, m_ptr->fx, 100); + sound(SOUND_FALL); + if (tr_ptr->flags7 & RF7_CAN_FLY) { #ifdef JP @@ -3305,6 +3307,31 @@ bool monst_spell_monst(int m_idx) dam += damroll(6, 8); } + if (p_ptr->riding) + { + int get_damage = 0; + + /* Mega hack -- this special action deals damage to the player. Therefore the code of "eyeeye" is necessary. + -- henkma + */ + get_damage = take_hit(DAMAGE_NOESCAPE, dam, m_name, -1); + if (p_ptr->tim_eyeeye && get_damage > 0 && !p_ptr->is_dead) + { +#ifdef JP + msg_format("¹¶·â¤¬%s¼«¿È¤ò½ý¤Ä¤±¤¿¡ª", m_name); +#else + char m_name_self[80]; + + /* hisself */ + monster_desc(m_name_self, m_ptr, MD_PRON_VISIBLE | MD_POSSESSIVE | MD_OBJECTIVE); + + msg_format("The attack of %s has wounded %s!", m_name, m_name_self); +#endif + project(0, 0, m_ptr->fy, m_ptr->fx, get_damage, GF_MISSILE, PROJECT_KILL, -1); + set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE); + } + } + mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx); } break;