OSDN Git Service

Extend features of tiling. (separation of Cell size and Tile size / add offset position.)
[hengband/hengband.git] / src / monster1.c
index 021f822..c3ab1cc 100644 (file)
@@ -117,6 +117,11 @@ static bool know_damage(int r_idx, int i)
  */
 void (*hook_c_roff)(byte attr, cptr str) = c_roff;
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Î»×¤¤½Ð¥á¥Ã¥»¡¼¥¸¤ò¤¢¤é¤«¤¸¤á»ØÄꤵ¤ì¤¿´Ø¿ô¥Ý¥¤¥ó¥¿¤Ë´ð¤Å¤­½ÐÎϤ¹¤ë
+ * @param str ½ÐÎÏʸ»úÎó
+ * @return ¤Ê¤·
+ */
 static void hooked_roff(cptr str)
 {
        /* Spawn */
@@ -1778,6 +1783,11 @@ void output_monster_spoiler(int r_idx, void (*roff_func)(byte attr, cptr str))
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥À¥ó¥¸¥ç¥ó¤Ë½Ð¸½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ¥À¥ó¥¸¥ç¥ó¤Ë½Ð¸½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 bool mon_hook_dungeon(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1794,6 +1804,11 @@ bool mon_hook_dungeon(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬³¤ÍΤ˽и½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ³¤ÍΤ˽и½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_ocean(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1805,6 +1820,11 @@ static bool mon_hook_ocean(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬³¤´ß¤Ë½Ð¸½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ³¤´ß¤Ë½Ð¸½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_shore(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1816,6 +1836,11 @@ static bool mon_hook_shore(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¹ÓÃϤ˽и½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ¹ÓÃϤ˽и½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_waste(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1827,6 +1852,11 @@ static bool mon_hook_waste(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬Ä®¤Ë½Ð¸½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ¹ÓÃϤ˽и½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_town(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1838,6 +1868,11 @@ static bool mon_hook_town(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¿¹ÎӤ˽и½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ¿¹ÎӤ˽и½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_wood(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1849,6 +1884,11 @@ static bool mon_hook_wood(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬²Ð»³¤Ë½Ð¸½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ²Ð»³¤Ë½Ð¸½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_volcano(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1859,7 +1899,11 @@ static bool mon_hook_volcano(int r_idx)
                return FALSE;
 }
 
-
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬»³ÃϤ˽и½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return »³ÃϤ˽и½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_mountain(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1871,6 +1915,11 @@ static bool mon_hook_mountain(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬Á𸶤˽и½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ¿¹ÎӤ˽и½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_grass(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1881,7 +1930,11 @@ static bool mon_hook_grass(int r_idx)
                return FALSE;
 }
 
-
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¿¼¤¤¿åÃÏ·Á¤Ë½Ð¸½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ¿¼¤¤¿åÃÏ·Á¤Ë½Ð¸½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_deep_water(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1895,6 +1948,11 @@ static bool mon_hook_deep_water(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬Àõ¤¤¿åÃÏ·Á¤Ë½Ð¸½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return Àõ¤¤¿åÃÏ·Á¤Ë½Ð¸½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_shallow_water(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1908,6 +1966,11 @@ static bool mon_hook_shallow_water(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬ÍÏ´äÃÏ·Á¤Ë½Ð¸½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ÍÏ´äÃÏ·Á¤Ë½Ð¸½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_lava(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1923,6 +1986,11 @@ static bool mon_hook_lava(int r_idx)
 }
 
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬Ä̾ï¤Î¾²ÃÏ·Á¤Ë½Ð¸½¤¹¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
+ * @param r_idx È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return Ä̾ï¤Î¾²ÃÏ·Á¤Ë½Ð¸½¤¹¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool mon_hook_floor(int r_idx)
 {
        monster_race *r_ptr = &r_info[r_idx];
@@ -1935,6 +2003,10 @@ static bool mon_hook_floor(int r_idx)
 }
 
 
+/*!
+ * @brief ¥×¥ì¥¤¥ä¡¼¤Î¸½ºß¤Î¹­°è¥Þ¥Ã¥×ºÂɸ¤«¤éÆÀ¤¿ÃÏÀª¤ò¸µ¤Ë¥â¥ó¥¹¥¿¡¼¤ÎÀ¸À®¾ò·ï´Ø¿ô¤òÊÖ¤¹
+ * @return ÃÏÀª¤Ë¤¢¤Ã¤¿¥â¥ó¥¹¥¿¡¼¤ÎÀ¸À®¾ò·ï´Ø¿ô
+ */
 monster_hook_type get_monster_hook(void)
 {
        if (!dun_level && !p_ptr->inside_quest)
@@ -1970,7 +2042,10 @@ monster_hook_type get_monster_hook(void)
        }
 }
 
-
+/*!
+ * @brief »ØÄꤵ¤ì¤¿¹­°è¥Þ¥Ã¥×ºÂɸ¤ÎÃÏÀª¤ò¸µ¤Ë¥â¥ó¥¹¥¿¡¼¤ÎÀ¸À®¾ò·ï´Ø¿ô¤òÊÖ¤¹
+ * @return ÃÏÀª¤Ë¤¢¤Ã¤¿¥â¥ó¥¹¥¿¡¼¤ÎÀ¸À®¾ò·ï´Ø¿ô
+ */
 monster_hook_type get_monster_hook2(int y, int x)
 {
        feature_type *f_ptr = &f_info[cave[y][x].feat];
@@ -2002,12 +2077,21 @@ monster_hook_type get_monster_hook2(int y, int x)
        else return (monster_hook_type)mon_hook_floor;
 }
 
-
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤òͧ¹¥Åª¤Ë¤¹¤ë
+ * @param m_ptr ¥â¥ó¥¹¥¿¡¼¾ðÊó¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
+ */
 void set_friendly(monster_type *m_ptr)
 {
        m_ptr->smart |= SM_FRIENDLY;
 }
 
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤ò¥Ú¥Ã¥È¤Ë¤¹¤ë
+ * @param m_ptr ¥â¥ó¥¹¥¿¡¼¾ðÊó¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
+ */
 void set_pet(monster_type *m_ptr)
 {
        if (!is_pet(m_ptr)) check_pets_num_and_align(m_ptr, TRUE);
@@ -2020,8 +2104,11 @@ void set_pet(monster_type *m_ptr)
                m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
 }
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤òŨ¤Ë²ó¤¹
  * Makes the monster hostile towards the player
+ * @param m_ptr ¥â¥ó¥¹¥¿¡¼¾ðÊó¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
  */
 void set_hostile(monster_type *m_ptr)
 {
@@ -2034,8 +2121,11 @@ void set_hostile(monster_type *m_ptr)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤ë
  * Anger the monster
+ * @param m_ptr ¥â¥ó¥¹¥¿¡¼¾ðÊó¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¤Ê¤·
  */
 void anger_monster(monster_type *m_ptr)
 {
@@ -2061,8 +2151,13 @@ msg_format("%^s
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬ÃÏ·Á¤òƧÇˤǤ­¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
  * Check if monster can cross terrain
+ * @param feat ÃÏ·ÁID
+ * @param r_ptr ¥â¥ó¥¹¥¿¡¼¼ï²¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @param mode ¥ª¥×¥·¥ç¥ó
+ * @return Æ§Ç˲Äǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
  */
 bool monster_can_cross_terrain(s16b feat, monster_race *r_ptr, u16b mode)
 {
@@ -2120,8 +2215,14 @@ bool monster_can_cross_terrain(s16b feat, monster_race *r_ptr, u16b mode)
 }
 
 
-/*
+/*!
+ * @brief »ØÄꤵ¤ì¤¿ºÂɸ¤ÎÃÏ·Á¤ò¥â¥ó¥¹¥¿¡¼¤¬Æ§ÇˤǤ­¤ë¤«¤É¤¦¤«¤òÊÖ¤¹
  * Strictly check if monster can enter the grid
+ * @param y ÃÏ·Á¤ÎYºÂɸ
+ * @param x ÃÏ·Á¤ÎXºÂɸ
+ * @param r_ptr ¥â¥ó¥¹¥¿¡¼¼ï²¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @param mode ¥ª¥×¥·¥ç¥ó
+ * @return Æ§Ç˲Äǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
  */
 bool monster_can_enter(int y, int x, monster_race *r_ptr, u16b mode)
 {
@@ -2135,8 +2236,12 @@ bool monster_can_enter(int y, int x, monster_race *r_ptr, u16b mode)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Î°À­¤Î´ð¤Å¤¤¤¿Å¨Âдط¸¤Î̵ͭ¤òÊÖ¤¹¡Ê¥µ¥Ö¥ë¡¼¥Á¥ó¡Ë
  * Check if this monster has "hostile" alignment (aux)
+ * @param sub_align1 ¥â¥ó¥¹¥¿¡¼1¤Î¥µ¥Ö¥Õ¥é¥°
+ * @param sub_align2 ¥â¥ó¥¹¥¿¡¼2¤Î¥µ¥Ö¥Õ¥é¥°
+ * @return Å¨Âдط¸¤Ë¤¢¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
  */
 static bool check_hostile_align(byte sub_align1, byte sub_align2)
 {
@@ -2152,8 +2257,12 @@ static bool check_hostile_align(byte sub_align1, byte sub_align2)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Î°À­¤Î´ð¤Å¤¤¤¿Å¨Âдط¸¤Î̵ͭ¤òÊÖ¤¹
  * Check if two monsters are enemies
+ * @param m_ptr ¥â¥ó¥¹¥¿¡¼1¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param n_ptr ¥â¥ó¥¹¥¿¡¼2¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return Å¨Âдط¸¤Ë¤¢¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
  */
 bool are_enemies(monster_type *m_ptr, monster_type *n_ptr)
 {
@@ -2189,8 +2298,15 @@ bool are_enemies(monster_type *m_ptr, monster_type *n_ptr)
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤ËÂФ·¤ÆŨ°Õ¤òÊú¤¯¤«¤É¤¦¤«¤òÊÖ¤¹
  * Check if this monster race has "hostile" alignment
+ * @param m_ptr ¥â¥ó¥¹¥¿¡¼¾ðÊó¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @param pa_good ¥×¥ì¥¤¥ä¡¼¤ÎÁ±·¹¸þÃÍ
+ * @param pa_evil ¥×¥ì¥¤¥ä¡¼¤Î°­·¹¸þÃÍ
+ * @param r_ptr ¥â¥ó¥¹¥¿¡¼¼ï²¾ðÊó¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¥×¥ì¥¤¥ä¡¼¤ËŨ°Õ¤ò»ý¤Ä¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ * @details
  * If user is player, m_ptr == NULL.
  */
 bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr)
@@ -2219,9 +2335,12 @@ bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, mo
 }
 
 
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬À¸Ì¿ÂΤ«¤É¤¦¤«¤òÊÖ¤¹
  * Is the monster "alive"?
- *
+ * @param r_ptr È½Äꤹ¤ë¥â¥ó¥¹¥¿¡¼¤Î¼ï²¾ðÊó¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return À¸Ì¿ÂΤʤé¤ÐTRUE¤òÊÖ¤¹
+ * @details
  * Used to determine the message to print for a killed monster.
  * ("dies", "destroyed")
  */
@@ -2235,8 +2354,13 @@ bool monster_living(monster_race *r_ptr)
 }
 
 
-/*
- * Is this monster declined to be questor or bounty?
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬ÆüìǽÎϾ塢¾Þ¶â¼ó¤«¤éÇÓ½ü¤¹¤ëɬÍפ¬¤¢¤ë¤«¤É¤¦¤«¤òÊÖ¤¹¡£
+ * Is the monster "alive"? / Is this monster declined to be questor or bounty?
+ * @param r_idx ¥â¥ó¥¹¥¿¡¼¤Î¼ï²ID
+ * @return ¾Þ¶â¼ó¤Ë²Ã¤¨¤é¤ì¤Ê¤¤¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ * @details
+ * ¼Â¼Á¥Ð¡¼¥Î¡¼¥ë¡á¥ë¥Ñ¡¼¥ÈÍÑ¡£
  */
 bool no_questor_or_bounty_uniques(int r_idx)
 {