bool maneable = player_has_los_bold(m_ptr->fy, m_ptr->fx);
bool learnable = (seen && maneable && !world_monster);
- /* Assume "projectable" */
- bool direct = TRUE;
+ /* Check "projectable" */
+ bool direct;
/* Cannot cast spells when confused */
if (m_ptr->confused)
rlev = ((r_ptr->level >= 1) ? r_ptr->level : 1);
/* Forbid inate attacks sometimes */
- if (no_inate) f4 &= 0x500000FF;
+ if (no_inate)
+ {
+ f4 &= ~(RF4_BREATH_MASK);
+ f5 &= ~(RF5_BREATH_MASK);
+ f6 &= ~(RF6_BREATH_MASK);
+ }
if (!p_ptr->csp)
{
return (TRUE);
}
+ /* Projectable? */
+ direct = ((x == px) && (y == py));
/* Cast the spell. */
switch (thrown_spell)
/* RF4_SHRIEK */
case 96+0:
{
- if (!direct) break;
disturb(1, 0);
#ifdef JP
msg_format("%^s¤¬¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£", m_name);
/* RF4_DISPEL */
case 96+2:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤òÎ϶¯¤¯¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF4_SHOOT */
case 96+4:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬´ñ̯¤Ê²»¤òȯ¤·¤¿¡£", m_name);
/* RF5_DRAIN_MANA */
case 128+9:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
if (p_ptr->csp)
{
/* RF5_MIND_BLAST */
case 128+10:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
if (!seen)
{
/* RF5_BRAIN_SMASH */
case 128+11:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
if (!seen)
{
/* RF5_CAUSE_1 */
case 128+12:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_CAUSE_2 */
case 128+13:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_CAUSE_3 */
case 128+14:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤òÂçÀ¼¤Ç¶«¤ó¤À¡£", m_name);
/* RF5_CAUSE_4 */
case 128+15:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬¡Ö¤ªÁ°¤Ï´û¤Ë»à¤ó¤Ç¤¤¤ë¡×¤È¶«¤ó¤À¡£", m_name);
/* RF5_BO_ACID */
case 128+16:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_BO_ELEC */
case 128+17:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_BO_FIRE */
case 128+18:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_BO_COLD */
case 128+19:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_BO_NETH */
case 128+21:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_BO_WATE */
case 128+22:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_BO_MANA */
case 128+23:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_BO_PLAS */
case 128+24:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_BO_ICEE */
case 128+25:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_MISSILE */
case 128+26:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_SCARE */
case 128+27:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¯¤È¡¢¶²¤í¤·¤²¤Ê²»¤¬Ê¹¤³¤¨¤¿¡£", m_name);
/* RF5_BLIND */
case 128+28:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF5_CONF */
case 128+29:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¯¤È¡¢Æ¬¤òǺ¤Þ¤¹²»¤¬¤·¤¿¡£", m_name);
/* RF5_SLOW */
case 128+30:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
msg_format("%^s¤¬¤¢¤Ê¤¿¤Î¶ÚÎϤòµÛ¤¤¼è¤í¤¦¤È¤·¤¿¡ª", m_name);
/* RF5_HOLD */
case 128+31:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF6_HAND_DOOM */
case 160+1:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
msg_format("%^s¤¬ÇËÌǤμê¤òÊü¤Ã¤¿¡ª", m_name);
default:
if (r_ptr->d_char == 'B')
{
- if (!direct) break;
disturb(1, 0);
- if (one_in_(3) || x!=px || y!=py)
+ if (one_in_(3) || !direct)
{
#ifdef JP
msg_format("%^s¤ÏÆÍÁ³»ë³¦¤«¤é¾Ã¤¨¤¿!", m_name);
/* RF6_TELE_TO */
case 160+8:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
msg_format("%^s¤¬¤¢¤Ê¤¿¤ò°ú¤Ìᤷ¤¿¡£", m_name);
/* RF6_TELE_AWAY */
case 160+9:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
msg_format("%^s¤Ë¥Æ¥ì¥Ý¡¼¥È¤µ¤»¤é¤ì¤¿¡£", m_name);
/* RF6_TELE_LEVEL */
case 160+10:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«´ñ̯¤Ê¸ÀÍÕ¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF6_PSY_SPEAR */
case 160+11:
{
- if (x!=px || y!=py) return (FALSE);
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF6_DARKNESS */
case 160+12:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤¿¡£", m_name);
/* RF6_TRAPS */
case 160+13:
{
- if (!direct) break;
disturb(1, 0);
#ifdef JP
if (blind) msg_format("%^s¤¬²¿¤«¤ò¤Ä¤Ö¤ä¤¤¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£", m_name);
/* RF6_FORGET */
case 160+14:
{
- if (x!=px || y!=py) return (FALSE);
- if (!direct) break;
+ if (!direct) return (FALSE);
disturb(1, 0);
#ifdef JP
msg_format("%^s¤¬¤¢¤Ê¤¿¤Îµ²±¤ò¾Ãµî¤·¤è¤¦¤È¤·¤Æ¤¤¤ë¡£", m_name);