#include "objectkind-hook.h"
#include "projection.h"
#include "monster.h"
+#include "monster-spell.h"
#include "spells-summon.h"
#include "patron.h"
#include "quest.h"
if (speed != 110) hooked_roff(_("、かつ", ", and"));
}
- /* Speed */
if (speed > 110)
{
if (speed > 139) hook_c_roff(TERM_RED, _("信じ難いほど", " incredibly"));
*/
void set_pet(monster_type *m_ptr)
{
- if (!is_pet(m_ptr)) check_pets_num_and_align(m_ptr, TRUE);
-
/* Check for quest completion */
check_quest_completion(m_ptr);
void set_hostile(monster_type *m_ptr)
{
if (p_ptr->inside_battle) return;
-
- if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, FALSE);
-
m_ptr->smart &= ~SM_PET;
m_ptr->smart &= ~SM_FRIENDLY;
}
/* Notice changes in view */
if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
{
- /* Update some things */
p_ptr->update |= (PU_MON_LITE);
}
{
GAME_TEXT m_name[MAX_NLEN];
- /* Extract monster name */
- monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
+ monster_desc(m_name, m_ptr, MD_WRONGDOER_NAME);
do_cmd_write_nikki(NIKKI_ARENA, p_ptr->arena_number, m_name);
}
return _("は死んだ。", " dies.");
}
+
+/*
+ * Monster health description
+ */
+concptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
+{
+ monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
+ bool living;
+ int perc;
+ concptr desc;
+ concptr attitude;
+ concptr clone;
+
+ /* Determine if the monster is "living" */
+ living = monster_living(m_ptr->ap_r_idx);
+
+ /* Calculate a health "percentage" */
+ perc = m_ptr->maxhp > 0 ? 100L * m_ptr->hp / m_ptr->maxhp : 0;
+
+ /* Healthy monsters */
+ if (m_ptr->hp >= m_ptr->maxhp)
+ {
+ desc = living ? _("無傷", "unhurt") : _("無ダメージ", "undamaged");
+ }
+
+ else if (perc >= 60)
+ {
+ desc = living ? _("軽傷", "somewhat wounded") : _("小ダメージ", "somewhat damaged");
+ }
+
+ else if (perc >= 25)
+ {
+ desc = living ? _("負傷", "wounded") : _("中ダメージ", "damaged");
+ }
+
+ else if (perc >= 10)
+ {
+ desc = living ? _("重傷", "badly wounded") : _("大ダメージ", "badly damaged");
+ }
+
+ else
+ {
+ desc = living ? _("半死半生", "almost dead") : _("倒れかけ", "almost destroyed");
+ }
+
+ /* Need attitude information? */
+ if (!(mode & 0x01))
+ {
+ /* Full information is not needed */
+ attitude = "";
+ }
+ else if (is_pet(m_ptr))
+ {
+ attitude = _(", ペット", ", pet");
+ }
+ else if (is_friendly(m_ptr))
+ {
+ attitude = _(", 友好的", ", friendly");
+ }
+ else
+ {
+ attitude = _("", "");
+ }
+
+ /* Clone monster? */
+ if (m_ptr->smart & SM_CLONED)
+ {
+ clone = ", clone";
+ }
+ else
+ {
+ clone = "";
+ }
+
+ /* Display monster's level --- idea borrowed from ToME */
+ if (ap_r_ptr->r_tkills && !(m_ptr->mflag2 & MFLAG2_KAGE))
+ {
+ return format(_("レベル%d, %s%s%s", "Level %d, %s%s%s"), ap_r_ptr->level, desc, attitude, clone);
+ }
+ else
+ {
+ return format(_("レベル???, %s%s%s", "Level ???, %s%s%s"), desc, attitude, clone);
+ }
+
+}
+