OSDN Git Service

幻覚に関するバグ修正.
authornothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 19 Jul 2004 14:14:17 +0000 (14:14 +0000)
committernothere <nothere@0568b783-4c39-0410-ac80-bf13821ea2a2>
Mon, 19 Jul 2004 14:14:17 +0000 (14:14 +0000)
* 幻覚時にペット命令でターゲットを指定すると正体が判明するバグを修正.
* 幻覚時にモンスターが進化すると正体が判明するバグを修正.
* 幻覚時のモンスターで無効なr_infoエントリが選ばれる可能性のあるバグ
  を修正.

src/cmd5.c
src/melee2.c
src/monster2.c

index bfef289..2d99b52 100644 (file)
@@ -2310,11 +2310,11 @@ void do_cmd_pet(void)
        powers[num++] = PET_DISMISS;
 
 #ifdef JP
-       sprintf(target_buf,"¥Ú¥Ã¥È¤Î¥¿¡¼¥²¥Ã¥È¤ò»ØÄê (¸½ºß¡§%s)",
-               (pet_t_m_idx ? r_name + r_info[m_list[pet_t_m_idx].r_idx].name : "»ØÄê¤Ê¤·"));
+       sprintf(target_buf, "¥Ú¥Ã¥È¤Î¥¿¡¼¥²¥Ã¥È¤ò»ØÄê (¸½ºß¡§%s)",
+               (pet_t_m_idx ? (p_ptr->image ? "²¿¤«´ñ̯¤Êʪ" : (r_name + r_info[m_list[pet_t_m_idx].r_idx].name)) : "»ØÄê¤Ê¤·"));
 #else
-       sprintf(target_buf,"specify a target of pet (now:%s)",
-               (pet_t_m_idx ? r_name + r_info[m_list[pet_t_m_idx].r_idx].name : "nothing"));
+       sprintf(target_buf, "specify a target of pet (now:%s)",
+               (pet_t_m_idx ? (p_ptr->image ? "something strange" : (r_name + r_info[m_list[pet_t_m_idx].r_idx].name)) : "nothing"));
 #endif
        power_desc[num] = target_buf;
 
index 79e6ba5..7757dbc 100644 (file)
@@ -4610,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 + hallu_race->name);
+#else
+                                       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);
+                                       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);
+                                       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;
index 25f8543..11d8132 100644 (file)
@@ -1520,7 +1520,7 @@ void monster_desc(char *desc, monster_type *m_ptr, int mode)
                        {
                                hallu_race = &r_info[randint1(max_r_idx - 1)];
                        }
-                       while (hallu_race->flags1 & RF1_UNIQUE);
+                       while (!hallu_race->name || (hallu_race->flags1 & RF1_UNIQUE));
 
                        strcpy(silly_name, (r_name + hallu_race->name));
                }