OSDN Git Service

Implementing MCI command for BGM playing.
[hengband/hengband.git] / src / do-spell.c
index ceb204f..059919d 100644 (file)
@@ -1,12 +1,22 @@
-/* File: do-spell.c */
-
-/* Purpose: Do everything for each spell */
+/*!
+    @file do-spell.c
+    @brief ËâË¡¤Î¥¤¥ó¥¿¡¼¥Õ¥§¥¤¥¹¤Èȯư / Purpose: Do everything for each spell
+    @date 2013/12/31
+    @author
+    2013 Deskull rearranged comment for Doxygen.
+ */
 
 #include "angband.h"
 
 
-/*
- * Generate dice info string such as "foo 2d10"
+/*!
+ * @brief
+ * ËâË¡¤Î¸ú²Ì¤ò¡Ö¥­¥ã¥×¥·¥ç¥ó:¥À¥¤¥¹¡ÜÄê¿ôÃ͡פΥե©¡¼¥Þ¥Ã¥È¤Ç½ÐÎϤ¹¤ë / Generate dice info string such as "foo 2d10"
+ * @param str ¥­¥ã¥×¥·¥ç¥ó
+ * @param dice ¥À¥¤¥¹¿ô
+ * @param sides ¥À¥¤¥¹ÌÜ
+ * @param base ¸ÇÄêÃÍ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_string_dice(cptr str, int dice, int sides, int base)
 {
@@ -24,8 +34,12 @@ static cptr info_string_dice(cptr str, int dice, int sides, int base)
 }
 
 
-/*
- * Generate damage-dice info string such as "dam 2d10"
+/*!
+ * @brief ËâË¡¤Ë¤è¤ë¥À¥á¡¼¥¸¤ò½ÐÎϤ¹¤ë / Generate damage-dice info string such as "dam 2d10"
+ * @param dice ¥À¥¤¥¹¿ô
+ * @param sides ¥À¥¤¥¹ÌÜ
+ * @param base ¸ÇÄêÃÍ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_damage(int dice, int sides, int base)
 {
@@ -36,9 +50,11 @@ static cptr info_damage(int dice, int sides, int base)
 #endif
 }
 
-
-/*
- * Generate duration info string such as "dur 20+1d20"
+/*!
+ * @brief ËâË¡¤Î¸ú²Ì»þ´Ö¤ò½ÐÎϤ¹¤ë / Generate duration info string such as "dur 20+1d20"
+ * @param base ¸ÇÄêÃÍ
+ * @param sides ¥À¥¤¥¹ÌÜ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_duration(int base, int sides)
 {
@@ -49,9 +65,10 @@ static cptr info_duration(int base, int sides)
 #endif
 }
 
-
-/*
- * Generate range info string such as "range 5"
+/*!
+ * @brief ËâË¡¤Î¸ú²ÌÈϰϤò½ÐÎϤ¹¤ë / Generate range info string such as "range 5"
+ * @param range ¸ú²ÌÈÏ°Ï
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_range(int range)
 {
@@ -62,9 +79,12 @@ static cptr info_range(int range)
 #endif
 }
 
-
-/*
- * Generate heal info string such as "heal 2d8"
+/*!
+ * @brief ËâË¡¤Ë¤è¤ë²óÉüÎ̤ò½ÐÎϤ¹¤ë / Generate heal info string such as "heal 2d8"
+ * @param dice ¥À¥¤¥¹¿ô
+ * @param sides ¥À¥¤¥¹ÌÜ
+ * @param base ¸ÇÄêÃÍ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_heal(int dice, int sides, int base)
 {
@@ -75,9 +95,11 @@ static cptr info_heal(int dice, int sides, int base)
 #endif
 }
 
-
-/*
- * Generate delay info string such as "delay 15+1d15"
+/*!
+ * @brief ËâË¡¸ú²Ìȯư¤Þ¤Ç¤ÎÃٱ䥿¡¼¥ó¤ò½ÐÎϤ¹¤ë / Generate delay info string such as "delay 15+1d15"
+ * @param base ¸ÇÄêÃÍ
+ * @param sides ¥À¥¤¥¹ÌÜ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_delay(int base, int sides)
 {
@@ -89,8 +111,10 @@ static cptr info_delay(int base, int sides)
 }
 
 
-/*
- * Generate multiple-damage info string such as "dam 25 each"
+/*!
+ * @brief ËâË¡¤Ë¤è¤ë¥À¥á¡¼¥¸¤ò½ÐÎϤ¹¤ë(¸ÇÄêÃÍ¡õÊ£¿ô²ó½èÍý) / Generate multiple-damage info string such as "dam 25 each"
+ * @param dam ¸ÇÄêÃÍ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_multi_damage(int dam)
 {
@@ -102,8 +126,11 @@ static cptr info_multi_damage(int dam)
 }
 
 
-/*
- * Generate multiple-damage-dice info string such as "dam 5d2 each"
+/*!
+ * @brief ËâË¡¤Ë¤è¤ë¥À¥á¡¼¥¸¤ò½ÐÎϤ¹¤ë(¥À¥¤¥¹¤Î¤ß¡õÊ£¿ô²ó½èÍý) / Generate multiple-damage-dice info string such as "dam 5d2 each"
+ * @param dice ¥À¥¤¥¹¿ô
+ * @param sides ¥À¥¤¥¹ÌÜ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_multi_damage_dice(int dice, int sides)
 {
@@ -114,9 +141,10 @@ static cptr info_multi_damage_dice(int dice, int sides)
 #endif
 }
 
-
-/*
- * Generate power info string such as "power 100"
+/*!
+ * @brief ËâË¡¤Ë¤è¤ë°ìÈÌŪ¤Ê¸úÎÏÃͤò½ÐÎϤ¹¤ë¡Ê¸ÇÄêÃÍ¡Ë / Generate power info string such as "power 100"
+ * @param power ¸ÇÄêÃÍ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_power(int power)
 {
@@ -128,6 +156,12 @@ static cptr info_power(int power)
 }
 
 
+/*!
+ * @brief ËâË¡¤Ë¤è¤ë°ìÈÌŪ¤Ê¸úÎÏÃͤò½ÐÎϤ¹¤ë¡Ê¥À¥¤¥¹ÃÍ¡Ë / Generate power info string such as "power 100"
+ * @param dice ¥À¥¤¥¹¿ô
+ * @param sides ¥À¥¤¥¹ÌÜ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
+ */
 /*
  * Generate power info string such as "power 1d100"
  */
@@ -141,8 +175,10 @@ static cptr info_power_dice(int dice, int sides)
 }
 
 
-/*
- * Generate radius info string such as "rad 100"
+/*!
+ * @brief ËâË¡¤Î¸ú²ÌȾ·Â¤ò½ÐÎϤ¹¤ë / Generate radius info string such as "rad 100"
+ * @param rad ¸ú²ÌȾ·Â
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_radius(int rad)
 {
@@ -154,21 +190,27 @@ static cptr info_radius(int rad)
 }
 
 
-/*
- * Generate weight info string such as "max wgt 15"
+/*!
+ * @brief ËâË¡¸ú²Ì¤Î¸Â³¦½ÅÎ̤ò½ÐÎϤ¹¤ë / Generate weight info string such as "max wgt 15"
+ * @param weight ºÇÂç½ÅÎÌ
+ * @return ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë½¾¤¤À°·Á¤µ¤ì¤¿Ê¸»úÎó
  */
 static cptr info_weight(int weight)
 {
 #ifdef JP
-       return format("ºÇÂç½ÅÎÌ:%d.%dkg", lbtokg1(weight/10), lbtokg2(weight/10));
+       return format("ºÇÂç½ÅÎÌ:%d.%dkg", lbtokg1(weight), lbtokg2(weight));
 #else
        return format("max wgt %d", weight/10);
 #endif
 }
 
 
-/*
- * Prepare standard probability to become beam for fire_bolt_or_beam()
+/*!
+ * @brief °ìÉô¥Ü¥ë¥ÈËâË¡¤Î¥Ó¡¼¥à²½³ÎΨ¤ò»»½Ð¤¹¤ë / Prepare standard probability to become beam for fire_bolt_or_beam()
+ * @return ¥Ó¡¼¥à²½³ÎΨ(%)
+ * @details
+ * ¥Ï¡¼¥É¥³¡¼¥Æ¥£¥ó¥°¤Ë¤è¤ë¼ÂÁõ¤¬¹Ô¤ï¤ì¤Æ¤¤¤ë¡£
+ * ¥á¥¤¥¸¤Ï(¥ì¥Ù¥ë)%¡¢¥Ï¥¤¥á¥¤¥¸¡¢¥¹¥Ú¥ë¥Þ¥¹¥¿¡¼¤Ï(¥ì¥Ù¥ë)%¡¢¤½¤ì°Ê³°¤Î¿¦¶È¤Ï(¥ì¥Ù¥ë/2)%
  */
 static int beam_chance(void)
 {
@@ -180,9 +222,16 @@ static int beam_chance(void)
        return p_ptr->lev / 2;
 }
 
-
-/*
- * Handle summoning and failure of trump spells
+/*!
+ * @brief ¥È¥é¥ó¥×ËâË¡Æȼ«¤Î¾¤´­½èÍý¤ò¹Ô¤¦ / Handle summoning and failure of trump spells
+ * @param num summon_specific()´Ø¿ô¤ò¸Æ¤Ó½Ð¤¹²ó¿ô
+ * @param pet ¥Ú¥Ã¥È²½¤È¤·¤Æ¾¤´­¤µ¤ì¤ë¤«Èݤ«
+ * @param y ¾¤´­°ÌÃÖ¤ÎyºÂɸ
+ * @param x ¾¤´­°ÌÃÖ¤ÎxºÂɸ
+ * @param lev ¾¤´­¥ì¥Ù¥ë
+ * @param type ¾¤´­¾ò·ïID
+ * @param mode ¥â¥ó¥¹¥¿¡¼À¸À®¾ò·ï¥Õ¥é¥°
+ * @return ¥â¥ó¥¹¥¿¡¼¤¬¡ÊŨÂФâ´Þ¤á¤Æ¡Ë¾¤´Ô¤µ¤ì¤¿¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
  */
 static bool trump_summoning(int num, bool pet, int y, int x, int lev, int type, u32b mode)
 {
@@ -239,11 +288,15 @@ static bool trump_summoning(int num, bool pet, int y, int x, int lev, int type,
 }
 
 
-/*
- * This spell should become more useful (more controlled) as the
- * player gains experience levels.  Thus, add 1/5 of the player's
- * level to the die roll.  This eliminates the worst effects later on,
- * while keeping the results quite random.  It also allows some potent
+/*!
+ * @brief ¡Ö¥ï¥ó¥À¡¼¡×¤Î¥é¥ó¥À¥à¤Ê¸ú²Ì¤ò·èÄꤷ¤Æ½èÍý¤¹¤ë¡£
+ * @param dir Êý¸þID
+ * @return ¤Ê¤·
+ * @details
+ * This spell should become more useful (more controlled) as the\n
+ * player gains experience levels.  Thus, add 1/5 of the player's\n
+ * level to the die roll.  This eliminates the worst effects later on,\n
+ * while keeping the results quite random.  It also allows some potent\n
  * effects only at high level.
  */
 static void cast_wonder(int dir)
@@ -327,6 +380,11 @@ static void cast_wonder(int dir)
 }
 
 
+/*!
+ * @brief ¡Ö°­Î´­¡×¤Î¥é¥ó¥À¥à¤Ê¸ú²Ì¤ò·èÄꤷ¤Æ½èÍý¤¹¤ë¡£
+ * @param dir Êý¸þID
+ * @return ¤Ê¤·
+ */
 static void cast_invoke_spirits(int dir)
 {
        int plev = p_ptr->lev;
@@ -493,7 +551,11 @@ static void cast_invoke_spirits(int dir)
        }
 }
 
-
+/*!
+ * @brief ¥«¥ª¥¹Åª¸ú²Ì¤¢¤ë¤¤¤ÏµÚ¤Ó¥·¥ã¥Ã¥Õ¥ë¤Î¡Ö±¿Ì¿¤ÎÎء׸ú²Ì¤ò°ú¿ô´ð½à¤Ë½èÍý¤¹¤ë¡£
+ * @param spell ´ð½à¤È¤Ê¤ë°ú¿ôID
+ * @return ¤Ê¤·
+ */
 static void wild_magic(int spell)
 {
        int counter = 0;
@@ -592,7 +654,10 @@ static void wild_magic(int spell)
        }
 }
 
-
+/*!
+ * @brief ¥È¥é¥ó¥×Îΰè¤Î¡Ö¥·¥ã¥Ã¥Õ¥ë¡×¤Î¸ú²Ì¤ò¥é¥ó¥À¥à¤Ë·è¤á¤Æ½èÍý¤¹¤ë¡£
+ * @return ¤Ê¤·
+ */
 static void cast_shuffle(void)
 {
        int plev = p_ptr->lev;
@@ -902,9 +967,12 @@ static void cast_shuffle(void)
        }
 }
 
-
-/*
- * Drop 10+1d10 meteor ball at random places near the player
+/*!
+ * @brief ¥«¥ª¥¹ËâË¡¡ÖήÀ±·²¡×¤Î½èÍý¤È¤·¤Æ¥×¥ì¥¤¥ä¡¼¤òÃæ¿´¤Ëð¨ÀÐÍî²¼½èÍý¤ò10+1d10²ó·«¤êÊÖ¤¹¡£
+ * / Drop 10+1d10 meteor ball at random places near the player
+ * @param dam ¥À¥á¡¼¥¸
+ * @param rad ¸úÎϤÎȾ·Â
+ * @return ¤Ê¤·
  */
 static void cast_meteor(int dam, int rad)
 {
@@ -945,8 +1013,11 @@ static void cast_meteor(int dam, int rad)
 }
 
 
-/*
- * Drop 10+1d10 disintegration ball at random places near the target
+/*!
+ * @brief Ç˼ÙËâË¡¡Ö¿À¤ÎÅܤê¡×¤Î½èÍý¤È¤·¤Æ¥¿¡¼¥²¥Ã¥È¤ò»ØÄꤷ¤¿¸åʬ²ò¤Î¥Ü¡¼¥ë¤òºÇÂç20²óȯÀ¸¤µ¤»¤ë¡£
+ * @param dam ¥À¥á¡¼¥¸
+ * @param rad ¸úÎϤÎȾ·Â
+ * @return ¥¿¡¼¥²¥Ã¥È¤ò»ØÄꤷ¡¢¼Â¹Ô¤·¤¿¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
  */
 static bool cast_wrath_of_the_god(int dam, int rad)
 {
@@ -1030,9 +1101,10 @@ static bool cast_wrath_of_the_god(int dam, int rad)
        return TRUE;
 }
 
-
-/*
- * An "item_tester_hook" for offer
+/*!
+ * @brief °­ËâÎΰè¤Î¥°¥ì¡¼¥¿¡¼¥Ç¡¼¥â¥ó¾¤´­¤ËÍøÍѲÄǽ¤Ê»àÂΤ«¤É¤¦¤«¤òÊÖ¤¹¡£ / An "item_tester_hook" for offer
+ * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @return À¸ìӤ˻ÈÍѲÄǽ¤Ê»àÂΤʤé¤ÐTRUE¤òÊÖ¤¹¡£
  */
 static bool item_tester_offer(object_type *o_ptr)
 {
@@ -1047,9 +1119,9 @@ static bool item_tester_offer(object_type *o_ptr)
        return (FALSE);
 }
 
-
-/*
- * Daemon spell Summon Greater Demon
+/*!
+ * @brief °­ËâÎΰè¤Î¥°¥ì¡¼¥¿¡¼¥Ç¡¼¥â¥ó¾¤´­¤ò½èÍý¤¹¤ë / Daemon spell Summon Greater Demon
+ * @return ½èÍý¤ò¼Â¹Ô¤·¤¿¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
  */
 static bool cast_summon_greater_demon(void)
 {
@@ -1126,9 +1198,11 @@ static bool cast_summon_greater_demon(void)
        return TRUE;
 }
 
-
-/*
- * Start singing if the player is a Bard 
+/*!
+ * @brief ²Î¤Î³«»Ï¤ò½èÍý¤¹¤ë / Start singing if the player is a Bard 
+ * @param spell ÎΰèËâË¡¤È¤·¤Æ¤ÎID
+ * @param song ËâË¡¸ú²Ì¤ÎID
+ * @return ¤Ê¤·
  */
 static void start_singing(int spell, int song)
 {
@@ -1150,9 +1224,9 @@ static void start_singing(int spell, int song)
        p_ptr->redraw |= (PR_STATUS);
 }
 
-
-/*
- * Stop singing if the player is a Bard 
+/*!
+ * @brief ²Î¤ÎÄä»ß¤ò½èÍý¤¹¤ë / Stop singing if the player is a Bard 
+ * @return ¤Ê¤·
  */
 void stop_singing(void)
 {
@@ -1186,6 +1260,12 @@ void stop_singing(void)
 }
 
 
+/*!
+ * @brief À¸Ì¿ÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_life_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -1883,7 +1963,12 @@ static cptr do_life_spell(int spell, int mode)
        return "";
 }
 
-
+/*!
+ * @brief Àç½ÑÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_sorcery_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -2588,6 +2673,12 @@ static cptr do_sorcery_spell(int spell, int mode)
 }
 
 
+/*!
+ * @brief ¼«Á³ÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_nature_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -3378,6 +3469,12 @@ static cptr do_nature_spell(int spell, int mode)
 }
 
 
+/*!
+ * @brief ¥«¥ª¥¹ÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_chaos_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -4180,7 +4277,12 @@ static cptr do_chaos_spell(int spell, int mode)
        return "";
 }
 
-
+/*!
+ * @brief °Å¹õÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_death_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -5015,6 +5117,12 @@ static cptr do_death_spell(int spell, int mode)
 }
 
 
+/*!
+ * @brief ¥È¥é¥ó¥×ÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_trump_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -5943,6 +6051,12 @@ static cptr do_trump_spell(int spell, int mode)
 }
 
 
+/*!
+ * @brief Èë½ÑÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_arcane_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -6665,7 +6779,12 @@ static cptr do_arcane_spell(int spell, int mode)
        return "";
 }
 
-
+/*!
+ * @brief ¾¢ÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_craft_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -7362,7 +7481,12 @@ static cptr do_craft_spell(int spell, int mode)
        return "";
 }
 
-
+/*!
+ * @brief °­ËâÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_daemon_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -8154,7 +8278,12 @@ static cptr do_daemon_spell(int spell, int mode)
        return "";
 }
 
-
+/*!
+ * @brief Ç˼ÙÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_crusade_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -8945,6 +9074,12 @@ static cptr do_crusade_spell(int spell, int mode)
 }
 
 
+/*!
+ * @brief ²Î¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ²ÎID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST / SPELL_FAIL / SPELL_CONT / SPELL_STOP »þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_music_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -10182,7 +10317,12 @@ static cptr do_music_spell(int spell, int mode)
        return "";
 }
 
-
+/*!
+ * @brief ·õ½Ñ¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ·õ½ÑID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_CAST)
+ * @return SPELL_NAME / SPELL_DESC »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST»þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_hissatsu_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -11136,17 +11276,17 @@ static cptr do_hissatsu_spell(int spell, int mode)
                if (cast)
                {
                        const int mana_cost_per_monster = 8;
-                       bool new = TRUE;
+                       bool is_new = TRUE;
                        bool mdeath;
 
                        do
                        {
                                if (!rush_attack(&mdeath)) break;
-                               if (new)
+                               if (is_new)
                                {
                                        /* Reserve needed mana point */
                                        p_ptr->csp -= technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
-                                       new = FALSE;
+                                       is_new = FALSE;
                                }
                                else
                                        p_ptr->csp -= mana_cost_per_monster;
@@ -11159,7 +11299,7 @@ static cptr do_hissatsu_spell(int spell, int mode)
                        }
                        while (p_ptr->csp > mana_cost_per_monster);
 
-                       if (new) return NULL;
+                       if (is_new) return NULL;
        
                        /* Restore reserved mana */
                        p_ptr->csp += technic_info[REALM_HISSATSU - MIN_TECHNIC][26].smana;
@@ -11398,8 +11538,11 @@ static cptr do_hissatsu_spell(int spell, int mode)
        return "";
 }
 
-
-/* Hex */
+/*!
+ * @brief ¼ö½ÑÎΰè¤ÎÉð´ï¼öÇû¤ÎÂоݤˤǤ­¤ëÉð´ï¤«¤É¤¦¤«¤òÊÖ¤¹¡£ / An "item_tester_hook" for offer
+ * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¼öÇû²Äǽ¤ÊÉð´ï¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool item_tester_hook_weapon_except_bow(object_type *o_ptr)
 {
        switch (o_ptr->tval)
@@ -11416,11 +11559,22 @@ static bool item_tester_hook_weapon_except_bow(object_type *o_ptr)
        return (FALSE);
 }
 
+/*!
+ * @brief ¼ö½ÑÎΰè¤Î³Æ½èÍý¤Ë»È¤¨¤ë¼ö¤ï¤ì¤¿ÁõÈ÷¤«¤É¤¦¤«¤òÊÖ¤¹¡£ / An "item_tester_hook" for offer
+ * @param o_ptr ¥ª¥Ö¥¸¥§¥¯¥È¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @return »È¤¨¤ëÁõÈ÷¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
 static bool item_tester_hook_cursed(object_type *o_ptr)
 {
        return (bool)(object_is_cursed(o_ptr));
 }
 
+/*!
+ * @brief ¼ö½ÑÎΰèËâË¡¤Î³Æ½èÍý¤ò¹Ô¤¦
+ * @param spell ËâË¡ID
+ * @param mode ½èÍýÆâÍÆ (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_CONT / SPELL_STOP)
+ * @return SPELL_NAME / SPELL_DESC / SPELL_INFO »þ¤Ë¤Ïʸ»úÎó¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£SPELL_CAST / SPELL_CONT / SPELL_STOP »þ¤ÏNULLʸ»úÎó¤òÊÖ¤¹¡£
+ */
 static cptr do_hex_spell(int spell, int mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
@@ -11565,7 +11719,7 @@ static cptr do_hex_spell(int spell, int mode)
                if (cast)
                {
                        int item;
-                       char *q, *s;
+                       cptr q, s;
                        char o_name[MAX_NLEN];
                        object_type *o_ptr;
                        u32b f[TR_FLAG_SIZE];
@@ -12031,7 +12185,7 @@ static cptr do_hex_spell(int spell, int mode)
                if (cast)
                {
                        int item;
-                       char *q, *s;
+                       cptr q, s;
                        char o_name[MAX_NLEN];
                        object_type *o_ptr;
                        u32b f[TR_FLAG_SIZE];
@@ -12328,7 +12482,7 @@ static cptr do_hex_spell(int spell, int mode)
                if (cast)
                {
                        int item;
-                       char *s, *q;
+                       cptr s, q;
                        u32b f[TR_FLAG_SIZE];
                        object_type *o_ptr;
 
@@ -12606,8 +12760,12 @@ static cptr do_hex_spell(int spell, int mode)
 }
 
 
-/*
- * Do everything for each spell
+/*!
+ * @brief ËâË¡½èÍý¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó
+ * @param realm ËâË¡Îΰè¤ÎID
+ * @param spell ³ÆÎΰè¤ÎËâË¡ID
+ * @param mode µá¤á¤ë½èÍý
+ * @return ³ÆÎΰèËâË¡¤Ë³Æ¼ï¥Æ¥­¥¹¥È¤òµá¤á¤¿¾ì¹ç¤Ïʸ»úÎ󻲾ȥݥ¤¥ó¥¿¡¢¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¤ÏNULL¥Ý¥¤¥ó¥¿¤òÊÖ¤¹¡£
  */
 cptr do_spell(int realm, int spell, int mode)
 {