-/* File: effects.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 effects.c
+ * @brief ¥×¥ì¥¤¥ä¡¼¤Î¥¹¥Æ¡¼¥¿¥¹´ÉÍý / effects of various "objects"
+ * @date 2014/01/01
+ * @author
+ * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
+ *\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
+ *\n
+ * 2013 Deskull rearranged comment for Doxygen.\n
*/
-/* Purpose: effects of various "objects" */
#include "angband.h"
+/*!
+ * @brief ¥×¥ì¥¤¥ä¡¼¤Î·Ñ³¹ÔÆ°¤òÀßÄꤹ¤ë¡£
+ * @param typ ·Ñ³¹ÔÆ°¤ÎID\n
+ * #ACTION_NONE / #ACTION_SEARCH / #ACTION_REST / #ACTION_LEARN / #ACTION_FISH / #ACTION_KAMAE / #ACTION_KATA / #ACTION_SING / #ACTION_HAYAGAKE / #ACTION_SPELL ¤«¤éÁªÂò¡£
+ * @return ¤Ê¤·
+ */
void set_action(int typ)
{
int prev_typ = p_ptr->action;
#else
msg_print("You are no longer walking extremely fast.");
#endif
+ energy_use = 100;
+ break;
+ }
+ case ACTION_SPELL:
+ {
+#ifdef JP
+ msg_print("¼öʸ¤Î±Ó¾§¤òÃæÃǤ·¤¿¡£");
+#else
+ msg_print("You stopped spelling all spells.");
+#endif
break;
}
}
/* If we are requested other action, stop singing */
if (prev_typ == ACTION_SING) stop_singing();
+ if (prev_typ == ACTION_SPELL) stop_hex_spell();
switch (p_ptr->action)
{
p_ptr->redraw |= (PR_STATE);
}
-/* reset timed flags */
+/*!
+ * @brief ¥×¥ì¥¤¥ä¡¼¤ÎÁ´¤Æ¤Î»þ¸Â¸ú²Ì¤ò¥ê¥»¥Ã¥È¤¹¤ë¡£ / reset timed flags
+ * @return ¤Ê¤·
+ */
void reset_tim_flags(void)
{
p_ptr->fast = 0; /* Timed -- Fast */
p_ptr->tim_sh_fire = 0;
p_ptr->tim_sh_holy = 0;
p_ptr->tim_eyeeye = 0;
+ p_ptr->magicdef = 0;
p_ptr->resist_magic = 0;
p_ptr->tsuyoshi = 0;
p_ptr->kabenuke = 0;
}
}
+/*!
+ * @brief ¥×¥ì¥¤¥ä¡¼¤ËËâÎϾõî¸ú²Ì¤òÍ¿¤¨¤ë¡£
+ * @return ¤Ê¤·
+ */
+void dispel_player(void)
+{
+ (void)set_fast(0, TRUE);
+ (void)set_lightspeed(0, TRUE);
+ (void)set_slow(0, TRUE);
+ (void)set_shield(0, TRUE);
+ (void)set_blessed(0, TRUE);
+ (void)set_tsuyoshi(0, TRUE);
+ (void)set_hero(0, TRUE);
+ (void)set_shero(0, TRUE);
+ (void)set_protevil(0, TRUE);
+ (void)set_invuln(0, TRUE);
+ (void)set_wraith_form(0, TRUE);
+ (void)set_kabenuke(0, TRUE);
+ (void)set_tim_res_nether(0, TRUE);
+ (void)set_tim_res_time(0, TRUE);
+ /* by henkma */
+ (void)set_tim_reflect(0,TRUE);
+ (void)set_multishadow(0,TRUE);
+ (void)set_dustrobe(0,TRUE);
+
+ (void)set_tim_invis(0, TRUE);
+ (void)set_tim_infra(0, TRUE);
+ (void)set_tim_esp(0, TRUE);
+ (void)set_tim_regen(0, TRUE);
+ (void)set_tim_stealth(0, TRUE);
+ (void)set_tim_levitation(0, TRUE);
+ (void)set_tim_sh_touki(0, TRUE);
+ (void)set_tim_sh_fire(0, TRUE);
+ (void)set_tim_sh_holy(0, TRUE);
+ (void)set_tim_eyeeye(0, TRUE);
+ (void)set_magicdef(0, TRUE);
+ (void)set_resist_magic(0, TRUE);
+ (void)set_oppose_acid(0, TRUE);
+ (void)set_oppose_elec(0, TRUE);
+ (void)set_oppose_fire(0, TRUE);
+ (void)set_oppose_cold(0, TRUE);
+ (void)set_oppose_pois(0, TRUE);
+ (void)set_ultimate_res(0, TRUE);
+ (void)set_mimic(0, 0, TRUE);
+ (void)set_ele_attack(0, 0);
+ (void)set_ele_immune(0, 0);
+
+ /* Cancel glowing hands */
+ if (p_ptr->special_attack & ATTACK_CONFUSE)
+ {
+ p_ptr->special_attack &= ~(ATTACK_CONFUSE);
+#ifdef JP
+ msg_print("¼ê¤Îµ±¤¤¬¤Ê¤¯¤Ê¤Ã¤¿¡£");
+#else
+ msg_print("Your hands stop glowing.");
+#endif
+ }
+
+ if (music_singing_any() || hex_spelling_any())
+ {
+#ifdef JP
+ cptr str = (music_singing_any()) ? "²Î" : "¼öʸ";
+#else
+ cptr str = (music_singing_any()) ? "singing" : "spelling";
+#endif
+ p_ptr->magic_num1[1] = p_ptr->magic_num1[0];
+ p_ptr->magic_num1[0] = 0;
+#ifdef JP
+ msg_format("%s¤¬ÅÓÀڤ줿¡£", str);
+#else
+ msg_format("Your %s is interrupted.", str);
+#endif
+ p_ptr->action = ACTION_NONE;
-/*
- * Set "p_ptr->tim_mimic", and "p_ptr->mimic_form",
- * notice observable changes
+ /* Recalculate bonuses */
+ p_ptr->update |= (PU_BONUS | PU_HP);
+
+ /* Redraw map */
+ p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
+
+ /* Update monsters */
+ p_ptr->update |= (PU_MONSTERS);
+
+ /* Window stuff */
+ p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+
+ p_ptr->energy_need += ENERGY_NEED();
+ }
+}
+
+
+/*!
+ * @brief Êѿȸú²Ì¤Î·Ñ³»þ´Ö¤ÈÊÑ¿ÈÀè¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_mimic", and "p_ptr->mimic_form", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param p ÊÑ¿ÈÆâÍÆ
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_mimic(int v, int p, bool do_dec)
{
return (FALSE);
/* Disturb */
- if (disturb_state)
- disturb(0, 0);
+ if (disturb_state) disturb(0, 1);
/* Redraw title */
p_ptr->redraw |= (PR_BASIC | PR_STATUS);
return (TRUE);
}
-/*
- * Set "p_ptr->blind", notice observable changes
- *
- * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to
- * memorize any terrain features which suddenly become "visible".
- * Note that blindness is currently the only thing which can affect
- * "player_can_see_bold()".
+/*!
+ * @brief ÌÕÌܤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->blind", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details
+ * Note the use of "PU_UN_LITE" and "PU_UN_VIEW", which is needed to\n
+ * memorize any terrain features which suddenly become "visible".\n
+ * Note that blindness is currently the only thing which can affect\n
+ * "player_can_see_bold()".\n
*/
bool set_blind(int v)
{
}
-/*
- * Set "p_ptr->confused", notice observable changes
+/*!
+ * @brief º®Íð¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->confused", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_confused(int v)
{
p_ptr->action = ACTION_NONE;
}
+ /* Sniper */
+ if (p_ptr->concent) reset_concentration(TRUE);
+
+ /* Hex */
+ if (hex_spelling_any()) stop_hex_spell_all();
+
notice = TRUE;
p_ptr->counter = FALSE;
chg_virtue(V_HARMONY, -1);
}
-/*
- * Set "p_ptr->poisoned", notice observable changes
+/*!
+ * @brief ÆǤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->poisoned", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_poisoned(int v)
{
}
-/*
- * Set "p_ptr->afraid", notice observable changes
+/*!
+ * @brief ¶²Éݤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->afraid", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_afraid(int v)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->paralyzed", notice observable changes
+/*!
+ * @brief Ëãáã¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->paralyzed", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_paralyzed(int v)
{
msg_print("You are paralyzed!");
#endif
+ /* Sniper */
+ if (p_ptr->concent) reset_concentration(TRUE);
+
+ /* Hex */
+ if (hex_spelling_any()) stop_hex_spell_all();
+
p_ptr->counter = FALSE;
notice = TRUE;
}
return (TRUE);
}
-
-/*
- * Set "p_ptr->image", notice observable changes
- *
- * Note that we must redraw the map when hallucination changes.
+/*!
+ * @brief ¸¸³Ð¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->image", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details Note that we must redraw the map when hallucination changes.
*/
bool set_image(int v)
{
msg_print("Oh, wow! Everything looks so cosmic now!");
#endif
+ /* Sniper */
+ if (p_ptr->concent) reset_concentration(TRUE);
+
p_ptr->counter = FALSE;
notice = TRUE;
}
if (!notice) return (FALSE);
/* Disturb */
- if (disturb_state) disturb(0, 0);
+ if (disturb_state) disturb(0, 1);
/* Redraw map */
p_ptr->redraw |= (PR_MAP);
+ /* Update the health bar */
+ p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
+
/* Update monsters */
p_ptr->update |= (PU_MONSTERS);
return (TRUE);
}
-
-/*
- * Set "p_ptr->fast", notice observable changes
+/*!
+ * @brief ²Ã®¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->fast", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_fast(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->lightspeed", notice observable changes
+/*!
+ * @brief ¸÷®°ÜÆ°¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->lightspeed", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_lightspeed(int v, bool do_dec)
{
if (p_ptr->is_dead) return FALSE;
+ if (p_ptr->wild_mode) v = 0;
+
/* Open */
if (v)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->slow", notice observable changes
+/*!
+ * @brief ¸ºÂ®¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->slow", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_slow(int v, bool do_dec)
{
}
-/*
- * Set "p_ptr->shield", notice observable changes
+/*!
+ * @brief È©Àв½¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->shield", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_shield(int v, bool do_dec)
{
}
-
-/*
- * Set "p_ptr->tsubureru", notice observable changes
+/*!
+ * @brief ¤Ä¤Ö¤ì¤ë¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tsubureru", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tsubureru(int v, bool do_dec)
{
}
-
-/*
- * Set "p_ptr->magicdef", notice observable changes
+/*!
+ * @brief ËâË¡¤Î³»¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->magicdef", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_magicdef(int v, bool do_dec)
{
return (TRUE);
}
-
-
-/*
- * Set "p_ptr->blessed", notice observable changes
+/*!
+ * @brief ½ËÊ¡¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->blessed", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_blessed(int v, bool do_dec)
{
}
-/*
- * Set "p_ptr->hero", notice observable changes
+/*!
+ * @brief »Îµ¤¹âÍȤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->hero", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_hero(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->shero", notice observable changes
+/*!
+ * @brief ¶¸Àï»Î²½¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->shero", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_shero(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->protevil", notice observable changes
+/*!
+ * @brief Âмٰ·ë³¦¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->protevil", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_protevil(int v, bool do_dec)
{
return (TRUE);
}
-/*
- * Set "p_ptr->wraith_form", notice observable changes
+/*!
+ * @brief Í©Âβ½¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->wraith_form", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_wraith_form(int v, bool do_dec)
{
}
-
-/*
- * Set "p_ptr->invuln", notice observable changes
+/*!
+ * @brief ̵½ýµå¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->invuln", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_invuln(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_esp", notice observable changes
+/*!
+ * @brief »þ¸ÂESP¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_esp", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_esp(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_invis", notice observable changes
+/*!
+ * @brief »þ¸ÂÆ©ÌÀ»ë¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_invis", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_invis(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_infra", notice observable changes
+/*!
+ * @brief »þ¸ÂÀÖ³°Àþ»ëÎϤηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_infra", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_infra(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_regen", notice observable changes
+/*!
+ * @brief »þ¸ÂµÞ²óÉü¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_regen", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_regen(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_stealth", notice observable changes
+/*!
+ * @brief ±£Ì©¤Î²Î¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_stealth", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_stealth(int v, bool do_dec)
{
return (TRUE);
}
-
+/*!
+ * @brief Ķ±£Ì©¾õÂÖ¤ò¥»¥Ã¥È¤¹¤ë
+ * @param set TRUE¤Ê¤é¤ÐĶ±£Ì©¾õÂ֤ˤʤ롣
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ */
bool set_superstealth(bool set)
{
bool notice = FALSE;
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_levitation", notice observable changes
+/*!
+ * @brief °ì»þŪÉâÍ·¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_levitation", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_levitation(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_sh_touki", notice observable changes
+/*!
+ * @brief °ì»þŪƮµ¤¤Î¥ª¡¼¥é¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_sh_touki", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_sh_touki(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_sh_fire", notice observable changes
+/*!
+ * @brief °ì»þŪ²Ð±ê¤Î¥ª¡¼¥é¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_sh_fire", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_sh_fire(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_sh_holy", notice observable changes
+/*!
+ * @brief °ì»þŪÀ»¤Ê¤ë¤Î¥ª¡¼¥é¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_sh_holy", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_sh_holy(int v, bool do_dec)
{
return (TRUE);
}
-
-
-/*
- * Set "p_ptr->tim_eyeeye", notice observable changes
+/*!
+ * @brief ÌܤˤÏÌܤò¤Î»Ä¤ê»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_eyeeye", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_eyeeye(int v, bool do_dec)
{
}
-
-/*
- * Set "p_ptr->resist_magic", notice observable changes
+/*!
+ * @brief °ì»þŪËâË¡Ëɸæ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->resist_magic", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_resist_magic(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_reflect", notice observable changes
+/*!
+ * @brief °ì»þŪȿ¼Í¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tim_reflect", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_tim_reflect(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->dustrobe", notice observable changes
+/*!
+ * @brief °ì»þŪÇËÊҤΥª¡¼¥é¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->dustrobe", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_dustrobe(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->tim_regen", notice observable changes
+/*!
+ * @brief °ì»þŪÊÉÈ´¤±¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->kabenuke", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_kabenuke(int v, bool do_dec)
{
return (TRUE);
}
-
+/*!
+ * @brief ¥ª¥¯¥ì·»¤µ¤ó¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->tsuyoshi", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ */
bool set_tsuyoshi(int v, bool do_dec)
{
bool notice = FALSE;
return (TRUE);
}
-
-/*
- * Set a temporary elemental brand. Clear all other brands. Print status
- * messages. -LM-
+/*!
+ * @brief °ì»þŪ¸µÁÇ¥¹¥ì¥¤¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set a temporary elemental brand. Clear all other brands. Print status messages. -LM-
+ * @param attack_type ¥¹¥ì¥¤¤Î¥¿¥¤¥×ID
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_ele_attack(u32b attack_type, int v)
{
return (TRUE);
}
-
-/*
- * Set a temporary elemental brand. Clear all other brands. Print status
- * messages. -LM-
+/*!
+ * @brief °ì»þŪ¸µÁÇÌȱ֤ηѳ»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set a temporary elemental brand. Clear all other brands. Print status messages. -LM-
+ * @param immune_type Ìȱ֤Υ¿¥¤¥×ID
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_ele_immune(u32b immune_type, int v)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->oppose_acid", notice observable changes
+/*!
+ * @brief °ì»þŪ»ÀÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_acid", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_oppose_acid(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->oppose_elec", notice observable changes
+/*!
+ * @brief °ì»þŪÅÅ·âÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_elec", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_oppose_elec(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->oppose_fire", notice observable changes
+/*!
+ * @brief °ì»þŪ²Ð±êÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_fire", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_oppose_fire(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->oppose_cold", notice observable changes
+/*!
+ * @brief °ì»þŪÎ䵤ÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_cold", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_oppose_cold(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->oppose_pois", notice observable changes
+/*!
+ * @brief °ì»þŪÆÇÂÑÀ¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->oppose_pois", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @param do_dec ¸½ºß¤Î·Ñ³»þ´Ö¤è¤êŤ¤ÃͤΤ߾å½ñ¤¤¹¤ë
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool set_oppose_pois(int v, bool do_dec)
{
return (TRUE);
}
-
-/*
- * Set "p_ptr->stun", notice observable changes
- *
+/*!
+ * @brief Û¯Û°¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->stun", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details
* Note the special code to only notice "range" changes.
*/
bool set_stun(int v)
p_ptr->action = ACTION_NONE;
}
+ /* Sniper */
+ if (p_ptr->concent) reset_concentration(TRUE);
+
+ /* Hex */
+ if (hex_spelling_any()) stop_hex_spell_all();
+
/* Notice */
notice = TRUE;
}
}
-/*
- * Set "p_ptr->cut", notice observable changes
- *
+/*!
+ * @brief ½Ð·ì¤Î·Ñ³»þ´Ö¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->cut", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details
* Note the special code to only notice "range" changes.
*/
bool set_cut(int v)
return (TRUE);
}
-
-/*
- * Set "p_ptr->food", notice observable changes
- *
+/*!
+ * @brief ¶õÊ¢¾õÂÖ¤ò¥»¥Ã¥È¤¹¤ë / Set "p_ptr->food", notice observable changes
+ * @param v ·Ñ³»þ´Ö
+ * @return ¥¹¥Æ¡¼¥¿¥¹¤Ë±Æ¶Á¤òµÚ¤Ü¤¹ÊѲ½¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details
+ * Set "", notice observable changes\n
+ *\n
* The "p_ptr->food" variable can get as large as 20000, allowing the
* addition of the most "filling" item, Elvish Waybread, which adds
- * 7500 food units, without overflowing the 32767 maximum limit.
- *
+ * 7500 food units, without overflowing the 32767 maximum limit.\n
+ *\n
* Perhaps we should disturb the player with various messages,
- * especially messages about hunger status changes. XXX XXX XXX
- *
+ * especially messages about hunger status changes. XXX XXX XXX\n
+ *\n
* Digestion of food is handled in "dungeon.c", in which, normally,
* the player digests about 20 food units per 100 game turns, more
* when "fast", more when "regenerating", less with "slow digestion",
* but when the player is "gorged", he digests 100 food units per 10
- * game turns, or a full 1000 food units per 100 game turns.
- *
+ * game turns, or a full 1000 food units per 100 game turns.\n
+ *\n
* Note that the player's speed is reduced by 10 units while gorged,
* so if the player eats a single food ration (5000 food units) when
* full (15000 food units), he will be gorged for (5000/100)*10 = 500
* game turns, or 500/(100/5) = 25 player turns (if nothing else is
- * affecting the player speed).
+ * affecting the player speed).\n
*/
bool set_food(int v)
{
return (TRUE);
}
-/*
- * Increases a stat by one randomized level -RAK-
- *
- * Note that this function (used by stat potions) now restores
- * the stat BEFORE increasing it.
+/*!
+ * @brief ¥×¥ì¥¤¥ä¡¼¤Î´ðËÜǽÎÏÃͤòÁý²Ã¤µ¤»¤ë / Increases a stat by one randomized level -RAK-
+ * @param stat ¾å¾º¤µ¤»¤ë¥¹¥Æ¡¼¥¿¥¹ID
+ * @return ¼ÂºÝ¤Ë¾å¾º¤·¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details
+ * Note that this function (used by stat potions) now restores\n
+ * the stat BEFORE increasing it.\n
*/
bool inc_stat(int stat)
{
return (FALSE);
}
-
-
-/*
- * Decreases a stat by an amount indended to vary from 0 to 100 percent.
- *
- * Amount could be a little higher in extreme cases to mangle very high
- * stats from massive assaults. -CWS
- *
- * Note that "permanent" means that the *given* amount is permanent,
- * not that the new value becomes permanent. This may not work exactly
- * as expected, due to "weirdness" in the algorithm, but in general,
- * if your stat is already drained, the "max" value will not drop all
- * the way down to the "cur" value.
+/*!
+ * @brief ¥×¥ì¥¤¥ä¡¼¤Î´ðËÜǽÎÏÃͤò¸º¾¯¤µ¤»¤ë / Decreases a stat by an amount indended to vary from 0 to 100 percent.
+ * @param stat ¸º¾¯¤µ¤»¤ë¥¹¥Æ¡¼¥¿¥¹ID
+ * @param amount ¸º¾¯¤µ¤»¤ë´ðËÜÎÌ
+ * @param permanent TRUE¤Ê¤é¤Ð¸½ºß¤ÎºÇÂçÃͤò¸º¾¯¤µ¤»¤ë
+ * @return ¼ÂºÝ¤Ë¸º¾¯¤·¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
+ * @details
+ *\n
+ * Amount could be a little higher in extreme cases to mangle very high\n
+ * stats from massive assaults. -CWS\n
+ *\n
+ * Note that "permanent" means that the *given* amount is permanent,\n
+ * not that the new value becomes permanent. This may not work exactly\n
+ * as expected, due to "weirdness" in the algorithm, but in general,\n
+ * if your stat is already drained, the "max" value will not drop all\n
+ * the way down to the "cur" value.\n
*/
bool dec_stat(int stat, int amount, int permanent)
{
}
-/*
- * Restore a stat. Return TRUE only if this actually makes a difference.
+/*!
+ * @brief ¥×¥ì¥¤¥ä¡¼¤Î´ðËÜǽÎÏÃͤò²óÉü¤µ¤»¤ë / Restore a stat. Return TRUE only if this actually makes a difference.
+ * @param stat ²óÉü¥¹¥Æ¡¼¥¿¥¹ID
+ * @return ¼ÂºÝ¤Ë²óÉü¤·¤¿¾ì¹çTRUE¤òÊÖ¤¹¡£
*/
bool res_stat(int stat)
{
{
/* Message */
#ifdef JP
-msg_print("À¸Ì¿ÎϤ¬Ìá¤Ã¤Æ¤¤¿µ¤¤¬¤¹¤ë¡£");
+msg_print("·Ð¸³Ãͤ¬Ìá¤Ã¤Æ¤¤¿µ¤¤¬¤¹¤ë¡£");
#else
- msg_print("You feel your life energies returning.");
+ msg_print("You feel your experience returning.");
#endif
if ((power > randint0(20)) && one_in_(3) && (p_ptr->prace != RACE_ANDROID))
{
char effect_msg[80] = "";
- int new_race, expfact, goalexpfact;
+ int new_race;
/* Some form of racial polymorph... */
power -= 10;
}
- /*
- * Restrict the race choices by exp penalty so
- * weak polymorph always means weak race
- */
- if (power < 0)
- goalexpfact = 100;
- else
- goalexpfact = 100 + 3 * randint0(power);
-
do
{
new_race = randint0(MAX_RACES);
- expfact = race_info[new_race].r_exp;
}
- while (((new_race == p_ptr->prace) && (expfact > goalexpfact)) || (new_race == RACE_ANDROID));
+ while ((new_race == p_ptr->prace) || (new_race == RACE_ANDROID));
change_race(new_race, effect_msg);
}
if (damage_type != DAMAGE_USELIFE)
{
/* Disturb */
- disturb(1, 0);
+ disturb(1, 1);
if (auto_more)
{
now_damaged = TRUE;
}
}
- /* Multishadow effects is determined by turn */
- if (p_ptr->multishadow && (turn & 1))
+ if (CHECK_MULTISHADOW())
{
if (damage_type == DAMAGE_FORCE)
{
/* Window stuff */
p_ptr->window |= (PW_PLAYER);
- handle_stuff();
-
if (damage_type != DAMAGE_GENO && p_ptr->chp == 0)
{
chg_virtue(V_SACRIFICE, 1);
/* Dead player */
if (p_ptr->chp < 0)
{
- char buf[10];
bool android = (p_ptr->prace == RACE_ANDROID ? TRUE : FALSE);
#ifdef JP /* »à¤ó¤À»þ¤Ë¶¯À©½ªÎ»¤·¤Æ»à¤ò²óÈò¤Ç¤¤Ê¤¯¤·¤Æ¤ß¤¿ by Habu */
chg_virtue(V_SACRIFICE, 10);
+ handle_stuff();
+
/* Leaving */
p_ptr->leaving = TRUE;
else
{
int q_idx = quest_number(dun_level);
+ bool seppuku = streq(hit_from, "Seppuku");
+ bool winning_seppuku = p_ptr->total_winner && seppuku;
+
+ play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_GAMEOVER);
#ifdef WORLD_SCORE
/* Make screen dump */
#endif
/* Note cause of death */
+ if (seppuku)
+ {
+ strcpy(p_ptr->died_from, hit_from);
+#ifdef JP
+ if (!winning_seppuku) strcpy(p_ptr->died_from, "ÀÚÊ¢");
+#endif
+ }
+ else
+ {
+ char dummy[1024];
#ifdef JP
- sprintf(p_ptr->died_from, "%s%s%s", !p_ptr->paralyzed ? "" : p_ptr->free_act ? "ĦÁü¾õÂÖ¤Ç":"Ëãáã¾õÂÖ¤Ç", p_ptr->image ? "¸¸³Ð¤ËÏĤó¤À" : "", hit_from);
+ sprintf(dummy, "%s%s%s", !p_ptr->paralyzed ? "" : p_ptr->free_act ? "ĦÁü¾õÂÖ¤Ç" : "Ëãáã¾õÂÖ¤Ç", p_ptr->image ? "¸¸³Ð¤ËÏĤó¤À" : "", hit_from);
#else
- sprintf(p_ptr->died_from, "%s%s", hit_from, !p_ptr->paralyzed ? "" : " while helpless");
+ sprintf(dummy, "%s%s", hit_from, !p_ptr->paralyzed ? "" : " while helpless");
#endif
+ my_strcpy(p_ptr->died_from, dummy, sizeof p_ptr->died_from);
+ }
/* No longer a winner */
p_ptr->total_winner = FALSE;
- if (p_ptr->inside_arena)
+ if (winning_seppuku)
+ {
#ifdef JP
- strcpy(buf,"¥¢¥ê¡¼¥Ê");
+ do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "¾¡Íø¤Î¸åÀÚÊ¢¤·¤¿¡£");
#else
- strcpy(buf,"in the Arena");
+ do_cmd_write_nikki(NIKKI_BUNSHOU, 0, "did Seppuku after the winning.");
#endif
- else if (!dun_level)
+ }
+ else
+ {
+ char buf[20];
+
+ if (p_ptr->inside_arena)
#ifdef JP
- strcpy(buf,"ÃϾå");
+ strcpy(buf,"¥¢¥ê¡¼¥Ê");
#else
- strcpy(buf,"on the surface");
+ strcpy(buf,"in the Arena");
#endif
- else if (q_idx && (is_fixed_quest_idx(q_idx) &&
- !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
+ else if (!dun_level)
#ifdef JP
- strcpy(buf,"¥¯¥¨¥¹¥È");
+ strcpy(buf,"ÃϾå");
#else
- strcpy(buf,"in a quest");
+ strcpy(buf,"on the surface");
#endif
- else
+ else if (q_idx && (is_fixed_quest_idx(q_idx) &&
+ !((q_idx == QUEST_OBERON) || (q_idx == QUEST_SERPENT))))
#ifdef JP
- sprintf(buf,"%d³¬", dun_level);
+ strcpy(buf,"¥¯¥¨¥¹¥È");
#else
- sprintf(buf,"level %d", dun_level);
+ strcpy(buf,"in a quest");
#endif
+ else
#ifdef JP
- sprintf(tmp,"%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£",buf, p_ptr->died_from);
+ sprintf(buf,"%d³¬", dun_level);
#else
- sprintf(tmp,"killed by %s %s.", p_ptr->died_from, buf);
+ sprintf(buf,"level %d", dun_level);
#endif
- do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
+
+#ifdef JP
+ sprintf(tmp, "%s¤Ç%s¤Ë»¦¤µ¤ì¤¿¡£", buf, p_ptr->died_from);
+#else
+ sprintf(tmp, "killed by %s %s.", p_ptr->died_from, buf);
+#endif
+ do_cmd_write_nikki(NIKKI_BUNSHOU, 0, tmp);
+ }
+
#ifdef JP
do_cmd_write_nikki(NIKKI_GAMESTART, 1, "-------- ¥²¡¼¥à¥ª¡¼¥Ð¡¼ --------");
#else
flush();
#ifdef JP
-if (get_check_strict("²èÌ̤òÊݸ¤·¤Þ¤¹¤«¡©", CHECK_NO_HISTORY))
+ if (get_check_strict("²èÌ̤òÊݸ¤·¤Þ¤¹¤«¡©", CHECK_NO_HISTORY))
#else
if (get_check_strict("Dump the screen? ", CHECK_NO_HISTORY))
#endif
-
{
do_cmd_save_screen();
}
if (!last_words)
{
#ifdef JP
-msg_format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë");
+ msg_format("¤¢¤Ê¤¿¤Ï%s¤Þ¤·¤¿¡£", android ? "²õ¤ì" : "»à¤Ë");
#else
msg_print(android ? "You are broken." : "You die.");
#endif
}
else
{
- if (streq(p_ptr->died_from, "Seppuku"))
+ if (winning_seppuku)
{
#ifdef JP
- get_rnd_line("seppuku_j.txt", 0, death_message);
+ get_rnd_line("seppuku_j.txt", 0, death_message);
#else
get_rnd_line("seppuku.txt", 0, death_message);
#endif
else
{
#ifdef JP
-get_rnd_line("death_j.txt", 0, death_message);
+ get_rnd_line("death_j.txt", 0, death_message);
#else
get_rnd_line("death.txt", 0, death_message);
#endif
}
+
+ do
+ {
+#ifdef JP
+ while (!get_string(winning_seppuku ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
+#else
+ while (!get_string("Last word: ", death_message, 1024)) ;
+#endif
+ }
#ifdef JP
- while (!get_string(streq(p_ptr->died_from, "Seppuku") ? "¼À¤¤Î¶ç: " : "ÃÇËöËâ¤Î¶«¤Ó: ", death_message, 1024)) ;
+ while (winning_seppuku && !get_check_strict("¤è¤í¤·¤¤¤Ç¤¹¤«¡©", CHECK_NO_HISTORY));
#else
- while (!get_string("Last word: ", death_message, 1024)) ;
+ while (winning_seppuku && !get_check_strict("Are you sure? ", CHECK_NO_HISTORY));
#endif
+
if (death_message[0] == '\0')
{
#ifdef JP
}
else p_ptr->last_message = string_make(death_message);
- if (streq(p_ptr->died_from, "Seppuku"))
- {
#ifdef JP
- int i, len;
- int w = Term->wid;
- int h = Term->hgt;
- int msg_pos_x[9] = { 5, 7, 9, 12, 14, 17, 19, 21, 23};
- int msg_pos_y[9] = { 3, 4, 5, 4, 5, 4, 5, 6, 4};
- cptr str;
- char* str2;
-
- Term_clear();
-
- /* ºù»¶¤ë */
- for (i = 0; i < 40; i++)
- Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "¦Ô");
-
- str = death_message;
- if (strncmp(str, "¡Ö", 2) == 0) str += 2;
-
- str2 = my_strstr(str, "¡×");
- if (str2 != NULL) *str2 = '\0';
-
- i = 0;
- while (i < 9)
- {
- str2 = my_strstr(str, " ");
- if (str2 == NULL) len = strlen(str);
- else len = str2 - str;
-
- if (len != 0)
- {
- Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len,
- TERM_WHITE, str);
- if (str2 == NULL) break;
- i++;
- }
- str = str2 + 1;
- if (*str == 0) break;
- }
-
- /* Hide cursor */
- Term_putstr(w-1, h-1, 1, TERM_WHITE, " ");
-
- flush();
+ if (winning_seppuku)
+ {
+ int i, len;
+ int w = Term->wid;
+ int h = Term->hgt;
+ int msg_pos_x[9] = { 5, 7, 9, 12, 14, 17, 19, 21, 23};
+ int msg_pos_y[9] = { 3, 4, 5, 4, 5, 4, 5, 6, 4};
+ cptr str;
+ char* str2;
+
+ Term_clear();
+
+ /* ºù»¶¤ë */
+ for (i = 0; i < 40; i++)
+ Term_putstr(randint0(w / 2) * 2, randint0(h), 2, TERM_VIOLET, "¦Ô");
+
+ str = death_message;
+ if (strncmp(str, "¡Ö", 2) == 0) str += 2;
+
+ str2 = my_strstr(str, "¡×");
+ if (str2 != NULL) *str2 = '\0';
+
+ i = 0;
+ while (i < 9)
+ {
+ str2 = my_strstr(str, " ");
+ if (str2 == NULL) len = strlen(str);
+ else len = str2 - str;
+
+ if (len != 0)
+ {
+ Term_putstr_v(w * 3 / 4 - 2 - msg_pos_x[i] * 2, msg_pos_y[i], len,
+ TERM_WHITE, str);
+ if (str2 == NULL) break;
+ i++;
+ }
+ str = str2 + 1;
+ if (*str == 0) break;
+ }
+
+ /* Hide cursor */
+ Term_putstr(w-1, h-1, 1, TERM_WHITE, " ");
+
+ flush();
#ifdef WORLD_SCORE
- /* Make screen dump */
- screen_dump = make_screen_dump();
+ /* Make screen dump */
+ screen_dump = make_screen_dump();
#endif
- /* Wait a key press */
- (void)inkey();
-#else
- msg_print(death_message);
-#endif
+ /* Wait a key press */
+ (void)inkey();
}
else
+#endif
msg_print(death_message);
}
}
return damage;
}
+ handle_stuff();
+
/* Hitpoint warning */
if (p_ptr->chp < warning)
{
#endif
#ifdef JP
- sprintf(tmp,"%s¤Ë¤è¤Ã¤Æ¥Ô¥ó¥Á¤Ë´Ù¤¤¤Ã¤¿¡£",hit_from);
+ sprintf(tmp,"%s¤Ë¤è¤Ã¤Æ¥Ô¥ó¥Á¤Ë´Ù¤Ã¤¿¡£",hit_from);
#else
sprintf(tmp,"A critical situation because of %s.",hit_from);
#endif
* Drain experience
* If resisted to draining, return FALSE
*/
-bool drain_exp(s32b drain, s32b slip, int hold_life_prob)
+bool drain_exp(s32b drain, s32b slip, int hold_exp_prob)
{
/* Androids and their mimics are never drained */
if (p_ptr->prace == RACE_ANDROID) return FALSE;
- if (p_ptr->hold_life && (randint0(100) < hold_life_prob))
+ if (p_ptr->hold_exp && (randint0(100) < hold_exp_prob))
{
/* Hold experience */
#ifdef JP
- msg_print("¤·¤«¤·¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¼é¤ê¤¤Ã¤¿¡ª");
+ msg_print("¤·¤«¤·¼«¸Ê¤Î·Ð¸³Ãͤò¼é¤ê¤¤Ã¤¿¡ª");
#else
- msg_print("You keep hold of your life force!");
+ msg_print("You keep hold of your experience!");
#endif
return FALSE;
}
/* Hold experience failed */
- if (p_ptr->hold_life)
+ if (p_ptr->hold_exp)
{
#ifdef JP
- msg_print("À¸Ì¿ÎϤò¾¯¤·µÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
+ msg_print("·Ð¸³Ãͤò¾¯¤·µÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
#else
- msg_print("You feel your life slipping away!");
+ msg_print("You feel your experience slipping away!");
#endif
lose_exp(slip);
}
else
{
#ifdef JP
- msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
+ msg_print("·Ð¸³Ãͤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
#else
- msg_print("You feel your life draining away!");
+ msg_print("You feel your experience draining away!");
#endif
lose_exp(drain);
}