• R/O
  • HTTP
  • SSH
  • HTTPS

hengband: コミット

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


コミットメタ情報

リビジョンe2c6cc0222cf069401acc454449ac9f9aa0d605e (tree)
日時2014-02-19 12:14:48
作者dis- <dis.rogue@gmai...>
コミッターdis-

ログメッセージ

refactor: simplify the arguments in mspells_4.c

変更サマリ

差分

--- a/src/defines.h
+++ b/src/defines.h
@@ -5694,3 +5694,11 @@ extern int PlayerUID;
56945694
56955695 #define have_dark_flag(ARRAY) \
56965696 (have_flag(ARRAY, TR_LITE_M1) || have_flag(ARRAY, TR_LITE_M2) || have_flag(ARRAY, TR_LITE_M3))
5697+
5698+/* Spell Type flag */
5699+#define SPELL_MON_TO_PLAYER 0x01
5700+#define SPELL_MON_TO_MON 0x02
5701+
5702+/* summoning number */
5703+#define S_NUM_6 (easy_band ? 2 : 6)
5704+#define S_NUM_4 (easy_band ? 1 : 4)
--- a/src/externs.h
+++ b/src/externs.h
@@ -1577,83 +1577,93 @@ extern bool do_cmd_mane(bool baigaesi);
15771577 extern void bolt(int m_idx, int typ, int dam_hp, int monspell, bool learnable);
15781578 extern void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable);
15791579
1580+/* mspells2.c */
1581+extern void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable);
1582+
15801583 /* mspells3.c */
15811584 extern bool do_cmd_cast_learned(void);
15821585 extern void learn_spell(int monspell);
15831586 extern void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode);
15841587
15851588 /* mspells4.c */
1586-extern void spell_RF4_SHRIEK(int m_idx, cptr m_name);
1587-extern void spell_RF4_DISPEL(bool blind, cptr m_name);
1588-extern int spell_RF4_ROCKET(bool blind, cptr m_name, monster_type* m_ptr, int y, int x, int m_idx, bool learnable);
1589-extern int spell_RF4_SHOOT(bool blind, cptr m_name, monster_race* r_ptr, int m_idx, bool learnable);
1590-extern int spell_RF4_BREATH(int GF_TYPE, bool blind, cptr m_name, monster_type* m_ptr, int y, int x, int m_idx, bool learnable);
1591-extern int spell_RF4_BA_CHAO(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1592-extern int spell_RF4_BA_NUKE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1593-extern int spell_RF5_BA_ACID(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1594-extern int spell_RF5_BA_ELEC(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1595-extern int spell_RF5_BA_FIRE(monster_type* m_ptr, bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1596-extern int spell_RF5_BA_COLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1597-extern int spell_RF5_BA_POIS(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1598-extern int spell_RF5_BA_NETH(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1599-extern int spell_RF5_BA_WATE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1600-extern int spell_RF5_BA_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1601-extern int spell_RF5_BA_DARK(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1602-extern int spell_RF5_DRAIN_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1603-extern int spell_RF5_MIND_BLAST(bool seen, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1604-extern int spell_RF5_BRAIN_SMASH(bool seen, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1605-extern int spell_RF5_CAUSE_1(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1606-extern int spell_RF5_CAUSE_2(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1607-extern int spell_RF5_CAUSE_3(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1608-extern int spell_RF5_CAUSE_4(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1609-extern int spell_RF5_BO_ACID(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1610-extern int spell_RF5_BO_ELEC(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1611-extern int spell_RF5_BO_FIRE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1612-extern int spell_RF5_BO_COLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1613-extern int spell_RF5_BA_LITE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1614-extern int spell_RF5_BO_NETH(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1615-extern int spell_RF5_BO_WATE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1616-extern int spell_RF5_BO_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1617-extern int spell_RF5_BO_PLAS(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1618-extern int spell_RF5_BO_ICEE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1619-extern int spell_RF5_MISSILE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable);
1620-extern void spell_RF5_SCARE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx);
1621-extern void spell_RF5_BLIND(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx);
1622-extern void spell_RF5_CONF(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx);
1623-extern void spell_RF5_SLOW(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx);
1624-extern void spell_RF5_HOLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx);
1625-extern void spell_RF6_HASTE(bool blind, cptr m_name, monster_type* m_ptr, int y, int x, int m_idx);
1626-extern int spell_RF6_HAND_DOOM(bool blind, cptr m_name, monster_type* m_ptr, int y, int x, int m_idx, bool learnable);
1627-extern void spell_RF6_HEAL(bool blind, bool seen, cptr m_name, monster_type* m_ptr, int rlev, int m_idx);
1628-extern void spell_RF6_INVULNER(bool seen, cptr m_name, monster_type* m_ptr, int m_idx);
1629-extern void spell_RF6_BLINK(cptr m_name, int m_idx);
1630-extern void spell_RF6_TPORT(cptr m_name, int m_idx);
1631-extern int spell_RF6_WORLD(cptr m_name, monster_type* m_ptr, int m_idx);
1632-extern int spell_RF6_SPECIAL(cptr m_name, monster_type* m_ptr, monster_race* r_ptr, u32b mode, bool blind, bool direct, int y, int x, int m_idx);
1633-extern void spell_RF6_TELE_TO(cptr m_name, monster_type* m_ptr);
1634-extern void spell_RF6_TELE_AWAY(cptr m_name, int m_idx);
1635-extern void spell_RF6_TELE_LEVEL(bool blind, cptr m_name, int m_idx, int rlev);
1636-extern int spell_RF6_PSY_SPEAR(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int m_idx, bool learnable);
1637-extern void spell_RF6_DARKNESS(bool blind, cptr m_name, bool can_use_lite_area);
1638-extern void spell_RF6_TRAPS(bool blind, cptr m_name, int y, int x);
1639-extern void spell_RF6_FORGET(cptr m_name, int rlev);
1640-extern void spell_RF6_RAISE_DEAD(bool blind, cptr m_name, int m_idx, monster_type* m_ptr);
1641-extern void spell_RF6_S_KIN(bool blind, cptr m_name, monster_type* m_ptr, monster_race* r_ptr, int m_idx, int y, int x, int rlev, u32b mode);
1642-extern void spell_RF6_S_CYBER(bool blind, cptr m_name, int m_idx, int y, int x);
1643-extern void spell_RF6_S_MONSTER(bool blind, cptr m_name, int m_idx, int y, int x, int rlev);
1644-extern void spell_RF6_S_MONSTERS(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_6);
1645-extern void spell_RF6_S_ANT(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_6);
1646-extern void spell_RF6_S_SPIDER(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_6);
1647-extern void spell_RF6_S_HOUND(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_4);
1648-extern void spell_RF6_S_HYDRA(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_4);
1649-extern void spell_RF6_S_ANGEL(bool blind, cptr m_name, monster_race* r_ptr, int m_idx, int y, int x, int rlev);
1650-extern void spell_RF6_S_DEMON(bool blind, cptr m_name, int m_idx, int y, int x, int rlev);
1651-extern void spell_RF6_S_UNDEAD(bool blind, cptr m_name, int m_idx, int y, int x, int rlev);
1652-extern void spell_RF6_S_DRAGON(bool blind, cptr m_name, int m_idx, int y, int x, int rlev);
1653-extern void spell_RF6_S_HI_UNDEAD(monster_type* m_ptr, bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_6, u32b mode);
1654-extern void spell_RF6_S_HI_DRAGON(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_4);
1655-extern void spell_RF6_S_AMBERITES(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_4);
1656-extern void spell_RF6_S_UNIQUE(bool blind, cptr m_name, int m_idx, monster_type* m_ptr, int y, int x, int rlev, int s_num_4);
1589+
1590+/* spells monster to player */
1591+extern void MP_spell_RF4_SHRIEK(int m_idx);
1592+extern void MP_spell_RF4_DISPEL(int m_idx);
1593+extern int MP_spell_RF4_ROCKET(int y, int x, int m_idx);
1594+extern int spell_RF4_SHOOT(int m_idx);
1595+extern int spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx);
1596+extern int spell_RF4_BA_CHAO(int y, int x, int m_idx);
1597+extern int spell_RF4_BA_NUKE(int y, int x, int m_idx);
1598+extern int spell_RF5_BA_ACID(int y, int x, int m_idx);
1599+extern int spell_RF5_BA_ELEC(int y, int x, int m_idx);
1600+extern int spell_RF5_BA_FIRE(int y, int x, int m_idx);
1601+extern int spell_RF5_BA_COLD(int y, int x, int m_idx);
1602+extern int spell_RF5_BA_POIS(int y, int x, int m_idx);
1603+extern int spell_RF5_BA_NETH(int y, int x, int m_idx);
1604+extern int spell_RF5_BA_WATE(int y, int x, int m_idx);
1605+extern int spell_RF5_BA_MANA(int y, int x, int m_idx);
1606+extern int spell_RF5_BA_DARK(int y, int x, int m_idx);
1607+extern int spell_RF5_DRAIN_MANA(int y, int x, int m_idx);
1608+extern int spell_RF5_MIND_BLAST(int y, int x, int m_idx);
1609+extern int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx);
1610+extern int spell_RF5_CAUSE_1(int y, int x, int m_idx);
1611+extern int spell_RF5_CAUSE_2(int y, int x, int m_idx);
1612+extern int spell_RF5_CAUSE_3(int y, int x, int m_idx);
1613+extern int spell_RF5_CAUSE_4(int y, int x, int m_idx);
1614+extern int spell_RF5_BO_ACID(int y, int x, int m_idx);
1615+extern int spell_RF5_BO_ELEC(int y, int x, int m_idx);
1616+extern int spell_RF5_BO_FIRE(int y, int x, int m_idx);
1617+extern int spell_RF5_BO_COLD(int y, int x, int m_idx);
1618+extern int spell_RF5_BA_LITE(int y, int x, int m_idx);
1619+extern int spell_RF5_BO_NETH(int y, int x, int m_idx);
1620+extern int spell_RF5_BO_WATE(int y, int x, int m_idx);
1621+extern int spell_RF5_BO_MANA(int y, int x, int m_idx);
1622+extern int spell_RF5_BO_PLAS(int y, int x, int m_idx);
1623+extern int spell_RF5_BO_ICEE(int y, int x, int m_idx);
1624+extern int spell_RF5_MISSILE(int y, int x, int m_idx);
1625+extern void spell_RF5_SCARE(int y, int x, int m_idx);
1626+extern void spell_RF5_BLIND(int y, int x, int m_idx);
1627+extern void spell_RF5_CONF(int y, int x, int m_idx);
1628+extern void spell_RF5_SLOW(int y, int x, int m_idx);
1629+extern void spell_RF5_HOLD(int y, int x, int m_idx);
1630+extern void spell_RF6_HASTE(int m_idx);
1631+extern int spell_RF6_HAND_DOOM(int y, int x, int m_idx);
1632+extern void spell_RF6_HEAL(int m_idx);
1633+extern void spell_RF6_INVULNER(int m_idx);
1634+extern void spell_RF6_BLINK(int m_idx);
1635+extern void spell_RF6_TPORT(int m_idx);
1636+extern int spell_RF6_WORLD(int m_idx);
1637+extern int spell_RF6_SPECIAL(int y, int x, int m_idx);
1638+extern void spell_RF6_TELE_TO(int m_idx);
1639+extern void spell_RF6_TELE_AWAY(int m_idx);
1640+extern void spell_RF6_TELE_LEVEL(int m_idx);
1641+extern int spell_RF6_PSY_SPEAR(int m_idx);
1642+extern void spell_RF6_DARKNESS(int m_idx);
1643+extern void spell_RF6_TRAPS(int y, int x, int m_idx);
1644+extern void spell_RF6_FORGET(int m_idx);
1645+extern void spell_RF6_RAISE_DEAD(int m_idx);
1646+extern void spell_RF6_S_KIN(int y, int x, int m_idx);
1647+extern void spell_RF6_S_CYBER(int y, int x, int m_idx);
1648+extern void spell_RF6_S_MONSTER(int y, int x, int m_idx);
1649+extern void spell_RF6_S_MONSTERS(int y, int x, int m_idx);
1650+extern void spell_RF6_S_ANT(int y, int x, int m_idx);
1651+extern void spell_RF6_S_SPIDER(int y, int x, int m_idx);
1652+extern void spell_RF6_S_HOUND(int y, int x, int m_idx);
1653+extern void spell_RF6_S_HYDRA(int y, int x, int m_idx);
1654+extern void spell_RF6_S_ANGEL(int y, int x, int m_idx);
1655+extern void spell_RF6_S_DEMON(int y, int x, int m_idx);
1656+extern void spell_RF6_S_UNDEAD(int y, int x, int m_idx);
1657+extern void spell_RF6_S_DRAGON(int y, int x, int m_idx);
1658+extern void spell_RF6_S_HI_UNDEAD(int y, int x, int m_idx);
1659+extern void spell_RF6_S_HI_DRAGON(int y, int x, int m_idx);
1660+extern void spell_RF6_S_AMBERITES(int y, int x, int m_idx);
1661+extern void spell_RF6_S_UNIQUE(int y, int x, int m_idx);
1662+
1663+/* spells monster to monster */
1664+extern void MM_spell_RF4_SHRIEK(int m_idx, int t_idx);
1665+extern void MM_spell_RF4_DISPEL(int m_idx, int t_idx);
1666+extern int MM_spell_RF4_ROCKET(int y, int x, int m_idx, int t_idx);
16571667
16581668 /* hissatsu.c */
16591669 extern void hissatsu_info(char *p, int power);
--- a/src/mspells1.c
+++ b/src/mspells1.c
@@ -1840,108 +1840,108 @@ bool make_attack_spell(int m_idx)
18401840 /* Cast the spell. */
18411841 switch (thrown_spell)
18421842 {
1843- case 96 + 0: spell_RF4_SHRIEK(m_idx, m_name); break; /* RF4_SHRIEK */
1843+ case 96 + 0: MP_spell_RF4_SHRIEK(m_idx); break; /* RF4_SHRIEK */
18441844 case 96 + 1: break; /* RF4_XXX1 */
1845- case 96 + 2: spell_RF4_DISPEL(blind, m_name); break; /* RF4_DISPEL */
1846- case 96 + 3: dam = spell_RF4_ROCKET(blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_ROCKET */
1847- case 96 + 4: dam = spell_RF4_SHOOT(blind, m_name, r_ptr, m_idx, learnable); break; /* RF4_SHOOT */
1845+ case 96 + 2: MP_spell_RF4_DISPEL(m_idx); break; /* RF4_DISPEL */
1846+ case 96 + 3: dam = MP_spell_RF4_ROCKET(y, x, m_idx); break; /* RF4_ROCKET */
1847+ case 96 + 4: dam = spell_RF4_SHOOT(m_idx); break; /* RF4_SHOOT */
18481848 case 96 + 5: break; /* RF4_XXX2 */
18491849 case 96 + 6: break; /* RF4_XXX3 */
18501850 case 96 + 7: break; /* RF4_XXX4 */
1851- case 96 + 8: dam = spell_RF4_BREATH(GF_ACID, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_ACID */
1852- case 96 + 9: dam = spell_RF4_BREATH(GF_ELEC, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_ELEC */
1853- case 96 + 10: dam = spell_RF4_BREATH(GF_FIRE, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_FIRE */
1854- case 96 + 11: dam = spell_RF4_BREATH(GF_COLD, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_COLD */
1855- case 96 + 12: dam = spell_RF4_BREATH(GF_POIS, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_POIS */
1856- case 96 + 13: dam = spell_RF4_BREATH(GF_NETHER, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_NETH */
1857- case 96 + 14: dam = spell_RF4_BREATH(GF_LITE, blind, m_name, m_ptr, y_br_lite, x_br_lite, m_idx, learnable); break; /* RF4_BR_LITE */
1858- case 96 + 15: dam = spell_RF4_BREATH(GF_DARK, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_DARK */
1859- case 96 + 16: dam = spell_RF4_BREATH(GF_CONFUSION, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_CONF */
1860- case 96 + 17: dam = spell_RF4_BREATH(GF_SOUND, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_SOUN */
1861- case 96 + 18: dam = spell_RF4_BREATH(GF_CHAOS, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_CHAO */
1862- case 96 + 19: dam = spell_RF4_BREATH(GF_DISENCHANT, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_DISE */
1863- case 96 + 20: dam = spell_RF4_BREATH(GF_NEXUS, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_NEXU */
1864- case 96 + 21: dam = spell_RF4_BREATH(GF_TIME, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_TIME */
1865- case 96 + 22: dam = spell_RF4_BREATH(GF_INERTIA, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_INER */
1866- case 96 + 23: dam = spell_RF4_BREATH(GF_GRAVITY, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_GRAV */
1867- case 96 + 24: dam = spell_RF4_BREATH(GF_SHARDS, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_SHAR */
1868- case 96 + 25: dam = spell_RF4_BREATH(GF_PLASMA, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_PLAS */
1869- case 96 + 26: dam = spell_RF4_BREATH(GF_FORCE, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_WALL */
1870- case 96 + 27: dam = spell_RF4_BREATH(GF_MANA, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_MANA */
1871- case 96 + 28: dam = spell_RF4_BA_NUKE(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF4_BA_NUKE */
1872- case 96 + 29: dam = spell_RF4_BREATH(GF_NUKE, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_NUKE */
1873- case 96 + 30: dam = spell_RF4_BA_CHAO(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF4_BA_CHAO */
1874- case 96 + 31: dam = spell_RF4_BREATH(GF_DISINTEGRATE, blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF4_BR_DISI */
1875- case 128 + 0: dam = spell_RF5_BA_ACID(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_ACID */
1876- case 128 + 1: dam = spell_RF5_BA_ELEC(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_ELEC */
1877- case 128 + 2: dam = spell_RF5_BA_FIRE(m_ptr, blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_FIRE */
1878- case 128 + 3: dam = spell_RF5_BA_COLD(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_COLD */
1879- case 128 + 4: dam = spell_RF5_BA_POIS(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_POIS */
1880- case 128 + 5: dam = spell_RF5_BA_NETH(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_NETH */
1881- case 128 + 6: dam = spell_RF5_BA_WATE(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_WATE */
1882- case 128 + 7: dam = spell_RF5_BA_MANA(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_MANA */
1883- case 128 + 8: dam = spell_RF5_BA_DARK(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_DARK */
1884- case 128 + 9: dam = spell_RF5_DRAIN_MANA(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_DRAIN_MANA */
1885- case 128 + 10: dam = spell_RF5_MIND_BLAST(seen, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_MIND_BLAST */
1886- case 128 + 11: dam = spell_RF5_BRAIN_SMASH(seen, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_MIND_BLAST */
1887- case 128 + 12: dam = spell_RF5_CAUSE_1(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_CAUSE_1 */
1888- case 128 + 13: dam = spell_RF5_CAUSE_2(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_CAUSE_2 */
1889- case 128 + 14: dam = spell_RF5_CAUSE_3(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_CAUSE_3 */
1890- case 128 + 15: dam = spell_RF5_CAUSE_4(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_CAUSE_4 */
1891- case 128 + 16: dam = spell_RF5_BO_ACID(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_ACID */
1892- case 128 + 17: dam = spell_RF5_BO_ELEC(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_ELEC */
1893- case 128 + 18: dam = spell_RF5_BO_FIRE(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_FIRE */
1894- case 128 + 19: dam = spell_RF5_BO_COLD(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_COLD */
1895- case 128 + 20: dam = spell_RF5_BA_LITE(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BA_LITE */
1896- case 128 + 21: dam = spell_RF5_BO_NETH(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_NETH */
1897- case 128 + 22: dam = spell_RF5_BO_WATE(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_WATE */
1898- case 128 + 23: dam = spell_RF5_BO_MANA(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_MANA */
1899- case 128 + 24: dam = spell_RF5_BO_PLAS(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_PLAS */
1900- case 128 + 25: dam = spell_RF5_BO_ICEE(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_BO_ICEE */
1901- case 128 + 26: dam = spell_RF5_MISSILE(blind, m_name, r_ptr, rlev, y, x, m_idx, learnable); break; /* RF5_MISSILE */
1902- case 128 + 27: spell_RF5_SCARE(blind, m_name, r_ptr, rlev, y, x, m_idx); break; /* RF5_SCARE */
1903- case 128 + 28: spell_RF5_BLIND(blind, m_name, r_ptr, rlev, y, x, m_idx); break; /* RF5_BLIND */
1904- case 128 + 29: spell_RF5_CONF(blind, m_name, r_ptr, rlev, y, x, m_idx); break; /* RF5_CONF */
1905- case 128 + 30: spell_RF5_SLOW(blind, m_name, r_ptr, rlev, y, x, m_idx); break; /* RF5_SLOW */
1906- case 128 + 31: spell_RF5_HOLD(blind, m_name, r_ptr, rlev, y, x, m_idx); break; /* RF5_HOLD */
1907- case 160 + 0: spell_RF6_HASTE(blind, m_name, m_ptr, y, x, m_idx); break; /* RF6_HASTE */
1908- case 160 + 1: dam = spell_RF6_HAND_DOOM(blind, m_name, m_ptr, y, x, m_idx, learnable); break; /* RF6_HAND_DOOM */
1909- case 160 + 2: spell_RF6_HEAL(blind, seen, m_name, m_ptr, rlev, m_idx); break; /* RF6_HEAL */
1910- case 160 + 3: spell_RF6_INVULNER(seen, m_name, m_ptr, m_idx); break; /* RF6_INVULNER */
1911- case 160 + 4: spell_RF6_BLINK(m_name, m_idx); break; /* RF6_BLINK */
1912- case 160 + 5: spell_RF6_TPORT(m_name, m_idx); break; /* RF6_TPORT */
1913- case 160 + 6: dam = spell_RF6_WORLD(m_name, m_ptr, m_idx); break; /* RF6_WORLD */
1851+ case 96 + 8: dam = spell_RF4_BREATH(GF_ACID, y, x, m_idx); break; /* RF4_BR_ACID */
1852+ case 96 + 9: dam = spell_RF4_BREATH(GF_ELEC, y, x, m_idx); break; /* RF4_BR_ELEC */
1853+ case 96 + 10: dam = spell_RF4_BREATH(GF_FIRE, y, x, m_idx); break; /* RF4_BR_FIRE */
1854+ case 96 + 11: dam = spell_RF4_BREATH(GF_COLD, y, x, m_idx); break; /* RF4_BR_COLD */
1855+ case 96 + 12: dam = spell_RF4_BREATH(GF_POIS, y, x, m_idx); break; /* RF4_BR_POIS */
1856+ case 96 + 13: dam = spell_RF4_BREATH(GF_NETHER, y, x, m_idx); break; /* RF4_BR_NETH */
1857+ case 96 + 14: dam = spell_RF4_BREATH(GF_LITE, y_br_lite, x_br_lite, m_idx); break; /* RF4_BR_LITE */
1858+ case 96 + 15: dam = spell_RF4_BREATH(GF_DARK, y, x, m_idx); break; /* RF4_BR_DARK */
1859+ case 96 + 16: dam = spell_RF4_BREATH(GF_CONFUSION, y, x, m_idx); break; /* RF4_BR_CONF */
1860+ case 96 + 17: dam = spell_RF4_BREATH(GF_SOUND, y, x, m_idx); break; /* RF4_BR_SOUN */
1861+ case 96 + 18: dam = spell_RF4_BREATH(GF_CHAOS, y, x, m_idx); break; /* RF4_BR_CHAO */
1862+ case 96 + 19: dam = spell_RF4_BREATH(GF_DISENCHANT, y, x, m_idx); break; /* RF4_BR_DISE */
1863+ case 96 + 20: dam = spell_RF4_BREATH(GF_NEXUS, y, x, m_idx); break; /* RF4_BR_NEXU */
1864+ case 96 + 21: dam = spell_RF4_BREATH(GF_TIME, y, x, m_idx); break; /* RF4_BR_TIME */
1865+ case 96 + 22: dam = spell_RF4_BREATH(GF_INERTIA, y, x, m_idx); break; /* RF4_BR_INER */
1866+ case 96 + 23: dam = spell_RF4_BREATH(GF_GRAVITY, y, x, m_idx); break; /* RF4_BR_GRAV */
1867+ case 96 + 24: dam = spell_RF4_BREATH(GF_SHARDS, y, x, m_idx); break; /* RF4_BR_SHAR */
1868+ case 96 + 25: dam = spell_RF4_BREATH(GF_PLASMA, y, x, m_idx); break; /* RF4_BR_PLAS */
1869+ case 96 + 26: dam = spell_RF4_BREATH(GF_FORCE, y, x, m_idx); break; /* RF4_BR_WALL */
1870+ case 96 + 27: dam = spell_RF4_BREATH(GF_MANA, y, x, m_idx); break; /* RF4_BR_MANA */
1871+ case 96 + 28: dam = spell_RF4_BA_NUKE(y, x, m_idx); break; /* RF4_BA_NUKE */
1872+ case 96 + 29: dam = spell_RF4_BREATH(GF_NUKE, y, x, m_idx); break; /* RF4_BR_NUKE */
1873+ case 96 + 30: dam = spell_RF4_BA_CHAO(y, x, m_idx); break; /* RF4_BA_CHAO */
1874+ case 96 + 31: dam = spell_RF4_BREATH(GF_DISINTEGRATE, y, x, m_idx); break; /* RF4_BR_DISI */
1875+ case 128 + 0: dam = spell_RF5_BA_ACID(y, x, m_idx); break; /* RF5_BA_ACID */
1876+ case 128 + 1: dam = spell_RF5_BA_ELEC(y, x, m_idx); break; /* RF5_BA_ELEC */
1877+ case 128 + 2: dam = spell_RF5_BA_FIRE(y, x, m_idx); break; /* RF5_BA_FIRE */
1878+ case 128 + 3: dam = spell_RF5_BA_COLD(y, x, m_idx); break; /* RF5_BA_COLD */
1879+ case 128 + 4: dam = spell_RF5_BA_POIS(y, x, m_idx); break; /* RF5_BA_POIS */
1880+ case 128 + 5: dam = spell_RF5_BA_NETH(y, x, m_idx); break; /* RF5_BA_NETH */
1881+ case 128 + 6: dam = spell_RF5_BA_WATE(y, x, m_idx); break; /* RF5_BA_WATE */
1882+ case 128 + 7: dam = spell_RF5_BA_MANA(y, x, m_idx); break; /* RF5_BA_MANA */
1883+ case 128 + 8: dam = spell_RF5_BA_DARK(y, x, m_idx); break; /* RF5_BA_DARK */
1884+ case 128 + 9: dam = spell_RF5_DRAIN_MANA(y, x, m_idx); break; /* RF5_DRAIN_MANA */
1885+ case 128 + 10: dam = spell_RF5_MIND_BLAST(y, x, m_idx); break; /* RF5_MIND_BLAST */
1886+ case 128 + 11: dam = spell_RF5_BRAIN_SMASH(y, x, m_idx); break; /* RF5_MIND_BLAST */
1887+ case 128 + 12: dam = spell_RF5_CAUSE_1(y, x, m_idx); break; /* RF5_CAUSE_1 */
1888+ case 128 + 13: dam = spell_RF5_CAUSE_2(y, x, m_idx); break; /* RF5_CAUSE_2 */
1889+ case 128 + 14: dam = spell_RF5_CAUSE_3(y, x, m_idx); break; /* RF5_CAUSE_3 */
1890+ case 128 + 15: dam = spell_RF5_CAUSE_4(y, x, m_idx); break; /* RF5_CAUSE_4 */
1891+ case 128 + 16: dam = spell_RF5_BO_ACID(y, x, m_idx); break; /* RF5_BO_ACID */
1892+ case 128 + 17: dam = spell_RF5_BO_ELEC(y, x, m_idx); break; /* RF5_BO_ELEC */
1893+ case 128 + 18: dam = spell_RF5_BO_FIRE(y, x, m_idx); break; /* RF5_BO_FIRE */
1894+ case 128 + 19: dam = spell_RF5_BO_COLD(y, x, m_idx); break; /* RF5_BO_COLD */
1895+ case 128 + 20: dam = spell_RF5_BA_LITE(y, x, m_idx); break; /* RF5_BA_LITE */
1896+ case 128 + 21: dam = spell_RF5_BO_NETH(y, x, m_idx); break; /* RF5_BO_NETH */
1897+ case 128 + 22: dam = spell_RF5_BO_WATE(y, x, m_idx); break; /* RF5_BO_WATE */
1898+ case 128 + 23: dam = spell_RF5_BO_MANA(y, x, m_idx); break; /* RF5_BO_MANA */
1899+ case 128 + 24: dam = spell_RF5_BO_PLAS(y, x, m_idx); break; /* RF5_BO_PLAS */
1900+ case 128 + 25: dam = spell_RF5_BO_ICEE(y, x, m_idx); break; /* RF5_BO_ICEE */
1901+ case 128 + 26: dam = spell_RF5_MISSILE(y, x, m_idx); break; /* RF5_MISSILE */
1902+ case 128 + 27: spell_RF5_SCARE(y, x, m_idx); break; /* RF5_SCARE */
1903+ case 128 + 28: spell_RF5_BLIND(y, x, m_idx); break; /* RF5_BLIND */
1904+ case 128 + 29: spell_RF5_CONF(y, x, m_idx); break; /* RF5_CONF */
1905+ case 128 + 30: spell_RF5_SLOW(y, x, m_idx); break; /* RF5_SLOW */
1906+ case 128 + 31: spell_RF5_HOLD(y, x, m_idx); break; /* RF5_HOLD */
1907+ case 160 + 0: spell_RF6_HASTE(m_idx); break; /* RF6_HASTE */
1908+ case 160 + 1: dam = spell_RF6_HAND_DOOM(y, x, m_idx); break; /* RF6_HAND_DOOM */
1909+ case 160 + 2: spell_RF6_HEAL(m_idx); break; /* RF6_HEAL */
1910+ case 160 + 3: spell_RF6_INVULNER(m_idx); break; /* RF6_INVULNER */
1911+ case 160 + 4: spell_RF6_BLINK(m_idx); break; /* RF6_BLINK */
1912+ case 160 + 5: spell_RF6_TPORT(m_idx); break; /* RF6_TPORT */
1913+ case 160 + 6: dam = spell_RF6_WORLD(m_idx); break; /* RF6_WORLD */
19141914
19151915 /* RF6_SPECIAL */
19161916 case 160 + 7:
1917- dam = spell_RF6_SPECIAL(m_name, m_ptr, r_ptr, mode, blind, direct, y, x, m_idx);
1917+ dam = spell_RF6_SPECIAL(y, x, m_idx);
19181918 if (dam < 0) return FALSE;
19191919 break;
19201920
1921- case 160 + 8: spell_RF6_TELE_TO(m_name, m_ptr); break; /* RF6_TELE_TO */
1922- case 160 + 9: spell_RF6_TELE_AWAY(m_name, m_idx); break; /* RF6_TELE_AWAY */
1923- case 160 + 10: spell_RF6_TELE_LEVEL(blind, m_name, m_idx, rlev); break; /* RF6_TELE_LEVEL */
1924- case 160 + 11: spell_RF6_PSY_SPEAR(blind, m_name, r_ptr, rlev, m_idx, learnable); break; /* RF6_PSY_SPEAR */
1925- case 160 + 12: spell_RF6_DARKNESS(blind, m_name, can_use_lite_area); break; /* RF6_DARKNESS */
1926- case 160 + 13: spell_RF6_TRAPS(blind, m_name, y, x); break; /* RF6_TRAPS */
1927- case 160 + 14: spell_RF6_FORGET(m_name, rlev); break; /* RF6_FORGET */
1928- case 160 + 15: spell_RF6_RAISE_DEAD(blind, m_name, m_idx, m_ptr); break; /* RF6_RAISE_DEAD */
1929- case 160 + 16: spell_RF6_S_KIN(blind, m_name, m_ptr, r_ptr, m_idx, y, x, rlev, mode); break; /* RF6_S_KIN */
1930- case 160 + 17: spell_RF6_S_CYBER(blind, m_name, m_idx, y, x); break; /* RF6_S_CYBER */
1931- case 160 + 18: spell_RF6_S_MONSTER(blind, m_name, m_idx, y, x, rlev); break; /* RF6_S_MONSTER */
1932- case 160 + 19: spell_RF6_S_MONSTERS(blind, m_name, m_idx, y, x, rlev, s_num_6); break; /* RF6_S_MONSTER */
1933- case 160 + 20: spell_RF6_S_ANT(blind, m_name, m_idx, y, x, rlev, s_num_6); break; /* RF6_S_ANT */
1934- case 160 + 21: spell_RF6_S_SPIDER(blind, m_name, m_idx, y, x, rlev, s_num_6); break; /* RF6_S_SPIDER */
1935- case 160 + 22: spell_RF6_S_HOUND(blind, m_name, m_idx, y, x, rlev, s_num_4); break; /* RF6_S_HOUND */
1936- case 160 + 23: spell_RF6_S_HYDRA(blind, m_name, m_idx, y, x, rlev, s_num_4); break; /* RF6_S_HYDRA */
1937- case 160 + 24: spell_RF6_S_ANGEL(blind, m_name, r_ptr, m_idx, y, x, rlev); break; /* RF6_S_ANGEL */
1938- case 160 + 25: spell_RF6_S_DEMON(blind, m_name, m_idx, y, x, rlev); break; /* RF6_S_DEMON */
1939- case 160 + 26: spell_RF6_S_UNDEAD(blind, m_name, m_idx, y, x, rlev); break; /* RF6_S_UNDEAD */
1940- case 160 + 27: spell_RF6_S_DRAGON(blind, m_name, m_idx, y, x, rlev); break; /* RF6_S_DRAGON */
1941- case 160 + 28: spell_RF6_S_HI_UNDEAD(m_ptr, blind, m_name, m_idx, y, x, rlev, s_num_6, mode); break; /* RF6_S_HI_UNDEAD */
1942- case 160 + 29: spell_RF6_S_HI_DRAGON(blind, m_name, m_idx, y, x, rlev, s_num_4); break; /* RF6_S_HI_DRAGON */
1943- case 160 + 30: spell_RF6_S_AMBERITES(blind, m_name, m_idx, y, x, rlev, s_num_4); break; /* RF6_S_AMBERITES */
1944- case 160 + 31: spell_RF6_S_UNIQUE(blind, m_name, m_idx, m_ptr, y, x, rlev, s_num_4); break; /* RF6_S_UNIQUE */
1921+ case 160 + 8: spell_RF6_TELE_TO(m_idx); break; /* RF6_TELE_TO */
1922+ case 160 + 9: spell_RF6_TELE_AWAY(m_idx); break; /* RF6_TELE_AWAY */
1923+ case 160 + 10: spell_RF6_TELE_LEVEL(m_idx); break; /* RF6_TELE_LEVEL */
1924+ case 160 + 11: spell_RF6_PSY_SPEAR(m_idx); break; /* RF6_PSY_SPEAR */
1925+ case 160 + 12: spell_RF6_DARKNESS(m_idx); break; /* RF6_DARKNESS */
1926+ case 160 + 13: spell_RF6_TRAPS(y, x, m_idx); break; /* RF6_TRAPS */
1927+ case 160 + 14: spell_RF6_FORGET(m_idx); break; /* RF6_FORGET */
1928+ case 160 + 15: spell_RF6_RAISE_DEAD(m_idx); break; /* RF6_RAISE_DEAD */
1929+ case 160 + 16: spell_RF6_S_KIN(y, x, m_idx); break; /* RF6_S_KIN */
1930+ case 160 + 17: spell_RF6_S_CYBER(y, x, m_idx); break; /* RF6_S_CYBER */
1931+ case 160 + 18: spell_RF6_S_MONSTER(y, x, m_idx); break; /* RF6_S_MONSTER */
1932+ case 160 + 19: spell_RF6_S_MONSTERS(y, x, m_idx); break; /* RF6_S_MONSTER */
1933+ case 160 + 20: spell_RF6_S_ANT(y, x, m_idx); break; /* RF6_S_ANT */
1934+ case 160 + 21: spell_RF6_S_SPIDER(y, x, m_idx); break; /* RF6_S_SPIDER */
1935+ case 160 + 22: spell_RF6_S_HOUND(y, x, m_idx); break; /* RF6_S_HOUND */
1936+ case 160 + 23: spell_RF6_S_HYDRA(y, x, m_idx); break; /* RF6_S_HYDRA */
1937+ case 160 + 24: spell_RF6_S_ANGEL(y, x, m_idx); break; /* RF6_S_ANGEL */
1938+ case 160 + 25: spell_RF6_S_DEMON(y, x, m_idx); break; /* RF6_S_DEMON */
1939+ case 160 + 26: spell_RF6_S_UNDEAD(y, x, m_idx); break; /* RF6_S_UNDEAD */
1940+ case 160 + 27: spell_RF6_S_DRAGON(y, x, m_idx); break; /* RF6_S_DRAGON */
1941+ case 160 + 28: spell_RF6_S_HI_UNDEAD(y, x, m_idx); break; /* RF6_S_HI_UNDEAD */
1942+ case 160 + 29: spell_RF6_S_HI_DRAGON(y, x, m_idx); break; /* RF6_S_HI_DRAGON */
1943+ case 160 + 30: spell_RF6_S_AMBERITES(y, x, m_idx); break; /* RF6_S_AMBERITES */
1944+ case 160 + 31: spell_RF6_S_UNIQUE(y, x, m_idx); break; /* RF6_S_UNIQUE */
19451945 }
19461946
19471947 if ((p_ptr->action == ACTION_LEARN) && thrown_spell > 175)
--- a/src/mspells2.c
+++ b/src/mspells2.c
@@ -31,7 +31,7 @@
3131 * Pass over any monsters that may be in the way
3232 * Affect grids, objects, monsters, and the player
3333 */
34-static void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable)
34+void monst_breath_monst(int m_idx, int y, int x, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable)
3535 {
3636 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
3737
@@ -830,78 +830,11 @@ bool monst_spell_monst(int m_idx)
830830
831831 switch (thrown_spell)
832832 {
833- /* RF4_SHRIEK */
834- case 96+0:
835- if (known)
836- {
837- if (see_m)
838- {
839- msg_format(_("%^sが%sに向かって叫んだ。", "%^s shrieks at %s."), m_name, t_name);
840- }
841- else
842- {
843- mon_fight = TRUE;
844- }
845- }
846-
847- wake_up = TRUE;
848-
849- break;
850-
851- /* RF4_XXX1 */
852- case 96+1:
853- /* XXX XXX XXX */
854- return FALSE;
855-
856- /* RF4_DISPEL */
857- case 96+2:
858- if (known)
859- {
860- if (see_m)
861- {
862- msg_format(_("%^sが%sに対して魔力消去の呪文を念じた。",
863- "%^s invokes a dispel magic at %s."), m_name, t_name);
864- }
865- else
866- {
867- mon_fight = TRUE;
868- }
869- }
870-
871- if (t_idx == p_ptr->riding) dispel_player();
872- dispel_monster_status(t_idx);
873-
874- break;
875-
876- /* RF4_ROCKET */
877- case 96+3:
878- if (known)
879- {
880- if (see_either)
881- {
882- disturb(1, 1);
883-
884- if (blind)
885- {
886- msg_format(_("%^sが何かを射った。", "%^s shoots something."), m_name);
887- }
888- else
889- {
890- msg_format(_("%^sが%sにロケットを発射した。", "%^s fires a rocket at %s."), m_name, t_name);
891- }
892- }
893- else
894- {
895- mon_fight = TRUE;
896- }
897- }
898-
899- dam = ((m_ptr->hp / 4) > 800 ? 800 : (m_ptr->hp / 4));
900- monst_breath_monst(m_idx, y, x, GF_ROCKET,
901- dam, 2, FALSE, MS_ROCKET, learnable);
902-
903- break;
904-
833+ case 96 + 0: MM_spell_RF4_SHRIEK(m_idx, t_idx); break; /* RF4_SHRIEK */
834+ case 96 + 1: return FALSE; /* RF4_XXX1 */
835+ case 96 + 2: MM_spell_RF4_DISPEL(m_idx, t_idx); break; /* RF4_DISPEL */
836+ case 96 + 3: dam = MM_spell_RF4_ROCKET(y, x, m_idx, t_idx); break; /* RF4_ROCKET */
837+
905838 /* RF4_SHOOT */
906839 case 96+4:
907840 if (known)
--- a/src/mspells4.c
+++ b/src/mspells4.c
@@ -1,17 +1,106 @@
11 #include "angband.h"
22
3-void spell_RF4_SHRIEK(int m_idx, cptr m_name)
3+cptr monster_name(int m_idx)
44 {
5+ char m_name[80];
6+ monster_type *m_ptr = &m_list[m_idx];
7+ monster_desc(m_name, m_ptr, 0x00);
8+ return m_name;
9+}
10+
11+/* 2 monster each is near by player, return true */
12+bool monster_near_player(int m_idx, int t_idx)
13+{
14+ monster_type *m_ptr = &m_list[m_idx];
15+ monster_type *t_ptr = &m_list[t_idx];
16+ return (m_ptr->cdis <= MAX_SIGHT) || (t_ptr->cdis <= MAX_SIGHT);
17+}
18+
19+/* player can see monster, return true */
20+bool see_monster(int m_idx)
21+{
22+ monster_type *m_ptr = &m_list[m_idx];
23+ return is_seen(m_ptr);
24+}
25+
26+bool spell_learnable(int m_idx)
27+{
28+ monster_type *m_ptr = &m_list[m_idx];
29+ /* Extract the "see-able-ness" */
30+ bool seen = (!p_ptr->blind && m_ptr->ml);
31+
32+ bool maneable = player_has_los_bold(m_ptr->fy, m_ptr->fx);
33+ return (seen && maneable && !world_monster);
34+}
35+
36+int monster_level_idx(int m_idx)
37+{
38+ monster_type *m_ptr = &m_list[m_idx];
39+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
40+ int rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
41+ return rlev;
42+}
43+
44+int spell_core(int SPELL_NUM, int hp, int y, int x, int m_idx, int SPELL_TYPE)
45+{
46+ int dam;
47+
48+ monster_type *m_ptr = &m_list[m_idx];
49+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
50+ bool learnable = spell_learnable(m_idx);
51+
52+ switch (SPELL_NUM)
53+ {
54+ case RF4_ROCKET:
55+ dam = (hp / 4) > 800 ? 800 : (hp / 4);
56+ if (SPELL_TYPE == SPELL_MON_TO_PLAYER)
57+ {
58+ breath(y, x, m_idx, GF_ROCKET, dam, 2, FALSE, MS_ROCKET, learnable);
59+ update_smart_learn(m_idx, DRS_SHARD);
60+ }
61+ else if (SPELL_TYPE == SPELL_MON_TO_MON)
62+ {
63+ monst_breath_monst(m_idx, y, x, GF_ROCKET, dam, 2, FALSE, MS_ROCKET, learnable);
64+ }
65+ break;
66+ }
67+ return dam;
68+}
69+
70+void MP_spell_RF4_SHRIEK(int m_idx)
71+{
72+ cptr m_name = monster_name(m_idx);
573 disturb(1, 1);
674 msg_format(_("%^sがかん高い金切り声をあげた。", "%^s makes a high pitched shriek."), m_name);
775 aggravate_monsters(m_idx);
876 }
977
10-void spell_RF4_DISPEL(bool blind, cptr m_name)
78+void MM_spell_RF4_SHRIEK(int m_idx, int t_idx)
79+{
80+ cptr m_name = monster_name(m_idx);
81+ cptr t_name = monster_name(t_idx);
82+ bool known = monster_near_player(m_idx, t_idx);
83+ bool see_m = see_monster(m_idx);
84+ if (known)
85+ {
86+ if (see_m)
87+ {
88+ msg_format(_("%^sが%sに向かって叫んだ。", "%^s shrieks at %s."), m_name, t_name);
89+ }
90+ else
91+ {
92+ mon_fight = TRUE;
93+ }
94+ }
95+ (void)set_monster_csleep(t_idx, 0);
96+}
97+
98+void MP_spell_RF4_DISPEL(int m_idx)
1199 {
100+ cptr m_name = monster_name(m_idx);
12101 disturb(1, 1);
13102
14- if (blind)
103+ if (p_ptr->blind)
15104 msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
16105 else
17106 msg_format(_("%^sが魔力消去の呪文を念じた。", "%^s invokes a dispel magic."), m_name);
@@ -19,35 +108,90 @@ void spell_RF4_DISPEL(bool blind, cptr m_name)
19108 dispel_player();
20109 if (p_ptr->riding) dispel_monster_status(p_ptr->riding);
21110
22-#ifdef JP
23111 if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
24- msg_print("やりやがったな!");
25-#endif
112+ msg_print(_("やりやがったな!", ""));
113+
26114 learn_spell(MS_DISPEL);
27115 }
28116
29-int spell_RF4_ROCKET(bool blind, cptr m_name, monster_type* m_ptr, int y, int x, int m_idx, bool learnable)
117+void MM_spell_RF4_DISPEL(int m_idx, int t_idx)
30118 {
31- int dam;
119+ cptr m_name = monster_name(m_idx);
120+ cptr t_name = monster_name(t_idx);
121+ bool known = monster_near_player(m_idx, t_idx);
122+ bool see_m = see_monster(m_idx);
123+ if (known)
124+ {
125+ if (see_m)
126+ {
127+ msg_format(_("%^sが%sに対して魔力消去の呪文を念じた。",
128+ "%^s invokes a dispel magic at %s."), m_name, t_name);
129+ }
130+ else
131+ {
132+ mon_fight = TRUE;
133+ }
134+ }
135+
136+ if (t_idx == p_ptr->riding) dispel_player();
137+ dispel_monster_status(t_idx);
138+}
32139
140+
141+int MP_spell_RF4_ROCKET(int y, int x, int m_idx)
142+{
143+ cptr m_name = monster_name(m_idx);
144+ monster_type *m_ptr = &m_list[m_idx];
33145 disturb(1, 1);
34- if (blind)
146+ if (p_ptr->blind)
35147 msg_format(_("%^sが何かを射った。", "%^s shoots something."), m_name);
36148 else
37149 msg_format(_("%^sがロケットを発射した。", "%^s fires a rocket."), m_name);
38150
39- dam = ((m_ptr->hp / 4) > 800 ? 800 : (m_ptr->hp / 4));
40- breath(y, x, m_idx, GF_ROCKET,
41- dam, 2, FALSE, MS_ROCKET, learnable);
42- update_smart_learn(m_idx, DRS_SHARD);
43- return dam;
151+ return spell_core(RF4_ROCKET, m_ptr->hp, y, x, m_idx, SPELL_MON_TO_PLAYER);
44152 }
45153
46-int spell_RF4_SHOOT(bool blind, cptr m_name, monster_race* r_ptr, int m_idx, bool learnable)
154+int MM_spell_RF4_ROCKET(int y, int x, int m_idx, int t_idx)
47155 {
156+ cptr m_name = monster_name(m_idx);
157+ cptr t_name = monster_name(t_idx);
158+ monster_type *m_ptr = &m_list[m_idx];
159+
160+ bool known = monster_near_player(m_idx, t_idx);
161+ bool see_either = see_monster(m_idx) || see_monster(t_idx);
162+ if (known)
163+ {
164+ if (see_either)
165+ {
166+ disturb(1, 1);
167+
168+ if (p_ptr->blind)
169+ {
170+ msg_format(_("%^sが何かを射った。", "%^s shoots something."), m_name);
171+ }
172+ else
173+ {
174+ msg_format(_("%^sが%sにロケットを発射した。", "%^s fires a rocket at %s."), m_name, t_name);
175+ }
176+ }
177+ else
178+ {
179+ mon_fight = TRUE;
180+ }
181+ }
182+ return spell_core(RF4_ROCKET, m_ptr->hp, y, x, m_idx, SPELL_MON_TO_MON);
183+}
184+
185+int spell_RF4_SHOOT(int m_idx)
186+{
187+ bool learnable = spell_learnable(m_idx);
188+ cptr m_name = monster_name(m_idx);
189+ monster_type *m_ptr = &m_list[m_idx];
190+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
191+
48192 int dam;
49193 disturb(1, 1);
50- if (blind)
194+ if (p_ptr->blind)
51195 msg_format(_("%^sが奇妙な音を発した。", "%^s makes a strange noise."), m_name);
52196 else
53197 msg_format(_("%^sが矢を放った。", "%^s fires an arrow."), m_name);
@@ -58,11 +202,14 @@ int spell_RF4_SHOOT(bool blind, cptr m_name, monster_race* r_ptr, int m_idx, boo
58202 return dam;
59203 }
60204
61-int spell_RF4_BREATH(int GF_TYPE, bool blind, cptr m_name, monster_type* m_ptr, int y, int x, int m_idx, bool learnable)
205+int spell_RF4_BREATH(int GF_TYPE, int y, int x, int m_idx)
62206 {
207+ bool learnable = spell_learnable(m_idx);
63208 int dam, ms_type, drs_type;
64209 cptr type_s;
65210 bool smart_learn = TRUE;
211+ cptr m_name = monster_name(m_idx);
212+ monster_type *m_ptr = &m_list[m_idx];
66213
67214 switch (GF_TYPE)
68215 {
@@ -211,7 +358,7 @@ int spell_RF4_BREATH(int GF_TYPE, bool blind, cptr m_name, monster_type* m_ptr,
211358 {
212359 msg_format(_("「ボ帝ビルカッター!!!」", "'Boty-Build cutter!!!'"));
213360 }
214- else if (blind)
361+ else if (p_ptr->blind)
215362 {
216363 msg_format(_("%^sが何かのブレスを吐いた。", "%^s breathes."), m_name);
217364 }
@@ -225,12 +372,18 @@ int spell_RF4_BREATH(int GF_TYPE, bool blind, cptr m_name, monster_type* m_ptr,
225372 return dam;
226373 }
227374
228-int spell_RF4_BA_CHAO(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
375+int spell_RF4_BA_CHAO(int y, int x, int m_idx)
229376 {
377+ bool learnable = spell_learnable(m_idx);
378+ cptr m_name = monster_name(m_idx);
379+ monster_type *m_ptr = &m_list[m_idx];
380+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
381+ int rlev = monster_level_idx(m_idx);
382+
230383 int dam;
231384 disturb(1, 1);
232385
233- if (blind)
386+ if (p_ptr->blind)
234387 msg_format(_("%^sが恐ろしげにつぶやいた。", "%^s mumbles frighteningly."), m_name);
235388 else
236389 msg_format(_("%^sが純ログルスを放った。", "%^s invokes a raw Logrus."), m_name);
@@ -242,12 +395,17 @@ int spell_RF4_BA_CHAO(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
242395 return dam;
243396 }
244397
245-int spell_RF4_BA_NUKE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
398+int spell_RF4_BA_NUKE(int y, int x, int m_idx)
246399 {
400+ bool learnable = spell_learnable(m_idx);
401+ cptr m_name = monster_name(m_idx);
402+ monster_type *m_ptr = &m_list[m_idx];
403+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
404+ int rlev = monster_level_idx(m_idx);
247405 int dam;
248406 disturb(1, 1);
249407
250- if (blind)
408+ if (p_ptr->blind)
251409 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
252410 else
253411 msg_format(_("%^sが放射能球を放った。", "%^s casts a ball of radiation."), m_name);
@@ -259,12 +417,17 @@ int spell_RF4_BA_NUKE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
259417 return dam;
260418 }
261419
262-int spell_RF5_BA_ACID(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
420+int spell_RF5_BA_ACID(int y, int x, int m_idx)
263421 {
422+ bool learnable = spell_learnable(m_idx);
423+ cptr m_name = monster_name(m_idx);
424+ monster_type *m_ptr = &m_list[m_idx];
425+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
426+ int rlev = monster_level_idx(m_idx);
264427 int dam, rad;
265428 disturb(1, 1);
266429
267- if (blind)
430+ if (p_ptr->blind)
268431 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
269432 else
270433 msg_format(_("%^sがアシッド・ボールの呪文を唱えた。", "%^s casts an acid ball."), m_name);
@@ -284,12 +447,17 @@ int spell_RF5_BA_ACID(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
284447 return dam;
285448 }
286449
287-int spell_RF5_BA_ELEC(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
450+int spell_RF5_BA_ELEC(int y, int x, int m_idx)
288451 {
452+ bool learnable = spell_learnable(m_idx);
453+ cptr m_name = monster_name(m_idx);
454+ monster_type *m_ptr = &m_list[m_idx];
455+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
456+ int rlev = monster_level_idx(m_idx);
289457 int dam, rad;
290458 disturb(1, 1);
291459
292- if (blind)
460+ if (p_ptr->blind)
293461 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
294462 else
295463 msg_format(_("%^sがサンダー・・ボールの呪文を唱えた。", "%^s casts a lightning ball."), m_name);
@@ -309,21 +477,26 @@ int spell_RF5_BA_ELEC(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
309477 return dam;
310478 }
311479
312-int spell_RF5_BA_FIRE(monster_type* m_ptr, bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
480+int spell_RF5_BA_FIRE(int y, int x, int m_idx)
313481 {
482+ bool learnable = spell_learnable(m_idx);
483+ cptr m_name = monster_name(m_idx);
484+ monster_type *m_ptr = &m_list[m_idx];
485+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
486+ int rlev = monster_level_idx(m_idx);
314487 int dam, rad;
315488 disturb(1, 1);
316489
317490 if (m_ptr->r_idx == MON_ROLENTO)
318491 {
319- if (blind)
492+ if (p_ptr->blind)
320493 msg_format(_("%sが何かを投げた。", "%^s throws something."), m_name);
321494 else
322495 msg_format(_("%sは手榴弾を投げた。", "%^s throws a hand grenade."), m_name);
323496 }
324497 else
325498 {
326- if (blind)
499+ if (p_ptr->blind)
327500 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
328501 else
329502 msg_format(_("%^sがファイア・ボールの呪文を唱えた。", "%^s casts a fire ball."), m_name);
@@ -344,12 +517,17 @@ int spell_RF5_BA_FIRE(monster_type* m_ptr, bool blind, cptr m_name, monster_race
344517 return dam;
345518 }
346519
347-int spell_RF5_BA_COLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
520+int spell_RF5_BA_COLD(int y, int x, int m_idx)
348521 {
522+ bool learnable = spell_learnable(m_idx);
523+ cptr m_name = monster_name(m_idx);
524+ monster_type *m_ptr = &m_list[m_idx];
525+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
526+ int rlev = monster_level_idx(m_idx);
349527 int dam, rad;
350528 disturb(1, 1);
351529
352- if (blind)
530+ if (p_ptr->blind)
353531 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
354532 else
355533 msg_format(_("%^sがアイス・ボールの呪文を唱えた。", "%^s casts a frost ball."), m_name);
@@ -369,12 +547,17 @@ int spell_RF5_BA_COLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
369547 return dam;
370548 }
371549
372-int spell_RF5_BA_POIS(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
550+int spell_RF5_BA_POIS(int y, int x, int m_idx)
373551 {
552+ bool learnable = spell_learnable(m_idx);
553+ cptr m_name = monster_name(m_idx);
554+ monster_type *m_ptr = &m_list[m_idx];
555+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
556+ int rlev = monster_level_idx(m_idx);
374557 int dam;
375558 disturb(1, 1);
376559
377- if (blind)
560+ if (p_ptr->blind)
378561 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
379562 else
380563 msg_format(_("%^sが悪臭雲の呪文を唱えた。", "%^s casts a stinking cloud."), m_name);
@@ -385,11 +568,16 @@ int spell_RF5_BA_POIS(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
385568 return dam;
386569 }
387570
388-int spell_RF5_BA_NETH(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
571+int spell_RF5_BA_NETH(int y, int x, int m_idx)
389572 {
573+ bool learnable = spell_learnable(m_idx);
574+ cptr m_name = monster_name(m_idx);
575+ monster_type *m_ptr = &m_list[m_idx];
576+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
577+ int rlev = monster_level_idx(m_idx);
390578 int dam;
391579 disturb(1, 1);
392- if (blind)
580+ if (p_ptr->blind)
393581 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
394582 else
395583 msg_format(_("%^sが地獄球の呪文を唱えた。", "%^s casts a nether ball."), m_name);
@@ -400,12 +588,17 @@ int spell_RF5_BA_NETH(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
400588 return dam;
401589 }
402590
403-int spell_RF5_BA_WATE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
591+int spell_RF5_BA_WATE(int y, int x, int m_idx)
404592 {
593+ bool learnable = spell_learnable(m_idx);
594+ cptr m_name = monster_name(m_idx);
595+ monster_type *m_ptr = &m_list[m_idx];
596+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
597+ int rlev = monster_level_idx(m_idx);
405598 int dam;
406599 disturb(1, 1);
407600
408- if (blind)
601+ if (p_ptr->blind)
409602 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
410603 else
411604 msg_format(_("%^sが流れるような身振りをした。", "%^s gestures fluidly."), m_name);
@@ -417,11 +610,16 @@ int spell_RF5_BA_WATE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
417610 return dam;
418611 }
419612
420-int spell_RF5_BA_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
613+int spell_RF5_BA_MANA(int y, int x, int m_idx)
421614 {
615+ bool learnable = spell_learnable(m_idx);
616+ cptr m_name = monster_name(m_idx);
617+ monster_type *m_ptr = &m_list[m_idx];
618+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
619+ int rlev = monster_level_idx(m_idx);
422620 int dam;
423621 disturb(1, 1);
424- if (blind)
622+ if (p_ptr->blind)
425623 msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
426624 else
427625 msg_format(_("%^sが魔力の嵐の呪文を念じた。", "%^s invokes a mana storm."), m_name);
@@ -431,12 +629,17 @@ int spell_RF5_BA_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
431629 return dam;
432630 }
433631
434-int spell_RF5_BA_DARK(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
632+int spell_RF5_BA_DARK(int y, int x, int m_idx)
435633 {
634+ bool learnable = spell_learnable(m_idx);
635+ cptr m_name = monster_name(m_idx);
636+ monster_type *m_ptr = &m_list[m_idx];
637+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
638+ int rlev = monster_level_idx(m_idx);
436639 int dam;
437640 disturb(1, 1);
438641
439- if (blind)
642+ if (p_ptr->blind)
440643 msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
441644 else
442645 msg_format(_("%^sが暗黒の嵐の呪文を念じた。", "%^s invokes a darkness storm."), m_name);
@@ -447,8 +650,11 @@ int spell_RF5_BA_DARK(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
447650 return dam;
448651 }
449652
450-int spell_RF5_DRAIN_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
653+int spell_RF5_DRAIN_MANA(int y, int x, int m_idx)
451654 {
655+ bool learnable = spell_learnable(m_idx);
656+ cptr m_name = monster_name(m_idx);
657+ int rlev = monster_level_idx(m_idx);
452658 int dam;
453659 disturb(1, 1);
454660
@@ -458,8 +664,13 @@ int spell_RF5_DRAIN_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev,
458664 return dam;
459665 }
460666
461-int spell_RF5_MIND_BLAST(bool seen, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
667+int spell_RF5_MIND_BLAST(int y, int x, int m_idx)
462668 {
669+ bool learnable = spell_learnable(m_idx);
670+ cptr m_name = monster_name(m_idx);
671+ monster_type *m_ptr = &m_list[m_idx];
672+ bool seen = (!p_ptr->blind && m_ptr->ml);
673+ int rlev = monster_level_idx(m_idx);
463674 int dam;
464675 disturb(1, 1);
465676 if (!seen)
@@ -472,8 +683,13 @@ int spell_RF5_MIND_BLAST(bool seen, cptr m_name, monster_race* r_ptr, int rlev,
472683 return dam;
473684 }
474685
475-int spell_RF5_BRAIN_SMASH(bool seen, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
686+int spell_RF5_BRAIN_SMASH(int y, int x, int m_idx)
476687 {
688+ bool learnable = spell_learnable(m_idx);
689+ cptr m_name = monster_name(m_idx);
690+ monster_type *m_ptr = &m_list[m_idx];
691+ bool seen = (!p_ptr->blind && m_ptr->ml);
692+ int rlev = monster_level_idx(m_idx);
477693 int dam;
478694 disturb(1, 1);
479695 if (!seen)
@@ -486,12 +702,15 @@ int spell_RF5_BRAIN_SMASH(bool seen, cptr m_name, monster_race* r_ptr, int rlev,
486702 return dam;
487703 }
488704
489-int spell_RF5_CAUSE_1(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
705+int spell_RF5_CAUSE_1(int y, int x, int m_idx)
490706 {
707+ bool learnable = spell_learnable(m_idx);
708+ cptr m_name = monster_name(m_idx);
709+ int rlev = monster_level_idx(m_idx);
491710 int dam;
492711 disturb(1, 1);
493712
494- if (blind)
713+ if (p_ptr->blind)
495714 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
496715 else
497716 msg_format(_("%^sがあなたを指さして呪った。", "%^s points at you and curses."), m_name);
@@ -501,12 +720,15 @@ int spell_RF5_CAUSE_1(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
501720 return dam;
502721 }
503722
504-int spell_RF5_CAUSE_2(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
723+int spell_RF5_CAUSE_2(int y, int x, int m_idx)
505724 {
725+ bool learnable = spell_learnable(m_idx);
726+ cptr m_name = monster_name(m_idx);
727+ int rlev = monster_level_idx(m_idx);
506728 int dam;
507729 disturb(1, 1);
508730
509- if (blind)
731+ if (p_ptr->blind)
510732 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
511733 else
512734 msg_format(_("%^sがあなたを指さして恐ろしげに呪った。", "%^s points at you and curses horribly."), m_name);
@@ -516,12 +738,15 @@ int spell_RF5_CAUSE_2(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
516738 return dam;
517739 }
518740
519-int spell_RF5_CAUSE_3(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
741+int spell_RF5_CAUSE_3(int y, int x, int m_idx)
520742 {
743+ bool learnable = spell_learnable(m_idx);
744+ cptr m_name = monster_name(m_idx);
745+ int rlev = monster_level_idx(m_idx);
521746 int dam;
522747 disturb(1, 1);
523748
524- if (blind)
749+ if (p_ptr->blind)
525750 msg_format(_("%^sが何かを大声で叫んだ。", "%^s mumbles loudly."), m_name);
526751 else
527752 msg_format(_("%^sがあなたを指さして恐ろしげに呪文を唱えた!", "%^s points at you, incanting terribly!"), m_name);
@@ -531,12 +756,15 @@ int spell_RF5_CAUSE_3(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
531756 return dam;
532757 }
533758
534-int spell_RF5_CAUSE_4(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
759+int spell_RF5_CAUSE_4(int y, int x, int m_idx)
535760 {
761+ bool learnable = spell_learnable(m_idx);
762+ cptr m_name = monster_name(m_idx);
763+ int rlev = monster_level_idx(m_idx);
536764 int dam;
537765 disturb(1, 1);
538766
539- if (blind)
767+ if (p_ptr->blind)
540768 msg_format(_("%^sが「お前は既に死んでいる」と叫んだ。", "%^s screams the word 'DIE!'"), m_name);
541769 else
542770 msg_format(_("%^sがあなたの秘孔を突いて「お前は既に死んでいる」と叫んだ。",
@@ -547,12 +775,17 @@ int spell_RF5_CAUSE_4(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
547775 return dam;
548776 }
549777
550-int spell_RF5_BO_ACID(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
778+int spell_RF5_BO_ACID(int y, int x, int m_idx)
551779 {
780+ bool learnable = spell_learnable(m_idx);
781+ cptr m_name = monster_name(m_idx);
782+ monster_type *m_ptr = &m_list[m_idx];
783+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
784+ int rlev = monster_level_idx(m_idx);
552785 int dam;
553786 disturb(1, 1);
554787
555- if (blind)
788+ if (p_ptr->blind)
556789 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
557790 else
558791 msg_format(_("%^sがアシッド・ボルトの呪文を唱えた。", "%^s casts a acid bolt."), m_name);
@@ -564,12 +797,17 @@ int spell_RF5_BO_ACID(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
564797 return dam;
565798 }
566799
567-int spell_RF5_BO_ELEC(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
800+int spell_RF5_BO_ELEC(int y, int x, int m_idx)
568801 {
802+ bool learnable = spell_learnable(m_idx);
803+ cptr m_name = monster_name(m_idx);
804+ monster_type *m_ptr = &m_list[m_idx];
805+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
806+ int rlev = monster_level_idx(m_idx);
569807 int dam;
570808 disturb(1, 1);
571809
572- if (blind)
810+ if (p_ptr->blind)
573811 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
574812 else
575813 msg_format(_("%^sがサンダー・ボルトの呪文を唱えた。", "%^s casts a lightning bolt."), m_name);
@@ -581,12 +819,17 @@ int spell_RF5_BO_ELEC(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
581819 return dam;
582820 }
583821
584-int spell_RF5_BO_FIRE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
822+int spell_RF5_BO_FIRE(int y, int x, int m_idx)
585823 {
824+ bool learnable = spell_learnable(m_idx);
825+ cptr m_name = monster_name(m_idx);
826+ monster_type *m_ptr = &m_list[m_idx];
827+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
828+ int rlev = monster_level_idx(m_idx);
586829 int dam;
587830 disturb(1, 1);
588831
589- if (blind)
832+ if (p_ptr->blind)
590833 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
591834 else
592835 msg_format(_("%^sがファイア・ボルトの呪文を唱えた。", "%^s casts a fire bolt."), m_name);
@@ -598,12 +841,17 @@ int spell_RF5_BO_FIRE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
598841 return dam;
599842 }
600843
601-int spell_RF5_BO_COLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
844+int spell_RF5_BO_COLD(int y, int x, int m_idx)
602845 {
846+ bool learnable = spell_learnable(m_idx);
847+ cptr m_name = monster_name(m_idx);
848+ monster_type *m_ptr = &m_list[m_idx];
849+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
850+ int rlev = monster_level_idx(m_idx);
603851 int dam;
604852 disturb(1, 1);
605853
606- if (blind)
854+ if (p_ptr->blind)
607855 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
608856 else
609857 msg_format(_("%^sがアイス・ボルトの呪文を唱えた。", "%^s casts a frost bolt."), m_name);
@@ -616,12 +864,15 @@ int spell_RF5_BO_COLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
616864 }
617865
618866
619-int spell_RF5_BA_LITE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
867+int spell_RF5_BA_LITE(int y, int x, int m_idx)
620868 {
869+ bool learnable = spell_learnable(m_idx);
870+ cptr m_name = monster_name(m_idx);
871+ int rlev = monster_level_idx(m_idx);
621872 int dam;
622873 disturb(1, 1);
623874
624- if (blind)
875+ if (p_ptr->blind)
625876 msg_format(_("%^sが何かを力強くつぶやいた。", "%^s mumbles powerfully."), m_name);
626877 else
627878 msg_format(_("%^sがスターバーストの呪文を念じた。", "%^s invokes a starburst."), m_name);
@@ -633,12 +884,17 @@ int spell_RF5_BA_LITE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
633884 }
634885
635886
636-int spell_RF5_BO_NETH(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
887+int spell_RF5_BO_NETH(int y, int x, int m_idx)
637888 {
889+ bool learnable = spell_learnable(m_idx);
890+ cptr m_name = monster_name(m_idx);
891+ monster_type *m_ptr = &m_list[m_idx];
892+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
893+ int rlev = monster_level_idx(m_idx);
638894 int dam;
639895 disturb(1, 1);
640896
641- if (blind)
897+ if (p_ptr->blind)
642898 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
643899 else
644900 msg_format(_("%^sが地獄の矢の呪文を唱えた。", "%^s casts a nether bolt."), m_name);
@@ -650,12 +906,17 @@ int spell_RF5_BO_NETH(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
650906 return dam;
651907 }
652908
653-int spell_RF5_BO_WATE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
909+int spell_RF5_BO_WATE(int y, int x, int m_idx)
654910 {
911+ bool learnable = spell_learnable(m_idx);
912+ cptr m_name = monster_name(m_idx);
913+ monster_type *m_ptr = &m_list[m_idx];
914+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
915+ int rlev = monster_level_idx(m_idx);
655916 int dam;
656917 disturb(1, 1);
657918
658- if (blind)
919+ if (p_ptr->blind)
659920 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
660921 else
661922 msg_format(_("%^sがウォーター・ボルトの呪文を唱えた。", "%^s casts a water bolt."), m_name);
@@ -666,11 +927,16 @@ int spell_RF5_BO_WATE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
666927 return dam;
667928 }
668929
669-int spell_RF5_BO_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
930+int spell_RF5_BO_MANA(int y, int x, int m_idx)
670931 {
932+ bool learnable = spell_learnable(m_idx);
933+ cptr m_name = monster_name(m_idx);
934+ monster_type *m_ptr = &m_list[m_idx];
935+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
936+ int rlev = monster_level_idx(m_idx);
671937 int dam;
672938 disturb(1, 1);
673- if (blind)
939+ if (p_ptr->blind)
674940 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
675941 else
676942 msg_format(_("%^sが魔力の矢の呪文を唱えた。", "%^s casts a mana bolt."), m_name);
@@ -681,11 +947,16 @@ int spell_RF5_BO_MANA(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
681947 return dam;
682948 }
683949
684-int spell_RF5_BO_PLAS(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
950+int spell_RF5_BO_PLAS(int y, int x, int m_idx)
685951 {
952+ bool learnable = spell_learnable(m_idx);
953+ cptr m_name = monster_name(m_idx);
954+ monster_type *m_ptr = &m_list[m_idx];
955+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
956+ int rlev = monster_level_idx(m_idx);
686957 int dam;
687958 disturb(1, 1);
688- if (blind)
959+ if (p_ptr->blind)
689960 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
690961
691962 else
@@ -697,11 +968,16 @@ int spell_RF5_BO_PLAS(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
697968 return dam;
698969 }
699970
700-int spell_RF5_BO_ICEE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
971+int spell_RF5_BO_ICEE(int y, int x, int m_idx)
701972 {
973+ bool learnable = spell_learnable(m_idx);
974+ cptr m_name = monster_name(m_idx);
975+ monster_type *m_ptr = &m_list[m_idx];
976+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
977+ int rlev = monster_level_idx(m_idx);
702978 int dam;
703979 disturb(1, 1);
704- if (blind)
980+ if (p_ptr->blind)
705981 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
706982 else
707983 msg_format(_("%^sが極寒の矢の呪文を唱えた。", "%^s casts an ice bolt."), m_name);
@@ -714,11 +990,14 @@ int spell_RF5_BO_ICEE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
714990 }
715991
716992
717-int spell_RF5_MISSILE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx, bool learnable)
993+int spell_RF5_MISSILE(int y, int x, int m_idx)
718994 {
995+ bool learnable = spell_learnable(m_idx);
996+ cptr m_name = monster_name(m_idx);
997+ int rlev = monster_level_idx(m_idx);
719998 int dam;
720999 disturb(1, 1);
721- if (blind)
1000+ if (p_ptr->blind)
7221001 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
7231002 else
7241003 msg_format(_("%^sがマジック・ミサイルの呪文を唱えた。", "%^s casts a magic missile."), m_name);
@@ -729,11 +1008,13 @@ int spell_RF5_MISSILE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, in
7291008 return dam;
7301009 }
7311010
732-void spell_RF5_SCARE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx)
1011+void spell_RF5_SCARE(int y, int x, int m_idx)
7331012 {
1013+ cptr m_name = monster_name(m_idx);
1014+ int rlev = monster_level_idx(m_idx);
7341015 disturb(1, 1);
7351016
736- if (blind)
1017+ if (p_ptr->blind)
7371018 msg_format(_("%^sが何かをつぶやくと、恐ろしげな音が聞こえた。", "%^s mumbles, and you hear scary noises."), m_name);
7381019 else
7391020 msg_format(_("%^sが恐ろしげな幻覚を作り出した。", "%^s casts a fearful illusion."), m_name);
@@ -754,11 +1035,13 @@ void spell_RF5_SCARE(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int
7541035 update_smart_learn(m_idx, DRS_FEAR);
7551036 }
7561037
757-void spell_RF5_BLIND(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx)
1038+void spell_RF5_BLIND(int y, int x, int m_idx)
7581039 {
1040+ cptr m_name = monster_name(m_idx);
1041+ int rlev = monster_level_idx(m_idx);
7591042 disturb(1, 1);
7601043
761- if (blind)
1044+ if (p_ptr->blind)
7621045 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
7631046 else
7641047 msg_format(_("%^sが呪文を唱えてあなたの目をくらました!",
@@ -780,11 +1063,13 @@ void spell_RF5_BLIND(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int
7801063 update_smart_learn(m_idx, DRS_BLIND);
7811064 }
7821065
783-void spell_RF5_CONF(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx)
1066+void spell_RF5_CONF(int y, int x, int m_idx)
7841067 {
1068+ cptr m_name = monster_name(m_idx);
1069+ int rlev = monster_level_idx(m_idx);
7851070 disturb(1, 1);
7861071
787- if (blind)
1072+ if (p_ptr->blind)
7881073 msg_format(_("%^sが何かをつぶやくと、頭を悩ます音がした。",
7891074 "%^s mumbles, and you hear puzzling noises."), m_name);
7901075 else
@@ -807,8 +1092,10 @@ void spell_RF5_CONF(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int
8071092 update_smart_learn(m_idx, DRS_CONF);
8081093 }
8091094
810-void spell_RF5_SLOW(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx)
1095+void spell_RF5_SLOW(int y, int x, int m_idx)
8111096 {
1097+ cptr m_name = monster_name(m_idx);
1098+ int rlev = monster_level_idx(m_idx);
8121099 disturb(1, 1);
8131100
8141101 msg_format(_("%^sがあなたの筋力を吸い取ろうとした!",
@@ -830,11 +1117,13 @@ void spell_RF5_SLOW(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int
8301117 update_smart_learn(m_idx, DRS_FREE);
8311118 }
8321119
833-void spell_RF5_HOLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int y, int x, int m_idx)
1120+void spell_RF5_HOLD(int y, int x, int m_idx)
8341121 {
1122+ cptr m_name = monster_name(m_idx);
1123+ int rlev = monster_level_idx(m_idx);
8351124 disturb(1, 1);
8361125
837- if (blind)
1126+ if (p_ptr->blind)
8381127 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
8391128 else
8401129 msg_format(_("%^sがあなたの目をじっと見つめた!", "%^s stares deep into your eyes!"), m_name);
@@ -855,10 +1144,12 @@ void spell_RF5_HOLD(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int
8551144 update_smart_learn(m_idx, DRS_FREE);
8561145 }
8571146
858-void spell_RF6_HASTE(bool blind, cptr m_name, monster_type* m_ptr, int y, int x, int m_idx)
1147+void spell_RF6_HASTE(int m_idx)
8591148 {
1149+ cptr m_name = monster_name(m_idx);
1150+ monster_type *m_ptr = &m_list[m_idx];
8601151 disturb(1, 1);
861- if (blind)
1152+ if (p_ptr->blind)
8621153 {
8631154 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
8641155 }
@@ -874,8 +1165,11 @@ void spell_RF6_HASTE(bool blind, cptr m_name, monster_type* m_ptr, int y, int x,
8741165 }
8751166 }
8761167
877-int spell_RF6_HAND_DOOM(bool blind, cptr m_name, monster_type* m_ptr, int y, int x, int m_idx, bool learnable)
1168+int spell_RF6_HAND_DOOM(int y, int x, int m_idx)
8781169 {
1170+ bool learnable = spell_learnable(m_idx);
1171+ cptr m_name = monster_name(m_idx);
1172+ monster_type *m_ptr = &m_list[m_idx];
8791173 int dam;
8801174 disturb(1, 1);
8811175 msg_format(_("%^sが<破滅の手>を放った!", "%^s invokes the Hand of Doom!"), m_name);
@@ -884,12 +1178,16 @@ int spell_RF6_HAND_DOOM(bool blind, cptr m_name, monster_type* m_ptr, int y, int
8841178 return dam;
8851179 }
8861180
887-void spell_RF6_HEAL(bool blind, bool seen, cptr m_name, monster_type* m_ptr,int rlev, int m_idx)
1181+void spell_RF6_HEAL(int m_idx)
8881182 {
1183+ cptr m_name = monster_name(m_idx);
1184+ monster_type *m_ptr = &m_list[m_idx];
1185+ int rlev = monster_level_idx(m_idx);
1186+ bool seen = (!p_ptr->blind && m_ptr->ml);
8891187 disturb(1, 1);
8901188
8911189 /* Message */
892- if (blind)
1190+ if (p_ptr->blind)
8931191 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
8941192 else
8951193 msg_format(_("%^sが自分の傷に集中した。", "%^s concentrates on %s wounds."), m_name);
@@ -934,8 +1232,11 @@ void spell_RF6_HEAL(bool blind, bool seen, cptr m_name, monster_type* m_ptr,int
9341232 msg_format(_("%^sは勇気を取り戻した。", "%^s recovers %s courage."), m_name);
9351233 }
9361234 }
937-void spell_RF6_INVULNER(bool seen, cptr m_name, monster_type* m_ptr, int m_idx)
1235+void spell_RF6_INVULNER(int m_idx)
9381236 {
1237+ cptr m_name = monster_name(m_idx);
1238+ monster_type *m_ptr = &m_list[m_idx];
1239+ bool seen = (!p_ptr->blind && m_ptr->ml);
9391240 disturb(1, 1);
9401241
9411242 /* Message */
@@ -947,8 +1248,9 @@ void spell_RF6_INVULNER(bool seen, cptr m_name, monster_type* m_ptr, int m_idx)
9471248 if (!MON_INVULNER(m_ptr)) (void)set_monster_invulner(m_idx, randint1(4) + 4, FALSE);
9481249 }
9491250
950-void spell_RF6_BLINK(cptr m_name, int m_idx)
1251+void spell_RF6_BLINK(int m_idx)
9511252 {
1253+ cptr m_name = monster_name(m_idx);
9521254 disturb(1, 1);
9531255 if (teleport_barrier(m_idx))
9541256 {
@@ -963,8 +1265,9 @@ void spell_RF6_BLINK(cptr m_name, int m_idx)
9631265 }
9641266 }
9651267
966-void spell_RF6_TPORT(cptr m_name, int m_idx)
1268+void spell_RF6_TPORT(int m_idx)
9671269 {
1270+ cptr m_name = monster_name(m_idx);
9681271 disturb(1, 1);
9691272 if (teleport_barrier(m_idx))
9701273 {
@@ -978,8 +1281,10 @@ void spell_RF6_TPORT(cptr m_name, int m_idx)
9781281 }
9791282 }
9801283
981-int spell_RF6_WORLD(cptr m_name, monster_type* m_ptr, int m_idx)
1284+int spell_RF6_WORLD(int m_idx)
9821285 {
1286+ cptr m_name = monster_name(m_idx);
1287+ monster_type *m_ptr = &m_list[m_idx];
9831288 int who = 0;
9841289 disturb(1, 1);
9851290 if (m_ptr->r_idx == MON_DIO) who = 1;
@@ -988,8 +1293,13 @@ int spell_RF6_WORLD(cptr m_name, monster_type* m_ptr, int m_idx)
9881293 return who;
9891294 }
9901295
991-int spell_RF6_SPECIAL(cptr m_name, monster_type* m_ptr, monster_race* r_ptr, u32b mode, bool blind, bool direct, int y, int x, int m_idx)
1296+int spell_RF6_SPECIAL(int y, int x, int m_idx)
9921297 {
1298+ cptr m_name = monster_name(m_idx);
1299+ monster_type *m_ptr = &m_list[m_idx];
1300+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
1301+ u32b mode = 0L;
1302+ bool direct = player_bold(y, x);
9931303 int k, dam, count=0;
9941304
9951305 disturb(1, 1);
@@ -1050,7 +1360,7 @@ int spell_RF6_SPECIAL(cptr m_name, monster_type* m_ptr, monster_race* r_ptr, u32
10501360 }
10511361
10521362 case MON_ROLENTO:
1053- if (blind)
1363+ if (p_ptr->blind)
10541364 msg_format(_("%^sが何か大量に投げた。", "%^s spreads something."), m_name);
10551365 else
10561366 msg_format(_("%^sは手榴弾をばらまいた。", "%^s throws some hand grenades."), m_name);
@@ -1064,7 +1374,7 @@ int spell_RF6_SPECIAL(cptr m_name, monster_type* m_ptr, monster_race* r_ptr, u32
10641374 }
10651375 }
10661376
1067- if (blind && count)
1377+ if (p_ptr->blind && count)
10681378 msg_print(_("多くのものが間近にばらまかれる音がする。", "You hear many things are scattered nearby."));
10691379
10701380 break;
@@ -1133,8 +1443,10 @@ int spell_RF6_SPECIAL(cptr m_name, monster_type* m_ptr, monster_race* r_ptr, u32
11331443 }
11341444
11351445
1136-void spell_RF6_TELE_TO(cptr m_name, monster_type* m_ptr)
1446+void spell_RF6_TELE_TO(int m_idx)
11371447 {
1448+ cptr m_name = monster_name(m_idx);
1449+ monster_type *m_ptr = &m_list[m_idx];
11381450 disturb(1, 1);
11391451 msg_format(_("%^sがあなたを引き戻した。", "%^s commands you to return."), m_name);
11401452
@@ -1142,8 +1454,9 @@ void spell_RF6_TELE_TO(cptr m_name, monster_type* m_ptr)
11421454 learn_spell(MS_TELE_TO);
11431455 }
11441456
1145-void spell_RF6_TELE_AWAY(cptr m_name, int m_idx)
1457+void spell_RF6_TELE_AWAY(int m_idx)
11461458 {
1459+ cptr m_name = monster_name(m_idx);
11471460 disturb(1, 1);
11481461
11491462 msg_format(_("%^sにテレポートさせられた。", "%^s teleports you away."), m_name);
@@ -1154,11 +1467,13 @@ void spell_RF6_TELE_AWAY(cptr m_name, int m_idx)
11541467 teleport_player_away(m_idx, 100);
11551468 }
11561469
1157-void spell_RF6_TELE_LEVEL(bool blind, cptr m_name, int m_idx, int rlev)
1470+void spell_RF6_TELE_LEVEL(int m_idx)
11581471 {
1472+ cptr m_name = monster_name(m_idx);
1473+ int rlev = monster_level_idx(m_idx);
11591474 disturb(1, 1);
11601475
1161- if (blind)
1476+ if (p_ptr->blind)
11621477 msg_format(_("%^sが何か奇妙な言葉をつぶやいた。", "%^s mumbles strangely."), m_name);
11631478 else
11641479 msg_format(_("%^sがあなたの足を指さした。", "%^s gestures at your feet."), m_name);
@@ -1179,11 +1494,16 @@ void spell_RF6_TELE_LEVEL(bool blind, cptr m_name, int m_idx, int rlev)
11791494 update_smart_learn(m_idx, DRS_NEXUS);
11801495 }
11811496
1182-int spell_RF6_PSY_SPEAR(bool blind, cptr m_name, monster_race* r_ptr, int rlev, int m_idx, bool learnable)
1497+int spell_RF6_PSY_SPEAR(int m_idx)
11831498 {
1499+ bool learnable = spell_learnable(m_idx);
1500+ cptr m_name = monster_name(m_idx);
1501+ monster_type *m_ptr = &m_list[m_idx];
1502+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
1503+ int rlev = monster_level_idx(m_idx);
11841504 int dam;
11851505 disturb(1, 1);
1186- if (blind)
1506+ if (p_ptr->blind)
11871507 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
11881508 else
11891509 msg_format(_("%^sが光の剣を放った。", "%^s throw a Psycho-Spear."), m_name);
@@ -1193,18 +1513,30 @@ int spell_RF6_PSY_SPEAR(bool blind, cptr m_name, monster_race* r_ptr, int rlev,
11931513 return dam;
11941514 }
11951515
1196-void spell_RF6_DARKNESS(bool blind, cptr m_name, bool can_use_lite_area)
1516+void spell_RF6_DARKNESS(int m_idx)
11971517 {
1518+ cptr m_name = monster_name(m_idx);
1519+ monster_type *m_ptr = &m_list[m_idx];
1520+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
1521+ bool can_use_lite_area = FALSE;
1522+
1523+ if ((p_ptr->pclass == CLASS_NINJA) &&
1524+ !(r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) &&
1525+ !(r_ptr->flags7 & RF7_DARK_MASK))
1526+ can_use_lite_area = TRUE;
11981527 disturb(1, 1);
11991528
1200- if (blind)
1529+ if (p_ptr->blind)
12011530 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
12021531 else if (can_use_lite_area)
12031532 msg_format(_("%^sが辺りを明るく照らした。", "%^s cast a spell to light up."), m_name);
12041533 else
12051534 msg_format(_("%^sが暗闇の中で手を振った。", "%^s gestures in shadow."), m_name);
12061535
1207- if (can_use_lite_area) (void)lite_area(0, 3);
1536+ if (can_use_lite_area)
1537+ {
1538+ (void)lite_area(0, 3);
1539+ }
12081540 else
12091541 {
12101542 learn_spell(MS_DARKNESS);
@@ -1212,11 +1544,12 @@ void spell_RF6_DARKNESS(bool blind, cptr m_name, bool can_use_lite_area)
12121544 }
12131545 }
12141546
1215-void spell_RF6_TRAPS(bool blind, cptr m_name, int y, int x)
1547+void spell_RF6_TRAPS(int y, int x, int m_idx)
12161548 {
1549+ cptr m_name = monster_name(m_idx);
12171550 disturb(1, 1);
12181551
1219- if (blind)
1552+ if (p_ptr->blind)
12201553 msg_format(_("%^sが何かをつぶやいて邪悪に微笑んだ。",
12211554 "%^s mumbles, and then cackles evilly."), m_name);
12221555 else
@@ -1227,8 +1560,10 @@ void spell_RF6_TRAPS(bool blind, cptr m_name, int y, int x)
12271560 (void)trap_creation(y, x);
12281561 }
12291562
1230-void spell_RF6_FORGET(cptr m_name, int rlev)
1563+void spell_RF6_FORGET(int m_idx)
12311564 {
1565+ cptr m_name = monster_name(m_idx);
1566+ int rlev = monster_level_idx(m_idx);
12321567 disturb(1, 1);
12331568
12341569 msg_format(_("%^sがあなたの記憶を消去しようとしている。",
@@ -1245,11 +1580,13 @@ void spell_RF6_FORGET(cptr m_name, int rlev)
12451580 learn_spell(MS_FORGET);
12461581 }
12471582
1248-void spell_RF6_RAISE_DEAD(bool blind, cptr m_name, int m_idx, monster_type* m_ptr)
1583+void spell_RF6_RAISE_DEAD(int m_idx)
12491584 {
1585+ cptr m_name = monster_name(m_idx);
1586+ monster_type *m_ptr = &m_list[m_idx];
12501587 disturb(1, 1);
12511588
1252- if (blind)
1589+ if (p_ptr->blind)
12531590 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
12541591 else
12551592 msg_format(_("%^sが死者復活の呪文を唱えた。",
@@ -1258,13 +1595,18 @@ void spell_RF6_RAISE_DEAD(bool blind, cptr m_name, int m_idx, monster_type* m_pt
12581595 animate_dead(m_idx, m_ptr->fy, m_ptr->fx);
12591596 }
12601597
1261-void spell_RF6_S_KIN(bool blind, cptr m_name, monster_type* m_ptr, monster_race* r_ptr, int m_idx, int y, int x, int rlev, u32b mode)
1598+void spell_RF6_S_KIN(int y, int x, int m_idx)
12621599 {
1600+ cptr m_name = monster_name(m_idx);
1601+ monster_type *m_ptr = &m_list[m_idx];
1602+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
1603+ int rlev = monster_level_idx(m_idx);
12631604 int count = 0, k;
1605+ u32b mode = 0L;
12641606 disturb(1, 1);
12651607 if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
12661608 {
1267- if (blind)
1609+ if (p_ptr->blind)
12681610 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
12691611 else
12701612 msg_format(_("%^sがダンジョンの主を召喚した。",
@@ -1272,7 +1614,7 @@ void spell_RF6_S_KIN(bool blind, cptr m_name, monster_type* m_ptr, monster_race*
12721614 }
12731615 else
12741616 {
1275- if (blind)
1617+ if (p_ptr->blind)
12761618 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
12771619 else
12781620 #ifdef JP
@@ -1360,16 +1702,17 @@ void spell_RF6_S_KIN(bool blind, cptr m_name, monster_type* m_ptr, monster_race*
13601702 break;
13611703 }
13621704
1363- if (blind && count)
1705+ if (p_ptr->blind && count)
13641706 msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
13651707 }
13661708
1367-void spell_RF6_S_CYBER(bool blind, cptr m_name, int m_idx, int y, int x)
1709+void spell_RF6_S_CYBER(int y, int x, int m_idx)
13681710 {
1711+ cptr m_name = monster_name(m_idx);
13691712 int count = 0;
13701713 disturb(1, 1);
13711714
1372- if (blind)
1715+ if (p_ptr->blind)
13731716 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
13741717 else
13751718 msg_format(_("%^sがサイバーデーモンを召喚した!",
@@ -1377,16 +1720,18 @@ void spell_RF6_S_CYBER(bool blind, cptr m_name, int m_idx, int y, int x)
13771720
13781721 count = summon_cyber(m_idx, y, x);
13791722
1380- if (blind && count)
1723+ if (p_ptr->blind && count)
13811724 msg_print(_("重厚な足音が近くで聞こえる。", "You hear heavy steps nearby."));
13821725 }
13831726
1384-void spell_RF6_S_MONSTER(bool blind, cptr m_name, int m_idx, int y, int x, int rlev)
1727+void spell_RF6_S_MONSTER(int y, int x, int m_idx)
13851728 {
1729+ cptr m_name = monster_name(m_idx);
1730+ int rlev = monster_level_idx(m_idx);
13861731 int k, count = 0;
13871732 disturb(1, 1);
13881733
1389- if (blind)
1734+ if (p_ptr->blind)
13901735 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
13911736 else
13921737 msg_format(_("%^sが魔法で仲間を召喚した!", "%^s magically summons help!"), m_name);
@@ -1395,112 +1740,126 @@ void spell_RF6_S_MONSTER(bool blind, cptr m_name, int m_idx, int y, int x, int r
13951740 {
13961741 count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
13971742 }
1398- if (blind && count)
1743+ if (p_ptr->blind && count)
13991744 msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
14001745 }
14011746
1402-void spell_RF6_S_MONSTERS(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_6)
1747+void spell_RF6_S_MONSTERS(int y, int x, int m_idx)
14031748 {
1749+ cptr m_name = monster_name(m_idx);
1750+ int rlev = monster_level_idx(m_idx);
14041751 int k, count = 0;
14051752 disturb(1, 1);
14061753
1407- if (blind)
1754+ if (p_ptr->blind)
14081755 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
14091756 else
14101757 msg_format(_("%^sが魔法でモンスターを召喚した!", "%^s magically summons monsters!"), m_name);
14111758
1412- for (k = 0; k < s_num_6; k++)
1759+ for (k = 0; k < S_NUM_6; k++)
14131760 {
14141761 count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
14151762 }
14161763
1417- if (blind && count)
1764+ if (p_ptr->blind && count)
14181765 msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
14191766 }
14201767
1421-void spell_RF6_S_ANT(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_6)
1768+void spell_RF6_S_ANT(int y, int x, int m_idx)
14221769 {
1770+ cptr m_name = monster_name(m_idx);
1771+ int rlev = monster_level_idx(m_idx);
14231772 int k, count = 0;
14241773 disturb(1, 1);
14251774
1426- if (blind)
1775+ if (p_ptr->blind)
14271776 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
14281777 else
14291778 msg_format(_("%^sが魔法でアリを召喚した。", "%^s magically summons ants."), m_name);
14301779
1431- for (k = 0; k < s_num_6; k++)
1780+ for (k = 0; k < S_NUM_6; k++)
14321781 {
14331782 count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, PM_ALLOW_GROUP);
14341783 }
14351784
1436- if (blind && count)
1785+ if (p_ptr->blind && count)
14371786 msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
14381787 }
14391788
1440-void spell_RF6_S_SPIDER(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_6)
1789+void spell_RF6_S_SPIDER(int y, int x, int m_idx)
14411790 {
1791+ cptr m_name = monster_name(m_idx);
1792+ int rlev = monster_level_idx(m_idx);
14421793 int k, count = 0;
14431794 disturb(1, 1);
14441795
1445- if (blind)
1796+ if (p_ptr->blind)
14461797 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
14471798 else
14481799 msg_format(_("%^sが魔法でクモを召喚した。", "%^s magically summons spiders."), m_name);
14491800
1450- for (k = 0; k < s_num_6; k++)
1801+ for (k = 0; k < S_NUM_6; k++)
14511802 {
14521803 count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP);
14531804 }
14541805
1455- if (blind && count)
1806+ if (p_ptr->blind && count)
14561807 msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
14571808 }
14581809
1459-void spell_RF6_S_HOUND(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_4)
1810+void spell_RF6_S_HOUND(int y, int x, int m_idx)
14601811 {
1812+ cptr m_name = monster_name(m_idx);
1813+ int rlev = monster_level_idx(m_idx);
14611814 int k, count = 0;
14621815 disturb(1, 1);
14631816
1464- if (blind)
1817+ if (p_ptr->blind)
14651818 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
14661819 else
14671820 msg_format(_("%^sが魔法でハウンドを召喚した。", "%^s magically summons hounds."), m_name);
14681821
1469- for (k = 0; k < s_num_4; k++)
1822+ for (k = 0; k < S_NUM_4; k++)
14701823 {
14711824 count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, PM_ALLOW_GROUP);
14721825 }
14731826
1474- if (blind && count)
1827+ if (p_ptr->blind && count)
14751828 msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
14761829 }
14771830
1478-void spell_RF6_S_HYDRA(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_4)
1831+void spell_RF6_S_HYDRA(int y, int x, int m_idx)
14791832 {
1833+ cptr m_name = monster_name(m_idx);
1834+ int rlev = monster_level_idx(m_idx);
14801835 int k, count = 0;
14811836 disturb(1, 1);
14821837
1483- if (blind)
1838+ if (p_ptr->blind)
14841839 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
14851840 else
14861841 msg_format(_("%^sが魔法でヒドラを召喚した。", "%^s magically summons hydras."), m_name);
14871842
1488- for (k = 0; k < s_num_4; k++)
1843+ for (k = 0; k < S_NUM_4; k++)
14891844 {
14901845 count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, PM_ALLOW_GROUP);
14911846 }
1492- if (blind && count)
1847+ if (p_ptr->blind && count)
14931848 msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
14941849 }
14951850
1496-void spell_RF6_S_ANGEL(bool blind, cptr m_name, monster_race* r_ptr, int m_idx, int y, int x, int rlev)
1851+void spell_RF6_S_ANGEL(int y, int x, int m_idx)
14971852 {
1853+ cptr m_name = monster_name(m_idx);
1854+ monster_type *m_ptr = &m_list[m_idx];
1855+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
1856+ int rlev = monster_level_idx(m_idx);
14981857 int k, count = 0;
14991858 int num = 1;
15001859
15011860 disturb(1, 1);
15021861
1503- if (blind)
1862+ if (p_ptr->blind)
15041863 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
15051864 else
15061865 msg_format(_("%^sが魔法で天使を召喚した!", "%^s magically summons an angel!"), m_name);
@@ -1517,22 +1876,24 @@ void spell_RF6_S_ANGEL(bool blind, cptr m_name, monster_race* r_ptr, int m_idx,
15171876
15181877 if (count < 2)
15191878 {
1520- if (blind && count)
1879+ if (p_ptr->blind && count)
15211880 msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
15221881 }
15231882 else
15241883 {
1525- if (blind)
1884+ if (p_ptr->blind)
15261885 msg_print(_("多くのものが間近に現れた音がする。", "You hear many things appear nearby."));
15271886 }
15281887 }
15291888
1530-void spell_RF6_S_DEMON(bool blind, cptr m_name, int m_idx, int y, int x, int rlev)
1889+void spell_RF6_S_DEMON(int y, int x, int m_idx)
15311890 {
1891+ cptr m_name = monster_name(m_idx);
1892+ int rlev = monster_level_idx(m_idx);
15321893 int k, count = 0;
15331894 disturb(1, 1);
15341895
1535- if (blind)
1896+ if (p_ptr->blind)
15361897 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
15371898 else
15381899 msg_format(_("%^sは魔法で混沌の宮廷から悪魔を召喚した!",
@@ -1543,16 +1904,18 @@ void spell_RF6_S_DEMON(bool blind, cptr m_name, int m_idx, int y, int x, int rle
15431904 count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, PM_ALLOW_GROUP);
15441905 }
15451906
1546- if (blind && count)
1907+ if (p_ptr->blind && count)
15471908 msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
15481909 }
15491910
1550-void spell_RF6_S_UNDEAD(bool blind, cptr m_name, int m_idx, int y, int x, int rlev)
1911+void spell_RF6_S_UNDEAD(int y, int x, int m_idx)
15511912 {
1913+ cptr m_name = monster_name(m_idx);
1914+ int rlev = monster_level_idx(m_idx);
15521915 int k, count = 0;
15531916 disturb(1, 1);
15541917
1555- if (blind)
1918+ if (p_ptr->blind)
15561919 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
15571920 else
15581921 msg_format(_("%^sが魔法でアンデッドの強敵を召喚した!",
@@ -1563,16 +1926,18 @@ void spell_RF6_S_UNDEAD(bool blind, cptr m_name, int m_idx, int y, int x, int rl
15631926 count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, PM_ALLOW_GROUP);
15641927 }
15651928
1566- if (blind && count)
1929+ if (p_ptr->blind && count)
15671930 msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
15681931 }
15691932
1570-void spell_RF6_S_DRAGON(bool blind, cptr m_name, int m_idx, int y, int x, int rlev)
1933+void spell_RF6_S_DRAGON(int y, int x, int m_idx)
15711934 {
1935+ cptr m_name = monster_name(m_idx);
1936+ int rlev = monster_level_idx(m_idx);
15721937 int k, count = 0;
15731938 disturb(1, 1);
15741939
1575- if (blind)
1940+ if (p_ptr->blind)
15761941 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
15771942 else
15781943 msg_format(_("%^sが魔法でドラゴンを召喚した!", "%^s magically summons a dragon!"), m_name);
@@ -1581,12 +1946,17 @@ void spell_RF6_S_DRAGON(bool blind, cptr m_name, int m_idx, int y, int x, int rl
15811946 {
15821947 count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, PM_ALLOW_GROUP);
15831948 }
1584- if (blind && count)
1949+ if (p_ptr->blind && count)
15851950 msg_print(_("何かが間近に現れた音がする。", "You hear something appear nearby."));
15861951 }
15871952
1588-void spell_RF6_S_HI_UNDEAD(monster_type* m_ptr, bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_6, u32b mode)
1953+void spell_RF6_S_HI_UNDEAD(int y, int x, int m_idx)
15891954 {
1955+ cptr m_name = monster_name(m_idx);
1956+ monster_type *m_ptr = &m_list[m_idx];
1957+ monster_race *r_ptr = &r_info[m_ptr->r_idx];
1958+ int rlev = monster_level_idx(m_idx);
1959+ u32b mode = 0L;
15901960 int k, count = 0;
15911961 disturb(1, 1);
15921962
@@ -1595,7 +1965,7 @@ void spell_RF6_S_HI_UNDEAD(monster_type* m_ptr, bool blind, cptr m_name, int m_i
15951965 int cy = y;
15961966 int cx = x;
15971967
1598- if (blind)
1968+ if (p_ptr->blind)
15991969 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
16001970 else
16011971 msg_format(_("%^sが魔法で幽鬼戦隊を召喚した!", "%^s magically summons rangers of Nazgul!"), m_name);
@@ -1637,18 +2007,18 @@ void spell_RF6_S_HI_UNDEAD(monster_type* m_ptr, bool blind, cptr m_name, int m_i
16372007 }
16382008 else
16392009 {
1640- if (blind)
2010+ if (p_ptr->blind)
16412011 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
16422012 else
16432013 msg_format(_("%^sが魔法で強力なアンデッドを召喚した!",
16442014 "%^s magically summons greater undead!"), m_name);
16452015
1646- for (k = 0; k < s_num_6; k++)
2016+ for (k = 0; k < S_NUM_6; k++)
16472017 {
16482018 count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
16492019 }
16502020 }
1651- if (blind && count)
2021+ if (p_ptr->blind && count)
16522022 {
16532023 msg_print(_("間近で何か多くのものが這い回る音が聞こえる。",
16542024 "You hear many creepy things appear nearby."));
@@ -1656,61 +2026,68 @@ void spell_RF6_S_HI_UNDEAD(monster_type* m_ptr, bool blind, cptr m_name, int m_i
16562026 }
16572027
16582028
1659-void spell_RF6_S_HI_DRAGON(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_4)
2029+void spell_RF6_S_HI_DRAGON(int y, int x, int m_idx)
16602030 {
2031+ cptr m_name = monster_name(m_idx);
2032+ int rlev = monster_level_idx(m_idx);
16612033 int k, count = 0;
16622034 disturb(1, 1);
16632035
1664- if (blind)
2036+ if (p_ptr->blind)
16652037 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
16662038 else
16672039 msg_format(_("%^sが魔法で古代ドラゴンを召喚した!", "%^s magically summons ancient dragons!"), m_name);
16682040
1669- for (k = 0; k < s_num_4; k++)
2041+ for (k = 0; k < S_NUM_4; k++)
16702042 {
16712043 count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
16722044 }
1673- if (blind && count)
2045+ if (p_ptr->blind && count)
16742046 {
16752047 msg_print(_("多くの力強いものが間近に現れた音が聞こえる。",
16762048 "You hear many powerful things appear nearby."));
16772049 }
16782050 }
16792051
1680-void spell_RF6_S_AMBERITES(bool blind, cptr m_name, int m_idx, int y, int x, int rlev, int s_num_4)
2052+void spell_RF6_S_AMBERITES(int y, int x, int m_idx)
16812053 {
2054+ cptr m_name = monster_name(m_idx);
2055+ int rlev = monster_level_idx(m_idx);
16822056 int k, count = 0;
16832057 disturb(1, 1);
16842058
1685- if (blind)
2059+ if (p_ptr->blind)
16862060 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
16872061 else
16882062 msg_format(_("%^sがアンバーの王族を召喚した!", "%^s magically summons Lords of Amber!"), m_name);
16892063
1690- for (k = 0; k < s_num_4; k++)
2064+ for (k = 0; k < S_NUM_4; k++)
16912065 {
16922066 count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
16932067 }
1694- if (blind && count)
2068+ if (p_ptr->blind && count)
16952069 {
16962070 msg_print(_("不死の者が近くに現れるのが聞こえた。", "You hear immortal beings appear nearby."));
16972071 }
16982072 }
16992073
1700-void spell_RF6_S_UNIQUE(bool blind, cptr m_name, int m_idx, monster_type* m_ptr, int y, int x, int rlev, int s_num_4)
2074+void spell_RF6_S_UNIQUE(int y, int x, int m_idx)
17012075 {
2076+ cptr m_name = monster_name(m_idx);
2077+ monster_type *m_ptr = &m_list[m_idx];
2078+ int rlev = monster_level_idx(m_idx);
17022079 int k, count = 0;
17032080 bool uniques_are_summoned = FALSE;
17042081 int non_unique_type = SUMMON_HI_UNDEAD;
17052082
17062083 disturb(1, 1);
17072084
1708- if (blind)
2085+ if (p_ptr->blind)
17092086 msg_format(_("%^sが何かをつぶやいた。", "%^s mumbles."), m_name);
17102087 else
17112088 msg_format(_("%^sが魔法で特別な強敵を召喚した!", "%^s magically summons special opponents!"), m_name);
17122089
1713- for (k = 0; k < s_num_4; k++)
2090+ for (k = 0; k < S_NUM_4; k++)
17142091 {
17152092 count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
17162093 }
@@ -1722,12 +2099,12 @@ void spell_RF6_S_UNIQUE(bool blind, cptr m_name, int m_idx, monster_type* m_ptr,
17222099 else if (m_ptr->sub_align & SUB_ALIGN_GOOD)
17232100 non_unique_type = SUMMON_ANGEL;
17242101
1725- for (k = count; k < s_num_4; k++)
2102+ for (k = count; k < S_NUM_4; k++)
17262103 {
17272104 count += summon_specific(m_idx, y, x, rlev, non_unique_type, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
17282105 }
17292106
1730- if (blind && count)
2107+ if (p_ptr->blind && count)
17312108 {
17322109 msg_format(_("多くの%sが間近に現れた音が聞こえる。", "You hear many %s appear nearby."),
17332110 uniques_are_summoned ? _("力強いもの", "powerful things") : _("もの", "things"));
旧リポジトリブラウザで表示