OSDN Git Service

本来見えないはずのCHAR_CLEARかつATTR_CLEARのモンスターが幻覚時に見え
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 31 May 2003 21:25:38 +0000 (21:25 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Sat, 31 May 2003 21:25:38 +0000 (21:25 +0000)
るバグを修正.

src/cave.c

index f9efe86..32ccb6f 100644 (file)
@@ -1404,18 +1404,22 @@ void map_info(int y, int x, byte *ap, char *cp)
                /* Visible monster */
                if (m_ptr->ml)
                {
+                       monster_race *r_ptr = &r_info[m_ptr->ap_r_idx];
+
                        feat_priority = 30;
 
                        /* Hack -- hallucination */
                        if (p_ptr->image)
                        {
-                               /* Hallucinatory monster */
-                               image_monster(ap, cp);
+                               /* Prevent clear char and attr monster */
+                               if (~r_ptr->flags1 & (RF1_CHAR_CLEAR | RF1_ATTR_CLEAR))
+                               {
+                                       /* Hallucinatory monster */
+                                       image_monster(ap, cp);
+                               }
                        }
                        else
                        {
-                               monster_race *r_ptr = &r_info[m_ptr->ap_r_idx];
-
                                /* Monster attr/char */
                                a = r_ptr->x_attr;
                                c = r_ptr->x_char;