ペットの解放の可否にしか使われないので, ループをPET_DISMISSのブロック
に移した上でペットがいれば途中で打ち切る仕様に変更.
int ask;
char choice;
char out_val[160];
- int pets = 0, pet_ctr;
+ int pet_ctr;
monster_type *m_ptr;
int mode = 0;
num = 0;
- /* Calculate pets */
- /* Process the monsters (backwards) */
- for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
- {
- /* Access the monster */
- m_ptr = &m_list[pet_ctr];
-
- if (is_pet(m_ptr)) pets++;
- }
-
#ifdef JP
power_desc[num] = "¥Ú¥Ã¥È¤òÊü¤¹";
#else
{
case PET_DISMISS: /* Dismiss pets */
{
- if (!pets)
+ /* Check pets (backwards) */
+ for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
+ {
+ /* Player has pet */
+ if (is_pet(&m_list[pet_ctr])) break;
+ }
+
+ if (!pet_ctr)
{
#ifdef JP
msg_print("¥Ú¥Ã¥È¤¬¤¤¤Ê¤¤¡ª");