• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

変愚蛮怒のメインリポジトリです


コミットメタ情報

リビジョンddb881790a6cb6a97a118bb7e3a9b53d6ccdbb3c (tree)
日時2014-02-20 22:16:35
作者dis- <dis.rogue@gmai...>
コミッターdis-

ログメッセージ

refactor: extract damage spells in monst_spell_monst

変更サマリ

差分

--- a/src/externs.h
+++ b/src/externs.h
@@ -1584,42 +1584,40 @@ extern void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode);
15841584
15851585 /* mspells4.c */
15861586 extern bool spell_learnable(int m_idx);
1587-
1588-/* spells monster to player */
1589-extern void MP_spell_RF4_SHRIEK(int m_idx);
1590-extern void MP_spell_RF4_DISPEL(int m_idx);
1591-extern int MP_spell_RF4_ROCKET(int y, int x, int m_idx);
1592-extern int MP_spell_RF4_SHOOT(int y, int x, int m_idx);
1593-extern int MP_spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx);
1594-extern int spell_RF4_BA_CHAO(int y, int x, int m_idx);
1595-extern int spell_RF4_BA_NUKE(int y, int x, int m_idx);
1596-extern int spell_RF5_BA_ACID(int y, int x, int m_idx);
1597-extern int spell_RF5_BA_ELEC(int y, int x, int m_idx);
1598-extern int spell_RF5_BA_FIRE(int y, int x, int m_idx);
1599-extern int spell_RF5_BA_COLD(int y, int x, int m_idx);
1600-extern int spell_RF5_BA_POIS(int y, int x, int m_idx);
1601-extern int spell_RF5_BA_NETH(int y, int x, int m_idx);
1602-extern int spell_RF5_BA_WATE(int y, int x, int m_idx);
1603-extern int spell_RF5_BA_MANA(int y, int x, int m_idx);
1604-extern int spell_RF5_BA_DARK(int y, int x, int m_idx);
1605-extern int spell_RF5_DRAIN_MANA(int y, int x, int m_idx);
1606-extern int spell_RF5_MIND_BLAST(int y, int x, int m_idx);
1607-extern int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx);
1608-extern int spell_RF5_CAUSE_1(int y, int x, int m_idx);
1609-extern int spell_RF5_CAUSE_2(int y, int x, int m_idx);
1610-extern int spell_RF5_CAUSE_3(int y, int x, int m_idx);
1611-extern int spell_RF5_CAUSE_4(int y, int x, int m_idx);
1612-extern int spell_RF5_BO_ACID(int y, int x, int m_idx);
1613-extern int spell_RF5_BO_ELEC(int y, int x, int m_idx);
1614-extern int spell_RF5_BO_FIRE(int y, int x, int m_idx);
1615-extern int spell_RF5_BO_COLD(int y, int x, int m_idx);
1616-extern int spell_RF5_BA_LITE(int y, int x, int m_idx);
1617-extern int spell_RF5_BO_NETH(int y, int x, int m_idx);
1618-extern int spell_RF5_BO_WATE(int y, int x, int m_idx);
1619-extern int spell_RF5_BO_MANA(int y, int x, int m_idx);
1620-extern int spell_RF5_BO_PLAS(int y, int x, int m_idx);
1621-extern int spell_RF5_BO_ICEE(int y, int x, int m_idx);
1622-extern int spell_RF5_MISSILE(int y, int x, int m_idx);
1587+extern void spell_RF4_SHRIEK(int m_idx, int t_idx, int TARGET_TYPE);;
1588+extern void spell_RF4_DISPEL(int m_idx, int t_idx, int TARGET_TYPE);
1589+extern int spell_RF4_ROCKET(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1590+extern int spell_RF4_SHOOT(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1591+extern int spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1592+extern int spell_RF4_BA_NUKE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1593+extern int spell_RF4_BA_CHAO(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1594+extern int spell_RF5_BA_ACID(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1595+extern int spell_RF5_BA_ELEC(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1596+extern int spell_RF5_BA_FIRE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1597+extern int spell_RF5_BA_COLD(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1598+extern int spell_RF5_BA_POIS(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1599+extern int spell_RF5_BA_NETH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1600+extern int spell_RF5_BA_WATE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1601+extern int spell_RF5_BA_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1602+extern int spell_RF5_BA_DARK(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1603+extern int spell_RF5_DRAIN_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1604+extern int spell_RF5_MIND_BLAST(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1605+extern int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1606+extern int spell_RF5_CAUSE_1(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1607+extern int spell_RF5_CAUSE_2(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1608+extern int spell_RF5_CAUSE_3(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1609+extern int spell_RF5_CAUSE_4(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1610+extern int spell_RF5_BO_ACID(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1611+extern int spell_RF5_BO_ELEC(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1612+extern int spell_RF5_BO_FIRE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1613+extern int spell_RF5_BO_COLD(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1614+extern int spell_RF5_BA_LITE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1615+extern int spell_RF5_BO_NETH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1616+extern int spell_RF5_BO_WATE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1617+extern int spell_RF5_BO_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1618+extern int spell_RF5_BO_PLAS(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1619+extern int spell_RF5_BO_ICEE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
1620+extern int spell_RF5_MISSILE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE);
16231621 extern void spell_RF5_SCARE(int y, int x, int m_idx);
16241622 extern void spell_RF5_BLIND(int y, int x, int m_idx);
16251623 extern void spell_RF5_CONF(int y, int x, int m_idx);
@@ -1658,13 +1656,6 @@ extern void spell_RF6_S_HI_DRAGON(int y, int x, int m_idx);
16581656 extern void spell_RF6_S_AMBERITES(int y, int x, int m_idx);
16591657 extern void spell_RF6_S_UNIQUE(int y, int x, int m_idx);
16601658
1661-/* spells monster to monster */
1662-extern void MM_spell_RF4_SHRIEK(int m_idx, int t_idx);
1663-extern void MM_spell_RF4_DISPEL(int m_idx, int t_idx);
1664-extern int MM_spell_RF4_ROCKET(int y, int x, int m_idx, int t_idx);
1665-extern int MM_spell_RF4_SHOOT(int y, int x, int m_idx, int t_idx);
1666-extern int MM_spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx, int t_idx);
1667-
16681659 /* hissatsu.c */
16691660 extern void hissatsu_info(char *p, int power);
16701661 extern void do_cmd_hissatsu(void);
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -1874,65 +1874,65 @@ bool make_attack_spell(int m_idx)
18741874 /* Cast the spell. */
18751875 switch (thrown_spell)
18761876 {
1877- case 96 + 0: MP_spell_RF4_SHRIEK(m_idx); break; /* RF4_SHRIEK */
1877+ case 96 + 0: spell_RF4_SHRIEK(m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_SHRIEK */
18781878 case 96 + 1: break; /* RF4_XXX1 */
1879- case 96 + 2: MP_spell_RF4_DISPEL(m_idx); break; /* RF4_DISPEL */
1880- case 96 + 3: dam = MP_spell_RF4_ROCKET(y, x, m_idx); break; /* RF4_ROCKET */
1881- case 96 + 4: dam = MP_spell_RF4_SHOOT(y, x, m_idx); break; /* RF4_SHOOT */
1879+ case 96 + 2: spell_RF4_DISPEL(m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_DISPEL */
1880+ case 96 + 3: dam = spell_RF4_ROCKET(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_ROCKET */
1881+ case 96 + 4: dam = spell_RF4_SHOOT(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_SHOOT */
18821882 case 96 + 5: break; /* RF4_XXX2 */
18831883 case 96 + 6: break; /* RF4_XXX3 */
18841884 case 96 + 7: break; /* RF4_XXX4 */
1885- case 96 + 8: dam = MP_spell_RF4_BREATH(GF_ACID, y, x, m_idx); break; /* RF4_BR_ACID */
1886- case 96 + 9: dam = MP_spell_RF4_BREATH(GF_ELEC, y, x, m_idx); break; /* RF4_BR_ELEC */
1887- case 96 + 10: dam = MP_spell_RF4_BREATH(GF_FIRE, y, x, m_idx); break; /* RF4_BR_FIRE */
1888- case 96 + 11: dam = MP_spell_RF4_BREATH(GF_COLD, y, x, m_idx); break; /* RF4_BR_COLD */
1889- case 96 + 12: dam = MP_spell_RF4_BREATH(GF_POIS, y, x, m_idx); break; /* RF4_BR_POIS */
1890- case 96 + 13: dam = MP_spell_RF4_BREATH(GF_NETHER, y, x, m_idx); break; /* RF4_BR_NETH */
1891- case 96 + 14: dam = MP_spell_RF4_BREATH(GF_LITE, y_br_lite, x_br_lite, m_idx); break; /* RF4_BR_LITE */
1892- case 96 + 15: dam = MP_spell_RF4_BREATH(GF_DARK, y, x, m_idx); break; /* RF4_BR_DARK */
1893- case 96 + 16: dam = MP_spell_RF4_BREATH(GF_CONFUSION, y, x, m_idx); break; /* RF4_BR_CONF */
1894- case 96 + 17: dam = MP_spell_RF4_BREATH(GF_SOUND, y, x, m_idx); break; /* RF4_BR_SOUN */
1895- case 96 + 18: dam = MP_spell_RF4_BREATH(GF_CHAOS, y, x, m_idx); break; /* RF4_BR_CHAO */
1896- case 96 + 19: dam = MP_spell_RF4_BREATH(GF_DISENCHANT, y, x, m_idx); break; /* RF4_BR_DISE */
1897- case 96 + 20: dam = MP_spell_RF4_BREATH(GF_NEXUS, y, x, m_idx); break; /* RF4_BR_NEXU */
1898- case 96 + 21: dam = MP_spell_RF4_BREATH(GF_TIME, y, x, m_idx); break; /* RF4_BR_TIME */
1899- case 96 + 22: dam = MP_spell_RF4_BREATH(GF_INERTIA, y, x, m_idx); break; /* RF4_BR_INER */
1900- case 96 + 23: dam = MP_spell_RF4_BREATH(GF_GRAVITY, y, x, m_idx); break; /* RF4_BR_GRAV */
1901- case 96 + 24: dam = MP_spell_RF4_BREATH(GF_SHARDS, y, x, m_idx); break; /* RF4_BR_SHAR */
1902- case 96 + 25: dam = MP_spell_RF4_BREATH(GF_PLASMA, y, x, m_idx); break; /* RF4_BR_PLAS */
1903- case 96 + 26: dam = MP_spell_RF4_BREATH(GF_FORCE, y, x, m_idx); break; /* RF4_BR_WALL */
1904- case 96 + 27: dam = MP_spell_RF4_BREATH(GF_MANA, y, x, m_idx); break; /* RF4_BR_MANA */
1905- case 96 + 28: dam = spell_RF4_BA_NUKE(y, x, m_idx); break; /* RF4_BA_NUKE */
1906- case 96 + 29: dam = MP_spell_RF4_BREATH(GF_NUKE, y, x, m_idx); break; /* RF4_BR_NUKE */
1907- case 96 + 30: dam = spell_RF4_BA_CHAO(y, x, m_idx); break; /* RF4_BA_CHAO */
1908- case 96 + 31: dam = MP_spell_RF4_BREATH(GF_DISINTEGRATE, y, x, m_idx); break; /* RF4_BR_DISI */
1909- case 128 + 0: dam = spell_RF5_BA_ACID(y, x, m_idx); break; /* RF5_BA_ACID */
1910- case 128 + 1: dam = spell_RF5_BA_ELEC(y, x, m_idx); break; /* RF5_BA_ELEC */
1911- case 128 + 2: dam = spell_RF5_BA_FIRE(y, x, m_idx); break; /* RF5_BA_FIRE */
1912- case 128 + 3: dam = spell_RF5_BA_COLD(y, x, m_idx); break; /* RF5_BA_COLD */
1913- case 128 + 4: dam = spell_RF5_BA_POIS(y, x, m_idx); break; /* RF5_BA_POIS */
1914- case 128 + 5: dam = spell_RF5_BA_NETH(y, x, m_idx); break; /* RF5_BA_NETH */
1915- case 128 + 6: dam = spell_RF5_BA_WATE(y, x, m_idx); break; /* RF5_BA_WATE */
1916- case 128 + 7: dam = spell_RF5_BA_MANA(y, x, m_idx); break; /* RF5_BA_MANA */
1917- case 128 + 8: dam = spell_RF5_BA_DARK(y, x, m_idx); break; /* RF5_BA_DARK */
1918- case 128 + 9: dam = spell_RF5_DRAIN_MANA(y, x, m_idx); break; /* RF5_DRAIN_MANA */
1919- case 128 + 10: dam = spell_RF5_MIND_BLAST(y, x, m_idx); break; /* RF5_MIND_BLAST */
1920- case 128 + 11: dam = spell_RF5_BRAIN_SMASH(y, x, m_idx); break; /* RF5_MIND_BLAST */
1921- case 128 + 12: dam = spell_RF5_CAUSE_1(y, x, m_idx); break; /* RF5_CAUSE_1 */
1922- case 128 + 13: dam = spell_RF5_CAUSE_2(y, x, m_idx); break; /* RF5_CAUSE_2 */
1923- case 128 + 14: dam = spell_RF5_CAUSE_3(y, x, m_idx); break; /* RF5_CAUSE_3 */
1924- case 128 + 15: dam = spell_RF5_CAUSE_4(y, x, m_idx); break; /* RF5_CAUSE_4 */
1925- case 128 + 16: dam = spell_RF5_BO_ACID(y, x, m_idx); break; /* RF5_BO_ACID */
1926- case 128 + 17: dam = spell_RF5_BO_ELEC(y, x, m_idx); break; /* RF5_BO_ELEC */
1927- case 128 + 18: dam = spell_RF5_BO_FIRE(y, x, m_idx); break; /* RF5_BO_FIRE */
1928- case 128 + 19: dam = spell_RF5_BO_COLD(y, x, m_idx); break; /* RF5_BO_COLD */
1929- case 128 + 20: dam = spell_RF5_BA_LITE(y, x, m_idx); break; /* RF5_BA_LITE */
1930- case 128 + 21: dam = spell_RF5_BO_NETH(y, x, m_idx); break; /* RF5_BO_NETH */
1931- case 128 + 22: dam = spell_RF5_BO_WATE(y, x, m_idx); break; /* RF5_BO_WATE */
1932- case 128 + 23: dam = spell_RF5_BO_MANA(y, x, m_idx); break; /* RF5_BO_MANA */
1933- case 128 + 24: dam = spell_RF5_BO_PLAS(y, x, m_idx); break; /* RF5_BO_PLAS */
1934- case 128 + 25: dam = spell_RF5_BO_ICEE(y, x, m_idx); break; /* RF5_BO_ICEE */
1935- case 128 + 26: dam = spell_RF5_MISSILE(y, x, m_idx); break; /* RF5_MISSILE */
1885+ case 96 + 8: dam = spell_RF4_BREATH(GF_ACID, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_ACID */
1886+ case 96 + 9: dam = spell_RF4_BREATH(GF_ELEC, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_ELEC */
1887+ case 96 + 10: dam = spell_RF4_BREATH(GF_FIRE, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_FIRE */
1888+ case 96 + 11: dam = spell_RF4_BREATH(GF_COLD, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_COLD */
1889+ case 96 + 12: dam = spell_RF4_BREATH(GF_POIS, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_POIS */
1890+ case 96 + 13: dam = spell_RF4_BREATH(GF_NETHER, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_NETH */
1891+ case 96 + 14: dam = spell_RF4_BREATH(GF_LITE, y_br_lite, x_br_lite, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_LITE */
1892+ case 96 + 15: dam = spell_RF4_BREATH(GF_DARK, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_DARK */
1893+ case 96 + 16: dam = spell_RF4_BREATH(GF_CONFUSION, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_CONF */
1894+ case 96 + 17: dam = spell_RF4_BREATH(GF_SOUND, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_SOUN */
1895+ case 96 + 18: dam = spell_RF4_BREATH(GF_CHAOS, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_CHAO */
1896+ case 96 + 19: dam = spell_RF4_BREATH(GF_DISENCHANT, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_DISE */
1897+ case 96 + 20: dam = spell_RF4_BREATH(GF_NEXUS, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_NEXU */
1898+ case 96 + 21: dam = spell_RF4_BREATH(GF_TIME, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_TIME */
1899+ case 96 + 22: dam = spell_RF4_BREATH(GF_INERTIA, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_INER */
1900+ case 96 + 23: dam = spell_RF4_BREATH(GF_GRAVITY, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_GRAV */
1901+ case 96 + 24: dam = spell_RF4_BREATH(GF_SHARDS, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_SHAR */
1902+ case 96 + 25: dam = spell_RF4_BREATH(GF_PLASMA, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_PLAS */
1903+ case 96 + 26: dam = spell_RF4_BREATH(GF_FORCE, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_WALL */
1904+ case 96 + 27: dam = spell_RF4_BREATH(GF_MANA, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_MANA */
1905+ case 96 + 28: dam = spell_RF4_BA_NUKE(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BA_NUKE */
1906+ case 96 + 29: dam = spell_RF4_BREATH(GF_NUKE, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_NUKE */
1907+ case 96 + 30: dam = spell_RF4_BA_CHAO(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BA_CHAO */
1908+ case 96 + 31: dam = spell_RF4_BREATH(GF_DISINTEGRATE, y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF4_BR_DISI */
1909+ case 128 + 0: dam = spell_RF5_BA_ACID(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_ACID */
1910+ case 128 + 1: dam = spell_RF5_BA_ELEC(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_ELEC */
1911+ case 128 + 2: dam = spell_RF5_BA_FIRE(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_FIRE */
1912+ case 128 + 3: dam = spell_RF5_BA_COLD(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_COLD */
1913+ case 128 + 4: dam = spell_RF5_BA_POIS(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_POIS */
1914+ case 128 + 5: dam = spell_RF5_BA_NETH(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_NETH */
1915+ case 128 + 6: dam = spell_RF5_BA_WATE(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_WATE */
1916+ case 128 + 7: dam = spell_RF5_BA_MANA(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_MANA */
1917+ case 128 + 8: dam = spell_RF5_BA_DARK(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_DARK */
1918+ case 128 + 9: dam = spell_RF5_DRAIN_MANA(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_DRAIN_MANA */
1919+ case 128 + 10: dam = spell_RF5_MIND_BLAST(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_MIND_BLAST */
1920+ case 128 + 11: dam = spell_RF5_BRAIN_SMASH(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_MIND_BLAST */
1921+ case 128 + 12: dam = spell_RF5_CAUSE_1(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_CAUSE_1 */
1922+ case 128 + 13: dam = spell_RF5_CAUSE_2(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_CAUSE_2 */
1923+ case 128 + 14: dam = spell_RF5_CAUSE_3(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_CAUSE_3 */
1924+ case 128 + 15: dam = spell_RF5_CAUSE_4(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_CAUSE_4 */
1925+ case 128 + 16: dam = spell_RF5_BO_ACID(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_ACID */
1926+ case 128 + 17: dam = spell_RF5_BO_ELEC(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_ELEC */
1927+ case 128 + 18: dam = spell_RF5_BO_FIRE(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_FIRE */
1928+ case 128 + 19: dam = spell_RF5_BO_COLD(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_COLD */
1929+ case 128 + 20: dam = spell_RF5_BA_LITE(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BA_LITE */
1930+ case 128 + 21: dam = spell_RF5_BO_NETH(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_NETH */
1931+ case 128 + 22: dam = spell_RF5_BO_WATE(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_WATE */
1932+ case 128 + 23: dam = spell_RF5_BO_MANA(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_MANA */
1933+ case 128 + 24: dam = spell_RF5_BO_PLAS(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_PLAS */
1934+ case 128 + 25: dam = spell_RF5_BO_ICEE(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_BO_ICEE */
1935+ case 128 + 26: dam = spell_RF5_MISSILE(y, x, m_idx, 0, MONSTER_TO_PLAYER); break; /* RF5_MISSILE */
19361936 case 128 + 27: spell_RF5_SCARE(y, x, m_idx); break; /* RF5_SCARE */
19371937 case 128 + 28: spell_RF5_BLIND(y, x, m_idx); break; /* RF5_BLIND */
19381938 case 128 + 29: spell_RF5_CONF(y, x, m_idx); break; /* RF5_CONF */
--- a/src/mspells2.c
+++ b/src/mspells2.c
@@ -735,734 +735,65 @@ bool monst_spell_monst(int m_idx)
735735
736736 switch (thrown_spell)
737737 {
738- case 96 + 0: MM_spell_RF4_SHRIEK(m_idx, t_idx); break; /* RF4_SHRIEK */
739- case 96 + 1: return FALSE; /* RF4_XXX1 */
740- case 96 + 2: MM_spell_RF4_DISPEL(m_idx, t_idx); break; /* RF4_DISPEL */
741- case 96 + 3: dam = MM_spell_RF4_ROCKET(y, x, m_idx, t_idx); break; /* RF4_ROCKET */
742- case 96 + 4: dam = MM_spell_RF4_SHOOT(y, x, m_idx, t_idx); break; /* RF4_SHOOT */
743- case 96 + 5: return FALSE; /* RF4_XXX2 */
744- case 96 + 6: return FALSE; /* RF4_XXX3 */
745- case 96 + 7: return FALSE; /* RF4_XXX4 */
746- case 96 + 8: dam = MM_spell_RF4_BREATH(GF_ACID, y, x, m_idx, t_idx); break; /* RF4_BR_ACID */
747- case 96 + 9: dam = MM_spell_RF4_BREATH(GF_ELEC, y, x, m_idx, t_idx); break; /* RF4_BR_ELEC */
748- case 96 + 10: dam = MM_spell_RF4_BREATH(GF_FIRE, y, x, m_idx, t_idx); break; /* RF4_BR_FIRE */
749- case 96 + 11: dam = MM_spell_RF4_BREATH(GF_COLD, y, x, m_idx, t_idx); break; /* RF4_BR_COLD */
750- case 96 + 12: dam = MM_spell_RF4_BREATH(GF_POIS, y, x, m_idx, t_idx); break; /* RF4_BR_POIS */
751- case 96 + 13: dam = MM_spell_RF4_BREATH(GF_NETHER, y, x, m_idx, t_idx); break; /* RF4_BR_NETH */
752- case 96 + 14: dam = MM_spell_RF4_BREATH(GF_LITE, y, x, m_idx, t_idx); break; /* RF4_BR_LITE */
753- case 96 + 15: dam = MM_spell_RF4_BREATH(GF_DARK, y, x, m_idx, t_idx); break; /* RF4_BR_DARK */
754- case 96 + 16: dam = MM_spell_RF4_BREATH(GF_CONFUSION, y, x, m_idx, t_idx); break; /* RF4_BR_CONF */
755- case 96 + 17: dam = MM_spell_RF4_BREATH(GF_SOUND, y, x, m_idx, t_idx); break; /* RF4_BR_SOUN */
756- case 96 + 18: dam = MM_spell_RF4_BREATH(GF_CHAOS, y, x, m_idx, t_idx); break; /* RF4_BR_CHAO */
757- case 96 + 19: dam = MM_spell_RF4_BREATH(GF_DISENCHANT, y, x, m_idx, t_idx); break; /* RF4_BR_DISE */
758- case 96 + 20: dam = MM_spell_RF4_BREATH(GF_NEXUS, y, x, m_idx, t_idx); break; /* RF4_BR_NEXU */
759- case 96 + 21: dam = MM_spell_RF4_BREATH(GF_TIME, y, x, m_idx, t_idx); break; /* RF4_BR_TIME */
760- case 96 + 22: dam = MM_spell_RF4_BREATH(GF_INERTIA, y, x, m_idx, t_idx); break; /* RF4_BR_INER */
761- case 96 + 23: dam = MM_spell_RF4_BREATH(GF_GRAVITY, y, x, m_idx, t_idx); break; /* RF4_BR_GRAV */
762- case 96 + 24: dam = MM_spell_RF4_BREATH(GF_SHARDS, y, x, m_idx, t_idx); break; /* RF4_BR_SHAR */
763- case 96 + 25: dam = MM_spell_RF4_BREATH(GF_PLASMA, y, x, m_idx, t_idx); break; /* RF4_BR_PLAS */
764- case 96 + 26: dam = MM_spell_RF4_BREATH(GF_FORCE, y, x, m_idx, t_idx); break; /* RF4_BR_WALL */
765- case 96 + 27: dam = MM_spell_RF4_BREATH(GF_MANA, y, x, m_idx, t_idx); break; /* RF4_BR_MANA */
766-
767- /* RF4_BA_NUKE */
768- case 96 + 28:
769- if (known)
770- {
771- if (see_either)
772- {
773- disturb(1, 1);
774-
775- if (blind)
776- {
777- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
778- }
779- else
780- {
781- msg_format(_("%^sが%sに放射能球を放った。", "%^s casts a ball of radiation at %s."), m_name, t_name);
782- }
783- }
784- else
785- {
786- mon_fight = TRUE;
787- }
788- }
789-
790- dam = (rlev + damroll(10, 6));
791- breath(y, x, m_idx, GF_NUKE, dam, 2, FALSE, MS_BALL_NUKE, MONSTER_TO_MONSTER);
792-
793- break;
794-
795- case 96 + 29: dam = MM_spell_RF4_BREATH(GF_NUKE, y, x, m_idx, t_idx); break; /* RF4_BR_NUKE */
796-
797- /* RF4_BA_CHAO */
798- case 96 + 30:
799- if (known)
800- {
801- if (see_either)
802- {
803- disturb(1, 1);
804-
805- if (blind)
806- {
807- msg_format(_("%^sが恐ろしげにつぶやいた。", "%^s mumbles frighteningly."), m_name);
808- }
809- else
810- {
811- msg_format(_("%^sが%sに純ログルスを放った。", "%^s invokes raw Logrus upon %s."), m_name, t_name);
812- }
813- }
814- else
815- {
816- mon_fight = TRUE;
817- }
818- }
819-
820- dam = (rlev * 2) + damroll(10, 10);
821- breath(y, x, m_idx, GF_CHAOS, dam, 4, FALSE, MS_BALL_CHAOS, MONSTER_TO_MONSTER);
822- break;
823-
824- case 96 + 31: dam = MM_spell_RF4_BREATH(GF_DISINTEGRATE, y, x, m_idx, t_idx); break; /* RF4_BR_DISI */
825-
826- /* RF5_BA_ACID */
827- case 128+0:
828- if (known)
829- {
830- if (see_either)
831- {
832- disturb(1, 1);
833-
834- if (blind)
835- {
836- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
837- }
838- else
839- {
840- msg_format(_("%^sが%sに向かってアシッド・ボールの呪文を唱えた。",
841- "%^s casts an acid ball at %s."), m_name, t_name);
842- }
843- }
844- else
845- {
846- mon_fight = TRUE;
847- }
848- }
849-
850- if (r_ptr->flags2 & RF2_POWERFUL)
851- {
852- rad = 4;
853- dam = (rlev * 4) + 50 + damroll(10, 10);
854- }
855- else
856- {
857- rad = 2;
858- dam = (randint1(rlev * 3) + 15);
859- }
860- breath(y, x, m_idx,GF_ACID, dam, rad, FALSE, MS_BALL_ACID, MONSTER_TO_MONSTER);
861- break;
862-
863- /* RF5_BA_ELEC */
864- case 128+1:
865- if (known)
866- {
867- if (see_either)
868- {
869- disturb(1, 1);
870-
871- if (blind)
872- {
873- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
874- }
875- else
876- {
877- msg_format(_("%^sが%sに向かってサンダー・ボールの呪文を唱えた。", "%^s casts a lightning ball at %s."), m_name, t_name);
878- }
879- }
880- else
881- {
882- mon_fight = TRUE;
883- }
884- }
885-
886- if (r_ptr->flags2 & RF2_POWERFUL)
887- {
888- rad = 4;
889- dam = (rlev * 4) + 50 + damroll(10, 10);
890- }
891- else
892- {
893- rad = 2;
894- dam = (randint1(rlev * 3 / 2) + 8);
895- }
896- breath(y, x, m_idx,GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC, MONSTER_TO_MONSTER);
897- break;
898-
899- /* RF5_BA_FIRE */
900- case 128+2:
901- if (known)
902- {
903- if (see_either)
904- {
905- disturb(1, 1);
906-
907- if (m_ptr->r_idx == MON_ROLENTO)
908- {
909- if (blind)
910- msg_format(_("%^sが何かを投げた。", "%^s throws something."), m_name);
911- else
912- msg_format(_("%^sが%^sに向かって手榴弾を投げた。", "%^s throws a hand grenade."), m_name, t_name);
913- }
914- else
915- {
916- if (blind)
917- {
918- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
919- }
920- else
921- {
922- msg_format(_("%^sが%sに向かってファイア・ボールの呪文を唱えた。",
923- "%^s casts a fire ball at %s."), m_name, t_name);
924- }
925- }
926- }
927- else
928- {
929- mon_fight = TRUE;
930- }
931- }
932-
933- if (r_ptr->flags2 & RF2_POWERFUL)
934- {
935- rad = 4;
936- dam = (rlev * 4) + 50 + damroll(10, 10);
937- }
938- else
939- {
940- rad = 2;
941- dam = (randint1(rlev * 7 / 2) + 10);
942- }
943- breath(y, x, m_idx,GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE, MONSTER_TO_MONSTER);
944- break;
945-
946- /* RF5_BA_COLD */
947- case 128+3:
948- if (known)
949- {
950- if (see_either)
951- {
952- disturb(1, 1);
953-
954- if (blind)
955- {
956- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
957- }
958- else
959- {
960- msg_format(_("%^sが%sに向かってアイス・ボールの呪文を唱えた。",
961- "%^s casts a frost ball at %s."), m_name, t_name);
962- }
963- }
964- else
965- {
966- mon_fight = TRUE;
967- }
968- }
969-
970- if (r_ptr->flags2 & RF2_POWERFUL)
971- {
972- rad = 4;
973- dam = (rlev * 4) + 50 + damroll(10, 10);
974- }
975- else
976- {
977- rad = 2;
978- dam = (randint1(rlev * 3 / 2) + 10);
979- }
980- breath(y, x, m_idx,GF_COLD, dam, rad, FALSE, MS_BALL_COLD, MONSTER_TO_MONSTER);
981- break;
982-
983- /* RF5_BA_POIS */
984- case 128+4:
985- if (known)
986- {
987- if (see_either)
988- {
989- disturb(1, 1);
990-
991- if (blind)
992- {
993- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
994- }
995- else
996- {
997- msg_format(_("%^sが%sに向かって悪臭雲の呪文を唱えた。",
998- "%^s casts a stinking cloud at %s."), m_name, t_name);
999- }
1000- }
1001- else
1002- {
1003- mon_fight = TRUE;
1004- }
1005- }
1006-
1007- dam = damroll(12, 2) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1008- breath(y, x, m_idx,GF_POIS, dam, 2, FALSE, MS_BALL_POIS, MONSTER_TO_MONSTER);
1009-
1010- break;
1011-
1012- /* RF5_BA_NETH */
1013- case 128+5:
1014- if (known)
1015- {
1016- if (see_either)
1017- {
1018- disturb(1, 1);
1019-
1020- if (blind)
1021- {
1022- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
1023- }
1024- else
1025- {
1026- msg_format(_("%^sが%sに向かって地獄球の呪文を唱えた。", "%^s casts a nether ball at %s."), m_name, t_name);
1027- }
1028- }
1029- else
1030- {
1031- mon_fight = TRUE;
1032- }
1033- }
1034-
1035- dam = 50 + damroll(10, 10) + (rlev * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1));
1036- breath(y, x, m_idx,GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER, MONSTER_TO_MONSTER);
1037-
1038- break;
1039-
1040- /* RF5_BA_WATE */
1041- case 128+6:
1042- if (known)
1043- {
1044- if (see_either)
1045- {
1046- disturb(1, 1);
1047-
1048- if (blind)
1049- {
1050- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
1051- }
1052- else
1053- {
1054- msg_format(_("%^sが%sに対して流れるような身振りをした。", "%^s gestures fluidly at %s."), m_name, t_name);
1055-
1056- msg_format(_("%^sは渦巻に飲み込まれた。", "%^s is engulfed in a whirlpool."), t_name);
1057- }
1058- }
1059- else
1060- {
1061- mon_fight = TRUE;
1062- }
1063- }
1064-
1065- dam = ((r_ptr->flags2 & RF2_POWERFUL) ? randint1(rlev * 3) : randint1(rlev * 2)) + 50;
1066- breath(y, x, m_idx,GF_WATER, dam, 4, FALSE, MS_BALL_WATER, MONSTER_TO_MONSTER);
1067-
1068- break;
1069-
1070- /* RF5_BA_MANA */
1071- case 128+7:
1072- if (known)
1073- {
1074- if (see_either)
1075- {
1076- disturb(1, 1);
1077-
1078- if (blind)
1079- {
1080- msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
1081- }
1082- else
1083- {
1084- msg_format(_("%^sが%sに対して魔力の嵐の呪文を念じた。", "%^s invokes a mana storm upon %s."), m_name, t_name);
1085- }
1086- }
1087- else
1088- {
1089- mon_fight = TRUE;
1090- }
1091- }
1092-
1093- dam = (rlev * 4) + 50 + damroll(10, 10);
1094- breath(y, x, m_idx,GF_MANA, dam, 4, FALSE, MS_BALL_MANA, MONSTER_TO_MONSTER);
1095-
1096- break;
1097-
1098- /* RF5_BA_DARK */
1099- case 128+8:
1100- if (known)
1101- {
1102- if (see_either)
1103- {
1104- disturb(1, 1);
1105-
1106- if (blind)
1107- {
1108- msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
1109- }
1110- else
1111- {
1112- msg_format(_("%^sが%sに対して暗黒の嵐の呪文を念じた。", "%^s invokes a darkness storm upon %s."), m_name, t_name);
1113- }
1114- }
1115- else
1116- {
1117- mon_fight = TRUE;
1118- }
1119- }
1120-
1121- dam = (rlev * 4) + 50 + damroll(10, 10);
1122- breath(y, x, m_idx,GF_DARK, dam, 4, FALSE, MS_BALL_DARK, MONSTER_TO_MONSTER);
1123-
1124- break;
1125-
1126- /* RF5_DRAIN_MANA */
1127- case 128+9:
1128- if (see_m)
1129- {
1130- /* Basic message */
1131- msg_format(_("%^sは精神エネルギーを%sから吸いとった。", "%^s draws psychic energy from %s."), m_name, t_name);
1132- }
1133-
1134- dam = ((randint1(rlev) / 2) + 1);
1135- breath(y, x, m_idx,GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA, MONSTER_TO_MONSTER);
1136-
1137- break;
1138-
1139- /* RF5_MIND_BLAST */
1140- case 128+10:
1141- if (see_m)
1142- {
1143- msg_format(_("%^sは%sをじっと睨んだ。", "%^s gazes intently at %s."), m_name, t_name);
1144- }
1145-
1146- dam = damroll(7, 7);
1147- breath(y, x, m_idx,GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST, MONSTER_TO_MONSTER);
1148-
1149- break;
1150-
1151- /* RF5_BRAIN_SMASH */
1152- case 128+11:
1153- if (see_m)
1154- {
1155- msg_format(_("%^sは%sをじっと睨んだ。", "%^s gazes intently at %s."), m_name, t_name);
1156- }
1157-
1158- dam = damroll(12, 12);
1159- breath(y, x, m_idx,GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH, MONSTER_TO_MONSTER);
1160-
1161- break;
1162-
1163- /* RF5_CAUSE_1 */
1164- case 128+12:
1165- if (known)
1166- {
1167- if (see_m)
1168- {
1169- msg_format(_("%^sは%sを指さして呪いをかけた。", "%^s points at %s and curses."), m_name, t_name);
1170- }
1171- else
1172- {
1173- mon_fight = TRUE;
1174- }
1175- }
1176-
1177- dam = damroll(3, 8);
1178- breath(y, x, m_idx,GF_CAUSE_1, dam, 0, FALSE, MS_CAUSE_1, MONSTER_TO_MONSTER);
1179-
1180- break;
1181-
1182- /* RF5_CAUSE_2 */
1183- case 128+13:
1184- if (known)
1185- {
1186- if (see_m)
1187- {
1188- msg_format(_("%^sは%sを指さして恐ろしげに呪いをかけた。",
1189- "%^s points at %s and curses horribly."), m_name, t_name);
1190- }
1191- else
1192- {
1193- mon_fight = TRUE;
1194- }
1195- }
1196-
1197- dam = damroll(8, 8);
1198- breath(y, x, m_idx,GF_CAUSE_2, dam, 0, FALSE, MS_CAUSE_2, MONSTER_TO_MONSTER);
1199-
1200- break;
1201-
1202- /* RF5_CAUSE_3 */
1203- case 128+14:
1204- if (known)
1205- {
1206- if (see_m)
1207- {
1208- msg_format(_("%^sは%sを指さし、恐ろしげに呪文を唱えた!",
1209- "%^s points at %s, incanting terribly!"), m_name, t_name);
1210- }
1211- else
1212- {
1213- mon_fight = TRUE;
1214- }
1215- }
1216-
1217- dam = damroll(10, 15);
1218- breath(y, x, m_idx,GF_CAUSE_3, dam, 0, FALSE, MS_CAUSE_3, MONSTER_TO_MONSTER);
1219-
1220- break;
1221-
1222- /* RF5_CAUSE_4 */
1223- case 128+15:
1224- if (known)
1225- {
1226- if (see_m)
1227- {
1228- msg_format(_("%^sが%sの秘孔を突いて、「お前は既に死んでいる」と叫んだ。",
1229- "%^s points at %s, screaming the word, 'DIE!'"), m_name, t_name);
1230- }
1231- else
1232- {
1233- mon_fight = TRUE;
1234- }
1235- }
1236-
1237- dam = damroll(15, 15);
1238- breath(y, x, m_idx,GF_CAUSE_4, dam, 0, FALSE, MS_CAUSE_4, MONSTER_TO_MONSTER);
1239-
1240- break;
1241-
1242- /* RF5_BO_ACID */
1243- case 128+16:
1244- if (known)
1245- {
1246- if (see_either)
1247- {
1248- msg_format(_("%sが%sに向かってアシッド・ボルトの呪文を唱えた。", "%^s casts an acid bolt at %s."), m_name, t_name);
1249- }
1250- else
1251- {
1252- mon_fight = TRUE;
1253- }
1254- }
1255-
1256- dam = (damroll(7, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1257- bolt(m_idx, y, x, GF_ACID, dam, MS_BOLT_ACID, MONSTER_TO_MONSTER);
1258-
1259- break;
1260-
1261- /* RF5_BO_ELEC */
1262- case 128+17:
1263- if (known)
1264- {
1265- if (see_either)
1266- {
1267- msg_format(_("%^sが%sに向かってサンダー・ボルトの呪文を唱えた。", "%^s casts a lightning bolt at %s."), m_name, t_name);
1268- }
1269- else
1270- {
1271- mon_fight = TRUE;
1272- }
1273- }
1274-
1275- dam = (damroll(4, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1276- bolt(m_idx, y, x, GF_ELEC, dam, MS_BOLT_ELEC, MONSTER_TO_MONSTER);
1277-
1278- break;
1279-
1280- /* RF5_BO_FIRE */
1281- case 128+18:
1282- if (known)
1283- {
1284- if (see_either)
1285- {
1286- msg_format(_("%^sが%sに向かってファイア・ボルトの呪文を唱えた。", "%^s casts a fire bolt at %s."), m_name, t_name);
1287- }
1288- else
1289- {
1290- mon_fight = TRUE;
1291- }
1292- }
1293-
1294- dam = (damroll(9, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1295- bolt(m_idx, y, x, GF_FIRE, dam, MS_BOLT_FIRE, MONSTER_TO_MONSTER);
1296-
1297- break;
1298-
1299- /* RF5_BO_COLD */
1300- case 128+19:
1301- if (known)
1302- {
1303- if (see_either)
1304- {
1305- msg_format(_("%^sが%sに向かってアイス・ボルトの呪文を唱えた。", "%^s casts a frost bolt at %s."), m_name, t_name);
1306- }
1307- else
1308- {
1309- mon_fight = TRUE;
1310- }
1311- }
1312-
1313- dam = (damroll(6, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
1314- bolt(m_idx, y, x, GF_COLD, dam, MS_BOLT_COLD, MONSTER_TO_MONSTER);
1315-
1316- break;
1317-
1318- /* RF5_BA_LITE */
1319- case 128+20:
1320- if (known)
1321- {
1322- if (see_either)
1323- {
1324- disturb(1, 1);
1325-
1326- if (blind)
1327- {
1328- msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
1329- }
1330- else
1331- {
1332- msg_format(_("%^sが%sに対してスターバーストの呪文を念じた。",
1333- "%^s invokes a starburst upon %s."), m_name, t_name);
1334- }
1335- }
1336- else
1337- {
1338- mon_fight = TRUE;
1339- }
1340- }
1341-
1342- dam = (rlev * 4) + 50 + damroll(10, 10);
1343- breath(y, x, m_idx,GF_LITE, dam, 4, FALSE, MS_STARBURST, MONSTER_TO_MONSTER);
1344-
1345- break;
1346-
1347- /* RF5_BO_NETH */
1348- case 128+21:
1349- if (known)
1350- {
1351- if (see_either)
1352- {
1353- msg_format(_("%^sが%sに向かって地獄の矢の呪文を唱えた。",
1354- "%^s casts a nether bolt at %s."), m_name, t_name);
1355- }
1356- else
1357- {
1358- mon_fight = TRUE;
1359- }
1360- }
1361-
1362- dam = 30 + damroll(5, 5) + (rlev * 4) / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3);
1363- bolt(m_idx, y, x, GF_NETHER, dam, MS_BOLT_NETHER, MONSTER_TO_MONSTER);
1364-
1365- break;
1366-
1367- /* RF5_BO_WATE */
1368- case 128+22:
1369- if (known)
1370- {
1371- if (see_either)
1372- {
1373- msg_format(_("%^sが%sに向かってウォーター・ボルトの呪文を唱えた。",
1374- "%^s casts a water bolt at %s."), m_name, t_name);
1375- }
1376- else
1377- {
1378- mon_fight = TRUE;
1379- }
1380- }
1381-
1382- dam = damroll(10, 10) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
1383- bolt(m_idx, y, x, GF_WATER, dam, MS_BOLT_WATER, MONSTER_TO_MONSTER);
1384-
1385- break;
1386-
1387- /* RF5_BO_MANA */
1388- case 128+23:
1389- if (known)
1390- {
1391- if (see_either)
1392- {
1393- msg_format(_("%^sが%sに向かって魔力の矢の呪文を唱えた。",
1394- "%^s casts a mana bolt at %s."), m_name, t_name);
1395- }
1396- else
1397- {
1398- mon_fight = TRUE;
1399- }
1400- }
1401-
1402- dam = randint1(rlev * 7 / 2) + 50;
1403- bolt(m_idx, y, x, GF_MANA, dam, MS_BOLT_MANA, MONSTER_TO_MONSTER);
1404-
1405- break;
1406-
1407- /* RF5_BO_PLAS */
1408- case 128+24:
1409- if (known)
1410- {
1411- if (see_either)
1412- {
1413- msg_format(_("%^sが%sに向かってプラズマ・ボルトの呪文を唱えた。",
1414- "%^s casts a plasma bolt at %s."), m_name, t_name);
1415- }
1416- else
1417- {
1418- mon_fight = TRUE;
1419- }
1420- }
1421-
1422- dam = 10 + damroll(8, 7) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
1423- bolt(m_idx, y, x, GF_PLASMA, dam, MS_BOLT_PLASMA, MONSTER_TO_MONSTER);
1424-
1425- break;
1426-
1427- /* RF5_BO_ICEE */
1428- case 128+25:
1429- if (known)
1430- {
1431- if (see_either)
1432- {
1433- msg_format(_("%^sが%sに向かって極寒の矢の呪文を唱えた。",
1434- "%^s casts an ice bolt at %s."), m_name, t_name);
1435- }
1436- else
1437- {
1438- mon_fight = TRUE;
1439- }
1440- }
1441-
1442- dam = damroll(6, 6) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
1443- bolt(m_idx, y, x, GF_ICE, dam, MS_BOLT_ICE, MONSTER_TO_MONSTER);
1444-
1445- break;
1446-
1447- /* RF5_MISSILE */
1448- case 128+26:
1449- if (known)
1450- {
1451- if (see_either)
1452- {
1453- msg_format(_("%^sが%sに向かってマジック・ミサイルの呪文を唱えた。",
1454- "%^s casts a magic missile at %s."), m_name, t_name);
1455- }
1456- else
1457- {
1458- mon_fight = TRUE;
1459- }
1460- }
1461-
1462- dam = damroll(2, 6) + (rlev / 3);
1463- bolt(m_idx, y, x, GF_MISSILE, dam, MS_MAGIC_MISSILE, MONSTER_TO_MONSTER);
1464-
1465- break;
738+ case 96 + 0: spell_RF4_SHRIEK(m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_SHRIEK */
739+ case 96 + 1: return FALSE; /* RF4_XXX1 */
740+ case 96 + 2: spell_RF4_DISPEL(m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_DISPEL */
741+ case 96 + 3: dam = spell_RF4_ROCKET(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_ROCKET */
742+ case 96 + 4: dam = spell_RF4_SHOOT(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_SHOOT */
743+ case 96 + 5: return FALSE; /* RF4_XXX2 */
744+ case 96 + 6: return FALSE; /* RF4_XXX3 */
745+ case 96 + 7: return FALSE; /* RF4_XXX4 */
746+ case 96 + 8: dam = spell_RF4_BREATH(GF_ACID, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_ACID */
747+ case 96 + 9: dam = spell_RF4_BREATH(GF_ELEC, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_ELEC */
748+ case 96 + 10: dam = spell_RF4_BREATH(GF_FIRE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_FIRE */
749+ case 96 + 11: dam = spell_RF4_BREATH(GF_COLD, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_COLD */
750+ case 96 + 12: dam = spell_RF4_BREATH(GF_POIS, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_POIS */
751+ case 96 + 13: dam = spell_RF4_BREATH(GF_NETHER, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_NETH */
752+ case 96 + 14: dam = spell_RF4_BREATH(GF_LITE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_LITE */
753+ case 96 + 15: dam = spell_RF4_BREATH(GF_DARK, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_DARK */
754+ case 96 + 16: dam = spell_RF4_BREATH(GF_CONFUSION, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_CONF */
755+ case 96 + 17: dam = spell_RF4_BREATH(GF_SOUND, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_SOUN */
756+ case 96 + 18: dam = spell_RF4_BREATH(GF_CHAOS, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_CHAO */
757+ case 96 + 19: dam = spell_RF4_BREATH(GF_DISENCHANT, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_DISE */
758+ case 96 + 20: dam = spell_RF4_BREATH(GF_NEXUS, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_NEXU */
759+ case 96 + 21: dam = spell_RF4_BREATH(GF_TIME, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_TIME */
760+ case 96 + 22: dam = spell_RF4_BREATH(GF_INERTIA, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_INER */
761+ case 96 + 23: dam = spell_RF4_BREATH(GF_GRAVITY, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_GRAV */
762+ case 96 + 24: dam = spell_RF4_BREATH(GF_SHARDS, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_SHAR */
763+ case 96 + 25: dam = spell_RF4_BREATH(GF_PLASMA, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_PLAS */
764+ case 96 + 26: dam = spell_RF4_BREATH(GF_FORCE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_WALL */
765+ case 96 + 27: dam = spell_RF4_BREATH(GF_MANA, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_MANA */
766+ case 96 + 28: dam = spell_RF4_BA_NUKE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BA_NUKE */
767+ case 96 + 29: dam = spell_RF4_BREATH(GF_NUKE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_NUKE */
768+ case 96 + 30: dam = spell_RF4_BA_CHAO(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BA_CHAO */
769+ case 96 + 31: dam = spell_RF4_BREATH(GF_DISINTEGRATE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF4_BR_DISI */
770+ case 128 + 0: dam = spell_RF5_BA_ACID(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_ACID */
771+ case 128 + 1: dam = spell_RF5_BA_ELEC(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_ELEC */
772+ case 128 + 2: dam = spell_RF5_BA_FIRE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_FIRE */
773+ case 128 + 3: dam = spell_RF5_BA_COLD(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_COLD */
774+ case 128 + 4: dam = spell_RF5_BA_POIS(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_POIS */
775+ case 128 + 5: dam = spell_RF5_BA_NETH(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_NETH */
776+ case 128 + 6: dam = spell_RF5_BA_WATE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_WATE */
777+ case 128 + 7: dam = spell_RF5_BA_MANA(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_MANA */
778+ case 128 + 8: dam = spell_RF5_BA_DARK(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_DARK */
779+ case 128 + 9: dam = spell_RF5_DRAIN_MANA(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_DRAIN_MANA */
780+ case 128 + 10: dam = spell_RF5_MIND_BLAST(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_MIND_BLAST */
781+ case 128 + 11: dam = spell_RF5_BRAIN_SMASH(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BRAIN_SMASH */
782+ case 128 + 12: dam = spell_RF5_CAUSE_1(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CAUSE_1 */
783+ case 128 + 13: dam = spell_RF5_CAUSE_2(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CAUSE_2 */
784+ case 128 + 14: dam = spell_RF5_CAUSE_3(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CAUSE_3 */
785+ case 128 + 15: dam = spell_RF5_CAUSE_4(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_CAUSE_4 */
786+ case 128 + 16: dam = spell_RF5_BO_ACID(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_ACID */
787+ case 128 + 17: dam = spell_RF5_BO_ELEC(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_ELEC */
788+ case 128 + 18: dam = spell_RF5_BO_FIRE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_FIRE */
789+ case 128 + 19: dam = spell_RF5_BO_COLD(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_COLD */
790+ case 128 + 20: dam = spell_RF5_BA_LITE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BA_LITE */
791+ case 128 + 21: dam = spell_RF5_BO_NETH(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_NETH */
792+ case 128 + 22: dam = spell_RF5_BO_WATE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_WATE */
793+ case 128 + 23: dam = spell_RF5_BO_MANA(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_MANA */
794+ case 128 + 24: dam = spell_RF5_BO_PLAS(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_PLAS */
795+ case 128 + 25: dam = spell_RF5_BO_ICEE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_BO_ICEE */
796+ case 128 + 26: dam = spell_RF5_MISSILE(y, x, m_idx, t_idx, MONSTER_TO_MONSTER); break; /* RF5_MISSILE */
1466797
1467798 /* RF5_SCARE */
1468799 case 128+27:
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -1,8 +1,7 @@
11 #include "angband.h"
22
3-cptr monster_name(int m_idx)
3+char* monster_name(int m_idx, char* m_name)
44 {
5- static char m_name[80];
65 monster_type *m_ptr = &m_list[m_idx];
76 monster_desc(m_name, m_ptr, 0x00);
87 return m_name;
@@ -41,197 +40,175 @@ int monster_level_idx(int m_idx)
4140 return rlev;
4241 }
4342
44-void MP_spell_RF4_SHRIEK(int m_idx)
43+bool monster_is_powerful(int m_idx)
4544 {
46- cptr m_name = monster_name(m_idx);
47- disturb(1, 1);
48- msg_format(_("%^sがかん高い金切り声をあげた。", "%^s makes a high pitched shriek."), m_name);
49- aggravate_monsters(m_idx);
45+ monster_type *m_ptr = &m_list[m_idx];
46+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
47+ return (r_ptr->flags2 & RF2_POWERFUL);
5048 }
5149
52-void MM_spell_RF4_SHRIEK(int m_idx, int t_idx)
50+void monspell_message(int m_idx, int t_idx, cptr msg1, cptr msg2, cptr msg3, int TARGET_TYPE)
5351 {
54- cptr m_name = monster_name(m_idx);
55- cptr t_name = monster_name(t_idx);
5652 bool known = monster_near_player(m_idx, t_idx);
57- bool see_m = see_monster(m_idx);
58- if (known)
59- {
60- if (see_m)
61- {
62- msg_format(_("%^sが%sに向かって叫んだ。", "%^s shrieks at %s."), m_name, t_name);
63- }
64- else
65- {
66- mon_fight = TRUE;
67- }
68- }
69- (void)set_monster_csleep(t_idx, 0);
70-}
53+ bool see_either = see_monster(m_idx) || see_monster(t_idx);
54+ bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
55+ bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
56+ char m_name[80], t_name[80];
57+ monster_name(m_idx, m_name);
58+ monster_name(t_idx, t_name);
7159
72-void MP_spell_RF4_DISPEL(int m_idx)
73-{
74- cptr m_name = monster_name(m_idx);
75- disturb(1, 1);
60+
61+ if (mon_to_player || (mon_to_mon && known && see_either))
62+ disturb(1, 1);
7663
7764 if (p_ptr->blind)
78- msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
65+ {
66+ if (mon_to_player || (mon_to_mon && known && see_either))
67+ msg_format(msg1, m_name);
68+ }
7969 else
80- msg_format(_("%^sが魔力消去の呪文を念じた。", "%^s invokes a dispel magic."), m_name);
81-
82- dispel_player();
83- if (p_ptr->riding) dispel_monster_status(p_ptr->riding);
84-
85- if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
86- msg_print(_("やりやがったな!", ""));
87-
88- learn_spell(MS_DISPEL);
89-}
90-
91-void MM_spell_RF4_DISPEL(int m_idx, int t_idx)
92-{
93- cptr m_name = monster_name(m_idx);
94- cptr t_name = monster_name(t_idx);
95- bool known = monster_near_player(m_idx, t_idx);
96- bool see_m = see_monster(m_idx);
97- if (known)
9870 {
99- if (see_m)
71+ if (mon_to_player)
10072 {
101- msg_format(_("%^sが%sに対して魔力消去の呪文を念じた。",
102- "%^s invokes a dispel magic at %s."), m_name, t_name);
73+ msg_format(msg2, m_name);
10374 }
104- else
75+ else if (mon_to_mon && known && see_either)
10576 {
106- mon_fight = TRUE;
77+ msg_format(msg3, m_name, t_name);
10778 }
10879 }
10980
110- if (t_idx == p_ptr->riding) dispel_player();
111- dispel_monster_status(t_idx);
81+ if (mon_to_mon && known && !see_either)
82+ mon_fight = TRUE;
11283 }
11384
114-int spell_RF4_ROCKET(int y, int x, int m_idx, int TARGET_TYPE)
85+void spell_RF4_SHRIEK(int m_idx, int t_idx, int TARGET_TYPE)
11586 {
116- int dam;
117- monster_type *m_ptr = &m_list[m_idx];
87+ bool known = monster_near_player(m_idx, t_idx);
88+ bool see_m = see_monster(m_idx);
89+ char m_name[80], t_name[80];
90+ monster_name(m_idx, m_name);
91+ monster_name(t_idx, t_name);
11892
119- dam = (m_ptr->hp / 4) > 800 ? 800 : (m_ptr->hp / 4);
120- breath(y, x, m_idx, GF_ROCKET, dam, 2, FALSE, MS_ROCKET, TARGET_TYPE);
121- if (TARGET_TYPE == MONSTER_TO_PLAYER)
93+ if (TARGET_TYPE == MONSTER_TO_MONSTER)
12294 {
123- update_smart_learn(m_idx, DRS_SHARD);
95+ if (known)
96+ {
97+ if (see_m)
98+ {
99+ msg_format(_("%^sが%sに向かって叫んだ。", "%^s shrieks at %s."), m_name, t_name);
100+ }
101+ else
102+ {
103+ mon_fight = TRUE;
104+ }
105+ }
106+ (void)set_monster_csleep(t_idx, 0);
107+ }
108+ else if (TARGET_TYPE == MONSTER_TO_PLAYER)
109+ {
110+ disturb(1, 1);
111+ msg_format(_("%^sがかん高い金切り声をあげた。", "%^s makes a high pitched shriek."), m_name);
112+ aggravate_monsters(m_idx);
124113 }
125- return dam;
126114 }
127115
128-int MP_spell_RF4_ROCKET(int y, int x, int m_idx)
116+void spell_RF4_DISPEL(int m_idx, int t_idx, int TARGET_TYPE)
129117 {
130- cptr m_name = monster_name(m_idx);
131- disturb(1, 1);
132- if (p_ptr->blind)
133- msg_format(_("%^sが何かを射った。", "%^s shoots something."), m_name);
134- else
135- msg_format(_("%^sがロケットを発射した。", "%^s fires a rocket."), m_name);
136-
137- return spell_RF4_ROCKET(y, x, m_idx, MONSTER_TO_PLAYER);
138-}
118+ bool known = monster_near_player(m_idx, t_idx);
119+ bool see_m = see_monster(m_idx);
120+ char m_name[80], t_name[80];
121+ monster_name(m_idx, m_name);
122+ monster_name(t_idx, t_name);
139123
140-int MM_spell_RF4_ROCKET(int y, int x, int m_idx, int t_idx)
141-{
142- cptr m_name = monster_name(m_idx);
143- cptr t_name = monster_name(t_idx);
144124
145- bool known = monster_near_player(m_idx, t_idx);
146- bool see_either = see_monster(m_idx) || see_monster(t_idx);
147- if (known)
125+ if (TARGET_TYPE == MONSTER_TO_MONSTER)
148126 {
149- if (see_either)
127+ if (known)
150128 {
151- disturb(1, 1);
152-
153- if (p_ptr->blind)
129+ if (see_m)
154130 {
155- msg_format(_("%^sが何かを射った。", "%^s shoots something."), m_name);
131+ msg_format(_("%^sが%sに対して魔力消去の呪文を念じた。",
132+ "%^s invokes a dispel magic at %s."), m_name, t_name);
156133 }
157134 else
158135 {
159- msg_format(_("%^sが%sにロケットを発射した。", "%^s fires a rocket at %s."), m_name, t_name);
136+ mon_fight = TRUE;
160137 }
161138 }
139+
140+ if (t_idx == p_ptr->riding) dispel_player();
141+ dispel_monster_status(t_idx);
142+ }
143+ else if (TARGET_TYPE == MONSTER_TO_PLAYER)
144+ {
145+ disturb(1, 1);
146+
147+ if (p_ptr->blind)
148+ msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
162149 else
163- {
164- mon_fight = TRUE;
165- }
150+ msg_format(_("%^sが魔力消去の呪文を念じた。", "%^s invokes a dispel magic."), m_name);
151+
152+ dispel_player();
153+ if (p_ptr->riding) dispel_monster_status(p_ptr->riding);
154+
155+ if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
156+ msg_print(_("やりやがったな!", ""));
157+
158+ learn_spell(MS_DISPEL);
166159 }
167- return spell_RF4_ROCKET(y, x, m_idx, MONSTER_TO_MONSTER);
168160 }
169161
170-int spell_RF4_SHOOT(int y, int x, int m_idx, int TARGET_TYPE)
162+int spell_RF4_ROCKET(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
171163 {
172164 int dam;
173165 monster_type *m_ptr = &m_list[m_idx];
174- monster_race *r_ptr = &r_info[m_ptr->r_idx];
175166
176- dam = damroll(r_ptr->blow[0].d_dice, r_ptr->blow[0].d_side);
177- bolt(m_idx, y, x, GF_ARROW, dam, MS_SHOOT, TARGET_TYPE);
178- sound(SOUND_SHOOT);
167+ monspell_message(m_idx, t_idx,
168+ _("%^sが何かを射った。", "%^s shoots something."),
169+ _("%^sがロケットを発射した。", "%^s fires a rocket."),
170+ _("%^sが%sにロケットを発射した。", "%^s fires a rocket at %s."),
171+ TARGET_TYPE);
179172
173+ dam = (m_ptr->hp / 4) > 800 ? 800 : (m_ptr->hp / 4);
174+ breath(y, x, m_idx, GF_ROCKET, dam, 2, FALSE, MS_ROCKET, TARGET_TYPE);
175+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
176+ update_smart_learn(m_idx, DRS_SHARD);
180177 return dam;
181178 }
182179
183-int MP_spell_RF4_SHOOT(int y, int x, int m_idx)
180+int spell_RF4_SHOOT(int y, int x, int m_idx, int t_idx,int TARGET_TYPE)
184181 {
185- bool learnable = spell_learnable(m_idx);
186- cptr m_name = monster_name(m_idx);
187-
188- disturb(1, 1);
189- if (p_ptr->blind)
190- msg_format(_("%^sが奇妙な音を発した。", "%^s makes a strange noise."), m_name);
191- else
192- msg_format(_("%^sが矢を放った。", "%^s fires an arrow."), m_name);
182+ int dam;
183+ monster_type *m_ptr = &m_list[m_idx];
184+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
185+
186+ monspell_message(m_idx, t_idx,
187+ _("%^sが奇妙な音を発した。", "%^s makes a strange noise."),
188+ _("%^sが矢を放った。", "%^s fires an arrow."),
189+ _("%^sが%sに矢を放った。", "%^s fires an arrow at %s."),
190+ TARGET_TYPE);
193191
194- return spell_RF4_SHOOT(y, x, m_idx, MONSTER_TO_PLAYER);
195-}
192+ dam = damroll(r_ptr->blow[0].d_dice, r_ptr->blow[0].d_side);
193+ bolt(m_idx, y, x, GF_ARROW, dam, MS_SHOOT, TARGET_TYPE);
194+ sound(SOUND_SHOOT);
196195
197-int MM_spell_RF4_SHOOT(int y, int x, int m_idx, int t_idx)
198-{
199- cptr m_name = monster_name(m_idx);
200- cptr t_name = monster_name(t_idx);
201- bool known = monster_near_player(m_idx, t_idx);
202- bool see_either = see_monster(m_idx) || see_monster(t_idx);
203- if (known)
204- {
205- if (see_either)
206- {
207- if (p_ptr->blind)
208- {
209- msg_format(_("%^sが奇妙な音を発した。", "%^s makes a strange noise."), m_name);
210- }
211- else
212- {
213- msg_format(_("%^sが%sに矢を放った。", "%^s fires an arrow at %s."), m_name, t_name);
214- }
215- }
216- else
217- {
218- mon_fight = TRUE;
219- }
220- }
221- return spell_RF4_SHOOT(y, x, m_idx, MONSTER_TO_MONSTER);
196+ return dam;
222197 }
223198
224199 int spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
225200 {
226- bool learnable = spell_learnable(m_idx);
227201 int dam, ms_type, drs_type;
228202 cptr type_s;
229203 bool smart_learn = TRUE;
230- cptr m_name = monster_name(m_idx);
231- cptr t_name = monster_name(t_idx);
232204 monster_type *m_ptr = &m_list[m_idx];
233205 bool known = monster_near_player(m_idx, t_idx);
234206 bool see_either = see_monster(m_idx) || see_monster(t_idx);
207+ bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
208+ bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
209+ char m_name[80], t_name[80];
210+ monster_name(m_idx, m_name);
211+ monster_name(t_idx, t_name);
235212
236213 switch (GF_TYPE)
237214 {
@@ -371,7 +348,9 @@ int spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx, int t_idx, int TARGET
371348 break;
372349 }
373350
374- disturb(1, 1);
351+ if (mon_to_player || (mon_to_mon && known && see_either))
352+ disturb(1, 1);
353+
375354 if (m_ptr->r_idx == MON_JAIAN && GF_TYPE == GF_SOUND)
376355 {
377356 msg_format(_("「ボォエ〜〜〜〜〜〜」", "'Booooeeeeee'"));
@@ -382,104 +361,85 @@ int spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx, int t_idx, int TARGET
382361 }
383362 else if (p_ptr->blind)
384363 {
385- if (TARGET_TYPE == MONSTER_TO_PLAYER ||
386- ((TARGET_TYPE == MONSTER_TO_MONSTER) && known && see_either))
387- msg_format(_("%^sが何かのブレスを吐いた。", "%^s breathes."), m_name);
364+ if (mon_to_player || (mon_to_mon && known && see_either))
365+ msg_format(_("%^sが何かのブレスを吐いた。", "%^s breathes."), m_name);
388366 }
389367 else
390368 {
391- if (TARGET_TYPE == MONSTER_TO_PLAYER)
369+ if (mon_to_player)
392370 {
393371 msg_format(_("%^sが%^sのブレスを吐いた。", "%^s breathes %^s."), m_name, type_s);
394372 }
395- else if ((TARGET_TYPE == MONSTER_TO_MONSTER) && known && see_either)
373+ else if (mon_to_mon && known && see_either)
396374 {
397375 _(msg_format("%^sが%^sに%^sのブレスを吐いた。", m_name, t_name, type_s),
398376 msg_format("%^s breathes %^s at %^s.", m_name, type_s, t_name));
399377 }
400378 }
401379
402- if (known && !see_either)
380+ if (mon_to_mon && known && !see_either)
403381 mon_fight = TRUE;
404382
405383 sound(SOUND_BREATH);
406384 breath(y, x, m_idx, GF_TYPE, dam, 0, TRUE, ms_type, TARGET_TYPE);
407- if (smart_learn && TARGET_TYPE == MONSTER_TO_PLAYER)
385+ if (smart_learn && mon_to_player)
408386 update_smart_learn(m_idx, drs_type);
409- return dam;
410-}
411387
412-int MP_spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx)
413-{
414- return spell_RF4_BREATH(GF_TYPE, y, x, m_idx, 0, MONSTER_TO_PLAYER);
415-}
416-
417-int MM_spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx, int t_idx)
418-{
419- return spell_RF4_BREATH(GF_TYPE, y, x, m_idx, t_idx, MONSTER_TO_MONSTER);
388+ return dam;
420389 }
421390
422-int spell_RF4_BA_CHAO(int y, int x, int m_idx)
391+int spell_RF4_BA_NUKE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
423392 {
424- bool learnable = spell_learnable(m_idx);
425- cptr m_name = monster_name(m_idx);
426- monster_type *m_ptr = &m_list[m_idx];
427- monster_race *r_ptr = &r_info[m_ptr->r_idx];
393+ int dam;
428394 int rlev = monster_level_idx(m_idx);
429395
430- int dam;
431- disturb(1, 1);
396+ monspell_message(m_idx, t_idx,
397+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
398+ _("%^sが放射能球を放った。", "%^s casts a ball of radiation."),
399+ _("%^sが%sに放射能球を放った。", "%^s casts a ball of radiation at %s."),
400+ TARGET_TYPE);
432401
433- if (p_ptr->blind)
434- msg_format(_("%^sが恐ろしげにつぶやいた。", "%^s mumbles frighteningly."), m_name);
435- else
436- msg_format(_("%^sが純ログルスを放った。", "%^s invokes a raw Logrus."), m_name);
437-
438- dam = ((r_ptr->flags2 & RF2_POWERFUL) ? (rlev * 3) : (rlev * 2)) + damroll(10, 10);
402+ dam = (rlev + damroll(10, 6)) * (monster_is_powerful(m_idx) ? 2 : 1);
403+ breath(y, x, m_idx, GF_NUKE, dam, 2, FALSE, MS_BALL_NUKE, TARGET_TYPE);
404+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
405+ update_smart_learn(m_idx, DRS_POIS);
439406
440- breath(y, x, m_idx, GF_CHAOS, dam, 4, FALSE, MS_BALL_CHAOS, MONSTER_TO_PLAYER);
441- update_smart_learn(m_idx, DRS_CHAOS);
442407 return dam;
443408 }
444409
445-int spell_RF4_BA_NUKE(int y, int x, int m_idx)
410+int spell_RF4_BA_CHAO(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
446411 {
447- bool learnable = spell_learnable(m_idx);
448- cptr m_name = monster_name(m_idx);
449- monster_type *m_ptr = &m_list[m_idx];
450- monster_race *r_ptr = &r_info[m_ptr->r_idx];
451- int rlev = monster_level_idx(m_idx);
452412 int dam;
453- disturb(1, 1);
413+ int rlev = monster_level_idx(m_idx);
454414
455- if (p_ptr->blind)
456- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
457- else
458- msg_format(_("%^sが放射能球を放った。", "%^s casts a ball of radiation."), m_name);
459-
460- dam = (rlev + damroll(10, 6)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
415+ monspell_message(m_idx, t_idx,
416+ _("%^sが恐ろしげにつぶやいた。", "%^s mumbles frighteningly."),
417+ _("%^sが純ログルスを放った。", "%^s invokes a raw Logrus."),
418+ _("%^sが%sに純ログルスを放った。", "%^s invokes raw Logrus upon %s."),
419+ TARGET_TYPE);
420+
421+ dam = (monster_is_powerful(m_idx) ? (rlev * 3) : (rlev * 2)) + damroll(10, 10);
422+
423+ breath(y, x, m_idx, GF_CHAOS, dam, 4, FALSE, MS_BALL_CHAOS, TARGET_TYPE);
424+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
425+ update_smart_learn(m_idx, DRS_CHAOS);
461426
462- breath(y, x, m_idx, GF_NUKE, dam, 2, FALSE, MS_BALL_NUKE, MONSTER_TO_PLAYER);
463- update_smart_learn(m_idx, DRS_POIS);
464427 return dam;
465428 }
466429
467-int spell_RF5_BA_ACID(int y, int x, int m_idx)
430+int spell_RF5_BA_ACID(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
468431 {
469- bool learnable = spell_learnable(m_idx);
470- cptr m_name = monster_name(m_idx);
471- monster_type *m_ptr = &m_list[m_idx];
472- monster_race *r_ptr = &r_info[m_ptr->r_idx];
473- int rlev = monster_level_idx(m_idx);
474432 int dam, rad;
475- disturb(1, 1);
433+ int rlev = monster_level_idx(m_idx);
476434
477- if (p_ptr->blind)
478- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
479- else
480- msg_format(_("%^sがアシッド・ボールの呪文を唱えた。", "%^s casts an acid ball."), m_name);
481-
482- if (r_ptr->flags2 & RF2_POWERFUL)
435+ monspell_message(m_idx, t_idx,
436+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
437+ _("%^sがアシッド・ボールの呪文を唱えた。", "%^s casts an acid ball."),
438+ _("%^sが%sに向かってアシッド・ボールの呪文を唱えた。",
439+ "%^s casts an acid ball at %s."),
440+ TARGET_TYPE);
441+
442+ if (monster_is_powerful(m_idx))
483443 {
484444 rad = 4;
485445 dam = (rlev * 4) + 50 + damroll(10, 10);
@@ -489,27 +449,27 @@ int spell_RF5_BA_ACID(int y, int x, int m_idx)
489449 rad = 2;
490450 dam = (randint1(rlev * 3) + 15);
491451 }
492- breath(y, x, m_idx, GF_ACID, dam, rad, FALSE, MS_BALL_ACID, MONSTER_TO_PLAYER);
493- update_smart_learn(m_idx, DRS_ACID);
452+
453+ breath(y, x, m_idx, GF_ACID, dam, rad, FALSE, MS_BALL_ACID, TARGET_TYPE);
454+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
455+ update_smart_learn(m_idx, DRS_ACID);
456+
494457 return dam;
495458 }
496459
497-int spell_RF5_BA_ELEC(int y, int x, int m_idx)
460+int spell_RF5_BA_ELEC(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
498461 {
499- bool learnable = spell_learnable(m_idx);
500- cptr m_name = monster_name(m_idx);
501- monster_type *m_ptr = &m_list[m_idx];
502- monster_race *r_ptr = &r_info[m_ptr->r_idx];
503- int rlev = monster_level_idx(m_idx);
504462 int dam, rad;
505- disturb(1, 1);
463+ int rlev = monster_level_idx(m_idx);
506464
507- if (p_ptr->blind)
508- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
509- else
510- msg_format(_("%^sがサンダー・・ボールの呪文を唱えた。", "%^s casts a lightning ball."), m_name);
465+ monspell_message(m_idx, t_idx,
466+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
467+ _("%^sがサンダー・・ボールの呪文を唱えた。", "%^s casts a lightning ball."),
468+ _("%^sが%sに向かってサンダー・ボールの呪文を唱えた。",
469+ "%^s casts a lightning ball at %s."),
470+ TARGET_TYPE);
511471
512- if (r_ptr->flags2 & RF2_POWERFUL)
472+ if (monster_is_powerful(m_idx))
513473 {
514474 rad = 4;
515475 dam = (rlev * 4) + 50 + damroll(10, 10);
@@ -519,37 +479,39 @@ int spell_RF5_BA_ELEC(int y, int x, int m_idx)
519479 rad = 2;
520480 dam = (randint1(rlev * 3 / 2) + 8);
521481 }
522- breath(y, x, m_idx, GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC, MONSTER_TO_PLAYER);
523- update_smart_learn(m_idx, DRS_ELEC);
482+
483+ breath(y, x, m_idx, GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC, TARGET_TYPE);
484+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
485+ update_smart_learn(m_idx, DRS_ELEC);
486+
524487 return dam;
525488 }
526489
527-int spell_RF5_BA_FIRE(int y, int x, int m_idx)
490+int spell_RF5_BA_FIRE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
528491 {
529- bool learnable = spell_learnable(m_idx);
530- cptr m_name = monster_name(m_idx);
492+ int dam, rad;
531493 monster_type *m_ptr = &m_list[m_idx];
532- monster_race *r_ptr = &r_info[m_ptr->r_idx];
533494 int rlev = monster_level_idx(m_idx);
534- int dam, rad;
535- disturb(1, 1);
536495
537496 if (m_ptr->r_idx == MON_ROLENTO)
538497 {
539- if (p_ptr->blind)
540- msg_format(_("%sが何かを投げた。", "%^s throws something."), m_name);
541- else
542- msg_format(_("%sは手榴弾を投げた。", "%^s throws a hand grenade."), m_name);
498+ monspell_message(m_idx, t_idx,
499+ _("%sが何かを投げた。", "%^s throws something."),
500+ _("%sは手榴弾を投げた。", "%^s throws a hand grenade."),
501+ _("%^sが%^sに向かって手榴弾を投げた。", "%^s throws a hand grenade."),
502+ TARGET_TYPE);
543503 }
544504 else
545505 {
546- if (p_ptr->blind)
547- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
548- else
549- msg_format(_("%^sがファイア・ボールの呪文を唱えた。", "%^s casts a fire ball."), m_name);
506+ monspell_message(m_idx, t_idx,
507+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
508+ _("%^sがファイア・ボールの呪文を唱えた。", "%^s casts a fire ball."),
509+ _("%^sが%sに向かってファイア・ボールの呪文を唱えた。",
510+ "%^s casts a fire ball at %s."),
511+ TARGET_TYPE);
550512 }
551513
552- if (r_ptr->flags2 & RF2_POWERFUL)
514+ if (monster_is_powerful(m_idx))
553515 {
554516 rad = 4;
555517 dam = (rlev * 4) + 50 + damroll(10, 10);
@@ -559,27 +521,27 @@ int spell_RF5_BA_FIRE(int y, int x, int m_idx)
559521 rad = 2;
560522 dam = (randint1(rlev * 7 / 2) + 10);
561523 }
562- breath(y, x, m_idx, GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE, MONSTER_TO_PLAYER);
563- update_smart_learn(m_idx, DRS_FIRE);
524+
525+ breath(y, x, m_idx, GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE, TARGET_TYPE);
526+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
527+ update_smart_learn(m_idx, DRS_FIRE);
528+
564529 return dam;
565530 }
566531
567-int spell_RF5_BA_COLD(int y, int x, int m_idx)
532+int spell_RF5_BA_COLD(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
568533 {
569- bool learnable = spell_learnable(m_idx);
570- cptr m_name = monster_name(m_idx);
571- monster_type *m_ptr = &m_list[m_idx];
572- monster_race *r_ptr = &r_info[m_ptr->r_idx];
573- int rlev = monster_level_idx(m_idx);
574534 int dam, rad;
575- disturb(1, 1);
535+ int rlev = monster_level_idx(m_idx);
576536
577- if (p_ptr->blind)
578- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
579- else
580- msg_format(_("%^sがアイス・ボールの呪文を唱えた。", "%^s casts a frost ball."), m_name);
537+ monspell_message(m_idx, t_idx,
538+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
539+ _("%^sがアイス・ボールの呪文を唱えた。", "%^s casts a frost ball."),
540+ _("%^sが%sに向かってアイス・ボールの呪文を唱えた。",
541+ "%^s casts a frost ball at %s."),
542+ TARGET_TYPE);
581543
582- if (r_ptr->flags2 & RF2_POWERFUL)
544+ if (monster_is_powerful(m_idx))
583545 {
584546 rad = 4;
585547 dam = (rlev * 4) + 50 + damroll(10, 10);
@@ -589,468 +551,521 @@ int spell_RF5_BA_COLD(int y, int x, int m_idx)
589551 rad = 2;
590552 dam = (randint1(rlev * 3 / 2) + 10);
591553 }
592- breath(y, x, m_idx, GF_COLD, dam, rad, FALSE, MS_BALL_COLD, MONSTER_TO_PLAYER);
593- update_smart_learn(m_idx, DRS_COLD);
554+
555+ breath(y, x, m_idx, GF_COLD, dam, rad, FALSE, MS_BALL_COLD, TARGET_TYPE);
556+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
557+ update_smart_learn(m_idx, DRS_COLD);
558+
594559 return dam;
595560 }
596561
597-int spell_RF5_BA_POIS(int y, int x, int m_idx)
562+
563+int spell_RF5_BA_POIS(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
598564 {
599- bool learnable = spell_learnable(m_idx);
600- cptr m_name = monster_name(m_idx);
601- monster_type *m_ptr = &m_list[m_idx];
602- monster_race *r_ptr = &r_info[m_ptr->r_idx];
603- int rlev = monster_level_idx(m_idx);
604565 int dam;
605- disturb(1, 1);
606566
607- if (p_ptr->blind)
608- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
609- else
610- msg_format(_("%^sが悪臭雲の呪文を唱えた。", "%^s casts a stinking cloud."), m_name);
567+ monspell_message(m_idx, t_idx,
568+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
569+ _("%^sが悪臭雲の呪文を唱えた。", "%^s casts a stinking cloud."),
570+ _("%^sが%sに向かって悪臭雲の呪文を唱えた。", "%^s casts a stinking cloud at %s."),
571+ TARGET_TYPE);
572+
573+ dam = damroll(12, 2) * (monster_is_powerful(m_idx) ? 2 : 1);
574+ breath(y, x, m_idx, GF_POIS, dam, 2, FALSE, MS_BALL_POIS, TARGET_TYPE);
575+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
576+ update_smart_learn(m_idx, DRS_POIS);
611577
612- dam = damroll(12, 2) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
613- breath(y, x, m_idx, GF_POIS, dam, 2, FALSE, MS_BALL_POIS, MONSTER_TO_PLAYER);
614- update_smart_learn(m_idx, DRS_POIS);
615578 return dam;
616579 }
617580
618-int spell_RF5_BA_NETH(int y, int x, int m_idx)
581+int spell_RF5_BA_NETH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
619582 {
620- bool learnable = spell_learnable(m_idx);
621- cptr m_name = monster_name(m_idx);
622- monster_type *m_ptr = &m_list[m_idx];
623- monster_race *r_ptr = &r_info[m_ptr->r_idx];
624- int rlev = monster_level_idx(m_idx);
625583 int dam;
626- disturb(1, 1);
627- if (p_ptr->blind)
628- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
629- else
630- msg_format(_("%^sが地獄球の呪文を唱えた。", "%^s casts a nether ball."), m_name);
584+ int rlev = monster_level_idx(m_idx);
585+
586+ monspell_message(m_idx, t_idx,
587+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
588+ _("%^sが地獄球の呪文を唱えた。", "%^s casts a nether ball."),
589+ _("%^sが%sに向かって地獄球の呪文を唱えた。", "%^s casts a nether ball at %s."),
590+ TARGET_TYPE);
591+
592+ dam = 50 + damroll(10, 10) + (rlev * (monster_is_powerful(m_idx) ? 2 : 1));
593+ breath(y, x, m_idx, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER, TARGET_TYPE);
594+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
595+ update_smart_learn(m_idx, DRS_NETH);
631596
632- dam = 50 + damroll(10, 10) + (rlev * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1));
633- breath(y, x, m_idx, GF_NETHER, dam, 2, FALSE, MS_BALL_NETHER, MONSTER_TO_PLAYER);
634- update_smart_learn(m_idx, DRS_NETH);
635597 return dam;
636598 }
637599
638-int spell_RF5_BA_WATE(int y, int x, int m_idx)
600+int spell_RF5_BA_WATE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
639601 {
640- bool learnable = spell_learnable(m_idx);
641- cptr m_name = monster_name(m_idx);
642- monster_type *m_ptr = &m_list[m_idx];
643- monster_race *r_ptr = &r_info[m_ptr->r_idx];
644- int rlev = monster_level_idx(m_idx);
645602 int dam;
646- disturb(1, 1);
603+ int rlev = monster_level_idx(m_idx);
604+ bool known = monster_near_player(m_idx, t_idx);
605+ bool see_either = see_monster(m_idx) || see_monster(t_idx);
606+ bool mon_to_mon = (TARGET_TYPE == MONSTER_TO_MONSTER);
607+ bool mon_to_player = (TARGET_TYPE == MONSTER_TO_PLAYER);
608+ char t_name[80];
609+ monster_name(t_idx, t_name);
647610
648- if (p_ptr->blind)
649- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
650- else
651- msg_format(_("%^sが流れるような身振りをした。", "%^s gestures fluidly."), m_name);
652611
653- msg_print(_("あなたは渦巻きに飲み込まれた。", "You are engulfed in a whirlpool."));
612+ monspell_message(m_idx, t_idx,
613+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
614+ _("%^sが流れるような身振りをした。", "%^s gestures fluidly."),
615+ _("%^sが%sに対して流れるような身振りをした。", "%^s gestures fluidly at %s."),
616+ TARGET_TYPE);
617+
618+ if (mon_to_player)
619+ {
620+ msg_format(_("あなたは渦巻きに飲み込まれた。", "You are engulfed in a whirlpool."));
621+ }
622+ else if (mon_to_mon && known && see_either && !p_ptr->blind)
623+ {
624+ msg_format(_("%^sは渦巻に飲み込まれた。", "%^s is engulfed in a whirlpool."), t_name);
625+ }
654626
655- dam = ((r_ptr->flags2 & RF2_POWERFUL) ? randint1(rlev * 3) : randint1(rlev * 2)) + 50;
656- breath(y, x, m_idx, GF_WATER, dam, 4, FALSE, MS_BALL_WATER, MONSTER_TO_PLAYER);
627+ dam = (monster_is_powerful(m_idx) ? randint1(rlev * 3) : randint1(rlev * 2)) + 50;
628+ breath(y, x, m_idx, GF_WATER, dam, 4, FALSE, MS_BALL_WATER, TARGET_TYPE);
657629 return dam;
658630 }
659631
660-int spell_RF5_BA_MANA(int y, int x, int m_idx)
632+
633+int spell_RF5_BA_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
661634 {
662- cptr m_name = monster_name(m_idx);
663- monster_type *m_ptr = &m_list[m_idx];
664- monster_race *r_ptr = &r_info[m_ptr->r_idx];
665- int rlev = monster_level_idx(m_idx);
666635 int dam;
667- disturb(1, 1);
668- if (p_ptr->blind)
669- msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
670- else
671- msg_format(_("%^sが魔力の嵐の呪文を念じた。", "%^s invokes a mana storm."), m_name);
636+ int rlev = monster_level_idx(m_idx);
637+
638+ monspell_message(m_idx, t_idx,
639+ _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
640+ _("%^sが魔力の嵐の呪文を念じた。", "%^s invokes a mana storm."),
641+ _("%^sが%sに対して魔力の嵐の呪文を念じた。", "%^s invokes a mana storm upon %s."),
642+ TARGET_TYPE);
672643
673644 dam = (rlev * 4) + 50 + damroll(10, 10);
674- breath(y, x, m_idx, GF_MANA, dam, 4, FALSE, MS_BALL_MANA, MONSTER_TO_PLAYER);
645+ breath(y, x, m_idx, GF_MANA, dam, 4, FALSE, MS_BALL_MANA, TARGET_TYPE);
675646 return dam;
676647 }
677648
678-int spell_RF5_BA_DARK(int y, int x, int m_idx)
649+int spell_RF5_BA_DARK(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
679650 {
680- cptr m_name = monster_name(m_idx);
681- monster_type *m_ptr = &m_list[m_idx];
682- monster_race *r_ptr = &r_info[m_ptr->r_idx];
683- int rlev = monster_level_idx(m_idx);
684651 int dam;
685- disturb(1, 1);
652+ int rlev = monster_level_idx(m_idx);
686653
687- if (p_ptr->blind)
688- msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
689- else
690- msg_format(_("%^sが暗黒の嵐の呪文を念じた。", "%^s invokes a darkness storm."), m_name);
654+ monspell_message(m_idx, t_idx,
655+ _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
656+ _("%^sが暗黒の嵐の呪文を念じた。", "%^s invokes a darkness storm."),
657+ _("%^sが%sに対して暗黒の嵐の呪文を念じた。", "%^s invokes a darkness storm upon %s."),
658+ TARGET_TYPE);
691659
692660 dam = (rlev * 4) + 50 + damroll(10, 10);
693- breath(y, x, m_idx, GF_DARK, dam, 4, FALSE, MS_BALL_DARK, MONSTER_TO_PLAYER);
694- update_smart_learn(m_idx, DRS_DARK);
661+ breath(y, x, m_idx, GF_DARK, dam, 4, FALSE, MS_BALL_DARK, TARGET_TYPE);
662+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
663+ update_smart_learn(m_idx, DRS_DARK);
664+
695665 return dam;
696666 }
697667
698-int spell_RF5_DRAIN_MANA(int y, int x, int m_idx)
668+int spell_RF5_DRAIN_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
699669 {
700- cptr m_name = monster_name(m_idx);
701670 int rlev = monster_level_idx(m_idx);
702671 int dam;
703- disturb(1, 1);
672+ char m_name[80], t_name[80];
673+ monster_name(m_idx, m_name);
674+ monster_name(t_idx, t_name);
675+
704676
705- dam = (randint1(rlev) / 2) + 1;
706- breath(y, x, m_idx, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA, MONSTER_TO_PLAYER);
707- update_smart_learn(m_idx, DRS_MANA);
677+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
678+ {
679+ disturb(1, 1);
680+ }
681+ else if (TARGET_TYPE == MONSTER_TO_MONSTER && see_monster(m_idx))
682+ {
683+ /* Basic message */
684+ msg_format(_("%^sは精神エネルギーを%sから吸いとった。", "%^s draws psychic energy from %s."), m_name, t_name);
685+ }
686+
687+ dam = ((randint1(rlev) / 2) + 1);
688+ breath(y, x, m_idx, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA, TARGET_TYPE);
689+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
690+ update_smart_learn(m_idx, DRS_MANA);
691+
708692 return dam;
709693 }
710694
711-int spell_RF5_MIND_BLAST(int y, int x, int m_idx)
695+int spell_RF5_MIND_BLAST(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
712696 {
713- cptr m_name = monster_name(m_idx);
714697 monster_type *m_ptr = &m_list[m_idx];
715698 bool seen = (!p_ptr->blind && m_ptr->ml);
716699 int rlev = monster_level_idx(m_idx);
717700 int dam;
718- disturb(1, 1);
719- if (!seen)
720- msg_print(_("何かがあなたの精神に念を放っているようだ。", "You feel something focusing on your mind."));
721- else
722- msg_format(_("%^sがあなたの瞳をじっとにらんでいる。", "%^s gazes deep into your eyes."), m_name);
701+ char m_name[80], t_name[80];
702+ monster_name(m_idx, m_name);
703+ monster_name(t_idx, t_name);
704+
705+
706+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
707+ {
708+ disturb(1, 1);
709+ if (!seen)
710+ msg_print(_("何かがあなたの精神に念を放っているようだ。", "You feel something focusing on your mind."));
711+ else
712+ msg_format(_("%^sがあなたの瞳をじっとにらんでいる。", "%^s gazes deep into your eyes."), m_name);
713+ }
714+ else if (TARGET_TYPE == MONSTER_TO_MONSTER && see_monster(m_idx))
715+ {
716+ msg_format(_("%^sは%sをじっと睨んだ。", "%^s gazes intently at %s."), m_name, t_name);
717+ }
723718
724719 dam = damroll(7, 7);
725- breath(y, x, m_idx, GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST, MONSTER_TO_PLAYER);
720+ breath(y, x, m_idx, GF_MIND_BLAST, dam, 0, FALSE, MS_MIND_BLAST, TARGET_TYPE);
726721 return dam;
727722 }
728723
729-int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx)
724+int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
730725 {
731- cptr m_name = monster_name(m_idx);
732726 monster_type *m_ptr = &m_list[m_idx];
733727 bool seen = (!p_ptr->blind && m_ptr->ml);
734728 int rlev = monster_level_idx(m_idx);
735729 int dam;
736- disturb(1, 1);
737- if (!seen)
738- msg_print(_("何かがあなたの精神に念を放っているようだ。", "You feel something focusing on your mind."));
739- else
740- msg_format(_("%^sがあなたの瞳をじっと見ている。", "%^s looks deep into your eyes."), m_name);
730+ char m_name[80], t_name[80];
731+ monster_name(m_idx, m_name);
732+ monster_name(t_idx, t_name);
733+
734+
735+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
736+ {
737+ disturb(1, 1);
738+ if (!seen)
739+ msg_print(_("何かがあなたの精神に念を放っているようだ。", "You feel something focusing on your mind."));
740+ else
741+ msg_format(_("%^sがあなたの瞳をじっとにらんでいる。", "%^s gazes deep into your eyes."), m_name);
742+ }
743+ else if (TARGET_TYPE == MONSTER_TO_MONSTER && see_monster(m_idx))
744+ {
745+ msg_format(_("%^sは%sをじっと睨んだ。", "%^s gazes intently at %s."), m_name, t_name);
746+ }
741747
742748 dam = damroll(12, 12);
743- breath(y, x, m_idx, GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH, MONSTER_TO_PLAYER);
749+ breath(y, x, m_idx, GF_BRAIN_SMASH, dam, 0, FALSE, MS_BRAIN_SMASH, TARGET_TYPE);
744750 return dam;
745751 }
746752
747-int spell_RF5_CAUSE_1(int y, int x, int m_idx)
753+void spell_RF5_CAUSE(int GF_TYPE, int dam, int y, int x, int m_idx, int t_idx, cptr msg1, cptr msg2, cptr msg3, int MS_TYPE, int TARGET_TYPE)
748754 {
749- cptr m_name = monster_name(m_idx);
750755 int rlev = monster_level_idx(m_idx);
751- int dam;
752- disturb(1, 1);
756+ char m_name[80], t_name[80];
757+ monster_name(m_idx, m_name);
758+ monster_name(t_idx, t_name);
753759
754- if (p_ptr->blind)
755- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
756- else
757- msg_format(_("%^sがあなたを指さして呪った。", "%^s points at you and curses."), m_name);
758760
759- dam = damroll(3, 8);
760- breath(y, x, m_idx, GF_CAUSE_1, dam, 0, FALSE, MS_CAUSE_1, MONSTER_TO_PLAYER);
761+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
762+ {
763+ disturb(1, 1);
764+ if (p_ptr->blind)
765+ msg_format(msg1, m_name);
766+ else
767+ msg_format(msg2, m_name);
768+ }
769+ else if (TARGET_TYPE == MONSTER_TO_MONSTER)
770+ {
771+ if (see_monster(m_idx))
772+ {
773+ msg_format(msg3, m_name, t_name);
774+ }
775+ else
776+ {
777+ mon_fight = TRUE;
778+ }
779+ }
780+ breath(y, x, m_idx, GF_TYPE, dam, 0, FALSE, MS_TYPE, TARGET_TYPE);
781+}
782+
783+int spell_RF5_CAUSE_1(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
784+{
785+ cptr msg1, msg2, msg3;
786+ int dam = damroll(3, 8);
787+
788+ msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
789+ msg2 = _("%^sがあなたを指さして呪った。", "%^s points at you and curses.");
790+ msg3 = _("%^sは%sを指さして呪いをかけた。", "%^s points at %s and curses.");
791+
792+ spell_RF5_CAUSE(GF_CAUSE_1, dam, y, x, m_idx, t_idx, msg1, msg2, msg3, MS_CAUSE_1, TARGET_TYPE);
761793 return dam;
762794 }
763795
764-int spell_RF5_CAUSE_2(int y, int x, int m_idx)
796+int spell_RF5_CAUSE_2(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
765797 {
766- cptr m_name = monster_name(m_idx);
767- int rlev = monster_level_idx(m_idx);
768- int dam;
769- disturb(1, 1);
798+ cptr msg1, msg2, msg3;
799+ int dam = damroll(8, 8);
770800
771- if (p_ptr->blind)
772- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
773- else
774- msg_format(_("%^sがあなたを指さして恐ろしげに呪った。", "%^s points at you and curses horribly."), m_name);
801+ msg1 = _("%^sが何かをつぶやいた。", "%^s mumbles.");
802+ msg2 = _("%^sがあなたを指さして恐ろしげに呪った。", "%^s points at you and curses horribly.");
803+ msg3 = _("%^sは%sを指さして恐ろしげに呪いをかけた。", "%^s points at %s and curses horribly.");
775804
776- dam = damroll(8, 8);
777- breath(y, x, m_idx, GF_CAUSE_2, dam, 0, FALSE, MS_CAUSE_2, MONSTER_TO_PLAYER);
805+ spell_RF5_CAUSE(GF_CAUSE_2, dam, y, x, m_idx, t_idx, msg1, msg2, msg3, MS_CAUSE_2, TARGET_TYPE);
778806 return dam;
779807 }
780808
781-int spell_RF5_CAUSE_3(int y, int x, int m_idx)
809+int spell_RF5_CAUSE_3(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
782810 {
783- cptr m_name = monster_name(m_idx);
784- int rlev = monster_level_idx(m_idx);
785- int dam;
786- disturb(1, 1);
811+ cptr msg1, msg2, msg3;
812+ int dam = damroll(10, 15);
787813
788- if (p_ptr->blind)
789- msg_format(_("%^sが何かを大声で叫んだ。", "%^s mumbles loudly."), m_name);
790- else
791- msg_format(_("%^sがあなたを指さして恐ろしげに呪文を唱えた!", "%^s points at you, incanting terribly!"), m_name);
814+ msg1 = _("%^sが何かを大声で叫んだ。", "%^s mumbles loudly.");
815+ msg2 = _("%^sがあなたを指さして恐ろしげに呪文を唱えた!", "%^s points at you, incanting terribly!");
816+ msg3 = _("%^sは%sを指さし、恐ろしげに呪文を唱えた!", "%^s points at %s, incanting terribly!");
792817
793- dam = damroll(10, 15);
794- breath(y, x, m_idx, GF_CAUSE_3, dam, 0, FALSE, MS_CAUSE_3, MONSTER_TO_PLAYER);
818+ spell_RF5_CAUSE(GF_CAUSE_3, dam, y, x, m_idx, t_idx, msg1, msg2, msg3, MS_CAUSE_3, TARGET_TYPE);
795819 return dam;
796820 }
797821
798-int spell_RF5_CAUSE_4(int y, int x, int m_idx)
822+int spell_RF5_CAUSE_4(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
799823 {
800- cptr m_name = monster_name(m_idx);
801- int rlev = monster_level_idx(m_idx);
802- int dam;
803- disturb(1, 1);
824+ cptr msg1, msg2, msg3;
825+ int dam = damroll(15, 15);
804826
805- if (p_ptr->blind)
806- msg_format(_("%^sが「お前は既に死んでいる」と叫んだ。", "%^s screams the word 'DIE!'"), m_name);
807- else
808- msg_format(_("%^sがあなたの秘孔を突いて「お前は既に死んでいる」と叫んだ。",
809- "%^s points at you, screaming the word DIE!"), m_name);
827+ msg1 = _("%^sが「お前は既に死んでいる」と叫んだ。", "%^s screams the word 'DIE!'");
828+ msg2 = _("%^sがあなたの秘孔を突いて「お前は既に死んでいる」と叫んだ。", "%^s points at you, screaming the word DIE!");
829+ msg3 = _("%^sが%sの秘孔を突いて、「お前は既に死んでいる」と叫んだ。", "%^s points at %s, screaming the word, 'DIE!'");
810830
811- dam = damroll(15, 15);
812- breath(y, x, m_idx, GF_CAUSE_4, dam, 0, FALSE, MS_CAUSE_4, MONSTER_TO_PLAYER);
831+ spell_RF5_CAUSE(GF_CAUSE_4, dam, y, x, m_idx, t_idx, msg1, msg2, msg3, MS_CAUSE_4, TARGET_TYPE);
813832 return dam;
814833 }
815834
816-int spell_RF5_BO_ACID(int y, int x, int m_idx)
835+int spell_RF5_BO_ACID(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
817836 {
818- bool learnable = spell_learnable(m_idx);
819- cptr m_name = monster_name(m_idx);
820- monster_type *m_ptr = &m_list[m_idx];
821- monster_race *r_ptr = &r_info[m_ptr->r_idx];
822- int rlev = monster_level_idx(m_idx);
823837 int dam;
824- disturb(1, 1);
838+ int rlev = monster_level_idx(m_idx);
825839
826- if (p_ptr->blind)
827- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
828- else
829- msg_format(_("%^sがアシッド・ボルトの呪文を唱えた。", "%^s casts a acid bolt."), m_name);
840+ monspell_message(m_idx, t_idx,
841+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
842+ _("%^sがアシッド・ボルトの呪文を唱えた。", "%^s casts a acid bolt."),
843+ _("%sが%sに向かってアシッド・ボルトの呪文を唱えた。", "%^s casts an acid bolt at %s."),
844+ TARGET_TYPE);
830845
831- dam = (damroll(7, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
832- bolt(m_idx, y, x, GF_ACID, dam, MS_BOLT_ACID, MONSTER_TO_PLAYER);
833- update_smart_learn(m_idx, DRS_ACID);
834- update_smart_learn(m_idx, DRS_REFLECT);
846+ dam = (damroll(7, 8) + (rlev / 3)) * (monster_is_powerful(m_idx) ? 2 : 1);
847+ bolt(m_idx, y, x, GF_ACID, dam, MS_BOLT_ACID, TARGET_TYPE);
848+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
849+ {
850+ update_smart_learn(m_idx, DRS_ACID);
851+ update_smart_learn(m_idx, DRS_REFLECT);
852+ }
835853 return dam;
836854 }
837855
838-int spell_RF5_BO_ELEC(int y, int x, int m_idx)
856+int spell_RF5_BO_ELEC(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
839857 {
840- bool learnable = spell_learnable(m_idx);
841- cptr m_name = monster_name(m_idx);
842- monster_type *m_ptr = &m_list[m_idx];
843- monster_race *r_ptr = &r_info[m_ptr->r_idx];
844- int rlev = monster_level_idx(m_idx);
845858 int dam;
846- disturb(1, 1);
859+ int rlev = monster_level_idx(m_idx);
847860
848- if (p_ptr->blind)
849- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
850- else
851- msg_format(_("%^sがサンダー・ボルトの呪文を唱えた。", "%^s casts a lightning bolt."), m_name);
861+ monspell_message(m_idx, t_idx,
862+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
863+ _("%^sがサンダー・ボルトの呪文を唱えた。", "%^s casts a lightning bolt."),
864+ _("%^sが%sに向かってサンダー・ボルトの呪文を唱えた。", "%^s casts a lightning bolt at %s."),
865+ TARGET_TYPE);
852866
853- dam = (damroll(4, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
854- bolt(m_idx, y, x, GF_ELEC, dam, MS_BOLT_ELEC, MONSTER_TO_PLAYER);
855- update_smart_learn(m_idx, DRS_ELEC);
856- update_smart_learn(m_idx, DRS_REFLECT);
867+ dam = (damroll(4, 8) + (rlev / 3)) * (monster_is_powerful(m_idx) ? 2 : 1);
868+ bolt(m_idx, y, x, GF_ELEC, dam, MS_BOLT_ELEC, TARGET_TYPE);
869+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
870+ {
871+ update_smart_learn(m_idx, DRS_ELEC);
872+ update_smart_learn(m_idx, DRS_REFLECT);
873+ }
857874 return dam;
858875 }
859876
860-int spell_RF5_BO_FIRE(int y, int x, int m_idx)
877+int spell_RF5_BO_FIRE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
861878 {
862- bool learnable = spell_learnable(m_idx);
863- cptr m_name = monster_name(m_idx);
864- monster_type *m_ptr = &m_list[m_idx];
865- monster_race *r_ptr = &r_info[m_ptr->r_idx];
866- int rlev = monster_level_idx(m_idx);
867879 int dam;
868- disturb(1, 1);
880+ int rlev = monster_level_idx(m_idx);
869881
870- if (p_ptr->blind)
871- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
872- else
873- msg_format(_("%^sがファイア・ボルトの呪文を唱えた。", "%^s casts a fire bolt."), m_name);
882+ monspell_message(m_idx, t_idx,
883+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
884+ _("%^sがファイア・ボルトの呪文を唱えた。", "%^s casts a fire bolt."),
885+ _("%^sが%sに向かってファイア・ボルトの呪文を唱えた。", "%^s casts a fire bolt at %s."),
886+ TARGET_TYPE);
874887
875- dam = (damroll(9, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
876- bolt(m_idx, y, x, GF_FIRE, dam, MS_BOLT_FIRE, MONSTER_TO_PLAYER);
877- update_smart_learn(m_idx, DRS_FIRE);
878- update_smart_learn(m_idx, DRS_REFLECT);
888+ dam = (damroll(9, 8) + (rlev / 3)) * (monster_is_powerful(m_idx) ? 2 : 1);
889+ bolt(m_idx, y, x, GF_FIRE, dam, MS_BOLT_FIRE, TARGET_TYPE);
890+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
891+ {
892+ update_smart_learn(m_idx, DRS_FIRE);
893+ update_smart_learn(m_idx, DRS_REFLECT);
894+ }
879895 return dam;
880896 }
881897
882-int spell_RF5_BO_COLD(int y, int x, int m_idx)
898+int spell_RF5_BO_COLD(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
883899 {
884- bool learnable = spell_learnable(m_idx);
885- cptr m_name = monster_name(m_idx);
886- monster_type *m_ptr = &m_list[m_idx];
887- monster_race *r_ptr = &r_info[m_ptr->r_idx];
888- int rlev = monster_level_idx(m_idx);
889900 int dam;
890- disturb(1, 1);
901+ int rlev = monster_level_idx(m_idx);
891902
892- if (p_ptr->blind)
893- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
894- else
895- msg_format(_("%^sがアイス・ボルトの呪文を唱えた。", "%^s casts a frost bolt."), m_name);
903+ monspell_message(m_idx, t_idx,
904+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
905+ _("%^sがアイス・ボルトの呪文を唱えた。", "%^s casts a frost bolt."),
906+ _("%^sが%sに向かってアイス・ボルトの呪文を唱えた。", "%^s casts a frost bolt at %s."),
907+ TARGET_TYPE);
896908
897- dam = (damroll(6, 8) + (rlev / 3)) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
898- bolt(m_idx, y, x, GF_COLD, dam, MS_BOLT_COLD, MONSTER_TO_PLAYER);
899- update_smart_learn(m_idx, DRS_COLD);
900- update_smart_learn(m_idx, DRS_REFLECT);
909+ dam = (damroll(6, 8) + (rlev / 3)) * (monster_is_powerful(m_idx) ? 2 : 1);
910+ bolt(m_idx, y, x, GF_COLD, dam, MS_BOLT_COLD, TARGET_TYPE);
911+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
912+ {
913+ update_smart_learn(m_idx, DRS_COLD);
914+ update_smart_learn(m_idx, DRS_REFLECT);
915+ }
901916 return dam;
902917 }
903918
904-
905-int spell_RF5_BA_LITE(int y, int x, int m_idx)
919+int spell_RF5_BA_LITE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
906920 {
907- cptr m_name = monster_name(m_idx);
908- int rlev = monster_level_idx(m_idx);
909921 int dam;
910- disturb(1, 1);
922+ int rlev = monster_level_idx(m_idx);
911923
912- if (p_ptr->blind)
913- msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
914- else
915- msg_format(_("%^sがスターバーストの呪文を念じた。", "%^s invokes a starburst."), m_name);
924+ monspell_message(m_idx, t_idx,
925+ _("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."),
926+ _("%^sがスターバーストの呪文を念じた。", "%^s invokes a starburst."),
927+ _("%^sが%sに対してスターバーストの呪文を念じた。", "%^s invokes a starburst upon %s."),
928+ TARGET_TYPE);
916929
917930 dam = (rlev * 4) + 50 + damroll(10, 10);
918- breath(y, x, m_idx, GF_LITE, dam, 4, FALSE, MS_STARBURST, MONSTER_TO_PLAYER);
919- update_smart_learn(m_idx, DRS_LITE);
931+ breath(y, x, m_idx, GF_LITE, dam, 4, FALSE, MS_STARBURST, TARGET_TYPE);
932+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
933+ update_smart_learn(m_idx, DRS_LITE);
934+
920935 return dam;
921936 }
922937
923938
924-int spell_RF5_BO_NETH(int y, int x, int m_idx)
939+int spell_RF5_BO_NETH(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
925940 {
926- bool learnable = spell_learnable(m_idx);
927- cptr m_name = monster_name(m_idx);
928- monster_type *m_ptr = &m_list[m_idx];
929- monster_race *r_ptr = &r_info[m_ptr->r_idx];
930- int rlev = monster_level_idx(m_idx);
931941 int dam;
932- disturb(1, 1);
942+ int rlev = monster_level_idx(m_idx);
933943
934- if (p_ptr->blind)
935- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
936- else
937- msg_format(_("%^sが地獄の矢の呪文を唱えた。", "%^s casts a nether bolt."), m_name);
944+ monspell_message(m_idx, t_idx,
945+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
946+ _("%^sが地獄の矢の呪文を唱えた。", "%^s casts a nether bolt."),
947+ _("%^sが%sに向かって地獄の矢の呪文を唱えた。", "%^s casts a nether bolt at %s."),
948+ TARGET_TYPE);
938949
939- dam = 30 + damroll(5, 5) + (rlev * 4) / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3);
940- bolt(m_idx, y, x, GF_NETHER, dam, MS_BOLT_NETHER, MONSTER_TO_PLAYER);
941- update_smart_learn(m_idx, DRS_NETH);
942- update_smart_learn(m_idx, DRS_REFLECT);
950+ dam = 30 + damroll(5, 5) + (rlev * 4) / (monster_is_powerful(m_idx) ? 2 : 3);
951+ bolt(m_idx, y, x, GF_NETHER, dam, MS_BOLT_NETHER, TARGET_TYPE);
952+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
953+ {
954+ update_smart_learn(m_idx, DRS_NETH);
955+ update_smart_learn(m_idx, DRS_REFLECT);
956+ }
943957 return dam;
944958 }
945959
946-int spell_RF5_BO_WATE(int y, int x, int m_idx)
960+int spell_RF5_BO_WATE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
947961 {
948- bool learnable = spell_learnable(m_idx);
949- cptr m_name = monster_name(m_idx);
950- monster_type *m_ptr = &m_list[m_idx];
951- monster_race *r_ptr = &r_info[m_ptr->r_idx];
952- int rlev = monster_level_idx(m_idx);
953962 int dam;
954- disturb(1, 1);
963+ int rlev = monster_level_idx(m_idx);
955964
956- if (p_ptr->blind)
957- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
958- else
959- msg_format(_("%^sがウォーター・ボルトの呪文を唱えた。", "%^s casts a water bolt."), m_name);
965+ monspell_message(m_idx, t_idx,
966+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
967+ _("%^sがウォーター・ボルトの呪文を唱えた。", "%^s casts a water bolt."),
968+ _("%^sが%sに向かってウォーター・ボルトの呪文を唱えた。", "%^s casts a water bolt at %s."),
969+ TARGET_TYPE);
960970
961- dam = damroll(10, 10) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
962- bolt(m_idx, y, x, GF_WATER, dam, MS_BOLT_WATER, MONSTER_TO_PLAYER);
963- update_smart_learn(m_idx, DRS_REFLECT);
971+ dam = damroll(10, 10) + (rlev * 3 / (monster_is_powerful(m_idx) ? 2 : 3));
972+ bolt(m_idx, y, x, GF_WATER, dam, MS_BOLT_WATER, TARGET_TYPE);
973+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
974+ {
975+ update_smart_learn(m_idx, DRS_REFLECT);
976+ }
964977 return dam;
965978 }
966979
967-int spell_RF5_BO_MANA(int y, int x, int m_idx)
980+int spell_RF5_BO_MANA(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
968981 {
969- bool learnable = spell_learnable(m_idx);
970- cptr m_name = monster_name(m_idx);
971- monster_type *m_ptr = &m_list[m_idx];
972- monster_race *r_ptr = &r_info[m_ptr->r_idx];
973- int rlev = monster_level_idx(m_idx);
974982 int dam;
975- disturb(1, 1);
976- if (p_ptr->blind)
977- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
978- else
979- msg_format(_("%^sが魔力の矢の呪文を唱えた。", "%^s casts a mana bolt."), m_name);
983+ int rlev = monster_level_idx(m_idx);
984+
985+ monspell_message(m_idx, t_idx,
986+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
987+ _("%^sが魔力の矢の呪文を唱えた。", "%^s casts a mana bolt."),
988+ _("%^sが%sに向かって魔力の矢の呪文を唱えた。", "%^s casts a mana bolt at %s."),
989+ TARGET_TYPE);
980990
981991 dam = randint1(rlev * 7 / 2) + 50;
982- bolt(m_idx, y, x, GF_MANA, dam, MS_BOLT_MANA, MONSTER_TO_PLAYER);
983- update_smart_learn(m_idx, DRS_REFLECT);
992+ bolt(m_idx, y, x, GF_MANA, dam, MS_BOLT_MANA, TARGET_TYPE);
993+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
994+ {
995+ update_smart_learn(m_idx, DRS_REFLECT);
996+ }
984997 return dam;
985998 }
986999
987-int spell_RF5_BO_PLAS(int y, int x, int m_idx)
1000+int spell_RF5_BO_PLAS(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
9881001 {
989- bool learnable = spell_learnable(m_idx);
990- cptr m_name = monster_name(m_idx);
991- monster_type *m_ptr = &m_list[m_idx];
992- monster_race *r_ptr = &r_info[m_ptr->r_idx];
993- int rlev = monster_level_idx(m_idx);
9941002 int dam;
995- disturb(1, 1);
996- if (p_ptr->blind)
997- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
1003+ int rlev = monster_level_idx(m_idx);
9981004
999- else
1000- msg_format(_("%^sがプラズマ・ボルトの呪文を唱えた。", "%^s casts a plasma bolt."), m_name);
1005+ monspell_message(m_idx, t_idx,
1006+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
1007+ _("%^sがプラズマ・ボルトの呪文を唱えた。", "%^s casts a plasma bolt."),
1008+ _("%^sが%sに向かってプラズマ・ボルトの呪文を唱えた。", "%^s casts a plasma bolt at %s."),
1009+ TARGET_TYPE);
10011010
1002- dam = 10 + damroll(8, 7) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
1003- bolt(m_idx, y, x, GF_PLASMA, dam, MS_BOLT_PLASMA, MONSTER_TO_PLAYER);
1004- update_smart_learn(m_idx, DRS_REFLECT);
1011+ dam = 10 + damroll(8, 7) + (rlev * 3 / (monster_is_powerful(m_idx) ? 2 : 3));
1012+ bolt(m_idx, y, x, GF_PLASMA, dam, MS_BOLT_PLASMA, TARGET_TYPE);
1013+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
1014+ {
1015+ update_smart_learn(m_idx, DRS_REFLECT);
1016+ }
10051017 return dam;
10061018 }
10071019
1008-int spell_RF5_BO_ICEE(int y, int x, int m_idx)
1020+int spell_RF5_BO_ICEE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
10091021 {
1010- bool learnable = spell_learnable(m_idx);
1011- cptr m_name = monster_name(m_idx);
1012- monster_type *m_ptr = &m_list[m_idx];
1013- monster_race *r_ptr = &r_info[m_ptr->r_idx];
1014- int rlev = monster_level_idx(m_idx);
10151022 int dam;
1016- disturb(1, 1);
1017- if (p_ptr->blind)
1018- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
1019- else
1020- msg_format(_("%^sが極寒の矢の呪文を唱えた。", "%^s casts an ice bolt."), m_name);
1023+ int rlev = monster_level_idx(m_idx);
10211024
1022- dam = damroll(6, 6) + (rlev * 3 / ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 3));
1023- bolt(m_idx, y, x, GF_ICE, dam, MS_BOLT_ICE, MONSTER_TO_PLAYER);
1024- update_smart_learn(m_idx, DRS_COLD);
1025- update_smart_learn(m_idx, DRS_REFLECT);
1025+ monspell_message(m_idx, t_idx,
1026+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
1027+ _("%^sが極寒の矢の呪文を唱えた。", "%^s casts an ice bolt."),
1028+ _("%^sが%sに向かって極寒の矢の呪文を唱えた。", "%^s casts an ice bolt at %s."),
1029+ TARGET_TYPE);
1030+
1031+ dam = damroll(6, 6) + (rlev * 3 / (monster_is_powerful(m_idx) ? 2 : 3));
1032+ bolt(m_idx, y, x, GF_ICE, dam, MS_BOLT_ICE, TARGET_TYPE);
1033+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
1034+ {
1035+ update_smart_learn(m_idx, DRS_COLD);
1036+ update_smart_learn(m_idx, DRS_REFLECT);
1037+ }
10261038 return dam;
10271039 }
10281040
1029-
1030-int spell_RF5_MISSILE(int y, int x, int m_idx)
1041+int spell_RF5_MISSILE(int y, int x, int m_idx, int t_idx, int TARGET_TYPE)
10311042 {
1032- bool learnable = spell_learnable(m_idx);
1033- cptr m_name = monster_name(m_idx);
1034- int rlev = monster_level_idx(m_idx);
10351043 int dam;
1036- disturb(1, 1);
1037- if (p_ptr->blind)
1038- msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
1039- else
1040- msg_format(_("%^sがマジック・ミサイルの呪文を唱えた。", "%^s casts a magic missile."), m_name);
1044+ int rlev = monster_level_idx(m_idx);
1045+
1046+ monspell_message(m_idx, t_idx,
1047+ _("%^sが何かをつぶやいた。", "%^s mumbles."),
1048+ _("%^sがマジック・ミサイルの呪文を唱えた。", "%^s casts a magic missile."),
1049+ _("%^sが%sに向かってマジック・ミサイルの呪文を唱えた。", "%^s casts a magic missile at %s."),
1050+ TARGET_TYPE);
10411051
10421052 dam = damroll(2, 6) + (rlev / 3);
1043- bolt(m_idx, y, x, GF_MISSILE, dam, MS_MAGIC_MISSILE, MONSTER_TO_PLAYER);
1044- update_smart_learn(m_idx, DRS_REFLECT);
1053+ bolt(m_idx, y, x, GF_MISSILE, dam, MS_MAGIC_MISSILE, TARGET_TYPE);
1054+ if (TARGET_TYPE == MONSTER_TO_PLAYER)
1055+ {
1056+ update_smart_learn(m_idx, DRS_REFLECT);
1057+ }
10451058 return dam;
10461059 }
10471060
10481061 void spell_RF5_SCARE(int y, int x, int m_idx)
10491062 {
1050- cptr m_name = monster_name(m_idx);
10511063 int rlev = monster_level_idx(m_idx);
1064+ char m_name[80];
1065+ monster_name(m_idx, m_name);
10521066 disturb(1, 1);
10531067
1068+
10541069 if (p_ptr->blind)
10551070 msg_format(_("%^sが何かをつぶやくと、恐ろしげな音が聞こえた。", "%^s mumbles, and you hear scary noises."), m_name);
10561071 else
@@ -1074,8 +1089,10 @@ void spell_RF5_SCARE(int y, int x, int m_idx)
10741089
10751090 void spell_RF5_BLIND(int y, int x, int m_idx)
10761091 {
1077- cptr m_name = monster_name(m_idx);
10781092 int rlev = monster_level_idx(m_idx);
1093+ char m_name[80];
1094+ monster_name(m_idx, m_name);
1095+
10791096 disturb(1, 1);
10801097
10811098 if (p_ptr->blind)
@@ -1102,8 +1119,10 @@ void spell_RF5_BLIND(int y, int x, int m_idx)
11021119
11031120 void spell_RF5_CONF(int y, int x, int m_idx)
11041121 {
1105- cptr m_name = monster_name(m_idx);
11061122 int rlev = monster_level_idx(m_idx);
1123+ char m_name[80];
1124+ monster_name(m_idx, m_name);
1125+
11071126 disturb(1, 1);
11081127
11091128 if (p_ptr->blind)
@@ -1131,8 +1150,10 @@ void spell_RF5_CONF(int y, int x, int m_idx)
11311150
11321151 void spell_RF5_SLOW(int y, int x, int m_idx)
11331152 {
1134- cptr m_name = monster_name(m_idx);
11351153 int rlev = monster_level_idx(m_idx);
1154+ char m_name[80];
1155+ monster_name(m_idx, m_name);
1156+
11361157 disturb(1, 1);
11371158
11381159 msg_format(_("%^sがあなたの筋力を吸い取ろうとした!",
@@ -1156,8 +1177,9 @@ void spell_RF5_SLOW(int y, int x, int m_idx)
11561177
11571178 void spell_RF5_HOLD(int y, int x, int m_idx)
11581179 {
1159- cptr m_name = monster_name(m_idx);
11601180 int rlev = monster_level_idx(m_idx);
1181+ char m_name[80];
1182+ monster_name(m_idx, m_name);
11611183 disturb(1, 1);
11621184
11631185 if (p_ptr->blind)
@@ -1183,8 +1205,9 @@ void spell_RF5_HOLD(int y, int x, int m_idx)
11831205
11841206 void spell_RF6_HASTE(int m_idx)
11851207 {
1186- cptr m_name = monster_name(m_idx);
11871208 monster_type *m_ptr = &m_list[m_idx];
1209+ char m_name[80];
1210+ monster_name(m_idx, m_name);
11881211 disturb(1, 1);
11891212 if (p_ptr->blind)
11901213 {
@@ -1204,9 +1227,10 @@ void spell_RF6_HASTE(int m_idx)
12041227
12051228 int spell_RF6_HAND_DOOM(int y, int x, int m_idx)
12061229 {
1207- cptr m_name = monster_name(m_idx);
12081230 monster_type *m_ptr = &m_list[m_idx];
12091231 int dam;
1232+ char m_name[80];
1233+ monster_name(m_idx, m_name);
12101234 disturb(1, 1);
12111235 msg_format(_("%^sが<破滅の手>を放った!", "%^s invokes the Hand of Doom!"), m_name);
12121236 dam = (((s32b)((40 + randint1(20)) * (p_ptr->chp))) / 100);
@@ -1216,10 +1240,12 @@ int spell_RF6_HAND_DOOM(int y, int x, int m_idx)
12161240
12171241 void spell_RF6_HEAL(int m_idx)
12181242 {
1219- cptr m_name = monster_name(m_idx);
12201243 monster_type *m_ptr = &m_list[m_idx];
12211244 int rlev = monster_level_idx(m_idx);
12221245 bool seen = (!p_ptr->blind && m_ptr->ml);
1246+ char m_name[80];
1247+ monster_name(m_idx, m_name);
1248+
12231249 disturb(1, 1);
12241250
12251251 /* Message */
@@ -1270,9 +1296,10 @@ void spell_RF6_HEAL(int m_idx)
12701296 }
12711297 void spell_RF6_INVULNER(int m_idx)
12721298 {
1273- cptr m_name = monster_name(m_idx);
12741299 monster_type *m_ptr = &m_list[m_idx];
12751300 bool seen = (!p_ptr->blind && m_ptr->ml);
1301+ char m_name[80];
1302+ monster_name(m_idx, m_name);
12761303 disturb(1, 1);
12771304
12781305 /* Message */
@@ -1286,7 +1313,9 @@ void spell_RF6_INVULNER(int m_idx)
12861313
12871314 void spell_RF6_BLINK(int m_idx)
12881315 {
1289- cptr m_name = monster_name(m_idx);
1316+ char m_name[80];
1317+ monster_name(m_idx, m_name);
1318+
12901319 disturb(1, 1);
12911320 if (teleport_barrier(m_idx))
12921321 {
@@ -1302,9 +1331,11 @@ void spell_RF6_BLINK(int m_idx)
13021331 }
13031332
13041333 void spell_RF6_TPORT(int m_idx)
1305-{
1306- cptr m_name = monster_name(m_idx);
1307- disturb(1, 1);
1334+{
1335+ char m_name[80];
1336+ monster_name(m_idx, m_name);
1337+
1338+ disturb(1, 1);
13081339 if (teleport_barrier(m_idx))
13091340 {
13101341 msg_format(_("魔法のバリアが%^sのテレポートを邪魔した。",
@@ -1319,9 +1350,11 @@ void spell_RF6_TPORT(int m_idx)
13191350
13201351 int spell_RF6_WORLD(int m_idx)
13211352 {
1322- cptr m_name = monster_name(m_idx);
13231353 monster_type *m_ptr = &m_list[m_idx];
13241354 int who = 0;
1355+ char m_name[80];
1356+ monster_name(m_idx, m_name);
1357+
13251358 disturb(1, 1);
13261359 if (m_ptr->r_idx == MON_DIO) who = 1;
13271360 else if (m_ptr->r_idx == MON_WONG) who = 3;
@@ -1331,12 +1364,13 @@ int spell_RF6_WORLD(int m_idx)
13311364
13321365 int spell_RF6_SPECIAL(int y, int x, int m_idx)
13331366 {
1334- cptr m_name = monster_name(m_idx);
13351367 monster_type *m_ptr = &m_list[m_idx];
13361368 monster_race *r_ptr = &r_info[m_ptr->r_idx];
13371369 u32b mode = 0L;
13381370 bool direct = player_bold(y, x);
13391371 int k, dam, count=0;
1372+ char m_name[80];
1373+ monster_name(m_idx, m_name);
13401374
13411375 disturb(1, 1);
13421376 switch (m_ptr->r_idx)
@@ -1481,8 +1515,10 @@ int spell_RF6_SPECIAL(int y, int x, int m_idx)
14811515
14821516 void spell_RF6_TELE_TO(int m_idx)
14831517 {
1484- cptr m_name = monster_name(m_idx);
14851518 monster_type *m_ptr = &m_list[m_idx];
1519+ char m_name[80];
1520+ monster_name(m_idx, m_name);
1521+
14861522 disturb(1, 1);
14871523 msg_format(_("%^sがあなたを引き戻した。", "%^s commands you to return."), m_name);
14881524
@@ -1492,7 +1528,8 @@ void spell_RF6_TELE_TO(int m_idx)
14921528
14931529 void spell_RF6_TELE_AWAY(int m_idx)
14941530 {
1495- cptr m_name = monster_name(m_idx);
1531+ char m_name[80];
1532+ monster_name(m_idx, m_name);
14961533 disturb(1, 1);
14971534
14981535 msg_format(_("%^sにテレポートさせられた。", "%^s teleports you away."), m_name);
@@ -1505,8 +1542,10 @@ void spell_RF6_TELE_AWAY(int m_idx)
15051542
15061543 void spell_RF6_TELE_LEVEL(int m_idx)
15071544 {
1508- cptr m_name = monster_name(m_idx);
15091545 int rlev = monster_level_idx(m_idx);
1546+ char m_name[80];
1547+ monster_name(m_idx, m_name);
1548+
15101549 disturb(1, 1);
15111550
15121551 if (p_ptr->blind)
@@ -1532,12 +1571,13 @@ void spell_RF6_TELE_LEVEL(int m_idx)
15321571
15331572 int spell_RF6_PSY_SPEAR(int y, int x, int m_idx)
15341573 {
1535- bool learnable = spell_learnable(m_idx);
1536- cptr m_name = monster_name(m_idx);
15371574 monster_type *m_ptr = &m_list[m_idx];
15381575 monster_race *r_ptr = &r_info[m_ptr->r_idx];
1539- int rlev = monster_level_idx(m_idx);
1576+ int rlev = monster_level_idx(m_idx);
15401577 int dam;
1578+ char m_name[80];
1579+ monster_name(m_idx, m_name);
1580+
15411581 disturb(1, 1);
15421582 if (p_ptr->blind)
15431583 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
@@ -1551,10 +1591,11 @@ int spell_RF6_PSY_SPEAR(int y, int x, int m_idx)
15511591
15521592 void spell_RF6_DARKNESS(int m_idx)
15531593 {
1554- cptr m_name = monster_name(m_idx);
15551594 monster_type *m_ptr = &m_list[m_idx];
15561595 monster_race *r_ptr = &r_info[m_ptr->r_idx];
15571596 bool can_use_lite_area = FALSE;
1597+ char m_name[80];
1598+ monster_name(m_idx, m_name);
15581599
15591600 if ((p_ptr->pclass == CLASS_NINJA) &&
15601601 !(r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) &&
@@ -1582,7 +1623,8 @@ void spell_RF6_DARKNESS(int m_idx)
15821623
15831624 void spell_RF6_TRAPS(int y, int x, int m_idx)
15841625 {
1585- cptr m_name = monster_name(m_idx);
1626+ char m_name[80];
1627+ monster_name(m_idx, m_name);
15861628 disturb(1, 1);
15871629
15881630 if (p_ptr->blind)
@@ -1598,8 +1640,10 @@ void spell_RF6_TRAPS(int y, int x, int m_idx)
15981640
15991641 void spell_RF6_FORGET(int m_idx)
16001642 {
1601- cptr m_name = monster_name(m_idx);
16021643 int rlev = monster_level_idx(m_idx);
1644+ char m_name[80];
1645+ monster_name(m_idx, m_name);
1646+
16031647 disturb(1, 1);
16041648
16051649 msg_format(_("%^sがあなたの記憶を消去しようとしている。",
@@ -1618,8 +1662,10 @@ void spell_RF6_FORGET(int m_idx)
16181662
16191663 void spell_RF6_RAISE_DEAD(int m_idx)
16201664 {
1621- cptr m_name = monster_name(m_idx);
16221665 monster_type *m_ptr = &m_list[m_idx];
1666+ char m_name[80];
1667+ monster_name(m_idx, m_name);
1668+
16231669 disturb(1, 1);
16241670
16251671 if (p_ptr->blind)
@@ -1633,12 +1679,14 @@ void spell_RF6_RAISE_DEAD(int m_idx)
16331679
16341680 void spell_RF6_S_KIN(int y, int x, int m_idx)
16351681 {
1636- cptr m_name = monster_name(m_idx);
16371682 monster_type *m_ptr = &m_list[m_idx];
16381683 monster_race *r_ptr = &r_info[m_ptr->r_idx];
16391684 int rlev = monster_level_idx(m_idx);
16401685 int count = 0, k;
16411686 u32b mode = 0L;
1687+ char m_name[80];
1688+ monster_name(m_idx, m_name);
1689+
16421690 disturb(1, 1);
16431691 if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
16441692 {
@@ -1744,8 +1792,10 @@ void spell_RF6_S_KIN(int y, int x, int m_idx)
17441792
17451793 void spell_RF6_S_CYBER(int y, int x, int m_idx)
17461794 {
1747- cptr m_name = monster_name(m_idx);
17481795 int count = 0;
1796+ char m_name[80];
1797+ monster_name(m_idx, m_name);
1798+
17491799 disturb(1, 1);
17501800
17511801 if (p_ptr->blind)
@@ -1762,9 +1812,11 @@ void spell_RF6_S_CYBER(int y, int x, int m_idx)
17621812
17631813 void spell_RF6_S_MONSTER(int y, int x, int m_idx)
17641814 {
1765- cptr m_name = monster_name(m_idx);
17661815 int rlev = monster_level_idx(m_idx);
17671816 int k, count = 0;
1817+ char m_name[80];
1818+ monster_name(m_idx, m_name);
1819+
17681820 disturb(1, 1);
17691821
17701822 if (p_ptr->blind)
@@ -1782,9 +1834,11 @@ void spell_RF6_S_MONSTER(int y, int x, int m_idx)
17821834
17831835 void spell_RF6_S_MONSTERS(int y, int x, int m_idx)
17841836 {
1785- cptr m_name = monster_name(m_idx);
17861837 int rlev = monster_level_idx(m_idx);
17871838 int k, count = 0;
1839+ char m_name[80];
1840+ monster_name(m_idx, m_name);
1841+
17881842 disturb(1, 1);
17891843
17901844 if (p_ptr->blind)
@@ -1803,9 +1857,11 @@ void spell_RF6_S_MONSTERS(int y, int x, int m_idx)
18031857
18041858 void spell_RF6_S_ANT(int y, int x, int m_idx)
18051859 {
1806- cptr m_name = monster_name(m_idx);
18071860 int rlev = monster_level_idx(m_idx);
18081861 int k, count = 0;
1862+ char m_name[80];
1863+ monster_name(m_idx, m_name);
1864+
18091865 disturb(1, 1);
18101866
18111867 if (p_ptr->blind)
@@ -1824,9 +1880,11 @@ void spell_RF6_S_ANT(int y, int x, int m_idx)
18241880
18251881 void spell_RF6_S_SPIDER(int y, int x, int m_idx)
18261882 {
1827- cptr m_name = monster_name(m_idx);
18281883 int rlev = monster_level_idx(m_idx);
18291884 int k, count = 0;
1885+ char m_name[80];
1886+ monster_name(m_idx, m_name);
1887+
18301888 disturb(1, 1);
18311889
18321890 if (p_ptr->blind)
@@ -1845,9 +1903,11 @@ void spell_RF6_S_SPIDER(int y, int x, int m_idx)
18451903
18461904 void spell_RF6_S_HOUND(int y, int x, int m_idx)
18471905 {
1848- cptr m_name = monster_name(m_idx);
18491906 int rlev = monster_level_idx(m_idx);
18501907 int k, count = 0;
1908+ char m_name[80];
1909+ monster_name(m_idx, m_name);
1910+
18511911 disturb(1, 1);
18521912
18531913 if (p_ptr->blind)
@@ -1866,9 +1926,11 @@ void spell_RF6_S_HOUND(int y, int x, int m_idx)
18661926
18671927 void spell_RF6_S_HYDRA(int y, int x, int m_idx)
18681928 {
1869- cptr m_name = monster_name(m_idx);
18701929 int rlev = monster_level_idx(m_idx);
18711930 int k, count = 0;
1931+ char m_name[80];
1932+ monster_name(m_idx, m_name);
1933+
18721934 disturb(1, 1);
18731935
18741936 if (p_ptr->blind)
@@ -1886,12 +1948,13 @@ void spell_RF6_S_HYDRA(int y, int x, int m_idx)
18861948
18871949 void spell_RF6_S_ANGEL(int y, int x, int m_idx)
18881950 {
1889- cptr m_name = monster_name(m_idx);
18901951 monster_type *m_ptr = &m_list[m_idx];
18911952 monster_race *r_ptr = &r_info[m_ptr->r_idx];
18921953 int rlev = monster_level_idx(m_idx);
18931954 int k, count = 0;
18941955 int num = 1;
1956+ char m_name[80];
1957+ monster_name(m_idx, m_name);
18951958
18961959 disturb(1, 1);
18971960
@@ -1924,9 +1987,11 @@ void spell_RF6_S_ANGEL(int y, int x, int m_idx)
19241987
19251988 void spell_RF6_S_DEMON(int y, int x, int m_idx)
19261989 {
1927- cptr m_name = monster_name(m_idx);
19281990 int rlev = monster_level_idx(m_idx);
19291991 int k, count = 0;
1992+ char m_name[80];
1993+ monster_name(m_idx, m_name);
1994+
19301995 disturb(1, 1);
19311996
19321997 if (p_ptr->blind)
@@ -1946,9 +2011,11 @@ void spell_RF6_S_DEMON(int y, int x, int m_idx)
19462011
19472012 void spell_RF6_S_UNDEAD(int y, int x, int m_idx)
19482013 {
1949- cptr m_name = monster_name(m_idx);
19502014 int rlev = monster_level_idx(m_idx);
19512015 int k, count = 0;
2016+ char m_name[80];
2017+ monster_name(m_idx, m_name);
2018+
19522019 disturb(1, 1);
19532020
19542021 if (p_ptr->blind)
@@ -1968,9 +2035,11 @@ void spell_RF6_S_UNDEAD(int y, int x, int m_idx)
19682035
19692036 void spell_RF6_S_DRAGON(int y, int x, int m_idx)
19702037 {
1971- cptr m_name = monster_name(m_idx);
19722038 int rlev = monster_level_idx(m_idx);
19732039 int k, count = 0;
2040+ char m_name[80];
2041+ monster_name(m_idx, m_name);
2042+
19742043 disturb(1, 1);
19752044
19762045 if (p_ptr->blind)
@@ -1988,7 +2057,7 @@ void spell_RF6_S_DRAGON(int y, int x, int m_idx)
19882057
19892058 void spell_RF6_S_HI_UNDEAD(int y, int x, int m_idx)
19902059 {
1991- cptr m_name = monster_name(m_idx);
2060+ char* m_name = monster_name(m_idx, "");
19922061 monster_type *m_ptr = &m_list[m_idx];
19932062 monster_race *r_ptr = &r_info[m_ptr->r_idx];
19942063 int rlev = monster_level_idx(m_idx);
@@ -2064,7 +2133,7 @@ void spell_RF6_S_HI_UNDEAD(int y, int x, int m_idx)
20642133
20652134 void spell_RF6_S_HI_DRAGON(int y, int x, int m_idx)
20662135 {
2067- cptr m_name = monster_name(m_idx);
2136+ char* m_name = monster_name(m_idx, "");
20682137 int rlev = monster_level_idx(m_idx);
20692138 int k, count = 0;
20702139 disturb(1, 1);
@@ -2087,7 +2156,7 @@ void spell_RF6_S_HI_DRAGON(int y, int x, int m_idx)
20872156
20882157 void spell_RF6_S_AMBERITES(int y, int x, int m_idx)
20892158 {
2090- cptr m_name = monster_name(m_idx);
2159+ char* m_name = monster_name(m_idx, "");
20912160 int rlev = monster_level_idx(m_idx);
20922161 int k, count = 0;
20932162 disturb(1, 1);
@@ -2109,7 +2178,7 @@ void spell_RF6_S_AMBERITES(int y, int x, int m_idx)
21092178
21102179 void spell_RF6_S_UNIQUE(int y, int x, int m_idx)
21112180 {
2112- cptr m_name = monster_name(m_idx);
2181+ char* m_name = monster_name(m_idx, "");
21132182 monster_type *m_ptr = &m_list[m_idx];
21142183 int rlev = monster_level_idx(m_idx);
21152184 int k, count = 0;
旧リポジトリブラウザで表示