OSDN Git Service

オプションignore_unview, disturb_nearは視界内であっても魔法が届かない
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 29 May 2004 17:38:10 +0000 (17:38 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 29 May 2004 17:38:10 +0000 (17:38 +0000)
場所を視界外とみなすように修正.

src/defines.h
src/melee2.c
src/spells1.c

index 15ec36b..8058e8a 100644 (file)
  * Is the monster seen by the player?
  */
 #define is_seen(A) \
-       ((bool) ((A)->ml && (!ignore_unview || player_can_see_bold((A)->fy, (A)->fx))))
+       ((bool)((A)->ml && (!ignore_unview || \
+        (player_can_see_bold((A)->fy, (A)->fx) && projectable(py, px, (A)->fy, (A)->fx)))))
 
 
 /*** Option Definitions ***/
index f50ae3a..222f416 100644 (file)
@@ -3318,7 +3318,7 @@ msg_format("%^s%s", m_name, monmessage);
                        /* Possible disturb */
                        if (m_ptr->ml &&
                            (disturb_move ||
-                            (disturb_near && (m_ptr->mflag & MFLAG_VIEW)) ||
+                            (disturb_near && (m_ptr->mflag & MFLAG_VIEW) && projectable(py, px, m_ptr->fy, m_ptr->fx)) ||
                             (disturb_high && ap_r_ptr->r_tkills && ap_r_ptr->level >= p_ptr->lev)))
                        {
                                /* Disturb */
index fc5c2ad..621071d 100644 (file)
@@ -8895,7 +8895,7 @@ bool project(int who, int rad, int y, int x, int dam, int typ, int flg, int mons
        if (flg & PROJECT_KILL)
        {
                see_s_msg = (who > 0) ? is_seen(&m_list[who]) :
-                       (!who ? TRUE : player_can_see_bold(y1, x1));
+                       (!who ? TRUE : (player_can_see_bold(y1, x1) && projectable(py, px, y1, x1)));
        }