-/* File: mspells1.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 mspells1.c
+ * @brief ¥â¥ó¥¹¥¿¡¼ËâË¡¤Î¼ÂÁõ / Monster spells (attack player)
+ * @date 2014/01/17
+ * @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
+ * @details
+ * And now for Intelligent monster attacks (including spells).\n
+ *\n
+ * Original idea and code by "DRS" (David Reeves Sward).\n
+ * Major modifications by "BEN" (Ben Harrison).\n
+ *\n
+ * Give monsters more intelligent attack/spell selection based on\n
+ * observations of previous attacks on the player, and/or by allowing\n
+ * the monster to "cheat" and know the player status.\n
+ *\n
+ * Maintain an idea of the player status, and use that information\n
+ * to occasionally eliminate "ineffective" spell attacks. We could\n
+ * also eliminate ineffective normal attacks, but there is no reason\n
+ * for the monster to do this, since he gains no benefit.\n
+ * Note that MINDLESS monsters are not allowed to use this code.\n
+ * And non-INTELLIGENT monsters only use it partially effectively.\n
+ *\n
+ * Actually learn what the player resists, and use that information\n
+ * to remove attacks or spells before using them. This will require\n
+ * much less space, if I am not mistaken. Thus, each monster gets a\n
+ * set of 32 bit flags, "smart", build from the various "SM_*" flags.\n
+ *\n
+ * This has the added advantage that attacks and spells are related.\n
+ * The "smart_learn" option means that the monster "learns" the flags\n
+ * that should be set, and "smart_cheat" means that he "knows" them.\n
+ * So "smart_cheat" means that the "smart" field is always up to date,\n
+ * while "smart_learn" means that the "smart" field is slowly learned.\n
+ * Both of them have the same effect on the "choose spell" routine.\n
*/
-/* Purpose: Monster spells (attack player) */
-
#include "angband.h"
-/*
- * And now for Intelligent monster attacks (including spells).
- *
- * Original idea and code by "DRS" (David Reeves Sward).
- * Major modifications by "BEN" (Ben Harrison).
- *
- * Give monsters more intelligent attack/spell selection based on
- * observations of previous attacks on the player, and/or by allowing
- * the monster to "cheat" and know the player status.
- *
- * Maintain an idea of the player status, and use that information
- * to occasionally eliminate "ineffective" spell attacks. We could
- * also eliminate ineffective normal attacks, but there is no reason
- * for the monster to do this, since he gains no benefit.
- * Note that MINDLESS monsters are not allowed to use this code.
- * And non-INTELLIGENT monsters only use it partially effectively.
- *
- * Actually learn what the player resists, and use that information
- * to remove attacks or spells before using them. This will require
- * much less space, if I am not mistaken. Thus, each monster gets a
- * set of 32 bit flags, "smart", build from the various "SM_*" flags.
- *
- * This has the added advantage that attacks and spells are related.
- * The "smart_learn" option means that the monster "learns" the flags
- * that should be set, and "smart_cheat" means that he "knows" them.
- * So "smart_cheat" means that the "smart" field is always up to date,
- * while "smart_learn" means that the "smart" field is slowly learned.
- * Both of them have the same effect on the "choose spell" routine.
- */
-
-
-
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤Î¼åÅÀ¤ò¤Ä¤¤¤¿ÁªÂò¤ò¼è¤ë¤«¤É¤¦¤«¤ÎȽÄê /
* Internal probability routine
+ * @param r_ptr ¥â¥ó¥¹¥¿¡¼¼ï²¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param prob ´ðËܳÎΨ(%)
+ * @return Ŭ¤·¤¿ÁªÂò¤ò¼è¤ë¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool int_outof(monster_race *r_ptr, int prob)
{
}
-
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤ÎËâË¡°ìÍ÷¤«¤éÀï½ÑŪ¤ËŬ¤µ¤Ê¤¤ËâË¡¤ò½ü³°¤¹¤ë /
* Remove the "bad" spells from a spell list
+ * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @param f4p ¥â¥ó¥¹¥¿¡¼ËâË¡¤Î¥Õ¥é¥°¥ê¥¹¥È1
+ * @param f5p ¥â¥ó¥¹¥¿¡¼ËâË¡¤Î¥Õ¥é¥°¥ê¥¹¥È2
+ * @param f6p ¥â¥ó¥¹¥¿¡¼ËâË¡¤Î¥Õ¥é¥°¥ê¥¹¥È3
+ * @return ¤Ê¤·
*/
static void remove_bad_spells(int m_idx, u32b *f4p, u32b *f5p, u32b *f6p)
{
}
-/*
- * Determine if there is a space near the player in which
- * a summoned creature can appear
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Ë¤È¤Ã¤Æ½êÄê¤ÎÃÏÅÀ¤¬¾¤´Ô¤ËÁê±þ¤·¤¤ÃÏÅÀ¤«¤É¤¦¤«¤òÊÖ¤¹¡£ /
+ * Determine if there is a space near the player in which a summoned creature can appear
+ * @param y1 ȽÄê¤ò¹Ô¤¤¤¿¤¤¥Þ¥¹¤ÎYºÂɸ
+ * @param x1 ȽÄê¤ò¹Ô¤¤¤¿¤¤¥Þ¥¹¤ÎXºÂɸ
+ * @return ¾¤´Ô¤ËÁê±þ¤·¤¤¤Ê¤é¤ÐTRUE¤òÊÖ¤¹
*/
bool summon_possible(int y1, int x1)
{
}
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Ë¤È¤Ã¤Æ»à¼ÔÉü³è¤ò¹Ô¤¦¤Ù¤¾õÂÖ¤«¤É¤¦¤«¤òÊÖ¤¹ /
+ * Determine if there is a space near the player in which a summoned creature can appear
+ * @param m_ptr ȽÄê¤ò¹Ô¤¤¤¿¤¤¥â¥ó¥¹¥¿¡¼¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return »à¼ÔÉü³è¤¬Í¸ú¤Ê¾õÂ֤ʤé¤ÐTRUE¤òÊÖ¤¹¡£
+ */
bool raise_possible(monster_type *m_ptr)
{
int xx, yy;
}
-/*
- * Originally, it was possible for a friendly to shoot another friendly.
- * Change it so a "clean shot" means no equally friendly monster is
- * between the attacker and target.
- */
-/*
+
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Ë¤È¤Ã¤Æ¥Ü¥ë¥È·¿ËâË¡¤¬Í¸ú¤Ê¾õÂÖ¤«¤òÊÖ¤¹ /
* Determine if a bolt spell will hit the player.
- *
- * This is exactly like "projectable", but it will
- * return FALSE if a monster is in the way.
- * no equally friendly monster is
- * between the attacker and target.
+ * @param y1 ¥Ü¥ë¥ÈËâˡȯ¼ÍÃÏÅÀ¤ÎYºÂɸ
+ * @param x1 ¥Ü¥ë¥ÈËâˡȯ¼ÍÃÏÅÀ¤ÎXºÂɸ
+ * @param y2 ¥Ü¥ë¥ÈËâË¡ÌÜɸÃÏÅÀ¤ÎYºÂɸ
+ * @param x2 ¥Ü¥ë¥ÈËâË¡ÌÜɸÃÏÅÀ¤ÎXºÂɸ
+ * @param is_friend ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤Ë³²°Õ¤ò»ý¤¿¤Ê¤¤(¥Ú¥Ã¥È¤«Í§¹¥Åª)¤Ê¤é¤ÐTRUE¤ò¤Ä¤±¤ë
+ * @return ¥Ü¥ë¥È·¿ËâË¡¤¬Í¸ú¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
+ * @details
+ * Originally, it was possible for a friendly to shoot another friendly.\n
+ * Change it so a "clean shot" means no equally friendly monster is\n
+ * between the attacker and target.\n
+ *\n
+ * This is exactly like "projectable", but it will\n
+ * return FALSE if a monster is in the way.\n
+ * no equally friendly monster is\n
+ * between the attacker and target.\n
*/
-bool clean_shot(int y1, int x1, int y2, int x2, bool friend)
+bool clean_shot(int y1, int x1, int y2, int x2, bool is_friend)
{
/* Must be the same as projectable() */
if ((cave[y][x].m_idx > 0) && !((y == y2) && (x == x2)))
{
monster_type *m_ptr = &m_list[cave[y][x].m_idx];
- if (friend == is_pet(m_ptr))
+ if (is_friend == is_pet(m_ptr))
{
return (FALSE);
}
/* Pets may not shoot through the character - TNB */
if (player_bold(y, x))
{
- if (friend) return (FALSE);
+ if (is_friend) return (FALSE);
}
}
return (TRUE);
}
-/*
- * Cast a bolt at the player
- * Stop if we hit a monster
- * Affect monsters and the player
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Î¥Ü¥ë¥È·¿ËâË¡½èÍý /
+ * Cast a bolt at the player Stop if we hit a monster Affect monsters and the player
+ * @param m_idx ¥â¥ó¥¹¥¿¡¼¤ÎID
+ * @param typ ¸ú²Ì°ÀID
+ * @param dam_hp °ÒÎÏ
+ * @param monspell ¥â¥ó¥¹¥¿¡¼ËâË¡¤ÎID
+ * @param learnable ¥é¡¼¥Ë¥ó¥°²Äǽ¤«Èݤ«
+ * @return ¤Ê¤·
*/
static void bolt(int m_idx, int typ, int dam_hp, int monspell, bool learnable)
{
- int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_PLAYER | PROJECT_REFLECTABLE;
+ int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_PLAYER;
+ if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
/* Target the player with a bolt attack */
(void)project(m_idx, 0, py, px, dam_hp, typ, flg, (learnable ? monspell : -1));
}
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Î¥Ó¡¼¥à·¿ËâË¡½èÍý /
+ * @param m_idx ¥â¥ó¥¹¥¿¡¼¤ÎID
+ * @param typ ¸ú²Ì°ÀID
+ * @param dam_hp °ÒÎÏ
+ * @param monspell ¥â¥ó¥¹¥¿¡¼ËâË¡¤ÎID
+ * @param learnable ¥é¡¼¥Ë¥ó¥°²Äǽ¤«Èݤ«
+ * @return ¤Ê¤·
+ */
static void beam(int m_idx, int typ, int dam_hp, int monspell, bool learnable)
{
int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_THRU | PROJECT_PLAYER;
}
-/*
- * Cast a breath (or ball) attack at the player
- * Pass over any monsters that may be in the way
- * Affect grids, objects, monsters, and the player
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Î¥Ü¡¼¥ë·¿¡õ¥Ö¥ì¥¹·¿ËâË¡½èÍý /
+ * Cast a breath (or ball) attack at the player Pass over any monsters that may be in the way Affect grids, objects, monsters, and the player
+ * @param y ÌÜɸÃÏÅÀ¤ÎYºÂɸ
+ * @param x ÌÜɸÃÏÅÀ¤ÎXºÂɸ
+ * @param m_idx ¥â¥ó¥¹¥¿¡¼¤ÎID
+ * @param typ ¸ú²Ì°ÀID
+ * @param dam_hp °ÒÎÏ
+ * @param rad Ⱦ·Â
+ * @param breath TRUE¤Ê¤é¤Ð¥Ö¥ì¥¹½èÍý¡¢FALSE¤Ê¤é¤Ð¥Ü¡¼¥ë½èÍý
+ * @param monspell ¥â¥ó¥¹¥¿¡¼ËâË¡¤ÎID
+ * @param learnable ¥é¡¼¥Ë¥ó¥°²Äǽ¤«Èݤ«
+ * @return ¤Ê¤·
*/
static void breath(int y, int x, int m_idx, int typ, int dam_hp, int rad, bool breath, int monspell, bool learnable)
{
(void)project(m_idx, rad, y, x, dam_hp, typ, flg, (learnable ? monspell : -1));
}
-
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤Î¥Ü¡¼¥ë·¿¡õ¥Ö¥ì¥¹·¿ËâË¡½èÍý /
+ * @param power ¼ö¤¤¤ÎÃʳ¬
+ * @param o_ptr ¼ö¤¤¤ò¤«¤±¤é¤ì¤ëÁõÈ÷¥ª¥Ö¥¸¥§¥¯¥È¤Î¹½Â¤Âλ²¾È¥Ý¥¤¥ó¥¿
+ * @return Í¿¤¨¤ë¼ö¤¤¤ÎID
+ */
u32b get_curse(int power, object_type *o_ptr)
{
u32b new_curse;
return new_curse;
}
+/*!
+ * @brief ÁõÈ÷¤Ø¤Î¼ö¤¤ÉÕ²ÃȽÄê¤ÈÉղýèÍý /
+ * @param chance ¼ö¤¤¤Î´ðËܳÎΨ
+ * @param heavy_chance ½Å¤¤¼ö¤¤¤òÁªÂò»è¤ËÆþ¤ì¤ë¤«Èݤ«¡£
+ * @return ¤Ê¤·
+ */
void curse_equipment(int chance, int heavy_chance)
{
bool changed = FALSE;
}
-/*
+/*!
+ * @brief IDÃͤ¬Àµ¤·¤¤¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell is good for hurting the player (directly).
+ * @param spell ȽÄêÂоݤÎID
+ * @return Àµ¤·¤¤ID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_attack(byte spell)
{
}
-/*
+/*!
+ * @brief IDÃͤ¬ÂàÈòÌÜŪ¤ËŬ¤·¤¿¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell is good for escaping.
+ * @param spell ȽÄêÂоݤÎID
+ * @return Ŭ¤·¤¿ËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_escape(byte spell)
{
return (FALSE);
}
-/*
+/*!
+ * @brief IDÃͤ¬Ë¸³²ÌÜŪ¤ËŬ¤·¤¿¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell is good for annoying the player.
+ * @param spell ȽÄêÂоݤÎID
+ * @return Ŭ¤·¤¿ËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_annoy(byte spell)
{
return (FALSE);
}
-/*
- * Return TRUE if a spell summons help.
+/*!
+ * @brief IDÃͤ¬¾¤´·¿¤Î¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
+ * Return TRUE if a spell is good for annoying the player.
+ * @param spell ȽÄêÂоݤÎID
+ * @return ¾¤´·¿ËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_summon(byte spell)
{
}
-/*
- * Return TRUE if a spell raise-dead.
+/*!
+ * @brief IDÃͤ¬»à¼ÔÉü³è½èÍý¤«¤É¤¦¤«¤òÊÖ¤¹ /
+ * Return TRUE if a spell is good for annoying the player.
+ * @param spell ȽÄêÂоݤÎID
+ * @return »à¼ÔÉü³è¤Î½èÍý¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_raise(byte spell)
{
return (FALSE);
}
-
-/*
+/*!
+ * @brief IDÃͤ¬Àï½ÑŪ¤Ê¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell is good in a tactical situation.
+ * @param spell ȽÄêÂоݤÎID
+ * @return Àï½ÑŪ¤ÊËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_tactic(byte spell)
{
return (FALSE);
}
-/*
+/*!
+ * @brief IDÃͤ¬ÌµÅ¨²½¤¹¤ë¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell makes invulnerable.
+ * @param spell ȽÄêÂоݤÎID
+ * @return ¾¤´·¿ËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_invulner(byte spell)
{
return (FALSE);
}
-/*
+/*!
+ * @brief IDÃͤ¬²Ã®¤¹¤ë¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell hastes.
+ * @param spell ȽÄêÂоݤÎID
+ * @return ¾¤´·¿ËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_haste(byte spell)
{
}
-/*
+/*!
+ * @brief IDÃͤ¬»þ´ÖÄä»ß¤ò¹Ô¤¦¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell world.
+ * @param spell ȽÄêÂоݤÎID
+ * @return »þ´ÖÄä»ßËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_world(byte spell)
{
- /* world */
if (spell == 160 + 6) return (TRUE);
-
- /* Not a haste spell */
return (FALSE);
}
-/*
+/*!
+ * @brief IDÃͤ¬ÆÃÊ̸ú²Ì¤Î¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell special.
+ * @param spell ȽÄêÂоݤÎID
+ * @return ÆÃÊ̸ú²ÌËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_special(byte spell)
{
if (p_ptr->inside_battle) return FALSE;
-
- /* world */
if (spell == 160 + 7) return (TRUE);
-
- /* Not a haste spell */
return (FALSE);
}
-/*
+/*!
+ * @brief IDÃͤ¬¸÷¤Î·õ¤Î¥â¥ó¥¹¥¿¡¼ËâË¡ID¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell psycho-spear.
+ * @param spell ȽÄêÂоݤÎID
+ * @return ¸÷¤Î·õ¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_psy_spe(byte spell)
{
}
-/*
+/*!
+ * @brief IDÃͤ¬¼£ÌþËâË¡¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell is good for healing.
+ * @param spell ȽÄêÂоݤÎID
+ * @return ¼£ÌþËâË¡¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_heal(byte spell)
{
}
-/*
+/*!
+ * @brief IDÃͤ¬ËâÎϾõ¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell is good for dispel.
+ * @param spell ȽÄêÂоݤÎID
+ * @return ËâÎϾõî¤ÎID¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
static bool spell_dispel(byte spell)
{
}
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤ËËâÎϾõî¤òÍ¿¤¨¤ë¤Ù¤¤«¤òȽÄꤹ¤ë¥ë¡¼¥Á¥ó
* Check should monster cast dispel spell.
+ * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î¹½Â¤ÂÎÇÛÎóID
+ * @return ËâÎϾõî¤ò¤«¤±¤ë¤Ù¤¤Ê¤éTRUE¤òÊÖ¤¹¡£
*/
-static bool dispel_check(int m_idx)
+bool dispel_check(int m_idx)
{
monster_type *m_ptr = &m_list[m_idx];
monster_race *r_ptr = &r_info[m_ptr->r_idx];
}
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤ÎËâË¡ÁªÂò¥ë¡¼¥Á¥ó
* Have a monster choose a spell from a list of "useful" spells.
- *
- * Note that this list does NOT include spells that will just hit
- * other monsters, and the list is restricted when the monster is
- * "desperate". Should that be the job of this function instead?
- *
- * Stupid monsters will just pick a spell randomly. Smart monsters
- * will choose more "intelligently".
- *
- * Use the helper functions above to put spells into categories.
- *
- * This function may well be an efficiency bottleneck.
+ * @param m_idx ¥â¥ó¥¹¥¿¡¼¤Î¹½Â¤ÂÎÇÛÎóID
+ * @param spells ¸õÊäËâË¡ID¤ò¤Þ¤È¤á¤¿ÇÛÎó
+ * @param num spells¤ÎŤµ
+ * @return ÁªÂò¤·¤¿¥â¥ó¥¹¥¿¡¼ËâË¡¤ÎID
+ * @details
+ * Note that this list does NOT include spells that will just hit\n
+ * other monsters, and the list is restricted when the monster is\n
+ * "desperate". Should that be the job of this function instead?\n
+ *\n
+ * Stupid monsters will just pick a spell randomly. Smart monsters\n
+ * will choose more "intelligently".\n
+ *\n
+ * Use the helper functions above to put spells into categories.\n
+ *\n
+ * This function may well be an efficiency bottleneck.\n
*/
static int choose_attack_spell(int m_idx, byte spells[], byte num)
{
}
-/*
+/*!
+ * @brief IDÃͤ¬ÈóËâ½ÑŪ¤ÊÆü쵻ǽ¤«¤É¤¦¤«¤òÊÖ¤¹ /
* Return TRUE if a spell is inate spell.
+ * @param spell ȽÄêÂоݤÎID
+ * @return ÈóËâ½ÑŪ¤ÊÆü쵻ǽ¤Ê¤é¤ÐTRUE¤òÊÖ¤¹¡£
*/
bool spell_is_inate(u16b spell)
{
}
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤¬¥×¥ì¥¤¥ä¡¼¤Ë¥À¥á¡¼¥¸¤òÍ¿¤¨¤ë¤¿¤á¤ÎºÇŬ¤ÊºÂɸ¤ò»»½Ð¤¹¤ë /
+ * @param m_ptr µ»Ç½¤ò»ÈÍѤ¹¤ë¥â¥ó¥¹¥¿¡¼¹½Â¤ÂΤλ²¾È¥Ý¥¤¥ó¥¿
+ * @param yp ºÇŬ¤ÊÌÜɸÃÏÅÀ¤ÎYºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param xp ºÇŬ¤ÊÌÜɸÃÏÅÀ¤ÎXºÂɸ¤òÊÖ¤¹»²¾È¥Ý¥¤¥ó¥¿
+ * @param f_flag ¼ÍÀþ¤ËÆþ¤ì¤ë¤Î¤òÈò¤±¤ëÃÏ·Á¤Î½ê»ý¥Õ¥é¥°
+ * @param path_check ¼ÍÀþ¤òȽÄꤹ¤ë¤¿¤á¤Î´Ø¿ô¥Ý¥¤¥ó¥¿
+ * @return ͸ú¤ÊºÂɸ¤¬¤¢¤Ã¤¿¾ì¹çTRUE¤òÊÖ¤¹
+ */
+static bool adjacent_grid_check(monster_type *m_ptr, int *yp, int *xp,
+ int f_flag, bool (*path_check)(int, int, int, int))
+{
+ int i;
+ int tonari;
+ static int tonari_y[4][8] = {{-1, -1, -1, 0, 0, 1, 1, 1},
+ {-1, -1, -1, 0, 0, 1, 1, 1},
+ { 1, 1, 1, 0, 0, -1, -1, -1},
+ { 1, 1, 1, 0, 0, -1, -1, -1}};
+ static int tonari_x[4][8] = {{-1, 0, 1, -1, 1, -1, 0, 1},
+ { 1, 0, -1, 1, -1, 1, 0, -1},
+ {-1, 0, 1, -1, 1, -1, 0, 1},
+ { 1, 0, -1, 1, -1, 1, 0, -1}};
+
+ if (m_ptr->fy < py && m_ptr->fx < px) tonari = 0;
+ else if (m_ptr->fy < py) tonari = 1;
+ else if (m_ptr->fx < px) tonari = 2;
+ else tonari = 3;
+
+ for (i = 0; i < 8; i++)
+ {
+ int next_x = *xp + tonari_x[tonari][i];
+ int next_y = *yp + tonari_y[tonari][i];
+ cave_type *c_ptr;
+
+ /* Access the next grid */
+ c_ptr = &cave[next_y][next_x];
+
+ /* Skip this feature */
+ if (!cave_have_flag_grid(c_ptr, f_flag)) continue;
+
+ if (path_check(m_ptr->fy, m_ptr->fx, next_y, next_x))
+ {
+ *yp = next_y;
+ *xp = next_x;
+ return TRUE;
+ }
+ }
+
+ return FALSE;
+}
+
#define DO_SPELL_NONE 0
#define DO_SPELL_BR_LITE 1
#define DO_SPELL_BR_DISI 2
#define DO_SPELL_BA_LITE 3
-/*
+/*!
+ * @brief ¥â¥ó¥¹¥¿¡¼¤ÎÆü쵻ǽ¥á¥¤¥ó¥ë¡¼¥Á¥ó /
* Creatures can cast spells, shoot missiles, and breathe.
- *
- * Returns "TRUE" if a spell (or whatever) was (successfully) cast.
- *
- * XXX XXX XXX This function could use some work, but remember to
- * keep it as optimized as possible, while retaining generic code.
- *
- * Verify the various "blind-ness" checks in the code.
- *
- * XXX XXX XXX Note that several effects should really not be "seen"
- * if the player is blind. See also "effects.c" for other "mistakes".
- *
- * Perhaps monsters should breathe at locations *near* the player,
- * since this would allow them to inflict "partial" damage.
- *
- * Perhaps smart monsters should decline to use "bolt" spells if
- * there is a monster in the way, unless they wish to kill it.
- *
- * Note that, to allow the use of the "track_target" option at some
- * later time, certain non-optimal things are done in the code below,
- * including explicit checks against the "direct" variable, which is
- * currently always true by the time it is checked, but which should
- * really be set according to an explicit "projectable()" test, and
- * the use of generic "x,y" locations instead of the player location,
- * with those values being initialized with the player location.
- *
- * It will not be possible to "correctly" handle the case in which a
- * monster attempts to attack a location which is thought to contain
- * the player, but which in fact is nowhere near the player, since this
- * might induce all sorts of messages about the attack itself, and about
- * the effects of the attack, which the player might or might not be in
- * a position to observe. Thus, for simplicity, it is probably best to
- * only allow "faulty" attacks by a monster if one of the important grids
- * (probably the initial or final grid) is in fact in view of the player.
- * It may be necessary to actually prevent spell attacks except when the
- * monster actually has line of sight to the player. Note that a monster
- * could be left in a bizarre situation after the player ducked behind a
- * pillar and then teleported away, for example.
- *
- * Note that certain spell attacks do not use the "project()" function
- * but "simulate" it via the "direct" variable, which is always at least
- * as restrictive as the "project()" function. This is necessary to
- * prevent "blindness" attacks and such from bending around walls, etc,
- * and to allow the use of the "track_target" option in the future.
- *
- * Note that this function attempts to optimize the use of spells for the
- * cases in which the monster has no spells, or has spells but cannot use
- * them, or has spells but they will have no "useful" effect. Note that
- * this function has been an efficiency bottleneck in the past.
- *
- * Note the special "MFLAG_NICE" flag, which prevents a monster from using
- * any spell attacks until the player has had a single chance to move.
+ * @param m_idx ¥â¥ó¥¹¥¿¡¼¹½Â¤ÂÎÇÛÎó¤ÎID
+ * @return ¼ÂºÝ¤ËÆü쵻ǽ¤òÍøÍѤ·¤¿¤éTRUE¤òÊÖ¤¹
+ * @details
+ * Returns "TRUE" if a spell (or whatever) was (successfully) cast.\n
+ *\n
+ * XXX XXX XXX This function could use some work, but remember to\n
+ * keep it as optimized as possible, while retaining generic code.\n
+ *\n
+ * Verify the various "blind-ness" checks in the code.\n
+ *\n
+ * XXX XXX XXX Note that several effects should really not be "seen"\n
+ * if the player is blind. See also "effects.c" for other "mistakes".\n
+ *\n
+ * Perhaps monsters should breathe at locations *near* the player,\n
+ * since this would allow them to inflict "partial" damage.\n
+ *\n
+ * Perhaps smart monsters should decline to use "bolt" spells if\n
+ * there is a monster in the way, unless they wish to kill it.\n
+ *\n
+ * Note that, to allow the use of the "track_target" option at some\n
+ * later time, certain non-optimal things are done in the code below,\n
+ * including explicit checks against the "direct" variable, which is\n
+ * currently always true by the time it is checked, but which should\n
+ * really be set according to an explicit "projectable()" test, and\n
+ * the use of generic "x,y" locations instead of the player location,\n
+ * with those values being initialized with the player location.\n
+ *\n
+ * It will not be possible to "correctly" handle the case in which a\n
+ * monster attempts to attack a location which is thought to contain\n
+ * the player, but which in fact is nowhere near the player, since this\n
+ * might induce all sorts of messages about the attack itself, and about\n
+ * the effects of the attack, which the player might or might not be in\n
+ * a position to observe. Thus, for simplicity, it is probably best to\n
+ * only allow "faulty" attacks by a monster if one of the important grids\n
+ * (probably the initial or final grid) is in fact in view of the player.\n
+ * It may be necessary to actually prevent spell attacks except when the\n
+ * monster actually has line of sight to the player. Note that a monster\n
+ * could be left in a bizarre situation after the player ducked behind a\n
+ * pillar and then teleported away, for example.\n
+ *\n
+ * @note
+ * that certain spell attacks do not use the "project()" function\n
+ * but "simulate" it via the "direct" variable, which is always at least\n
+ * as restrictive as the "project()" function. This is necessary to\n
+ * prevent "blindness" attacks and such from bending around walls, etc,\n
+ * and to allow the use of the "track_target" option in the future.\n
+ *\n
+ * Note that this function attempts to optimize the use of spells for the\n
+ * cases in which the monster has no spells, or has spells but cannot use\n
+ * them, or has spells but they will have no "useful" effect. Note that\n
+ * this function has been an efficiency bottleneck in the past.\n
+ *\n
+ * Note the special "MFLAG_NICE" flag, which prevents a monster from using\n
+ * any spell attacks until the player has had a single chance to move.\n
*/
bool make_attack_spell(int m_idx)
{
u32b mode = 0L;
int s_num_6 = (easy_band ? 2 : 6);
int s_num_4 = (easy_band ? 1 : 4);
+ int rad = 0; //For elemental spells
/* Target location */
int x = px;
int y = py;
+ /* Target location for lite breath */
+ int x_br_lite = 0;
+ int y_br_lite = 0;
+
/* Summon count */
int count = 0;
/* Check range */
if ((m_ptr->cdis > MAX_RANGE) && !m_ptr->target_y) return (FALSE);
+ /* Check path for lite breath */
+ if (f4 & RF4_BR_LITE)
+ {
+ y_br_lite = y;
+ x_br_lite = x;
+
+ if (los(m_ptr->fy, m_ptr->fx, y_br_lite, x_br_lite))
+ {
+ feature_type *f_ptr = &f_info[cave[y_br_lite][x_br_lite].feat];
+
+ if (!have_flag(f_ptr->flags, FF_LOS))
+ {
+ if (have_flag(f_ptr->flags, FF_PROJECT) && one_in_(2)) f4 &= ~(RF4_BR_LITE);
+ }
+ }
+
+ /* Check path to next grid */
+ else if (!adjacent_grid_check(m_ptr, &y_br_lite, &x_br_lite, FF_LOS, los)) f4 &= ~(RF4_BR_LITE);
+
+ /* Don't breath lite to the wall if impossible */
+ if (!(f4 & RF4_BR_LITE))
+ {
+ y_br_lite = 0;
+ x_br_lite = 0;
+ }
+ }
+
/* Check path */
if (projectable(m_ptr->fy, m_ptr->fx, y, x))
{
success = TRUE;
}
else if ((f4 & RF4_BR_LITE) && (m_ptr->cdis < MAX_RANGE/2) &&
- los(m_ptr->fy, m_ptr->fx, y, x) &&
- (one_in_(10) || (projectable(y, x, m_ptr->fy, m_ptr->fx) && one_in_(2))))
+ los(m_ptr->fy, m_ptr->fx, y, x) && one_in_(5))
{
do_spell = DO_SPELL_BR_LITE;
success = TRUE;
{
int by = y, bx = x;
get_project_point(m_ptr->fy, m_ptr->fx, &by, &bx, 0L);
- if ((distance(by, bx, y, x) <= 3) && los(by, bx, y, x) &&
- (one_in_(10) || (projectable(y, x, m_ptr->fy, m_ptr->fx) && one_in_(2))))
+ if ((distance(by, bx, y, x) <= 3) && los(by, bx, y, x) && one_in_(5))
{
do_spell = DO_SPELL_BA_LITE;
success = TRUE;
}
}
- if (!success)
- {
- int i;
- int tonari;
- int tonari_y[4][8] = {{-1,-1,-1,0,0,1,1,1},
- {-1,-1,-1,0,0,1,1,1},
- {1,1,1,0,0,-1,-1,-1},
- {1,1,1,0,0,-1,-1,-1}};
- int tonari_x[4][8] = {{-1,0,1,-1,1,-1,0,1},
- {1,0,-1,1,-1,1,0,-1},
- {-1,0,1,-1,1,-1,0,1},
- {1,0,-1,1,-1,1,0,-1}};
-
- if (m_ptr->fy < py && m_ptr->fx < px) tonari = 0;
- else if (m_ptr->fy < py) tonari = 1;
- else if (m_ptr->fx < px) tonari = 2;
- else tonari = 3;
-
- for (i = 0; i < 8; i++)
- {
- int next_x = x + tonari_x[tonari][i];
- int next_y = y + tonari_y[tonari][i];
- cave_type *c_ptr;
-
- /* Access the next grid */
- c_ptr = &cave[next_y][next_x];
-
- /* Skip door, rubble, wall, tree, mountain, etc. */
- if (!cave_have_flag_grid(c_ptr, FF_PROJECT)) continue;
-
- if (projectable(m_ptr->fy, m_ptr->fx, next_y, next_x))
- {
- y = next_y;
- x = next_x;
- success = TRUE;
- break;
- }
- }
- }
+ if (!success) success = adjacent_grid_check(m_ptr, &y, &x, FF_PROJECT, projectable);
if (!success)
{
f6 &= (RF6_INDIRECT_MASK);
success = TRUE;
}
+
+ if (y_br_lite && x_br_lite && (m_ptr->cdis < MAX_RANGE/2) && one_in_(5))
+ {
+ if (!success)
+ {
+ y = y_br_lite;
+ x = x_br_lite;
+ do_spell = DO_SPELL_BR_LITE;
+ success = TRUE;
+ }
+ else f4 |= (RF4_BR_LITE);
+ }
}
/* No spells */
if (!spell_is_inate(thrown_spell)
&& (in_no_magic_dungeon || (MON_STUNNED(m_ptr) && one_in_(2)) || (randint0(100) < failrate)))
{
- disturb(1, 0);
+ disturb(1, 1);
/* Message */
#ifdef JP
msg_format("%^s¤Ï¼öʸ¤ò¾§¤¨¤è¤¦¤È¤·¤¿¤¬¼ºÇÔ¤·¤¿¡£", m_name);
return (TRUE);
}
+ /* Hex: Anti Magic Barrier */
+ if (!spell_is_inate(thrown_spell) && magic_barrier(m_idx))
+ {
+#ifdef JP
+ msg_format("È¿ËâË¡¥Ð¥ê¥¢¤¬%^s¤Î¼öʸ¤ò¤«¤¾Ã¤·¤¿¡£", m_name);
+#else
+ msg_format("Anti magic barrier cancels the spell which %^s casts.");
+#endif
+ return (TRUE);
+ }
+
/* Projectable? */
direct = player_bold(y, x);
/* RF4_SHRIEK */
case 96+0:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
msg_format("%^s¤¬¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£", m_name);
#else
case 96+2:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
else msg_format("%^s¤¬ËâÎϾõî¤Î¼öʸ¤òÇ°¤¸¤¿¡£", m_name);
if (blind) msg_format("%^s mumbles powerfully.", m_name);
else msg_format("%^s invokes a dispel magic.", m_name);
#endif
- set_fast(0, TRUE);
- set_lightspeed(0, TRUE);
- set_slow(0, TRUE);
- set_shield(0, TRUE);
- set_blessed(0, TRUE);
- set_tsuyoshi(0, TRUE);
- set_hero(0, TRUE);
- set_shero(0, TRUE);
- set_protevil(0, TRUE);
- set_invuln(0, TRUE);
- set_wraith_form(0, TRUE);
- set_kabenuke(0, TRUE);
- set_tim_res_nether(0, TRUE);
- set_tim_res_time(0, TRUE);
- /* by henkma */
- set_tim_reflect(0,TRUE);
- set_multishadow(0,TRUE);
- set_dustrobe(0,TRUE);
-
- set_tim_invis(0, TRUE);
- set_tim_infra(0, TRUE);
- set_tim_esp(0, TRUE);
- set_tim_regen(0, TRUE);
- set_tim_stealth(0, TRUE);
- set_tim_levitation(0, TRUE);
- set_tim_sh_touki(0, TRUE);
- set_tim_sh_fire(0, TRUE);
- set_tim_sh_holy(0, TRUE);
- set_tim_eyeeye(0, TRUE);
- set_magicdef(0, TRUE);
- set_resist_magic(0, TRUE);
- set_oppose_acid(0, TRUE);
- set_oppose_elec(0, TRUE);
- set_oppose_fire(0, TRUE);
- set_oppose_cold(0, TRUE);
- set_oppose_pois(0, TRUE);
- set_ultimate_res(0, TRUE);
- set_mimic(0, 0, TRUE);
- set_ele_attack(0, 0);
- 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 ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0]))
- {
- p_ptr->magic_num1[1] = p_ptr->magic_num1[0];
- p_ptr->magic_num1[0] = 0;
-#ifdef JP
- msg_print("²Î¤¬ÅÓÀڤ줿¡£");
-#else
- msg_print("Your singing is interrupted.");
-#endif
- p_ptr->action = ACTION_NONE;
-
- /* 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();
- }
+ dispel_player();
if (p_ptr->riding) dispel_monster_status(p_ptr->riding);
#ifdef JP
/* RF4_ROCKET */
case 96+3:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¼Í¤Ã¤¿¡£", m_name);
#else
case 96+4:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬´ñ̯¤Ê²»¤òȯ¤·¤¿¡£", m_name);
#else
/* RF4_BR_ACID */
case 96+8:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_ELEC */
case 96+9:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_FIRE */
case 96+10:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_COLD */
case 96+11:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_POIS */
case 96+12:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_NETH */
case 96+13:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_LITE */
case 96+14:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
#endif
dam = ((m_ptr->hp / 6) > 400 ? 400 : (m_ptr->hp / 6));
- breath(y, x, m_idx, GF_LITE, dam,0, TRUE, MS_BR_LITE, learnable);
+ breath(y_br_lite, x_br_lite, m_idx, GF_LITE, dam,0, TRUE, MS_BR_LITE, learnable);
update_smart_learn(m_idx, DRS_LITE);
break;
}
/* RF4_BR_DARK */
case 96+15:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_CONF */
case 96+16:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_SOUN */
case 96+17:
{
- disturb(1, 0);
+ disturb(1, 1);
if (m_ptr->r_idx == MON_JAIAN)
#ifdef JP
msg_format("¡Ö¥Ü¥©¥¨¡Á¡Á¡Á¡Á¡Á¡Á¡×");
/* RF4_BR_CHAO */
case 96+18:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_DISE */
case 96+19:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_NEXU */
case 96+20:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_TIME */
case 96+21:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_INER */
case 96+22:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_GRAV */
case 96+23:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_SHAR */
case 96+24:
{
- disturb(1, 0);
+ disturb(1, 1);
if (m_ptr->r_idx == MON_BOTEI)
#ifdef JP
msg_format("¡Ö¥ÜÄë¥Ó¥ë¥«¥Ã¥¿¡¼¡ª¡ª¡ª¡×");
/* RF4_BR_PLAS */
case 96+25:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_WALL */
case 96+26:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BR_MANA */
case 96+27:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BA_NUKE */
case 96+28:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF4_BR_NUKE */
case 96+29:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF4_BA_CHAO */
case 96+30:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬¶²¤í¤·¤²¤Ë¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF4_BR_DISI */
case 96+31:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£", m_name);
#else
/* RF5_BA_ACID */
case 128+0:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
-if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
+ if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
+ else msg_format("%^s¤¬¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
#else
if (blind) msg_format("%^s mumbles.", m_name);
-#endif
-
-#ifdef JP
-else msg_format("%^s¤¬¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
-#else
else msg_format("%^s casts an acid ball.", m_name);
#endif
-
- dam = (randint1(rlev * 3) + 15) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
- breath(y, x, m_idx, GF_ACID, dam, 2, FALSE, MS_BALL_ACID, learnable);
+ if (r_ptr->flags2 & RF2_POWERFUL)
+ {
+ rad = 4;
+ dam = (rlev * 4) + 50 + damroll(10, 10);
+ }
+ else
+ {
+ rad = 2;
+ dam = (randint1(rlev * 3) + 15);
+ }
+ breath(y, x, m_idx, GF_ACID, dam, rad, FALSE, MS_BALL_ACID, learnable);
update_smart_learn(m_idx, DRS_ACID);
break;
}
/* RF5_BA_ELEC */
case 128+1:
{
- disturb(1, 0);
+ int rad = (r_ptr->flags2 & RF2_POWERFUL) ? 4 : 2;
+ disturb(1, 1);
#ifdef JP
-if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
+ if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
+ else msg_format("%^s¤¬¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
#else
if (blind) msg_format("%^s mumbles.", m_name);
-#endif
-
-#ifdef JP
-else msg_format("%^s¤¬¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
-#else
else msg_format("%^s casts a lightning ball.", m_name);
#endif
-
- dam = (randint1(rlev * 3 / 2) + 8) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
- breath(y, x, m_idx, GF_ELEC, dam, 2, FALSE, MS_BALL_ELEC, learnable);
+ if (r_ptr->flags2 & RF2_POWERFUL)
+ {
+ rad = 4;
+ dam = (rlev * 4) + 50 + damroll(10, 10);
+ }
+ else
+ {
+ rad = 2;
+ dam = (randint1(rlev * 3 / 2) + 8);
+ }
+ breath(y, x, m_idx, GF_ELEC, dam, rad, FALSE, MS_BALL_ELEC, learnable);
update_smart_learn(m_idx, DRS_ELEC);
break;
}
/* RF5_BA_FIRE */
case 128+2:
{
- disturb(1, 0);
+ int rad = (r_ptr->flags2 & RF2_POWERFUL) ? 4 : 2;
+ disturb(1, 1);
if (m_ptr->r_idx == MON_ROLENTO)
{
else
{
#ifdef JP
-if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
+ if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
+ else msg_format("%^s¤¬¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
#else
if (blind) msg_format("%^s mumbles.", m_name);
-#endif
-
-#ifdef JP
-else msg_format("%^s¤¬¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
-#else
else msg_format("%^s casts a fire ball.", m_name);
#endif
}
- dam = (randint1(rlev * 7 / 2) + 10) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
- breath(y, x, m_idx, GF_FIRE, dam, 2, FALSE, MS_BALL_FIRE, learnable);
+ if (r_ptr->flags2 & RF2_POWERFUL)
+ {
+ rad = 4;
+ dam = (rlev * 4) + 50 + damroll(10, 10);
+ }
+ else
+ {
+ rad = 2;
+ dam = (randint1(rlev * 7 / 2) + 10);
+ }
+ breath(y, x, m_idx, GF_FIRE, dam, rad, FALSE, MS_BALL_FIRE, learnable);
update_smart_learn(m_idx, DRS_FIRE);
break;
}
/* RF5_BA_COLD */
case 128+3:
{
- disturb(1, 0);
+ int rad = (r_ptr->flags2 & RF2_POWERFUL) ? 4 : 2;
+ disturb(1, 1);
#ifdef JP
-if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
+ if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
+ else msg_format("%^s¤¬¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
#else
if (blind) msg_format("%^s mumbles.", m_name);
-#endif
-
-#ifdef JP
-else msg_format("%^s¤¬¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£", m_name);
-#else
else msg_format("%^s casts a frost ball.", m_name);
#endif
-
- dam = (randint1(rlev * 3 / 2) + 10) * ((r_ptr->flags2 & RF2_POWERFUL) ? 2 : 1);
- breath(y, x, m_idx, GF_COLD, dam, 2, FALSE, MS_BALL_COLD, learnable);
+ if (r_ptr->flags2 & RF2_POWERFUL)
+ {
+ rad = 4;
+ dam = (rlev * 4) + 50 + damroll(10, 10);
+ }
+ else
+ {
+ rad = 2;
+ dam = (randint1(rlev * 3 / 2) + 10);
+ }
+ breath(y, x, m_idx, GF_COLD, dam, rad, FALSE, MS_BALL_COLD, learnable);
update_smart_learn(m_idx, DRS_COLD);
break;
}
/* RF5_BA_POIS */
case 128+4:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF5_BA_NETH */
case 128+5:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF5_BA_WATE */
case 128+6:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF5_BA_MANA */
case 128+7:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF5_BA_DARK */
case 128+8:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+9:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
dam = (randint1(rlev) / 2) + 1;
breath(y, x, m_idx, GF_DRAIN_MANA, dam, 0, FALSE, MS_DRAIN_MANA, learnable);
case 128+10:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
if (!seen)
{
#ifdef JP
case 128+11:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
if (!seen)
{
#ifdef JP
case 128+12:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+13:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+14:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤òÂçÀ¼¤Ç¶«¤ó¤À¡£", m_name);
#else
case 128+15:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬¡Ö¤ªÁ°¤Ï´û¤Ë»à¤ó¤Ç¤¤¤ë¡×¤È¶«¤ó¤À¡£", m_name);
#else
case 128+16:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+17:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+18:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+19:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF5_BA_LITE */
case 128+20:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+21:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+22:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+23:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+24:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+25:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+26:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+27:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¯¤È¡¢¶²¤í¤·¤²¤Ê²»¤¬Ê¹¤³¤¨¤¿¡£", m_name);
#else
case 128+28:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 128+29:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¯¤È¡¢Æ¬¤òǺ¤Þ¤¹²»¤¬¤·¤¿¡£", m_name);
#else
case 128+30:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
msg_format("%^s¤¬¤¢¤Ê¤¿¤Î¶ÚÎϤòµÛ¤¤¼è¤í¤¦¤È¤·¤¿¡ª", m_name);
#else
case 128+31:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_HASTE */
case 160+0:
{
- disturb(1, 0);
+ disturb(1, 1);
if (blind)
{
#ifdef JP
case 160+1:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
msg_format("%^s¤¬<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª", m_name);
#else
/* RF6_HEAL */
case 160+2:
{
- disturb(1, 0);
+ disturb(1, 1);
/* Message */
if (blind)
/* RF6_INVULNER */
case 160+3:
{
- disturb(1, 0);
+ disturb(1, 1);
/* Message */
if (!seen)
/* RF6_BLINK */
case 160+4:
{
- disturb(1, 0);
+ disturb(1, 1);
+ if (teleport_barrier(m_idx))
+ {
#ifdef JP
-msg_format("%^s¤¬½Ö»þ¤Ë¾Ã¤¨¤¿¡£", m_name);
+ msg_format("ËâË¡¤Î¥Ð¥ê¥¢¤¬%^s¤Î¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤷¤¿¡£", m_name);
#else
- msg_format("%^s blinks away.", m_name);
+ msg_format("Magic barrier obstructs teleporting of %^s.", m_name);
#endif
-
- teleport_away(m_idx, 10, FALSE, FALSE);
- p_ptr->update |= (PU_MONSTERS);
+ }
+ else
+ {
+#ifdef JP
+ msg_format("%^s¤¬½Ö»þ¤Ë¾Ã¤¨¤¿¡£", m_name);
+#else
+ msg_format("%^s blinks away.", m_name);
+#endif
+ teleport_away(m_idx, 10, 0L);
+ p_ptr->update |= (PU_MONSTERS);
+ }
break;
}
/* RF6_TPORT */
case 160+5:
{
- int i, oldfy, oldfx;
- u32b flgs[TR_FLAG_SIZE];
- object_type *o_ptr;
-
- oldfy = m_ptr->fy;
- oldfx = m_ptr->fx;
-
- disturb(1, 0);
-#ifdef JP
-msg_format("%^s¤¬¥Æ¥ì¥Ý¡¼¥È¤·¤¿¡£", m_name);
-#else
- msg_format("%^s teleports away.", m_name);
-#endif
-
- teleport_away(m_idx, MAX_SIGHT * 2 + 5, FALSE, FALSE);
-
- if (los(py, px, oldfy, oldfx) && !world_monster)
+ disturb(1, 1);
+ if (teleport_barrier(m_idx))
{
- for (i=INVEN_RARM;i<INVEN_TOTAL;i++)
- {
- o_ptr = &inventory[i];
- if (!object_is_cursed(o_ptr))
- {
- object_flags(o_ptr, flgs);
-
- if ((have_flag(flgs, TR_TELEPORT)) || (p_ptr->muta1 & MUT1_VTELEPORT) || (p_ptr->pclass == CLASS_IMITATOR))
- {
#ifdef JP
- if (get_check_strict("¤Ä¤¤¤Æ¤¤¤¤Þ¤¹¤«¡©", CHECK_OKAY_CANCEL))
+ msg_format("ËâË¡¤Î¥Ð¥ê¥¢¤¬%^s¤Î¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤷¤¿¡£", m_name);
#else
- if (get_check_strict("Do you follow it? ", CHECK_OKAY_CANCEL))
+ msg_format("Magic barrier obstructs teleporting of %^s.", m_name);
#endif
- {
- if (one_in_(3))
- {
- teleport_player(200, TRUE);
+ }
+ else
+ {
#ifdef JP
- msg_print("¼ºÇÔ¡ª");
+ msg_format("%^s¤¬¥Æ¥ì¥Ý¡¼¥È¤·¤¿¡£", m_name);
#else
- msg_print("Failed!");
+ msg_format("%^s teleports away.", m_name);
#endif
- }
- else teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, FALSE);
- p_ptr->energy_need += ENERGY_NEED();
- }
- break;
- }
- }
- }
+ teleport_away_followable(m_idx);
}
break;
}
case 160+6:
{
int who = 0;
- disturb(1, 0);
+ disturb(1, 1);
if(m_ptr->r_idx == MON_DIO) who = 1;
else if(m_ptr->r_idx == MON_WONG) who = 3;
dam = who;
{
int k;
- disturb(1, 0);
+ disturb(1, 1);
switch (m_ptr->r_idx)
{
case MON_OHMU:
default:
if (r_ptr->d_char == 'B')
{
- disturb(1, 0);
+ disturb(1, 1);
if (one_in_(3) || !direct)
{
#ifdef JP
#else
msg_format("%^s suddenly go out of your sight!", m_name);
#endif
- teleport_away(m_idx, 10, FALSE, FALSE);
+ teleport_away(m_idx, 10, TELEPORT_NONMAGICAL);
p_ptr->update |= (PU_MONSTERS);
}
else
bool fear; /* dummy */
#ifdef JP
- msg_format("%^s¤¬¤¢¤Ê¤¿¤òÄϤó¤Ç¶õÃ椫¤éÅꤲÍ¤¿¡£", m_name);
+ msg_format("%^s¤¬¤¢¤Ê¤¿¤òÄϤó¤Ç¶õÃ椫¤éÅꤲÍî¤Ȥ·¤¿¡£", m_name);
#else
msg_format("%^s holds you, and drops from the sky.", m_name);
#endif
dam = damroll(4, 8);
- teleport_player_to(m_ptr->fy, m_ptr->fx, FALSE, TRUE);
+ teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_NONMAGICAL | TELEPORT_PASSIVE);
sound(SOUND_FALL);
case 160+8:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
msg_format("%^s¤¬¤¢¤Ê¤¿¤ò°ú¤Ìᤷ¤¿¡£", m_name);
#else
msg_format("%^s commands you to return.", m_name);
#endif
- teleport_player_to(m_ptr->fy, m_ptr->fx, TRUE, TRUE);
+ teleport_player_to(m_ptr->fy, m_ptr->fx, TELEPORT_PASSIVE);
learn_spell(MS_TELE_TO);
break;
}
case 160+9:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
msg_format("%^s¤Ë¥Æ¥ì¥Ý¡¼¥È¤µ¤»¤é¤ì¤¿¡£", m_name);
if ((p_ptr->pseikaku == SEIKAKU_COMBAT) || (inventory[INVEN_BOW].name1 == ART_CRIMSON))
#endif
learn_spell(MS_TELE_AWAY);
- teleport_player(100, TRUE);
+ teleport_player_away(m_idx, 100);
break;
}
case 160+10:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«´ñ̯¤Ê¸ÀÍÕ¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 160+11:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
case 160+12:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_TRAPS */
case 160+13:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£", m_name);
#else
case 160+14:
{
if (!direct) return (FALSE);
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
msg_format("%^s¤¬¤¢¤Ê¤¿¤Îµ²±¤ò¾Ãµî¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¡£", m_name);
#else
/* RF6_RAISE_DEAD */
case 160+15:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_KIN */
case 160+16:
{
- disturb(1, 0);
+ disturb(1, 1);
if (m_ptr->r_idx == MON_SERPENT || m_ptr->r_idx == MON_ZOMBI_SERPENT)
{
#ifdef JP
/* RF6_S_CYBER */
case 160+17:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_MONSTER */
case 160+18:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_MONSTERS */
case 160+19:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_ANT */
case 160+20:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_SPIDER */
case 160+21:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_HOUND */
case 160+22:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_HYDRA */
case 160+23:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
{
int num = 1;
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_DEMON */
case 160+25:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_UNDEAD */
case 160+26:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_DRAGON */
case 160+27:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_HI_UNDEAD */
case 160+28:
{
- disturb(1, 0);
+ disturb(1, 1);
if (((m_ptr->r_idx == MON_MORGOTH) || (m_ptr->r_idx == MON_SAURON) || (m_ptr->r_idx == MON_ANGMAR)) && ((r_info[MON_NAZGUL].cur_num+2) < r_info[MON_NAZGUL].max_num))
{
/* RF6_S_HI_DRAGON */
case 160+29:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_AMBERITES */
case 160+30:
{
- disturb(1, 0);
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
/* RF6_S_UNIQUE */
case 160+31:
{
- disturb(1, 0);
+ bool uniques_are_summoned = FALSE;
+ int non_unique_type = SUMMON_HI_UNDEAD;
+
+ disturb(1, 1);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
#else
{
count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
- if (r_ptr->flags3 & RF3_GOOD)
- {
- for (k = count; k < s_num_4; k++)
- {
- count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
- }
- }
- else
+
+ if (count) uniques_are_summoned = TRUE;
+
+ if ((m_ptr->sub_align & (SUB_ALIGN_GOOD | SUB_ALIGN_EVIL)) == (SUB_ALIGN_GOOD | SUB_ALIGN_EVIL))
+ non_unique_type = 0;
+ else if (m_ptr->sub_align & SUB_ALIGN_GOOD)
+ non_unique_type = SUMMON_ANGEL;
+
+ for (k = count; k < s_num_4; k++)
{
- for (k = count; k < s_num_4; k++)
- {
- count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
- }
+ count += summon_specific(m_idx, y, x, rlev, non_unique_type, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
}
+
if (blind && count)
{
#ifdef JP
-msg_print("¿¤¯¤ÎÎ϶¯¤¤¤â¤Î¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬Ê¹¤³¤¨¤ë¡£");
+ msg_format("¿¤¯¤Î%s¤¬´Ö¶á¤Ë¸½¤ì¤¿²»¤¬Ê¹¤³¤¨¤ë¡£", uniques_are_summoned ? "Î϶¯¤¤¤â¤Î" : "¤â¤Î");
#else
- msg_print("You hear many powerful things appear nearby.");
+ msg_format("You hear many %s appear nearby.", uniques_are_summoned ? "powerful things" : "things");
#endif
-
}
break;
}
p_ptr->mane_num++;
new_mane = TRUE;
- p_ptr->redraw |= (PR_MANE);
+ p_ptr->redraw |= (PR_IMITATION);
}
}