{
bool fear = FALSE;
- /* Assume a default death */
-#ifdef JP
- cptr note_dies = "¤Ï»à¤ó¤À¡£";
-#else
- cptr note_dies = " dies.";
-#endif
-
- /* Some monsters get "destroyed" */
- if (!monster_living(r_ptr))
- {
- int i;
- bool explode = FALSE;
-
- for (i = 0; i < 4; i++)
- {
- if (r_ptr->blow[i].method == RBM_EXPLODE) explode = TRUE;
- }
-
- /* Special note at death */
- if (explode)
-#ifdef JP
-note_dies = "¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£";
-#else
- note_dies = " explodes into tiny shreds.";
-#endif
- else
-#ifdef JP
- note_dies = "¤òÅݤ·¤¿¡£";
-#else
- note_dies = " is destroyed.";
-#endif
-
- }
-
/* Handle unseen monster */
if (!visible)
{
}
/* Hit the monster, check for death */
- if (mon_take_hit(c_ptr->m_idx, tdam, &fear, note_dies))
+ if (mon_take_hit(c_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_ptr(m_ptr))))
{
/* Dead monster */
}
{
bool fear = FALSE;
- /* Assume a default death */
-#ifdef JP
- cptr note_dies = "¤Ï»à¤ó¤À¡£";
-#else
- cptr note_dies = " dies.";
-#endif
-
-
- /* Some monsters get "destroyed" */
- if (!monster_living(r_ptr))
- {
- int i;
- bool explode = FALSE;
-
- for (i = 0; i < 4; i++)
- {
- if (r_ptr->blow[i].method == RBM_EXPLODE) explode = TRUE;
- }
-
- /* Special note at death */
- if (explode)
-#ifdef JP
-note_dies = "¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£";
-#else
- note_dies = " explodes into tiny shreds.";
-#endif
- else
-#ifdef JP
- note_dies = "¤òÅݤ·¤¿¡£";
-#else
- note_dies = " is destroyed.";
-#endif
-
- }
-
-
/* Handle unseen monster */
if (!visible)
{
}
/* Hit the monster, check for death */
- if (mon_take_hit(c_ptr->m_idx, tdam, &fear, note_dies))
+ if (mon_take_hit(c_ptr->m_idx, tdam, &fear, extract_note_dies(real_r_ptr(m_ptr))))
{
/* Dead monster */
}
/* xtra2.c */
extern void check_experience(void);
extern void check_quest_completion(monster_type *m_ptr);
+extern cptr extract_note_dies(monster_race *r_ptr);
extern void monster_death(int m_idx, bool drop_item);
extern bool mon_take_hit(int m_idx, int dam, bool *fear, cptr note);
extern void get_screen_size(int *wid_p, int *hgt_p);
set_tim_eyeeye(p_ptr->tim_eyeeye-5, TRUE);
}
- if (p_ptr->riding) mon_take_hit_mon(p_ptr->riding, dam, &fear, NULL, m_idx);
+ if (p_ptr->riding) mon_take_hit_mon(p_ptr->riding, dam, &fear, extract_note_dies(real_r_ptr(&m_list[p_ptr->riding])), m_idx);
}
break;
}
}
}
- mon_take_hit_mon(t_idx, dam, &fear, NULL, m_idx);
+ mon_take_hit_mon(t_idx, dam, &fear, extract_note_dies(real_r_ptr(t_ptr)), m_idx);
}
break;
}
cptr note = NULL;
/* Assume a default death */
-#ifdef JP
- cptr note_dies = "¤Ï»à¤ó¤À¡£";
-#else
- cptr note_dies = " dies.";
-#endif
+ cptr note_dies = extract_note_dies(real_r_ptr(m_ptr));
int ty = m_ptr->fy;
int tx = m_ptr->fx;
#endif
- /* Some monsters get "destroyed" */
- if (!monster_living(r_ptr))
- {
- int i;
- bool explode = FALSE;
-
- for (i = 0; i < 4; i++)
- {
- if (r_ptr->blow[i].method == RBM_EXPLODE) explode = TRUE;
- }
-
- /* Special note at death */
- if (explode)
-#ifdef JP
-note_dies = "¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£";
-#else
- note_dies = " explodes into tiny shreds.";
-#endif
- else
-#ifdef JP
-note_dies = "¤òÅݤ·¤¿¡£";
-#else
- note_dies = " is destroyed.";
-#endif
- }
-
if (p_ptr->riding && (c_ptr->m_idx == p_ptr->riding)) disturb(1, 0);
/* Analyze the damage type */
}
}
+
+/*
+ * Return monster death string
+ */
+cptr extract_note_dies(monster_race *r_ptr)
+{
+ /* Some monsters get "destroyed" */
+ if (!monster_living(r_ptr))
+ {
+ int i;
+
+ for (i = 0; i < 4; i++)
+ {
+ if (r_ptr->blow[i].method == RBM_EXPLODE)
+ {
+#ifdef JP
+ return "¤ÏÇúȯ¤·¤ÆÊ´¡¹¤Ë¤Ê¤Ã¤¿¡£";
+#else
+ return " explodes into tiny shreds.";
+#endif
+ }
+ }
+
+#ifdef JP
+ return "¤òÅݤ·¤¿¡£";
+#else
+ return " is destroyed.";
+#endif
+ }
+
+ /* Assume a default death */
+#ifdef JP
+ return "¤Ï»à¤ó¤À¡£";
+#else
+ return " dies.";
+#endif
+}
+
+
/*
* Handle the "death" of a monster.
*