-/* File: mspells3.c */
-
-/*
- * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
- *
- * This software may be copied and distributed for educational, research,
- * and not for profit purposes provided that this copyright and statement
- * are included in all such copies. Other copyrights may also apply.
+/*!
+ * @file mspells3.c
+ * @brief ÀÄËâË¡¤Î½èÍý¼ÂÁõ / Blue magic
+ * @date 2014/01/15
+ * @author
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
+ * This software may be copied and distributed for educational, research,\n
+ * and not for profit purposes provided that this copyright and statement\n
+ * are included in all such copies. Other copyrights may also apply.\n
+ * 2014 Deskull rearranged comment for Doxygen.\n
*/
-/* Purpose: Mane code */
-
#include "angband.h"
-#define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130)
+#define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) /*!< ¥â¥ó¥¹¥¿¡¼ËâË¡¤ò¥×¥ì¥¤¥ä¡¼¤¬»ÈÍѤ¹¤ë¾ì¹ç¤Î´¹»»¥ì¥Ù¥ë */
+/*!
+ * @brief ¼õ¤±¼è¤Ã¤¿¥â¥ó¥¹¥¿¡¼ËâË¡¤ÎID¤Ë±þ¤¸¤ÆÀÄËâË¡¤Î¸ú²Ì¾ðÊó¤ò¤Þ¤È¤á¤¿¥Õ¥©¡¼¥Þ¥Ã¥È¤òÊÖ¤¹
+ * @param p ¾ðÊó¤òÊÖ¤¹Ê¸»úÎ󻲾ȥݥ¤¥ó¥¿
+ * @param power ¥â¥ó¥¹¥¿¡¼ËâË¡¤ÎID
+ * @return ¤Ê¤·
+ */
static void learned_info(char *p, int power)
{
int plev = pseudo_plev();
}
-/*
+/*!
+ * @brief »ÈÍѲÄǽ¤ÊÀÄËâË¡¤òÁªÂò¤¹¤ë /
* Allow user to choose a imitation.
- *
- * If a valid spell is chosen, saves it in '*sn' and returns TRUE
- * If the user hits escape, returns FALSE, and set '*sn' to -1
- * If there are no legal choices, returns FALSE, and sets '*sn' to -2
- *
- * The "prompt" should be "cast", "recite", or "study"
- * The "known" should be TRUE for cast/pray, FALSE for study
- *
- * nb: This function has a (trivial) display bug which will be obvious
- * when you run it. It's probably easy to fix but I haven't tried,
- * sorry.
+ * @param sn ÁªÂò¤·¤¿¥â¥ó¥¹¥¿¡¼¹¶·âID¡¢¥¥ã¥ó¥»¥ë¤Î¾ì¹ç-1¡¢ÉÔÀµ¤ÊÁªÂò¤Î¾ì¹ç-2¤òÊÖ¤¹
+ * @return ȯư²Äǽ¤ÊËâË¡¤òÁªÂò¤·¤¿¾ì¹çTRUE¡¢¥¥ã¥ó¥»¥ë½èÍý¤«ÉÔÀµ¤ÊÁªÂò¤¬¹Ô¤ï¤ì¤¿¾ì¹çFALSE¤òÊÖ¤¹¡£
+ * @details
+ * If a valid spell is chosen, saves it in '*sn' and returns TRUE\n
+ * If the user hits escape, returns FALSE, and set '*sn' to -1\n
+ * If there are no legal choices, returns FALSE, and sets '*sn' to -2\n
+ *\n
+ * The "prompt" should be "cast", "recite", or "study"\n
+ * The "known" should be TRUE for cast/pray, FALSE for study\n
+ *\n
+ * nb: This function has a (trivial) display bug which will be obvious\n
+ * when you run it. It's probably easy to fix but I haven't tried,\n
+ * sorry.\n
*/
static int get_learned_power(int *sn)
{
}
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'imitator'.
+/*!
+ * @brief ÀÄËâË¡¤Îȯư /
+ * do_cmd_cast calls this function if the player's class is 'blue-mage'.
+ * @param spell ȯư¤¹¤ë¥â¥ó¥¹¥¿¡¼¹¶·â¤ÎID
+ * @param success TRUE¤ÏÀ®¸ù»þ¡¢FALSE¤Ï¼ºÇÔ»þ¤Î½èÍý¤ò¹Ô¤¦
+ * @return ½èÍý¤ò¼Â¹Ô¤·¤¿¤éTRUE¡¢¥¥ã¥ó¥»¥ë¤·¤¿¾ì¹çFALSE¤òÊÖ¤¹¡£
*/
static bool cast_learned_spell(int spell, bool success)
{
break;
case MS_DISPEL:
{
- monster_type *m_ptr;
- char m_name[80];
+ int m_idx;
if (!target_set(TARGET_KILL)) return FALSE;
- if (!cave[target_row][target_col].m_idx) break;
- if (!los(py, px, target_row, target_col)) break;
+ m_idx = cave[target_row][target_col].m_idx;
+ if (!m_idx) break;
+ if (!player_has_los_bold(target_row, target_col)) break;
if (!projectable(py, px, target_row, target_col)) break;
- m_ptr = &m_list[cave[target_row][target_col].m_idx];
- monster_desc(m_name, m_ptr, 0);
- if (m_ptr->invulner)
- {
- m_ptr->invulner = 0;
- if (m_ptr->ml)
- {
-#ifdef JP
- msg_format("%s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ï¤Ê¤¤¡£", m_name);
-#else
- msg_format("%^s is no longer invulnerable.", m_name);
-#endif
- p_ptr->redraw |= (PR_HEALTH);
- if (p_ptr->riding == cave[target_row][target_col].m_idx) p_ptr->redraw |= (PR_UHEALTH);
- }
- m_ptr->energy_need += ENERGY_NEED();
- }
- if (m_ptr->fast)
- {
- m_ptr->fast = 0;
-#ifdef JP
- if (m_ptr->ml) msg_format("%s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- if (m_ptr->ml) msg_format("%^s is no longer fast.", m_name);
-#endif
- }
- if (m_ptr->slow)
- {
- m_ptr->slow = 0;
-#ifdef JP
- if (m_ptr->ml) msg_format("%s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
-#else
- if (m_ptr->ml) msg_format("%^s is no longer slow.", m_name);
-#endif
- }
-
+ dispel_monster_status(m_idx);
break;
}
case MS_ROCKET:
break;
case MS_SLOW:
if (!get_aim_dir(&dir)) return FALSE;
- slow_monster(dir);
+ slow_monster(dir, plev);
break;
case MS_SLEEP:
if (!get_aim_dir(&dir)) return FALSE;
- sleep_monster(dir);
+ sleep_monster(dir, plev);
break;
case MS_SPEED:
(void)set_fast(randint1(20 + plev) + plev, FALSE);
(void)set_invuln(randint1(4) + 4, FALSE);
break;
case MS_BLINK:
- teleport_player(10, FALSE);
+ teleport_player(10, 0L);
break;
case MS_TELEPORT:
- teleport_player(plev * 5, FALSE);
+ teleport_player(plev * 5, 0L);
break;
case MS_WORLD:
world_player = TRUE;
msg_format("You command %s to return.", m_name);
#endif
- teleport_monster_to(cave[target_row][target_col].m_idx, py, px, 100, TRUE);
+ teleport_monster_to(cave[target_row][target_col].m_idx, py, px, 100, TELEPORT_PASSIVE);
break;
}
case MS_TELE_AWAY:
if (!target_set(TARGET_KILL)) return FALSE;
target_m_idx = cave[target_row][target_col].m_idx;
if (!target_m_idx) break;
- if (!los(py, px, target_row, target_col)) break;
+ if (!player_has_los_bold(target_row, target_col)) break;
if (!projectable(py, px, target_row, target_col)) break;
m_ptr = &m_list[target_m_idx];
r_ptr = &r_info[m_ptr->r_idx];
return TRUE;
}
-
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'Blue-Mage'.
+/*!
+ * @brief ÀÄËâË¡¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * do_cmd_cast calls this function if the player's class is 'Blue-Mage'.
+ * @return ½èÍý¤ò¼Â¹Ô¤·¤¿¤éTRUE¡¢¥¥ã¥ó¥»¥ë¤·¤¿¾ì¹çFALSE¤òÊÖ¤¹¡£
*/
bool do_cmd_cast_learned(void)
{
return TRUE;
}
+/*!
+ * @brief ÀÄËâË¡¤Î¥é¡¼¥Ë¥ó¥°È½Äê¤ÈÀ®¸ù¤·¤¿¾ì¹ç¤Î¥é¡¼¥Ë¥ó¥°½èÍý
+ * @param monspell ¥é¡¼¥Ë¥ó¥°¤ò»î¤ß¤ë¥â¥ó¥¹¥¿¡¼¹¶·â¤ÎID
+ * @return ¤Ê¤·
+ */
void learn_spell(int monspell)
{
if (p_ptr->action != ACTION_LEARN) return;
}
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼ÆüìǽÎϤΥե饰ÇÛÎ󤫤éÆÃÄê¾ò·ï¤ÎËâË¡¤À¤±¤òÈ´¤½Ð¤¹½èÍý
* Extract monster spells mask for the given mode
+ * @param f4 ¥â¥ó¥¹¥¿¡¼ÆüìǽÎϤÎ4ÈÖÌܤΥե饰ÇÛÎó
+ * @param f5 ¥â¥ó¥¹¥¿¡¼ÆüìǽÎϤÎ5ÈÖÌܤΥե饰ÇÛÎó
+ * @param f6 ¥â¥ó¥¹¥¿¡¼ÆüìǽÎϤÎ6ÈÖÌܤΥե饰ÇÛÎó
+ * @param mode È´¤½Ð¤·¤¿¤¤¾ò·ï
+ * @return ¤Ê¤·
+ */
+/*
*/
void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode)
{