OSDN Git Service

幻覚に関するバグ修正.
[hengband/hengband.git] / src / melee2.c
index 222f416..7757dbc 100644 (file)
@@ -2460,13 +2460,10 @@ static void process_monster(int m_idx)
 #endif
                }
 
-               if (m_ptr->ml)
+               /* Hack -- Count the wakings */
+               if (is_original_ap_and_seen(m_ptr) && (r_ptr->r_wake < MAX_UCHAR))
                {
-                       /* Hack -- Count the wakings */
-                       if ((r_ptr->r_wake < MAX_UCHAR) && is_original_ap(m_ptr))
-                       {
-                               r_ptr->r_wake++;
-                       }
+                       r_ptr->r_wake++;
                }
        }
 
@@ -4613,14 +4610,33 @@ void monster_gain_exp(int m_idx, int s_idx)
                {
                        if (!ignore_unview || player_can_see_bold(m_ptr->fy, m_ptr->fx))
                        {
+                               if (p_ptr->image)
+                               {
+                                       monster_race *hallu_race;
+
+                                       do
+                                       {
+                                               hallu_race = &r_info[randint1(max_r_idx - 1)];
+                                       }
+                                       while (!hallu_race->name || (hallu_race->flags1 & RF1_UNIQUE));
+
 #ifdef JP
-                               msg_format("%s¤Ï%s¤Ë¿Ê²½¤·¤¿¡£", m_name, r_name + r_ptr->name);
+                                       msg_format("%s¤Ï%s¤Ë¿Ê²½¤·¤¿¡£", m_name, r_name + hallu_race->name);
 #else
-                               msg_format("%^s evolved into %s.", m_name, r_name + r_ptr->name);
+                                       msg_format("%^s evolved into %s.", m_name, r_name + hallu_race->name);
 #endif
+                               }
+                               else
+                               {
+#ifdef JP
+                                       msg_format("%s¤Ï%s¤Ë¿Ê²½¤·¤¿¡£", m_name, r_name + r_ptr->name);
+#else
+                                       msg_format("%^s evolved into %s.", m_name, r_name + r_ptr->name);
+#endif
+                               }
                        }
 
-                       r_info[old_r_idx].r_xtra1 |= MR1_SINKA;
+                       if (!p_ptr->image) r_info[old_r_idx].r_xtra1 |= MR1_SINKA;
 
                        /* Now you feel very close to this pet. */
                        m_ptr->parent_m_idx = 0;