#include "objectkind-hook.h"
#include "projection.h"
#include "monster.h"
+#include "monster-spell.h"
#include "spells-summon.h"
+#include "patron.h"
#include "quest.h"
#include "artifact.h"
#include "avatar.h"
+#include "wild.h"
/*
/* But we've also killed it */
if (dead)
{
- hooked_roff(format(
- _("が、すでに仇討ちは果たしている!",
- (", but you have avenged %s! ", plural(r_ptr->r_deaths, "him", "them")))));
+ hooked_roff(
+ _(format("が、すでに仇討ちは果たしている!"),
+ format(", but you have avenged %s! ", plural(r_ptr->r_deaths, "him", "them"))));
}
/* Unavenged (ever) */
else
{
- hooked_roff(format(
- _("のに、まだ仇討ちを果たしていない。",
- (", who %s unavenged. ", plural(r_ptr->r_deaths, "remains", "remain")))));
+ hooked_roff(
+ _(format("のに、まだ仇討ちを果たしていない。"),
+ format(", who %s unavenged. ", plural(r_ptr->r_deaths, "remains", "remain"))));
}
/* Start a new line */
if (speed != 110) hooked_roff(_("、かつ", ", and"));
}
- /* Speed */
if (speed > 110)
{
if (speed > 139) hook_c_roff(TERM_RED, _("信じ難いほど", " incredibly"));
(long)1000 / (p_ptr->max_plv + 2) + 5) / 10);
#ifdef JP
- hooked_roff(format(" %d レベルのキャラクタにとって 約%ld.%02ld ポイントの経験となる。",
- p_ptr->lev, (long)i, (long)j ));
+ hooked_roff(format(" %d レベルのキャラクタにとって 約%ld.%02ld ポイントの経験となる。", p_ptr->lev, (long)i, (long)j ));
#else
/* Mention the experience */
- hooked_roff(format(" is worth about %ld.%02ld point%s for level %d player",
- (long)i, (long)j,
- (((i == 1) && (j == 0)) ? "" : "s")), p_ptr->lev);
+ hooked_roff(format(" is worth about %ld.%02ld point%s",
+ (long)i, (long)j, ((i == 1) && (j == 0)) ? "" : "s"));
/* Take account of annoying English */
p = "th";
{
hooked_roff(format(_("%^sは経験を積むと、", "%^s will evolve into "), wd_he[msex]));
hook_c_roff(TERM_YELLOW, format("%s", r_name+r_info[r_ptr->next_r_idx].name));
- hooked_roff(format(
- _(("に進化する。"),
- (" when %s gets enugh experience. ", wd_he[msex]))));
+
+ hooked_roff(
+ _(format("に進化する。"),
+ format(" when %s gets enough experience. ", wd_he[msex])));
}
else if (!(r_ptr->flags1 & RF1_UNIQUE))
{
*/
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);
m_ptr->smart |= SM_PET;
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;
}
&& !p_ptr->inside_battle && !is_pet(m_ptr);
/* The caster is dead? */
- if (world_monster && world_monster == m_idx) world_monster = 0;
+ if (current_world_ptr->timewalk_m_idx && current_world_ptr->timewalk_m_idx == m_idx) current_world_ptr->timewalk_m_idx = 0;
/* Notice changes in view */
if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
{
- /* Update some things */
p_ptr->update |= (PU_MON_LITE);
}
r_ptr = &r_info[m_ptr->r_idx];
}
- /* Check for quest completion */
check_quest_completion(m_ptr);
/* Handle the possibility of player vanquishing arena combatant -KMW- */
{
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);
}
{
if (rakuba(-1, FALSE))
{
- msg_print(_("地面に落とされた。", "You have fallen from your riding pet."));
+ msg_print(_("地面に落とされた。", "You have fallen from the pet you were riding."));
}
}
if (drop_chosen_item)
{
ARTIFACT_IDX a_idx = 0;
- int chance = 0;
+ PERCENTAGE chance = 0;
for (i = 0; i < 4; i++)
{
play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FINAL_QUEST_CLEAR);
- do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("見事に変愚蛮怒の勝利者となった!", "become *WINNER* of Hengband finely!"));
+ do_cmd_write_nikki(NIKKI_BUNSHOU, 0, _("見事に変愚蛮怒の勝利者となった!", "finally become *WINNER* of Hengband!"));
- if ((p_ptr->pclass == CLASS_CHAOS_WARRIOR) || (p_ptr->muta2 & MUT2_CHAOS_GIFT))
- {
- msg_format(_("%sからの声が響いた。", "The voice of %s booms out:"), chaos_patrons[p_ptr->chaos_patron]);
- msg_print(_("『よくやった、定命の者よ!』", "'Thou art donst well, mortal!'"));
- }
+ admire_from_patron(p_ptr);
/* Congratulations */
msg_print(_("*** おめでとう ***", "*** CONGRATULATIONS ***"));
msg_print(_("準備が整ったら引退(自殺コマンド)しても結構です。", "You may retire (commit suicide) when you are ready."));
}
}
+
+/*!
+ * @brief モンスターを撃破した際の述語メッセージを返す /
+ * Return monster death string
+ * @param r_ptr 撃破されたモンスターの種族情報を持つ構造体の参照ポインタ
+ * @return 撃破されたモンスターの述語
+ */
+concptr extract_note_dies(MONRACE_IDX r_idx)
+{
+ monster_race *r_ptr = &r_info[r_idx];
+ /* Some monsters get "destroyed" */
+ if (!monster_living(r_idx))
+ {
+ int i;
+
+ for (i = 0; i < 4; i++)
+ {
+ if (r_ptr->blow[i].method == RBM_EXPLODE)
+ {
+ return _("は爆発して粉々になった。", " explodes into tiny shreds.");
+ }
+ }
+ return _("を倒した。", " is destroyed.");
+ }
+
+ 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);
+ }
+
+}
+