OSDN Git Service

p_ptr->tim_invisとp_ptr->tim_reflectの扱いを少し整理.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 29 May 2003 13:35:22 +0000 (13:35 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Thu, 29 May 2003 13:35:22 +0000 (13:35 +0000)
src/files.c
src/spells1.c
src/spells2.c
src/xtra1.c

index 2a85862..b640b2c 100644 (file)
@@ -2672,9 +2672,8 @@ static void tim_player_flags(u32b flgs[TR_FLAG_SIZE])
        if (p_ptr->wraith_form)
                add_flag(flgs, TR_REFLECT);
        /* by henkma */
-       if (p_ptr->tim_reflect){
+       if (p_ptr->tim_reflect)
                add_flag(flgs, TR_REFLECT);
-       }
 
        if (p_ptr->magicdef)
        {
index 11bec83..80d40a4 100644 (file)
@@ -6435,7 +6435,7 @@ static bool project_p(int who, cptr who_name, int r, int y, int x, int dam, int
        if (!who) return (FALSE);
        if (who == p_ptr->riding) return (FALSE);
 
-       if ((p_ptr->reflect || p_ptr->tim_reflect || ((p_ptr->special_defense & KATA_FUUJIN) && !p_ptr->blind)) && (flg & PROJECT_REFLECTABLE) && !one_in_(10))
+       if ((p_ptr->reflect || ((p_ptr->special_defense & KATA_FUUJIN) && !p_ptr->blind)) && (flg & PROJECT_REFLECTABLE) && !one_in_(10))
        {
                byte t_y, t_x;
                int max_attempts = 10;
index c40e6e4..1a43b80 100644 (file)
@@ -4021,8 +4021,7 @@ bool detect_monsters_normal(int range)
                if (distance(py, px, y, x) > range) continue;
 
                /* Detect all non-invisible monsters */
-               if ((!(r_ptr->flags2 & RF2_INVISIBLE)) ||
-                   p_ptr->see_inv || p_ptr->tim_invis)
+               if (!(r_ptr->flags2 & RF2_INVISIBLE) || p_ptr->see_inv)
                {
                        /* Repair visibility later */
                        repair_monsters = TRUE;
index 5514bca..0dd2338 100644 (file)
@@ -4485,6 +4485,12 @@ void calc_bonuses(void)
                p_ptr->ffall = TRUE;
        }
 
+       /* Temporary reflection */
+       if (p_ptr->tim_reflect)
+       {
+               p_ptr->reflect = TRUE;
+       }
+
        /* Hack -- Hero/Shero -> Res fear */
        if (IS_HERO() || p_ptr->shero)
        {