1 #include "view/display-monster-status.h"
2 #include "monster-race/monster-race-hook.h"
3 #include "monster-race/monster-race.h"
4 #include "monster/monster-flag-types.h"
5 #include "monster/monster-info.h"
6 #include "monster/smart-learn-types.h"
9 * Monster health description
11 concptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
13 bool living = monster_living(m_ptr->ap_r_idx);
14 int perc = m_ptr->maxhp > 0 ? 100L * m_ptr->hp / m_ptr->maxhp : 0;
17 if (m_ptr->hp >= m_ptr->maxhp) {
18 desc = living ? _("無傷", "unhurt") : _("無ダメージ", "undamaged");
19 } else if (perc >= 60) {
20 desc = living ? _("軽傷", "somewhat wounded") : _("小ダメージ", "somewhat damaged");
21 } else if (perc >= 25) {
22 desc = living ? _("負傷", "wounded") : _("中ダメージ", "damaged");
23 } else if (perc >= 10) {
24 desc = living ? _("重傷", "badly wounded") : _("大ダメージ", "badly damaged");
26 desc = living ? _("半死半生", "almost dead") : _("倒れかけ", "almost destroyed");
32 } else if (is_pet(m_ptr)) {
33 attitude = _(", ペット", ", pet");
34 } else if (is_friendly(m_ptr)) {
35 attitude = _(", 友好的", ", friendly");
40 concptr clone = m_ptr->mflag2.has(MFLAG2::CLONED) ? ", clone" : "";
41 monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
42 if (ap_r_ptr->r_tkills && m_ptr->mflag2.has_not(MFLAG2::KAGE)) {
43 return format(_("レベル%d, %s%s%s", "Level %d, %s%s%s"), ap_r_ptr->level, desc, attitude, clone);
46 return format(_("レベル???, %s%s%s", "Level ???, %s%s%s"), desc, attitude, clone);