OSDN Git Service

GF_ICE属性の攻撃に対し、目には目を等の反撃ダメージが発動しないバグを修正。
[hengband/hengband.git] / src / monster2.c
index 25f8543..53866ef 100644 (file)
@@ -261,6 +261,9 @@ void delete_monster_idx(int i)
        }
 
 
+       if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, FALSE);
+
+
        /* Wipe the Monster */
        (void)WIPE(m_ptr, monster_type);
 
@@ -443,6 +446,14 @@ void compact_monsters(int size)
                        /* All monsters get a saving throw */
                        if (randint0(100) < chance) continue;
 
+                       if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
+                       {
+                               char m_name[80];
+
+                               monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
+                               do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_COMPACT, m_name);
+                       }
+
                        /* Delete the monster */
                        delete_monster_idx(i);
 
@@ -1520,7 +1531,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));
                }
@@ -2380,7 +2391,8 @@ void update_mon(int m_idx, bool full)
                        }
 
                        /* Basic telepathy */
-                       else if (p_ptr->telepathy)
+                       /* Snipers get telepathy when they concentrate deeper */
+                       else if ((p_ptr->telepathy) || (p_ptr->concent >= CONCENT_TELE_THRESHOLD))
                        {
                                /* Empty mind, no telepathy */
                                if (r_ptr->flags2 & (RF2_EMPTY_MIND))
@@ -2517,6 +2529,13 @@ void update_mon(int m_idx, bool full)
                        bool do_invisible = FALSE;
                        bool do_cold_blood = FALSE;
 
+                       /* Snipers can see targets in darkness when they concentrate deeper */
+                       if (p_ptr->concent >= CONCENT_RADAR_THRESHOLD)
+                       {
+                               /* Easy to see */
+                               easy = flag = TRUE;
+                       }
+
                        /* Use "infravision" */
                        if (d <= p_ptr->see_infra)
                        {
@@ -2810,6 +2829,8 @@ void choose_new_monster(int m_idx, bool born, int r_idx)
                if (!r_idx) return;
        }
 
+       if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, FALSE);
+
        m_ptr->r_idx = r_idx;
        m_ptr->ap_r_idx = r_idx;
        update_mon(m_idx, FALSE);
@@ -2819,6 +2840,8 @@ void choose_new_monster(int m_idx, bool born, int r_idx)
            (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK)))
                p_ptr->update |= (PU_MON_LITE);
 
+       if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, TRUE);
+
        if (born)
        {
                /* Sub-alignment of a chameleon */