OSDN Git Service

Vanillaにならって、キャラクターの状態を表わすグローバル変数の多くを
[hengband/hengband.git] / src / spells3.c
index fd0f2f2..789741d 100644 (file)
@@ -1139,7 +1139,7 @@ msg_print("
 }
 
 
-bool item_tester_hook_weapon_nobow(object_type *o_ptr)
+static bool item_tester_hook_weapon_nobow(object_type *o_ptr)
 {
        switch (o_ptr->tval)
        {
@@ -1905,33 +1905,15 @@ sprintf(out_val, "
        }
 
        /* Artifacts cannot be destroyed */
-       if (artifact_p(o_ptr) || o_ptr->art_name)
+       if (!can_player_destroy_object(o_ptr))
        {
-               byte feel = FEEL_SPECIAL;
-
                /* Message */
 #ifdef JP
-msg_format("%s¤ò¶â¤ËÊѤ¨¤ë¤³¤È¤Ë¼ºÇÔ¤·¤¿¡£", o_name);
+               msg_format("%s¤ò¶â¤ËÊѤ¨¤ë¤³¤È¤Ë¼ºÇÔ¤·¤¿¡£", o_name);
 #else
                msg_format("You fail to turn %s to gold!", o_name);
 #endif
 
-
-               /* Hack -- Handle icky artifacts */
-               if (cursed_p(o_ptr) || broken_p(o_ptr)) feel = FEEL_TERRIBLE;
-
-               /* Hack -- inscribe the artifact */
-               o_ptr->feeling = feel;
-
-               /* We have "felt" it (again) */
-               o_ptr->ident |= (IDENT_SENSE);
-
-               /* Combine the pack */
-               p_ptr->notice |= (PN_COMBINE);
-
-               /* Window stuff */
-               p_ptr->window |= (PW_INVEN | PW_EQUIP);
-
                /* Done */
                return FALSE;
        }
@@ -2069,7 +2051,7 @@ bool item_tester_hook_weapon(object_type *o_ptr)
        return (FALSE);
 }
 
-bool item_tester_hook_weapon2(object_type *o_ptr)
+static bool item_tester_hook_weapon2(object_type *o_ptr)
 {
        switch (o_ptr->tval)
        {
@@ -2115,7 +2097,7 @@ bool item_tester_hook_armour(object_type *o_ptr)
 }
 
 
-bool item_tester_hook_corpse(object_type *o_ptr)
+static bool item_tester_hook_corpse(object_type *o_ptr)
 {
        switch (o_ptr->tval)
        {
@@ -2165,7 +2147,7 @@ bool item_tester_hook_weapon_armour(object_type *o_ptr)
 /*
  * Check if an object is nameless weapon or armour
  */
-bool item_tester_hook_nameless_weapon_armour(object_type *o_ptr)
+static bool item_tester_hook_nameless_weapon_armour(object_type *o_ptr)
 {
        if (o_ptr->name1 || o_ptr->art_name || o_ptr->name2 || o_ptr->xtra3)
                return FALSE;
@@ -2610,12 +2592,12 @@ bool identify_item(object_type *o_ptr)
 }
 
 
-bool item_tester_hook_identify(object_type *o_ptr)
+static bool item_tester_hook_identify(object_type *o_ptr)
 {
        return (bool)!object_known_p(o_ptr);
 }
 
-bool item_tester_hook_identify_weapon_armour(object_type *o_ptr)
+static bool item_tester_hook_identify_weapon_armour(object_type *o_ptr)
 {
        if (object_known_p(o_ptr))
                return FALSE;
@@ -2627,7 +2609,7 @@ bool item_tester_hook_identify_weapon_armour(object_type *o_ptr)
  * This routine does *not* automatically combine objects.
  * Returns TRUE if something was identified, else FALSE.
  */
-bool ident_spell(bool only_equip)
+bool ident_spell(bool only_equip, bool wait_optimize)
 {
        int             item;
        object_type     *o_ptr;
@@ -2712,8 +2694,8 @@ s = "
 
        /* Auto-inscription/destroy */
        idx = is_autopick(o_ptr);
-       auto_inscribe_item(o_ptr, idx);
-       if (!old_known) auto_destroy_item(item, idx);
+       auto_inscribe_item(item, idx);
+       if (!old_known) auto_destroy_item(item, idx, wait_optimize);
 
        /* Something happened */
        return (TRUE);
@@ -2787,12 +2769,12 @@ msg_print("
 
 
 
-bool item_tester_hook_identify_fully(object_type *o_ptr)
+static bool item_tester_hook_identify_fully(object_type *o_ptr)
 {
        return (bool)(!object_known_p(o_ptr) || !(o_ptr->ident & IDENT_MENTAL));
 }
 
-bool item_tester_hook_identify_fully_weapon_armour(object_type *o_ptr)
+static bool item_tester_hook_identify_fully_weapon_armour(object_type *o_ptr)
 {
        if (!item_tester_hook_identify_fully(o_ptr))
                return FALSE;
@@ -2803,7 +2785,7 @@ bool item_tester_hook_identify_fully_weapon_armour(object_type *o_ptr)
  * Fully "identify" an object in the inventory  -BEN-
  * This routine returns TRUE if an item was identified.
  */
-bool identify_fully(bool only_equip)
+bool identify_fully(bool only_equip, bool wait_optimize)
 {
        int             item;
        object_type     *o_ptr;
@@ -2894,8 +2876,8 @@ s = "
 
        /* Auto-inscription/destroy */
        idx = is_autopick(o_ptr);
-       auto_inscribe_item(o_ptr, idx);
-       if (!old_known) auto_destroy_item(item, idx);
+       auto_inscribe_item(item, idx);
+       if (!old_known) auto_destroy_item(item, idx, wait_optimize);
 
        /* Success */
        return (TRUE);
@@ -3879,8 +3861,8 @@ strcpy(name, "(Ƚ
 
                        /* Forgotten */
                        else if ((j < 1) ?
-                               ((spell_forgotten1 & (1L << i))) :
-                               ((spell_forgotten2 & (1L << (i % 32)))))
+                               ((p_ptr->spell_forgotten1 & (1L << i))) :
+                               ((p_ptr->spell_forgotten2 & (1L << (i % 32)))))
                        {
                                /* Forgotten */
                                a = TERM_ORANGE;
@@ -3888,8 +3870,8 @@ strcpy(name, "(Ƚ
 
                        /* Unknown */
                        else if (!((j < 1) ?
-                               (spell_learned1 & (1L << i)) :
-                               (spell_learned2 & (1L << (i % 32)))))
+                               (p_ptr->spell_learned1 & (1L << i)) :
+                               (p_ptr->spell_learned2 & (1L << (i % 32)))))
                        {
                                /* Unknown */
                                a = TERM_RED;
@@ -3897,8 +3879,8 @@ strcpy(name, "(Ƚ
 
                        /* Untried */
                        else if (!((j < 1) ?
-                               (spell_worked1 & (1L << i)) :
-                               (spell_worked2 & (1L << (i % 32)))))
+                               (p_ptr->spell_worked1 & (1L << i)) :
+                               (p_ptr->spell_worked2 & (1L << (i % 32)))))
                        {
                                /* Untried */
                                a = TERM_YELLOW;
@@ -3921,6 +3903,18 @@ strcpy(name, "(Ƚ
 }
 
 
+/*
+ * Returns experience of a spell
+ */
+s16b experience_of_spell(int spell, int realm)
+{
+       if (p_ptr->pclass == CLASS_SORCERER) return 1600;
+       else if (p_ptr->pclass == CLASS_RED_MAGE) return 1200;
+       else if (realm+1 == p_ptr->realm1) return p_ptr->spell_exp[spell];
+       else if (realm+1 == p_ptr->realm2) return p_ptr->spell_exp[spell + 32];
+       else return 0;
+}
+
 
 /*
  * Returns spell chance of failure for spell -RAK-
@@ -3958,18 +3952,14 @@ s16b spell_chance(int spell, int realm)
        chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[mp_ptr->spell_stat]] - 1);
 
        if (p_ptr->riding)
-               chance += (MAX(r_info[m_list[p_ptr->riding].r_idx].level-skill_exp[GINOU_RIDING]/100-10,0));
-
-       if (p_ptr->pclass == CLASS_SORCERER)
-               shouhimana = s_ptr->smana*2200 + 2399;
-       else if (p_ptr->pclass == CLASS_RED_MAGE)
-               shouhimana = s_ptr->smana*2600 + 2399;
-       else if ((realm+1 == p_ptr->realm1) || (realm+1 == p_ptr->realm2))
-               shouhimana = (s_ptr->smana*(3800-spell_exp[((p_ptr->realm1 == realm+1) ? spell: spell+32)])+2399);
-       else shouhimana = s_ptr->smana*3800;
-       if(p_ptr->dec_mana)
-               shouhimana *= 3;
+               chance += (MAX(r_info[m_list[p_ptr->riding].r_idx].level-p_ptr->skill_exp[GINOU_RIDING]/100-10,0));
+
+       /* Extract mana consumption rate */
+       shouhimana = s_ptr->smana*(3800 - experience_of_spell(spell, realm)) + 2399;
+
+       if(p_ptr->dec_mana) shouhimana *= 3;
        else shouhimana *= 4;
+
        shouhimana /= 9600;
        if(shouhimana < 1) shouhimana = 1;
 
@@ -4004,7 +3994,7 @@ s16b spell_chance(int spell, int realm)
        else if (p_ptr->dec_mana) chance-=2;
 
        if ((realm+1 == REALM_NATURE) && ((p_ptr->align > 50) || (p_ptr->align < -50))) chance += penalty;
-       if ((realm+1 == REALM_LIFE) && (p_ptr->align < -20)) chance += penalty;
+       if (((realm+1 == REALM_LIFE) || (realm+1 == REALM_CRUSADE)) && (p_ptr->align < -20)) chance += penalty;
        if (((realm+1 == REALM_DEATH) || (realm+1 == REALM_DAEMON)) && (p_ptr->align > 20)) chance += penalty;
 
        /* Minimum failure rate */
@@ -4019,8 +4009,9 @@ s16b spell_chance(int spell, int realm)
 
        if ((realm+1 == p_ptr->realm1) || (realm+1 == p_ptr->realm2))
        {
-               if(spell_exp[((p_ptr->realm1 == realm+1) ? spell: spell+32)]>1399) chance--;
-               if(spell_exp[((p_ptr->realm1 == realm+1) ? spell: spell+32)]>1599) chance--;
+               s16b exp = experience_of_spell(spell, realm);
+               if(exp > 1399) chance--;
+               if(exp > 1599) chance--;
        }
        if(p_ptr->dec_mana) chance--;
        if (p_ptr->heavy_spell) chance += 5;
@@ -4057,8 +4048,8 @@ bool spell_okay(int spell, bool learned, bool study_pray, int realm)
 
        /* Spell is forgotten */
        if ((realm == p_ptr->realm2 - 1) ?
-           (spell_forgotten2 & (1L << spell)) :
-           (spell_forgotten1 & (1L << spell)))
+           (p_ptr->spell_forgotten2 & (1L << spell)) :
+           (p_ptr->spell_forgotten1 & (1L << spell)))
        {
                /* Never okay */
                return (FALSE);
@@ -4069,8 +4060,8 @@ bool spell_okay(int spell, bool learned, bool study_pray, int realm)
 
        /* Spell is learned */
        if ((realm == p_ptr->realm2 - 1) ?
-           (spell_learned2 & (1L << spell)) :
-           (spell_learned1 & (1L << spell)))
+           (p_ptr->spell_learned2 & (1L << spell)) :
+           (p_ptr->spell_learned1 & (1L << spell)))
        {
                /* Always true */
                return (!study_pray);
@@ -4126,31 +4117,19 @@ static void spell_info(char *p, int spell, int realm)
        case 0: /* Life */
                switch (spell)
                {
-               case  1: sprintf(p, " %s2d10", s_heal); break;
-               case  2: sprintf(p, " %s12+d12", s_dur); break;
-               case  4: sprintf(p, " %s%d", s_dam, 10 + (plev / 2)); break;
-               case  6: sprintf(p, " %s4d10", s_heal); break;
+               case  0: sprintf(p, " %s2d10", s_heal); break;
+               case  1: sprintf(p, " %s12+d12", s_dur); break;
+               case  2: sprintf(p, " %s%dd4", s_dam, 3 + ((plev - 1) / 5)); break;
+               case  3: sprintf(p, " %s%d", s_dam, 10 + (plev / 2)); break;
+               case  5: sprintf(p, " %s4d10", s_heal); break;
+               case  9: sprintf(p, " %s%dd8", s_dam, 8 + ((plev - 1) / 5)); break;
                case 10: sprintf(p, " %s8d10", s_heal); break;
-               case 11: sprintf(p, " %s24+d24", s_dur); break;
-               case 12: sprintf(p, " %s3d6+%d", s_dam, orb); break;
-               case 13: sprintf(p, " %sd25+%d", s_dur, 3 * plev); break;
+               case 11: sprintf(p, " %s20+d20", s_dur); break;
                case 14: sprintf(p, " %s300", s_heal); break;
-               case 16: sprintf(p, " %sd%d", s_dam, plev); break;
-               case 18: sprintf(p, " %sd%d", s_dam, 3 * plev); break;
-               case 20: sprintf(p, " %sd%d", s_dam, 4 * plev); break;
-#ifdef JP
-               case 22: sprintf(p, " Â»:d%d/²ó:1000", 4 * plev); break;
-#else
-               case 22: sprintf(p, " d %d/h 1000", 4 * plev); break;
-#endif
-               case 24: sprintf(p, " %s25+d25", s_dur); break;
-               case 25: sprintf(p, " %s48+d48", s_dur); break;
-               case 28: sprintf(p, " %s2000", s_heal); break;
-#ifdef JP
-               case 30: sprintf(p, " ²ó300/»%d+250", plev * 4); break;
-#else
-               case 30: sprintf(p, " h300/d%d+250", plev * 4); break;
-#endif
+               case 18: sprintf(p, " %sd%d", s_dam, 5 * plev); break;
+               case 20: sprintf(p, " %s%dd15", s_dam, 5 + ((plev - 1) / 3)); break;
+               case 21: sprintf(p, " %s15+d21", s_delay); break;
+               case 29: sprintf(p, " %s2000", s_heal); break;
                case 31: sprintf(p, " %s%d+d%d", s_dur,(plev/2), (plev/2)); break;
                }
                break;
@@ -4283,7 +4262,7 @@ static void spell_info(char *p, int spell, int realm)
 #ifdef JP
                case 28: sprintf(p, " %s³Æ%d", s_dam, plev * 2); break;
 #else
-               case 28: sprintf(p, " dam %d each", plev * 2); break;
+               case 28: sprintf(p, " %s%d each", s_dam, plev * 2); break;
 #endif
                }
                break;
@@ -4362,6 +4341,45 @@ static void spell_info(char *p, int spell, int realm)
                }
                break;
                
+       case 9: /* Crusade */
+               switch (spell)
+               {
+               case  0: sprintf(p, " %s%dd4", s_dam, 3 + ((plev - 1) / 5)); break;
+               case  5: sprintf(p, " %s%d", s_range, plev*3); break;
+#ifdef JP
+               case  6: sprintf(p, " %s³Æ%dd2", s_dam, 3+((plev-1)/9)); break;
+#else
+               case  6: sprintf(p, " %s%dd2 each", s_dam, 3+((plev-1)/9)); break;
+#endif
+               case  9: sprintf(p, " %s3d6+%d", s_dam, orb); break;
+               case 10: sprintf(p, " %sd%d", s_dam, plev); break;
+               case 12: sprintf(p, " %s24+d24", s_dur); break;
+               case 13: sprintf(p, " %sd25+%d", s_dur, 3 * plev); break;
+               case 14: sprintf(p, " %s%d", s_dam, plev*5); break;
+#ifdef JP
+               case 15: sprintf(p, " Â»:d%d/²ó:100", 6 * plev); break;
+#else
+               case 15: sprintf(p, " dam:d%d/h100", 6 * plev); break;
+#endif
+               case 18: sprintf(p, " %s18+d18", s_dur); break;
+               case 19: sprintf(p, " %sd%d", s_dam, 4 * plev); break;
+               case 20: sprintf(p, " %sd%d", s_dam, 4 * plev); break;
+               case 22: sprintf(p, " %s%d", s_dam, 2 * plev+100); break;
+               case 24: sprintf(p, " %s25+d25", s_dur); break;
+               case 28: sprintf(p, " %s10+d10", s_dur); break;
+#ifdef JP
+               case 29: sprintf(p, " %s³Æ%d", s_dam, plev*3+25); break;
+#else
+               case 29: sprintf(p, " %s%d each", s_dam, plev*3+25); break;
+#endif
+#ifdef JP
+               case 30: sprintf(p, " ²ó100/»%d+%d", plev * 4, plev*11/2); break;
+#else
+               case 30: sprintf(p, " h100/dm%d+%d", plev * 4, plev*11/2); break;
+#endif
+               }
+               break;
+
        case 15: /* Music */
                switch (spell)
                {
@@ -4403,7 +4421,7 @@ void print_spells(int target_spell, byte *spells, int num, int y, int x, int rea
        bool max = FALSE;
 
 
-       if (((realm < 0) || (realm > MAX_REALM - 1)) && wizard)
+       if (((realm < 0) || (realm > MAX_REALM - 1)) && p_ptr->wizard)
 #ifdef JP
 msg_print("·Ù¹ð¡ª print_spell ¤¬Îΰè¤Ê¤·¤Ë¸Æ¤Ð¤ì¤¿");
 #else
@@ -4458,36 +4476,34 @@ put_str(buf, y, x + 29);
                        shouhimana = s_ptr->smana;
                else
                {
-                       if (p_ptr->pclass == CLASS_SORCERER)
-                               shouhimana = s_ptr->smana*2200 + 2399;
-                       else if (p_ptr->pclass == CLASS_RED_MAGE)
-                               shouhimana = s_ptr->smana*2600 + 2399;
-                       else if ((realm+1 == p_ptr->realm1) || (realm+1 == p_ptr->realm2))
-                               shouhimana = (s_ptr->smana*(3800-spell_exp[(spell+increment)])+2399);
-                       else
-                               shouhimana = s_ptr->smana*3800+2399;
-                       if(p_ptr->dec_mana)
-                               shouhimana *= 3;
+                       s16b exp = experience_of_spell(spell, realm);
+
+                       /* Extract mana consumption rate */
+                       shouhimana = s_ptr->smana*(3800 - exp) + 2399;
+
+                       if(p_ptr->dec_mana) shouhimana *= 3;
                        else shouhimana *= 4;
+
                        shouhimana /= 9600;
                        if(shouhimana < 1) shouhimana = 1;
-               }
 
-               if ((increment == 64) || (s_ptr->slevel >= 99)) shougou = 0;
-               else if (spell_exp[spell+increment]<900) shougou = 0;
-               else if (spell_exp[spell+increment]<1200) shougou = 1;
-               else if (spell_exp[spell+increment]<1400) shougou = 2;
-               else if (spell_exp[spell+increment]<1600) shougou = 3;
-               else shougou = 4;
-               max = FALSE;
-               if (!increment && (shougou == 4)) max = TRUE;
-               else if ((increment == 32) && (shougou == 3)) max = TRUE;
-               else if (s_ptr->slevel >= 99) max = TRUE;
-               else if (p_ptr->pclass == CLASS_RED_MAGE) max = TRUE;
-
-               strncpy(ryakuji,shougou_moji[shougou],4);
-               ryakuji[3] = ']';
-               ryakuji[4] = '\0';
+                       if ((increment == 64) || (s_ptr->slevel >= 99)) shougou = 0;
+                       else if (exp < 900) shougou = 0;
+                       else if (exp < 1200) shougou = 1;
+                       else if (exp < 1400) shougou = 2;
+                       else if (exp < 1600) shougou = 3;
+                       else shougou = 4;
+
+                       max = FALSE;
+                       if (!increment && (shougou == 4)) max = TRUE;
+                       else if ((increment == 32) && (shougou == 3)) max = TRUE;
+                       else if (s_ptr->slevel >= 99) max = TRUE;
+                       else if (p_ptr->pclass == CLASS_RED_MAGE) max = TRUE;
+
+                       strncpy(ryakuji,shougou_moji[shougou],4);
+                       ryakuji[3] = ']';
+                       ryakuji[4] = '\0';
+               }
 
                if (use_menu && target_spell)
                {
@@ -4560,8 +4576,8 @@ comment = " ̤
                        line_attr = TERM_L_BLUE;
                }
                else if ((realm + 1 == p_ptr->realm1) ?
-                   ((spell_forgotten1 & (1L << spell))) :
-                   ((spell_forgotten2 & (1L << spell))))
+                   ((p_ptr->spell_forgotten1 & (1L << spell))) :
+                   ((p_ptr->spell_forgotten2 & (1L << spell))))
                {
 #ifdef JP
 comment = " ËºµÑ";
@@ -4572,8 +4588,8 @@ comment = " ˺
                        line_attr = TERM_YELLOW;
                }
                else if (!((realm + 1 == p_ptr->realm1) ?
-                   (spell_learned1 & (1L << spell)) :
-                   (spell_learned2 & (1L << spell))))
+                   (p_ptr->spell_learned1 & (1L << spell)) :
+                   (p_ptr->spell_learned2 & (1L << spell))))
                {
 #ifdef JP
 comment = " Ì¤ÃÎ";
@@ -4584,8 +4600,8 @@ comment = " ̤
                        line_attr = TERM_L_BLUE;
                }
                else if (!((realm + 1 == p_ptr->realm1) ?
-                   (spell_worked1 & (1L << spell)) :
-                   (spell_worked2 & (1L << spell))))
+                   (p_ptr->spell_worked1 & (1L << spell)) :
+                   (p_ptr->spell_worked2 & (1L << spell))))
                {
 #ifdef JP
 comment = " Ì¤·Ð¸³";
@@ -4731,6 +4747,7 @@ bool hates_fire(object_type *o_ptr)
                case TV_ARCANE_BOOK:
                case TV_ENCHANT_BOOK:
                case TV_DAEMON_BOOK:
+               case TV_CRUSADE_BOOK:
                case TV_MUSIC_BOOK:
                case TV_HISSATSU_BOOK:
                {
@@ -5490,7 +5507,6 @@ bool polymorph_monster(int y, int x)
 {
        cave_type *c_ptr = &cave[y][x];
        monster_type *m_ptr = &m_list[c_ptr->m_idx];
-       bool friendly, pet;
        bool polymorphed = FALSE;
        int new_r_idx;
        int old_r_idx = m_ptr->r_idx;
@@ -5505,34 +5521,33 @@ bool polymorph_monster(int y, int x)
        /* Memorize the monster before polymorphing */
        back_m = *m_ptr;
 
-       /* Get the monsters attitude */
-       friendly = is_friendly(m_ptr);
-       pet = is_pet(m_ptr);
-
        /* Pick a "new" monster race */
        new_r_idx = poly_r_idx(old_r_idx);
 
        /* Handle polymorph */
        if (new_r_idx != old_r_idx)
        {
+               u32b mode = 0L;
+
+               /* Get the monsters attitude */
+               if (is_friendly(m_ptr)) mode |= PM_FORCE_FRIENDLY;
+               if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
+               if (m_ptr->mflag2 & MFLAG_NOPET) mode |= PM_NO_PET;
+
                /* "Kill" the "old" monster */
                delete_monster_idx(c_ptr->m_idx);
 
                /* Create a new monster (no groups) */
-               if (place_monster_aux(0, y, x, new_r_idx, FALSE, FALSE, friendly, pet, FALSE, (bool)(m_ptr->mflag2 & MFLAG_NOPET)))
+               if (place_monster_aux(0, y, x, new_r_idx, mode))
                {
                        /* Success */
                        polymorphed = TRUE;
                }
                else
                {
-                       monster_terrain_sensitive = FALSE;
-
                        /* Placing the new monster failed */
-                       place_monster_aux(0, y, x, old_r_idx, FALSE, FALSE, friendly, pet, TRUE, (bool)(m_ptr->mflag2 & MFLAG_NOPET));
+                       place_monster_aux(0, y, x, old_r_idx, (mode | PM_NO_KAGE | PM_IGNORE_TERRAIN));
                        m_list[hack_m_idx_ii] = back_m;
-
-                       monster_terrain_sensitive = TRUE;
                }
 
                if (targeted) target_who = hack_m_idx_ii;
@@ -5908,8 +5923,11 @@ msg_format("
 }
 
 
-bool summon_kin_player(bool pet, int level, int y, int x, bool group)
+bool summon_kin_player(int level, int y, int x, u32b mode)
 {
+       bool pet = (bool)(mode & PM_FORCE_PET);
+       if (!pet) mode |= PM_NO_PET;
+
        switch (p_ptr->mimic_form)
        {
        case MIMIC_NONE:
@@ -6010,5 +6028,5 @@ bool summon_kin_player(bool pet, int level, int y, int x, bool group)
                summon_kin_type = 'V';
                break;
        }       
-       return summon_specific((pet ? -1 : 0), y, x, level, SUMMON_KIN, group, FALSE, pet, FALSE, (bool)(!pet));
+       return summon_specific((pet ? -1 : 0), y, x, level, SUMMON_KIN, mode);
 }