int i;
FILE *fff;
monster_type *m_ptr;
+ char pet_name[80];
int t_friends = 0;
int show_upkeep = 0;
char file_name[1024];
/* Calculate "upkeep" for pets */
if (is_pet(m_ptr))
{
- char pet_name[80];
t_friends++;
monster_desc(pet_name, m_ptr, 0x88);
- fprintf(fff, "%s (%s)", pet_name, look_mon_desc(i, 0x00));
- if (p_ptr->riding == i)
-#ifdef JP
- fprintf(fff, " ¾èÇÏÃæ");
-#else
- fprintf(fff, " Riding");
-#endif
- fprintf(fff, "\n");
+ fprintf(fff, "%s (%s)\n", pet_name, look_mon_desc(m_ptr, 0x00));
}
}
+ /* Process the waiting pets (backwards) */
+ for (i = MAX_PARTY_MON - 1; i >= 0; i--)
+ {
+ /* Access the monster */
+ m_ptr = &party_mon[i];
+
+ /* Ignore "dead" monsters */
+ if (!m_ptr->r_idx) continue;
+
+ t_friends++;
+
+ /* List waiting pets */
+ monster_desc(pet_name, m_ptr, 0x488);
+ fprintf(fff, "%s (%s)\n", pet_name, look_mon_desc(m_ptr, 0x00));
+ }
+
show_upkeep = calculate_upkeep();
fprintf(fff, "----------------------------------------------\n");
extern void redraw_window(void);
extern bool change_panel(int dy, int dx);
extern void verify_panel(void);
-extern cptr look_mon_desc(int m_idx, u32b mode);
+extern cptr look_mon_desc(monster_type *m_ptr, u32b mode);
extern void ang_sort_aux(vptr u, vptr v, int p, int q);
extern void ang_sort(vptr u, vptr v, int n);
extern bool target_able(int m_idx);
{
bool pet = FALSE;
+ char pet_name[80];
for (i = m_max - 1; i >= 1; i--)
{
monster_type *m_ptr = &m_list[i];
- char pet_name[80];
if (!m_ptr->r_idx) continue;
if (!is_pet(m_ptr)) continue;
monster_desc(pet_name, m_ptr, 0x88);
fprintf(fff, "%s\n", pet_name);
}
+
+ for (i = MAX_PARTY_MON - 1; i >= 0; i--)
+ {
+ monster_type *m_ptr = &party_mon[i];
+
+ if (!m_ptr->r_idx) continue;
+ if (!m_ptr->nickname) continue;
+ if (!pet)
+ {
+#ifdef JP
+ fprintf(fff, "\n [¼ç¤Ê¥Ú¥Ã¥È]\n\n");
+#else
+ fprintf(fff, "\n [leading pets]\n\n");
+#endif
+ pet = TRUE;
+ }
+ monster_desc(pet_name, m_ptr, 0x488);
+ fprintf(fff, "%s\n", pet_name);
+ }
+
if (pet) fprintf(fff, "\n");
}
* 0x80 --> Assume the monster is visible
* 0x100 --> Chameleon's true name
* 0x200 --> Ignore hallucination, and penetrate shape change
+ * 0x400 --> Assume this monster pet waiting outside the floor
*
* Useful Modes:
* 0x00 --> Full nominative name ("the kobold") or "it"
strcat(desc, format("(%s)", r_name + r_info[m_ptr->r_idx].name));
}
+ if (mode & 0x400)
+ {
+#ifdef JP
+ strcat(desc,"(ÂÔµ¡Ãæ)");
+#else
+ strcat(desc,"(waiting)");
+#endif
+ }
+
/* Handle the Possessive as a special afterthought */
if (mode & 0x02)
{
/*
* Monster health description
*/
-cptr look_mon_desc(int m_idx, u32b mode)
+cptr look_mon_desc(monster_type *m_ptr, u32b mode)
{
- monster_type *m_ptr = &m_list[m_idx];
monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
bool living;
int perc;
evaluate_monster_exp(acount, m_ptr);
#ifdef JP
- sprintf(out_val, "[%s]%s%s(%s)%s%s [r»× %s%s]", acount, s1, m_name, look_mon_desc(c_ptr->m_idx, 0x01), s2, s3, x_info, info);
+ sprintf(out_val, "[%s]%s%s(%s)%s%s [r»× %s%s]", acount, s1, m_name, look_mon_desc(m_ptr, 0x01), s2, s3, x_info, info);
#else
- sprintf(out_val, "[%s]%s%s%s%s(%s) [r, %s%s]", acount, s1, s2, s3, m_name, look_mon_desc(c_ptr->m_idx, 0x01), x_info, info);
+ sprintf(out_val, "[%s]%s%s%s%s(%s) [r, %s%s]", acount, s1, s2, s3, m_name, look_mon_desc(m_ptr, 0x01), x_info, info);
#endif
prt(out_val, 0, 0);