/*!
- * @file cmd6.c
- * @brief ¥×¥ì¥¤¥ä¡¼¤Î¥¢¥¤¥Æ¥à¤Ë´Ø¤¹¤ë¥³¥Þ¥ó¥É¤Î¼ÂÁõ2 / Spell/Prayer commands
- * @date 2014/01/02
- * @author
+ * @file cmd6.c
+ * @brief ¥×¥ì¥¤¥ä¡¼¤Î¥¢¥¤¥Æ¥à¤Ë´Ø¤¹¤ë¥³¥Þ¥ó¥É¤Î¼ÂÁõ2 / Spell/Prayer commands
+ * @date 2014/01/27
+ * @author
+ * <pre>
* 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.
- */
-
-#include "angband.h"
-
-
-/*
+ * 2014 Deskull rearranged comment for Doxygen.\n
+ * </pre>
+ * @details
+ * <pre>
* This file includes code for eating food, drinking potions,
* reading scrolls, aiming wands, using staffs, zapping rods,
* and activating artifacts.
*
* Note that food/potions/scrolls no longer use bit-flags for effects,
* but instead use the "sval" (which is also used to sort the objects).
+ * </pre>
*/
+#include "angband.h"
+
+/*!
+ * @brief ¿©ÎÁ¤ò¿©¤Ù¤ë¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó
+ * @param item ¿©¤Ù¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Î½ê»ýÉÊID
+ * @return ¤Ê¤·
+ */
static void do_cmd_eat_food_aux(int item)
{
int ident, lev;
}
-/*
+/*!
+ * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤ò¥×¥ì¥¤¥ä¡¼¤¬¿©¤Ù¤ë¤³¤È¤¬¤Ç¤¤ë¤«¤òȽÄꤹ¤ë /
* Hook to determine if an object is eatable
+ * @param o_ptr ȽÄꤷ¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ¿©¤Ù¤ë¤³¤È¤¬²Äǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
*/
static bool item_tester_hook_eatable(object_type *o_ptr)
{
}
-/*
+/*!
+ * @brief ¿©ÎÁ¤ò¿©¤Ù¤ë¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
* Eat some food (from the pack or floor)
+ * @return ¤Ê¤·
*/
void do_cmd_eat_food(void)
{
}
-/*
+/*!
+ * @brief Ìô¤ò°û¤à¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó /
* Quaff a potion (from the pack or the floor)
+ * @param item °û¤àÌô¥ª¥Ö¥¸¥§¥¯¥È¤Î½ê»ýÉÊID
+ * @return ¤Ê¤·
*/
static void do_cmd_quaff_potion_aux(int item)
{
break;
case SV_POTION_LOSE_MEMORIES:
- if (!p_ptr->hold_life && (p_ptr->exp > 0))
+ if (!p_ptr->hold_exp && (p_ptr->exp > 0))
{
#ifdef JP
msg_print("²áµî¤Îµ²±¤¬Çö¤ì¤Æ¤¤¤¯µ¤¤¬¤¹¤ë¡£");
}
-/*
+/*!
+ * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤ò¥×¥ì¥¤¥ä¡¼¤¬°û¤à¤³¤È¤¬¤Ç¤¤ë¤«¤òȽÄꤹ¤ë /
* Hook to determine if an object can be quaffed
+ * @param o_ptr ȽÄꤷ¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return °û¤à¤³¤È¤¬²Äǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
*/
static bool item_tester_hook_quaff(object_type *o_ptr)
{
if (o_ptr->tval == TV_FLASK && o_ptr->sval == SV_FLASK_OIL)
return TRUE;
}
-
return FALSE;
}
-/*
+/*!
+ * @brief Ìô¤ò°û¤à¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
* Quaff some potion (from the pack or floor)
+ * @return ¤Ê¤·
*/
void do_cmd_quaff_potion(void)
{
}
-/*
+/*!
+ * @brief ´¬Êª¤òÆɤॳ¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó
* Read a scroll (from the pack or floor).
- *
+ * @param item Æɤ४¥Ö¥¸¥§¥¯¥È¤Î½ê»ýÉÊID
+ * @param known ȽÌÀºÑ¤Ê¤é¤ÐTRUE
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
* Certain scrolls can be "aborted" without losing the scroll. These
* include scrolls with no effects but recharge or identify, which are
* cancelled before use. XXX Reading them still takes a turn, though.
+ * </pre>
*/
static void do_cmd_read_scroll_aux(int item, bool known)
{
}
}
-
-/*
+/*!
+ * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤ò¥×¥ì¥¤¥ä¡¼¤¬Æɤळ¤È¤¬¤Ç¤¤ë¤«¤òȽÄꤹ¤ë /
* Hook to determine if an object is readable
+ * @param o_ptr ȽÄꤷ¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return Æɤळ¤È¤¬²Äǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
*/
static bool item_tester_hook_readable(object_type *o_ptr)
{
return (FALSE);
}
-
+/*!
+ * @brief Æɤॳ¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * Eat some food (from the pack or floor)
+ * @return ¤Ê¤·
+ */
void do_cmd_read_scroll(void)
{
object_type *o_ptr;
do_cmd_read_scroll_aux(item, object_is_aware(o_ptr));
}
-
+/*!
+ * @brief ¾ó¤Î¸ú²Ì¤òȯư¤¹¤ë
+ * @param sval ¥ª¥Ö¥¸¥§¥¯¥È¤Îsval
+ * @param use_charge »ÈÍѲó¿ô¤ò¾ÃÈñ¤·¤¿¤«¤É¤¦¤«¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param powerful ¶¯ÎÏȯư¾å¤Î½èÍý¤Ê¤é¤ÐTRUE
+ * @param magic ËâÆ»¶ñ½Ñ¾å¤Î½èÍý¤Ê¤é¤ÐTRUE
+ * @param known ȽÌÀºÑ¤Ê¤é¤ÐTRUE
+ * @return ȯư¤Ë¤è¤ê¸ú²ÌÆâÍƤ¬³ÎÄꤷ¤¿¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
static int staff_effect(int sval, bool *use_charge, bool powerful, bool magic, bool known)
{
int k;
return ident;
}
-/*
+/*!
+ * @brief ¾ó¤ò»È¤¦¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó /
* Use a staff. -RAK-
- *
+ * @param item »È¤¦¥ª¥Ö¥¸¥§¥¯¥È¤Î½ê»ýÉÊID
+ * @return ¤Ê¤·
+ * @details
* One charge of one staff disappears.
- *
* Hack -- staffs of identify can be "cancelled".
*/
static void do_cmd_use_staff_aux(int item)
}
}
-
+/*!
+ * @brief ¾ó¤ò»È¤¦¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @return ¤Ê¤·
+ */
void do_cmd_use_staff(void)
{
int item;
do_cmd_use_staff_aux(item);
}
-
+/*!
+ * @brief ËâË¡ËÀ¤Î¸ú²Ì¤òȯư¤¹¤ë
+ * @param sval ¥ª¥Ö¥¸¥§¥¯¥È¤Îsval
+ * @param dir ȯư¤ÎÊý¸þID
+ * @param powerful ¶¯ÎÏȯư¾å¤Î½èÍý¤Ê¤é¤ÐTRUE
+ * @param magic ËâÆ»¶ñ½Ñ¾å¤Î½èÍý¤Ê¤é¤ÐTRUE
+ * @return ȯư¤Ë¤è¤ê¸ú²ÌÆâÍƤ¬³ÎÄꤷ¤¿¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
static int wand_effect(int sval, int dir, bool powerful, bool magic)
{
int ident = FALSE;
return ident;
}
-
-/*
+/*!
+ * @brief ËâË¡ËÀ¤ò»È¤¦¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó /
* Aim a wand (from the pack or floor).
- *
+ * @param item »È¤¦¥ª¥Ö¥¸¥§¥¯¥È¤Î½ê»ýÉÊID
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
* Use a single charge from a single item.
* Handle "unstacking" in a logical manner.
- *
* For simplicity, you cannot use a stack of items from the
* ground. This would require too much nasty code.
- *
* There are no wands which can "destroy" themselves, in the inventory
* or on the ground, so we can ignore this possibility. Note that this
* required giving "wand of wonder" the ability to ignore destruction
* by electric balls.
- *
* All wands can be "cancelled" at the "Direction?" prompt for free.
- *
* Note that the basic "bolt" wands do slightly less damage than the
* basic "bolt" rods, but the basic "ball" wands do the same damage
* as the basic "ball" rods.
+ * </pre>
*/
static void do_cmd_aim_wand_aux(int item)
{
}
}
-
+/*!
+ * @brief ËâË¡ËÀ¤ò»È¤¦¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @return ¤Ê¤·
+ */
void do_cmd_aim_wand(void)
{
int item;
do_cmd_aim_wand_aux(item);
}
-
+/*!
+ * @brief ¥í¥Ã¥É¤Î¸ú²Ì¤òȯư¤¹¤ë
+ * @param sval ¥ª¥Ö¥¸¥§¥¯¥È¤Îsval
+ * @param dir ȯưÌÜɸ¤ÎÊý¸þID
+ * @param use_charge ¥Á¥ã¡¼¥¸¤ò¾ÃÈñ¤·¤¿¤«¤É¤¦¤«¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param powerful ¶¯ÎÏȯư¾å¤Î½èÍý¤Ê¤é¤ÐTRUE
+ * @param magic ËâÆ»¶ñ½Ñ¾å¤Î½èÍý¤Ê¤é¤ÐTRUE
+ * @return ȯư¤Ë¤è¤ê¸ú²ÌÆâÍƤ¬³ÎÄꤷ¤¿¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
+ */
static int rod_effect(int sval, int dir, bool *use_charge, bool powerful, bool magic)
{
int ident = FALSE;
return ident;
}
-/*
+/*!
+ * @brief ËâË¡ËÀ¤ò»È¤¦¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó /
* Activate (zap) a Rod
- *
+ * @param item »È¤¦¥ª¥Ö¥¸¥§¥¯¥È¤Î½ê»ýÉÊID
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
* Unstack fully charged rods as needed.
- *
* Hack -- rods of perception/genocide can be "cancelled"
* All rods can be cancelled at the "Direction?" prompt
- *
* pvals are defined for each rod in k_info. -LM-
+ * </pre>
*/
static void do_cmd_zap_rod_aux(int item)
{
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
}
-
+/*!
+ * @brief ¥í¥Ã¥É¤ò»È¤¦¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @return ¤Ê¤·
+ */
void do_cmd_zap_rod(void)
{
int item;
do_cmd_zap_rod_aux(item);
}
-
-/*
+/*!
+ * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤ò¥×¥ì¥¤¥ä¡¼¤¬ËâÆ»¶ñ¤È¤·¤Æȯư¤Ç¤¤ë¤«¤òȽÄꤹ¤ë /
* Hook to determine if an object is activatable
+ * @param o_ptr ȽÄꤷ¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ËâÆ»¶ñ¤È¤·¤Æȯư²Äǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
*/
static bool item_tester_hook_activate(object_type *o_ptr)
{
return (FALSE);
}
-
-/*
+/*!
+ * @brief ¡Ø°ì¤Ä¤Î»ØÎء٤θú²Ì½èÍý /
* Hack -- activate the ring of power
+ * @param dir ȯư¤ÎÊý¸þID
+ * @return ¤Ê¤·
*/
void ring_of_power(int dir)
{
}
}
-
+/*!
+ * @brief ¥Ú¥Ã¥ÈÆþ¤ê¥â¥ó¥¹¥¿¡¼¥Ü¡¼¥ë¤ò¥½¡¼¥È¤¹¤ë¤¿¤á¤ÎÈæ³Ó´Ø¿ô
+ * @param u ½ê»ýÉÊÇÛÎó¤Î»²¾È¥Ý¥¤¥ó¥¿
+ * @param v ̤»ÈÍÑ
+ * @param a ½ê»ýÉÊID1
+ * @param b ½ê»ýÉÊID2
+ * @return 1¤ÎÊý¤¬Âç¤Ç¤¢¤ì¤ÐTRUE
+ */
static bool ang_sort_comp_pet(vptr u, vptr v, int a, int b)
{
u16b *who = (u16b*)(u);
}
-/*
+/*!
+ * @brief ÁõÈ÷¤òȯư¤¹¤ë¥³¥Þ¥ó¥É¤Î¥µ¥Ö¥ë¡¼¥Á¥ó /
* Activate a wielded object. Wielded objects never stack.
* And even if they did, activatable objects never stack.
- *
+ * @param item ȯư¤¹¤ë¥ª¥Ö¥¸¥§¥¯¥È¤Î½ê»ýÉÊID
+ * @return ¤Ê¤·
+ * @details
+ * <pre>
* Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
* But one could, for example, easily make an activatable "Ring of Plasma".
- *
* Note that it always takes a turn to activate an artifact, even if
* the user hits "escape" at the "direction" prompt.
+ * </pre>
*/
static void do_cmd_activate_aux(int item)
{
}
-
+/*!
+ * @brief ÁõÈ÷¤òȯư¤¹¤ë¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * @return ¤Ê¤·
+ */
void do_cmd_activate(void)
{
int item;
}
-/*
+/*!
+ * @brief ¥ª¥Ö¥¸¥§¥¯¥È¤ò¥×¥ì¥¤¥ä¡¼¤¬´Ê°×»ÈÍÑ¥³¥Þ¥ó¥É¤ÇÍøÍѤǤ¤ë¤«¤òȽÄꤹ¤ë /
* Hook to determine if an object is useable
+ * @param o_ptr ȽÄꤷ¤¿¤¤¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return ÍøÍѲÄǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
*/
static bool item_tester_hook_use(object_type *o_ptr)
{
}
-/*
+/*!
+ * @brief ¥¢¥¤¥Æ¥à¤òÈÆÍÑŪ¤Ë¡Ö»È¤¦¡×¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
* Use an item
+ * @return ¤Ê¤·
+ * @details
* XXX - Add actions for other item types
*/
void do_cmd_use(void)
}
}
+/*!
+ * @brief ËâÆ»¶ñ½Ñ»Õ¤Î¼è¤ê¹þ¤ó¤ÀËâÎÏ°ìÍ÷¤«¤éÁªÂò/±ÜÍ÷¤¹¤ë /
+ * @param only_browse ±ÜÍ÷¤¹¤ë¤À¤±¤Ê¤é¤ÐTRUE
+ * @return ÁªÂò¤·¤¿ËâÎϤÎID¡¢¥¥ã¥ó¥»¥ë¤Ê¤é¤Ð-1¤òÊÖ¤¹
+ */
static int select_magic_eater(bool only_browse)
{
int ext=0;
}
-/*
- * Use eaten rod, wand or staff
+/*!
+ * @brief ¼è¤ê¹þ¤ó¤ÀËâÎϤòÍøÍѤ¹¤ë¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
+ * Use eaten rod, wand or staff
+ * @param only_browse ±ÜÍ÷¤¹¤ë¤À¤±¤Ê¤é¤ÐTRUE
+ * @param powerful ¶¯ÎÏȯưÃæ¤Î½èÍý¤Ê¤é¤ÐTRUE
+ * @return ¼ÂºÝ¤Ë¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤¿¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
bool do_cmd_magic_eater(bool only_browse, bool powerful)
{