OSDN Git Service

[Refactor] #37353 「死を欺く処理」を dungeon.c から cheat_death() に分離。 / Separate cheat_death...
[hengband/hengband.git] / src / mspells4.c
index 72660a1..5baf6ad 100644 (file)
@@ -2552,7 +2552,7 @@ MONSTER_NUMBER summon_EAGLE(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
        int num = 4 + randint1(3);
        for (k = 0; k < num; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_EAGLES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
        }
        return count;
 }
@@ -2609,7 +2609,7 @@ MONSTER_NUMBER summon_Guardian(POSITION y, POSITION x, int rlev, MONSTER_IDX m_i
 
        for (k = 0; k < num; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_GUARDIANS, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
        }
        return count;
 }
@@ -2649,7 +2649,7 @@ MONSTER_NUMBER summon_LOUSE(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
        int num = 2 + randint1(3);
        for (k = 0; k < num; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_LOUSE, PM_ALLOW_GROUP, '\0');
        }
        return count;
 }
@@ -2665,13 +2665,12 @@ MONSTER_NUMBER summon_LOUSE(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
 MONSTER_NUMBER summon_Kin(POSITION y, POSITION x, int rlev, MONSTER_IDX m_idx)
 {
        int k, count = 0;
-       monster_type    *m_ptr = &m_list[m_idx];
-       monster_race    *r_ptr = &r_info[m_ptr->r_idx];
-       summon_kin_type = r_ptr->d_char; /* Big hack */
+       monster_type *m_ptr = &m_list[m_idx];
+       monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
        for (k = 0; k < 4; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_KIN, PM_ALLOW_GROUP, r_ptr->d_char);
        }
        return count;
 }
@@ -2794,7 +2793,7 @@ void spell_RF6_S_CYBER(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_
 
        if (is_friendly(m_ptr) && mon_to_mon)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP));
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_CYBER, (PM_ALLOW_GROUP), '\0');
        }
        else
        {
@@ -2833,10 +2832,10 @@ void spell_RF6_S_MONSTER(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX
        for (k = 0; k < 1; k++)
        {
                if(mon_to_player)
-                       count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+                       count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
 
                if(mon_to_mon)
-                       count += summon_specific(m_idx, y, x, rlev, 0, (monster_u_mode(m_idx)));
+                       count += summon_specific(m_idx, y, x, rlev, 0, (monster_u_mode(m_idx)), '\0');
        }
 
        if (p_ptr->blind && count && mon_to_player)
@@ -2871,10 +2870,10 @@ void spell_RF6_S_MONSTERS(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX
        for (k = 0; k < S_NUM_6; k++)
        {
                if(mon_to_player)
-                       count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+                       count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
 
                if(mon_to_mon)
-                       count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | monster_u_mode(m_idx)));
+                       count += summon_specific(m_idx, y, x, rlev, 0, (PM_ALLOW_GROUP | monster_u_mode(m_idx)), '\0');
        }
 
        if (p_ptr->blind && count && mon_to_player)
@@ -2908,7 +2907,7 @@ void spell_RF6_S_ANT(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_id
        
        for (k = 0; k < S_NUM_6; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_ANT, PM_ALLOW_GROUP, '\0');
        }
 
        if (p_ptr->blind && count && mon_to_player)
@@ -2942,7 +2941,7 @@ void spell_RF6_S_SPIDER(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t
        
        for (k = 0; k < S_NUM_6; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_SPIDER, PM_ALLOW_GROUP, '\0');
        }
 
        if (p_ptr->blind && count && mon_to_player)
@@ -2976,7 +2975,7 @@ void spell_RF6_S_HOUND(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_
        
        for (k = 0; k < S_NUM_4; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_HOUND, PM_ALLOW_GROUP, '\0');
        }
 
        if (p_ptr->blind && count && mon_to_player)
@@ -3010,7 +3009,7 @@ void spell_RF6_S_HYDRA(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_
        
        for (k = 0; k < S_NUM_4; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_HYDRA, PM_ALLOW_GROUP, '\0');
        }
 
        if (p_ptr->blind && count && mon_to_player)
@@ -3051,7 +3050,7 @@ void spell_RF6_S_ANGEL(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_
        
        for (k = 0; k < num; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_ANGEL, PM_ALLOW_GROUP, '\0');
        }
        
        if (count < 2)
@@ -3092,7 +3091,7 @@ void spell_RF6_S_DEMON(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_
        
        for (k = 0; k < 1; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_DEMON, PM_ALLOW_GROUP, '\0');
        }
        
        if (p_ptr->blind && count)
@@ -3125,7 +3124,7 @@ void spell_RF6_S_UNDEAD(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t
        
        for (k = 0; k < 1; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_UNDEAD, PM_ALLOW_GROUP, '\0');
        }
        
        if (p_ptr->blind && count)
@@ -3158,7 +3157,7 @@ void spell_RF6_S_DRAGON(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t
        
        for (k = 0; k < 1; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, PM_ALLOW_GROUP);
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_DRAGON, PM_ALLOW_GROUP, '\0');
        }
        
        if (p_ptr->blind && count)
@@ -3264,10 +3263,10 @@ void spell_RF6_S_HI_UNDEAD(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_ID
                for (k = 0; k < S_NUM_6; k++)
                {
                        if(mon_to_player)
-                               count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+                               count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
 
                        if(mon_to_mon)
-                               count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | monster_u_mode(m_idx)));
+                               count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_UNDEAD, (PM_ALLOW_GROUP | monster_u_mode(m_idx)), '\0');
                }
        }
        if (p_ptr->blind && count && mon_to_player)
@@ -3304,10 +3303,10 @@ void spell_RF6_S_HI_DRAGON(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_ID
        for (k = 0; k < S_NUM_4; k++)
        {       
                if(mon_to_player)
-                       count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+                       count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
 
                if(mon_to_mon)
-                       count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | monster_u_mode(m_idx)));
+                       count += summon_specific(m_idx, y, x, rlev, SUMMON_HI_DRAGON, (PM_ALLOW_GROUP | monster_u_mode(m_idx)), '\0');
        }
        
        if (p_ptr->blind && count && mon_to_player)
@@ -3343,7 +3342,7 @@ void spell_RF6_S_AMBERITES(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_ID
        
        for (k = 0; k < S_NUM_4; k++)
        {       
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_AMBERITES, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
        }
        
        if (p_ptr->blind && count && mon_to_player)
@@ -3382,7 +3381,7 @@ void spell_RF6_S_UNIQUE(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t
        
        for (k = 0; k < S_NUM_4; k++)
        {       
-               count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+               count += summon_specific(m_idx, y, x, rlev, SUMMON_UNIQUE, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
        }
        
        if (count) uniques_are_summoned = TRUE;
@@ -3394,7 +3393,7 @@ void spell_RF6_S_UNIQUE(POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t
 
        for (k = count; k < S_NUM_4; k++)
        {
-               count += summon_specific(m_idx, y, x, rlev, non_unique_type, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE));
+               count += summon_specific(m_idx, y, x, rlev, non_unique_type, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE), '\0');
        }
 
        if (p_ptr->blind && count && mon_to_player)