3 * @brief モンスター情報の記述 / describe monsters (using monster memory)
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
7 * This software may be copied and distributed for educational, research,
8 * and not for profit purposes provided that this copyright and statement
9 * are included in all such copies. Other copyrights may also apply.
10 * 2014 Deskull rearranged comment for Doxygen.
21 #include "objectkind-hook.h"
22 #include "player-personality.h"
24 #include "monster-spell.h"
25 #include "monsterrace-hook.h"
26 #include "spells-summon.h"
37 #include "view-mainwindow.h"
38 #include "player-class.h"
43 * Pronoun arrays, by gender.
45 static concptr wd_he[3] =
49 { "it", "he", "she" };
52 static concptr wd_his[3] =
54 { "それの", "彼の", "彼女の" };
56 { "its", "his", "her" };
62 * 英語の複数系記述用マクロ / Pluralizer. Args(count, singular, plural)
64 #define plural(c,s,p) \
65 (((c) == 1) ? (s) : (p))
70 * @brief モンスターのAC情報を得ることができるかを返す / Determine if the "armor" is known
71 * @param r_idx モンスターの種族ID
72 * @return 敵のACを知る条件が満たされているならTRUEを返す
74 * The higher the level, the fewer kills needed.
76 static bool know_armour(MONRACE_IDX r_idx)
78 monster_race *r_ptr = &r_info[r_idx];
79 DEPTH level = r_ptr->level;
80 MONSTER_NUMBER kills = r_ptr->r_tkills;
82 bool known = (r_ptr->r_cast_spell == MAX_UCHAR) ? TRUE : FALSE;
84 if (cheat_know || known) return TRUE;
85 if (kills > 304 / (4 + level)) return TRUE;
86 if (!(r_ptr->flags1 & RF1_UNIQUE)) return FALSE;
87 if (kills > 304 / (38 + (5 * level) / 4)) return TRUE;
93 * @brief モンスターの打撃威力を知ることができるかどうかを返す
94 * Determine if the "damage" of the given attack is known
95 * @param r_idx モンスターの種族ID
97 * @return 敵のダメージダイスを知る条件が満たされているならTRUEを返す
100 * the higher the level of the monster, the fewer the attacks you need,
101 * the more damage an attack does, the more attacks you need
104 static bool know_damage(MONRACE_IDX r_idx, int i)
106 monster_race *r_ptr = &r_info[r_idx];
108 DEPTH level = r_ptr->level;
110 s32b a = r_ptr->r_blows[i];
112 s32b d1 = r_ptr->blow[i].d_dice;
113 s32b d2 = r_ptr->blow[i].d_side;
117 if (d >= ((4 + level)*MAX_UCHAR) / 80) d = ((4 + level)*MAX_UCHAR - 1) / 80;
118 if ((4 + level) * a > 80 * d) return TRUE;
119 if (!(r_ptr->flags1 & RF1_UNIQUE)) return FALSE;
120 if ((4 + level) * (2 * a) > 80 * d) return TRUE;
128 * Prepare hook for c_roff(). It will be changed for spoiler generation in wizard1.c.
130 void(*hook_c_roff)(TERM_COLOR attr, concptr str) = c_roff;
133 * @brief モンスターの思い出メッセージをあらかじめ指定された関数ポインタに基づき出力する
137 static void hooked_roff(concptr str)
140 hook_c_roff(TERM_WHITE, str);
144 * @brief ダイス目を文字列に変換する
145 * @param base_damage 固定値
146 * @param dice_num ダイス数
147 * @param dice_side ダイス面
148 * @param dice_mult ダイス倍率
149 * @param dice_div ダイス除数
150 * @param msg 文字列を格納するポインタ
153 void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg)
155 char base[80] = "", dice[80] = "", mult[80] = "";
159 sprintf(msg, "%d", base_damage);
163 if (base_damage != 0)
164 sprintf(base, "%d+", base_damage);
167 sprintf(dice, "d%d", dice_side);
169 sprintf(dice, "%dd%d", dice_num, dice_side);
171 if (dice_mult != 1 || dice_div != 1)
174 sprintf(mult, "*%d", dice_mult);
176 sprintf(mult, "*(%d/%d)", dice_mult, dice_div);
178 sprintf(msg, "%s%s%s", base, dice, mult);
183 * @brief 文字列にモンスターの攻撃力を加える
184 * @param r_idx モンスターの種族ID
185 * @param SPELL_NUM 呪文番号
187 * @param tmp 返すメッセージを格納する配列
190 void set_damage(player_type *player_ptr, MONRACE_IDX r_idx, int SPELL_NUM, char* msg, char* tmp)
192 int base_damage = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, BASE_DAM);
193 int dice_num = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, DICE_NUM);
194 int dice_side = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, DICE_SIDE);
195 int dice_mult = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, DICE_MULT);
196 int dice_div = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, DICE_DIV);
197 char dmg_str[80], dice_str[80];
198 dice_to_string(base_damage, dice_num, dice_side, dice_mult, dice_div, dmg_str);
199 sprintf(dice_str, "(%s)", dmg_str);
201 if (know_armour(r_idx))
202 sprintf(tmp, msg, dice_str);
204 sprintf(tmp, msg, "");
208 * @brief モンスターの思い出情報を表示する
209 * Hack -- display monster information using "hooked_roff()"
210 * @param r_idx モンスターの種族ID
211 * @param mode 表示オプション
214 * This function should only be called with the cursor placed at the
215 * left edge of the screen, on a cleared line, in which the recall is
216 * to take place. One extra blank line is left after the recall.
218 static void roff_aux(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
220 monster_race *r_ptr = &r_info[r_idx];
232 bool nightmare = ironman_nightmare && !(mode & 0x02);
233 SPEED speed = nightmare ? r_ptr->speed + 5 : r_ptr->speed;
237 bool reinforce = FALSE;
243 BIT_FLAGS a_ability_flags1;
244 BIT_FLAGS a_ability_flags2;
248 ITEM_NUMBER drop_gold, drop_item;
253 char tmp_msg[96][96];
255 bool know_everything = FALSE;
257 /* Obtain a copy of the "known" number of drops */
258 drop_gold = r_ptr->r_drop_gold;
259 drop_item = r_ptr->r_drop_item;
261 /* Obtain a copy of the "known" flags */
262 flags1 = (r_ptr->flags1 & r_ptr->r_flags1);
263 flags2 = (r_ptr->flags2 & r_ptr->r_flags2);
264 flags3 = (r_ptr->flags3 & r_ptr->r_flags3);
265 flags4 = (r_ptr->flags4 & r_ptr->r_flags4);
266 a_ability_flags1 = (r_ptr->a_ability_flags1 & r_ptr->r_flags5);
267 a_ability_flags2 = (r_ptr->a_ability_flags2 & r_ptr->r_flags6);
268 flags7 = (r_ptr->flags7 & r_ptr->flags7);
269 flagsr = (r_ptr->flagsr & r_ptr->r_flagsr);
271 for (n = 0; n < A_MAX; n++)
273 if (r_ptr->reinforce_id[n] > 0) reinforce = TRUE;
276 /* cheat_know or research_mon() */
277 if (cheat_know || (mode & 0x01))
278 know_everything = TRUE;
280 /* Cheat -- Know everything */
283 /* Hack -- maximal drops */
284 drop_gold = drop_item =
285 (((r_ptr->flags1 & RF1_DROP_4D2) ? 8 : 0) +
286 ((r_ptr->flags1 & RF1_DROP_3D2) ? 6 : 0) +
287 ((r_ptr->flags1 & RF1_DROP_2D2) ? 4 : 0) +
288 ((r_ptr->flags1 & RF1_DROP_1D2) ? 2 : 0) +
289 ((r_ptr->flags1 & RF1_DROP_90) ? 1 : 0) +
290 ((r_ptr->flags1 & RF1_DROP_60) ? 1 : 0));
292 /* Hack -- but only "valid" drops */
293 if (r_ptr->flags1 & RF1_ONLY_GOLD) drop_item = 0;
294 if (r_ptr->flags1 & RF1_ONLY_ITEM) drop_gold = 0;
296 /* Hack -- know all the flags */
297 flags1 = r_ptr->flags1;
298 flags2 = r_ptr->flags2;
299 flags3 = r_ptr->flags3;
300 flags4 = r_ptr->flags4;
301 a_ability_flags1 = r_ptr->a_ability_flags1;
302 a_ability_flags2 = r_ptr->a_ability_flags2;
303 flagsr = r_ptr->flagsr;
307 /* Extract a gender (if applicable) */
308 if (r_ptr->flags1 & RF1_FEMALE) msex = 2;
309 else if (r_ptr->flags1 & RF1_MALE) msex = 1;
311 /* Assume some "obvious" flags */
312 if (r_ptr->flags1 & RF1_UNIQUE) flags1 |= (RF1_UNIQUE);
313 if (r_ptr->flags1 & RF1_QUESTOR) flags1 |= (RF1_QUESTOR);
314 if (r_ptr->flags1 & RF1_MALE) flags1 |= (RF1_MALE);
315 if (r_ptr->flags1 & RF1_FEMALE) flags1 |= (RF1_FEMALE);
317 /* Assume some "creation" flags */
318 if (r_ptr->flags1 & RF1_FRIENDS) flags1 |= (RF1_FRIENDS);
319 if (r_ptr->flags1 & RF1_ESCORT) flags1 |= (RF1_ESCORT);
320 if (r_ptr->flags1 & RF1_ESCORTS) flags1 |= (RF1_ESCORTS);
322 /* Killing a monster reveals some properties */
323 if (r_ptr->r_tkills || know_everything)
325 /* Know "race" flags */
326 if (r_ptr->flags3 & RF3_ORC) flags3 |= (RF3_ORC);
327 if (r_ptr->flags3 & RF3_TROLL) flags3 |= (RF3_TROLL);
328 if (r_ptr->flags3 & RF3_GIANT) flags3 |= (RF3_GIANT);
329 if (r_ptr->flags3 & RF3_DRAGON) flags3 |= (RF3_DRAGON);
330 if (r_ptr->flags3 & RF3_DEMON) flags3 |= (RF3_DEMON);
331 if (r_ptr->flags3 & RF3_UNDEAD) flags3 |= (RF3_UNDEAD);
332 if (r_ptr->flags3 & RF3_EVIL) flags3 |= (RF3_EVIL);
333 if (r_ptr->flags3 & RF3_GOOD) flags3 |= (RF3_GOOD);
334 if (r_ptr->flags3 & RF3_ANIMAL) flags3 |= (RF3_ANIMAL);
335 if (r_ptr->flags3 & RF3_AMBERITE) flags3 |= (RF3_AMBERITE);
336 if (r_ptr->flags2 & RF2_HUMAN) flags2 |= (RF2_HUMAN);
338 /* Know 'quantum' flag */
339 if (r_ptr->flags2 & RF2_QUANTUM) flags2 |= (RF2_QUANTUM);
341 /* Know "forced" flags */
342 if (r_ptr->flags1 & RF1_FORCE_DEPTH) flags1 |= (RF1_FORCE_DEPTH);
343 if (r_ptr->flags1 & RF1_FORCE_MAXHP) flags1 |= (RF1_FORCE_MAXHP);
346 /* For output_monster_spoiler() */
353 /* Treat uniques differently */
354 if (flags1 & RF1_UNIQUE)
356 /* Hack -- Determine if the unique is "dead" */
357 bool dead = (r_ptr->max_num == 0) ? TRUE : FALSE;
359 /* We've been killed... */
362 /* Killed ancestors */
363 hooked_roff(format(_("%^sはあなたの先祖を %d 人葬っている", "%^s has slain %d of your ancestors"),
364 wd_he[msex], r_ptr->r_deaths));
366 /* But we've also killed it */
370 _(format("が、すでに仇討ちは果たしている!"),
371 format(", but you have avenged %s! ", plural(r_ptr->r_deaths, "him", "them"))));
374 /* Unavenged (ever) */
378 _(format("のに、まだ仇討ちを果たしていない。"),
379 format(", who %s unavenged. ", plural(r_ptr->r_deaths, "remains", "remain"))));
382 /* Start a new line */
386 /* Dead unique who never hurt us */
389 hooked_roff(_("あなたはこの仇敵をすでに葬り去っている。", "You have slain this foe. "));
391 /* Start a new line */
396 /* Not unique, but killed us */
397 else if (r_ptr->r_deaths)
401 _(format("このモンスターはあなたの先祖を %d 人葬っている", r_ptr->r_deaths),
402 format("%d of your ancestors %s been killed by this creature, ", r_ptr->r_deaths, plural(r_ptr->r_deaths, "has", "have"))));
404 /* Some kills this life */
408 _("が、あなたはこのモンスターを少なくとも %d 体は倒している。",
409 "and you have exterminated at least %d of the creatures. "), r_ptr->r_pkills));
412 /* Some kills past lives */
413 else if (r_ptr->r_tkills)
416 _("が、あなたの先祖はこのモンスターを少なくとも %d 体は倒している。",
417 "and your ancestors have exterminated at least %d of the creatures. "), r_ptr->r_tkills));
424 _("が、まだ%sを倒したことはない。",
425 "and %s is not ever known to have been defeated. "), wd_he[msex]));
428 /* Start a new line */
433 /* Killed some this life */
437 _("あなたはこのモンスターを少なくとも %d 体は殺している。",
438 "You have killed at least %d of these creatures. "), r_ptr->r_pkills));
441 /* Killed some last life */
442 else if (r_ptr->r_tkills)
445 _("あなたの先祖はこのモンスターを少なくとも %d 体は殺している。",
446 "Your ancestors have killed at least %d of these creatures. "), r_ptr->r_tkills));
452 hooked_roff(_("このモンスターを倒したことはない。", "No battles to the death are recalled. "));
455 /* Start a new line */
461 concptr tmp = r_text + r_ptr->text;
468 /* Start a new line */
473 if (r_idx == MON_KAGE)
484 /* Describe location */
485 if (r_ptr->level == 0)
487 hooked_roff(format(_("%^sは町に住み", "%^s lives in the town"), wd_he[msex]));
490 else if (r_ptr->r_tkills || know_everything)
495 _("%^sは通常地下 %d フィートで出現し", "%^s is normally found at depths of %d feet"),
496 wd_he[msex], r_ptr->level * 50));
501 _("%^sは通常地下 %d 階で出現し", "%^s is normally found on dungeon level %d"),
502 wd_he[msex], r_ptr->level));
508 /* Describe movement */
509 if (r_idx == MON_CHAMELEON)
511 hooked_roff(_("、他のモンスターに化ける。", "and can take the shape of other monster."));
519 hooked_roff(_("、", ", and "));
523 hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
528 hooked_roff("moves");
532 if ((flags1 & RF1_RAND_50) || (flags1 & RF1_RAND_25))
535 if ((flags1 & RF1_RAND_50) && (flags1 & RF1_RAND_25))
537 hooked_roff(_("かなり", " extremely"));
539 else if (flags1 & RF1_RAND_50)
541 hooked_roff(_("幾分", " somewhat"));
543 else if (flags1 & RF1_RAND_25)
545 hooked_roff(_("少々", " a bit"));
549 hooked_roff(_("不規則に", " erratically"));
551 /* Hack -- Occasional conjunction */
552 if (speed != 110) hooked_roff(_("、かつ", ", and"));
557 if (speed > 139) hook_c_roff(TERM_RED, _("信じ難いほど", " incredibly"));
558 else if (speed > 134) hook_c_roff(TERM_ORANGE, _("猛烈に", " extremely"));
559 else if (speed > 129) hook_c_roff(TERM_ORANGE, _("非常に", " very"));
560 else if (speed > 124) hook_c_roff(TERM_UMBER, _("かなり", " fairly"));
561 else if (speed < 120) hook_c_roff(TERM_L_UMBER, _("やや", " somewhat"));
562 hook_c_roff(TERM_L_RED, _("素早く", " quickly"));
564 else if (speed < 110)
566 if (speed < 90) hook_c_roff(TERM_L_GREEN, _("信じ難いほど", " incredibly"));
567 else if (speed < 95) hook_c_roff(TERM_BLUE, _("非常に", " very"));
568 else if (speed < 100) hook_c_roff(TERM_BLUE, _("かなり", " fairly"));
569 else if (speed > 104) hook_c_roff(TERM_GREEN, _("やや", " somewhat"));
570 hook_c_roff(TERM_L_BLUE, _("ゆっくりと", " slowly"));
574 hooked_roff(_("普通の速さで", " at normal speed"));
577 hooked_roff("動いている");
581 /* The code above includes "attack speed" */
582 if (flags1 & RF1_NEVER_MOVE)
587 hooked_roff(_("、しかし", ", but "));
591 hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
594 hooked_roff(_("侵入者を追跡しない", "does not deign to chase intruders"));
597 /* End this sentence */
600 hooked_roff(_("。", ". "));
605 /* Describe experience if known */
606 if (r_ptr->r_tkills || know_everything)
612 if (flags1 & RF1_UNIQUE)
614 hooked_roff("Killing this");
618 hooked_roff("A kill of this");
623 /* Describe the "quality" */
624 if (flags2 & RF2_ELDRITCH_HORROR) hook_c_roff(TERM_VIOLET, _("狂気を誘う", " sanity-blasting"));/*nuke me*/
625 if (flags3 & RF3_ANIMAL) hook_c_roff(TERM_L_GREEN, _("自然界の", " natural"));
626 if (flags3 & RF3_EVIL) hook_c_roff(TERM_L_DARK, _("邪悪なる", " evil"));
627 if (flags3 & RF3_GOOD) hook_c_roff(TERM_YELLOW, _("善良な", " good"));
628 if (flags3 & RF3_UNDEAD) hook_c_roff(TERM_VIOLET, _("アンデッドの", " undead"));
629 if (flags3 & RF3_AMBERITE) hook_c_roff(TERM_VIOLET, _("アンバーの王族の", " Amberite"));
631 if ((flags3 & (RF3_DRAGON | RF3_DEMON | RF3_GIANT | RF3_TROLL | RF3_ORC | RF3_ANGEL)) || (flags2 & (RF2_QUANTUM | RF2_HUMAN)))
633 /* Describe the "race" */
634 if (flags3 & RF3_DRAGON) hook_c_roff(TERM_ORANGE, _("ドラゴン", " dragon"));
635 if (flags3 & RF3_DEMON) hook_c_roff(TERM_VIOLET, _("デーモン", " demon"));
636 if (flags3 & RF3_GIANT) hook_c_roff(TERM_L_UMBER, _("巨人", " giant"));
637 if (flags3 & RF3_TROLL) hook_c_roff(TERM_BLUE, _("トロル", " troll"));
638 if (flags3 & RF3_ORC) hook_c_roff(TERM_UMBER, _("オーク", " orc"));
639 if (flags2 & RF2_HUMAN) hook_c_roff(TERM_L_WHITE, _("人間", " human"));
640 if (flags2 & RF2_QUANTUM) hook_c_roff(TERM_VIOLET, _("量子生物", " quantum creature"));
641 if (flags3 & RF3_ANGEL) hook_c_roff(TERM_YELLOW, _("天使", " angel"));
645 hooked_roff(_("モンスター", " creature"));
649 hooked_roff("を倒すことは");
651 /* Group some variables */
655 /* calculate the integer exp part */
656 i = (long)r_ptr->mexp * r_ptr->level / (player_ptr->max_plv + 2) * 3 / 2;
658 /* calculate the fractional exp part scaled by 100, */
659 /* must use long arithmetic to avoid overflow */
660 j = ((((long)r_ptr->mexp * r_ptr->level % (player_ptr->max_plv + 2) * 3 / 2) *
661 (long)1000 / (player_ptr->max_plv + 2) + 5) / 10);
664 hooked_roff(format(" %d レベルのキャラクタにとって 約%ld.%02ld ポイントの経験となる。", player_ptr->lev, (long)i, (long)j));
667 /* Mention the experience */
668 hooked_roff(format(" is worth about %ld.%02ld point%s",
669 (long)i, (long)j, ((i == 1) && (j == 0)) ? "" : "s"));
671 /* Take account of annoying English */
673 i = player_ptr->lev % 10;
674 if ((player_ptr->lev / 10) == 1) /* nothing */;
675 else if (i == 1) p = "st";
676 else if (i == 2) p = "nd";
677 else if (i == 3) p = "rd";
679 /* Take account of "leading vowels" in numbers */
682 if ((i == 8) || (i == 11) || (i == 18)) q = "n";
684 /* Mention the dependance on the player's level */
685 hooked_roff(format(" for a%s %lu%s level character. ",
692 if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC) && (flags3 & RF3_AURA_COLD))
694 hook_c_roff(TERM_VIOLET, format(
695 _("%^sは炎と氷とスパークに包まれている。", "%^s is surrounded by flames, ice and electricity. "), wd_he[msex]));
697 else if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC))
699 hook_c_roff(TERM_L_RED, format(
700 _("%^sは炎とスパークに包まれている。", "%^s is surrounded by flames and electricity. "), wd_he[msex]));
702 else if ((flags2 & RF2_AURA_FIRE) && (flags3 & RF3_AURA_COLD))
704 hook_c_roff(TERM_BLUE, format(
705 _("%^sは炎と氷に包まれている。", "%^s is surrounded by flames and ice. "), wd_he[msex]));
707 else if ((flags3 & RF3_AURA_COLD) && (flags2 & RF2_AURA_ELEC))
709 hook_c_roff(TERM_L_GREEN, format(
710 _("%^sは氷とスパークに包まれている。", "%^s is surrounded by ice and electricity. "), wd_he[msex]));
712 else if (flags2 & RF2_AURA_FIRE)
714 hook_c_roff(TERM_RED, format(
715 _("%^sは炎に包まれている。", "%^s is surrounded by flames. "), wd_he[msex]));
717 else if (flags3 & RF3_AURA_COLD)
719 hook_c_roff(TERM_BLUE, format(
720 _("%^sは氷に包まれている。", "%^s is surrounded by ice. "), wd_he[msex]));
722 else if (flags2 & RF2_AURA_ELEC)
724 hook_c_roff(TERM_L_BLUE, format(
725 _("%^sはスパークに包まれている。", "%^s is surrounded by electricity. "), wd_he[msex]));
728 if (flags2 & RF2_REFLECTING)
729 hooked_roff(format(_("%^sは矢の呪文を跳ね返す。", "%^s reflects bolt spells. "), wd_he[msex]));
731 /* Describe escorts */
732 if ((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS) || reinforce)
735 _("%^sは通常護衛を伴って現れる。", "%^s usually appears with escorts. "), wd_he[msex]));
739 hooked_roff(_("護衛の構成は", "These escorts"));
740 if ((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS))
742 hooked_roff(_("少なくとも", " at the least"));
746 hooked_roff(" contain ");
748 for (n = 0; n < A_MAX; n++)
750 if (r_ptr->reinforce_id[n] && r_ptr->reinforce_dd[n] && r_ptr->reinforce_ds[n])
752 monster_race *rf_ptr = &r_info[r_ptr->reinforce_id[n]];
753 if (rf_ptr->flags1 & RF1_UNIQUE)
755 hooked_roff(format(_("、%s", ", %s"), r_name + rf_ptr->name));
760 hooked_roff(format("、 %dd%d 体の%s", r_ptr->reinforce_dd[n], r_ptr->reinforce_ds[n], r_name + rf_ptr->name));
762 bool plural = (r_ptr->reinforce_dd[n] * r_ptr->reinforce_ds[n] > 1);
763 GAME_TEXT name[MAX_NLEN];
764 strcpy(name, r_name + rf_ptr->name);
765 if (plural) plural_aux(name);
766 hooked_roff(format(",%dd%d %s", r_ptr->reinforce_dd[n], r_ptr->reinforce_ds[n], name));
771 hooked_roff(_("で成り立っている。", "."));
775 /* Describe friends */
776 else if (flags1 & RF1_FRIENDS)
778 hooked_roff(format(_("%^sは通常集団で現れる。", "%^s usually appears in groups. "), wd_he[msex]));
782 /* Collect inate attacks */
784 if (flags4 & RF4_SHRIEK) { vp[vn] = _("悲鳴で助けを求める", "shriek for help"); color[vn++] = TERM_L_WHITE; }
785 if (flags4 & RF4_ROCKET)
787 set_damage(player_ptr, r_idx, (MS_ROCKET), _("ロケット%sを発射する", "shoot a rocket%s"), tmp_msg[vn]);
788 vp[vn] = tmp_msg[vn];
789 color[vn++] = TERM_UMBER;
792 if (flags4 & RF4_SHOOT)
794 for (r = 0, m = 0; m < 4; m++)
796 if (r_ptr->blow[m].method == RBM_SHOOT)
798 if (know_armour(r_idx))
799 sprintf(tmp_msg[vn], _("威力 %dd%d の射撃をする", "fire an arrow (Power:%dd%d)"), r_ptr->blow[m].d_side, r_ptr->blow[m].d_dice);
801 sprintf(tmp_msg[vn], _("射撃をする", "fire an arrow"));
802 vp[vn] = tmp_msg[vn]; color[vn++] = TERM_UMBER;
807 if (a_ability_flags2 & (RF6_SPECIAL)) { vp[vn] = _("特別な行動をする", "do something"); color[vn++] = TERM_VIOLET; }
809 /* Describe inate attacks */
813 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
817 for (n = 0; n < vn; n++)
822 jverb(vp[n], jverb_buf, JVERB_OR);
823 hook_c_roff(color[n], jverb_buf);
824 hook_c_roff(color[n], "り");
827 else hook_c_roff(color[n], vp[n]);
830 if (n == 0) hooked_roff(" may ");
831 else if (n < vn - 1) hooked_roff(", ");
832 else hooked_roff(" or ");
835 hook_c_roff(color[n], vp[n]);
841 hooked_roff(_("ことがある。", ". "));
845 /* Collect breaths */
847 if (flags4 & (RF4_BR_ACID))
849 set_damage(player_ptr, r_idx, (MS_BR_ACID), _("酸%s", "acid%s"), tmp_msg[vn]);
850 vp[vn] = tmp_msg[vn];
851 color[vn++] = TERM_GREEN;
853 if (flags4 & (RF4_BR_ELEC))
855 set_damage(player_ptr, r_idx, (MS_BR_ELEC), _("稲妻%s", "lightning%s"), tmp_msg[vn]);
856 vp[vn] = tmp_msg[vn];
857 color[vn++] = TERM_BLUE;
859 if (flags4 & (RF4_BR_FIRE))
861 set_damage(player_ptr, r_idx, (MS_BR_FIRE), _("火炎%s", "fire%s"), tmp_msg[vn]);
862 vp[vn] = tmp_msg[vn];
863 color[vn++] = TERM_RED;
865 if (flags4 & (RF4_BR_COLD))
867 set_damage(player_ptr, r_idx, (MS_BR_COLD), _("冷気%s", "frost%s"), tmp_msg[vn]);
868 vp[vn] = tmp_msg[vn];
869 color[vn++] = TERM_L_WHITE;
871 if (flags4 & (RF4_BR_POIS))
873 set_damage(player_ptr, r_idx, (MS_BR_POIS), _("毒%s", "poison%s"), tmp_msg[vn]);
874 vp[vn] = tmp_msg[vn];
875 color[vn++] = TERM_L_GREEN;
877 if (flags4 & (RF4_BR_NETH))
879 set_damage(player_ptr, r_idx, (MS_BR_NETHER), _("地獄%s", "nether%s"), tmp_msg[vn]);
880 vp[vn] = tmp_msg[vn];
881 color[vn++] = TERM_L_DARK;
883 if (flags4 & (RF4_BR_LITE))
885 set_damage(player_ptr, r_idx, (MS_BR_LITE), _("閃光%s", "light%s"), tmp_msg[vn]);
886 vp[vn] = tmp_msg[vn];
887 color[vn++] = TERM_YELLOW;
889 if (flags4 & (RF4_BR_DARK))
891 set_damage(player_ptr, r_idx, (MS_BR_DARK), _("暗黒%s", "darkness%s"), tmp_msg[vn]);
892 vp[vn] = tmp_msg[vn];
893 color[vn++] = TERM_L_DARK;
895 if (flags4 & (RF4_BR_CONF))
897 set_damage(player_ptr, r_idx, (MS_BR_CONF), _("混乱%s", "confusion%s"), tmp_msg[vn]);
898 vp[vn] = tmp_msg[vn];
899 color[vn++] = TERM_L_UMBER;
901 if (flags4 & (RF4_BR_SOUN))
903 set_damage(player_ptr, r_idx, (MS_BR_SOUND), _("轟音%s", "sound%s"), tmp_msg[vn]);
904 vp[vn] = tmp_msg[vn];
905 color[vn++] = TERM_ORANGE;
907 if (flags4 & (RF4_BR_CHAO))
909 set_damage(player_ptr, r_idx, (MS_BR_CHAOS), _("カオス%s", "chaos%s"), tmp_msg[vn]);
910 vp[vn] = tmp_msg[vn];
911 color[vn++] = TERM_VIOLET;
913 if (flags4 & (RF4_BR_DISE))
915 set_damage(player_ptr, r_idx, (MS_BR_DISEN), _("劣化%s", "disenchantment%s"), tmp_msg[vn]);
916 vp[vn] = tmp_msg[vn];
917 color[vn++] = TERM_VIOLET;
919 if (flags4 & (RF4_BR_NEXU))
921 set_damage(player_ptr, r_idx, (MS_BR_NEXUS), _("因果混乱%s", "nexus%s"), tmp_msg[vn]);
922 vp[vn] = tmp_msg[vn];
923 color[vn++] = TERM_VIOLET;
925 if (flags4 & (RF4_BR_TIME))
927 set_damage(player_ptr, r_idx, (MS_BR_TIME), _("時間逆転%s", "time%s"), tmp_msg[vn]);
928 vp[vn] = tmp_msg[vn];
929 color[vn++] = TERM_L_BLUE;
931 if (flags4 & (RF4_BR_INER))
933 set_damage(player_ptr, r_idx, (MS_BR_INERTIA), _("遅鈍%s", "inertia%s"), tmp_msg[vn]);
934 vp[vn] = tmp_msg[vn];
935 color[vn++] = TERM_SLATE;
937 if (flags4 & (RF4_BR_GRAV))
939 set_damage(player_ptr, r_idx, (MS_BR_GRAVITY), _("重力%s", "gravity%s"), tmp_msg[vn]);
940 vp[vn] = tmp_msg[vn];
941 color[vn++] = TERM_SLATE;
943 if (flags4 & (RF4_BR_SHAR))
945 set_damage(player_ptr, r_idx, (MS_BR_SHARDS), _("破片%s", "shards%s"), tmp_msg[vn]);
946 vp[vn] = tmp_msg[vn];
947 color[vn++] = TERM_L_UMBER;
949 if (flags4 & (RF4_BR_PLAS))
951 set_damage(player_ptr, r_idx, (MS_BR_PLASMA), _("プラズマ%s", "plasma%s"), tmp_msg[vn]);
952 vp[vn] = tmp_msg[vn];
953 color[vn++] = TERM_L_RED;
955 if (flags4 & (RF4_BR_WALL))
957 set_damage(player_ptr, r_idx, (MS_BR_FORCE), _("フォース%s", "force%s"), tmp_msg[vn]);
958 vp[vn] = tmp_msg[vn];
959 color[vn++] = TERM_UMBER;
961 if (flags4 & (RF4_BR_MANA))
963 set_damage(player_ptr, r_idx, (MS_BR_MANA), _("魔力%s", "mana%s"), tmp_msg[vn]);
964 vp[vn] = tmp_msg[vn];
965 color[vn++] = TERM_L_BLUE;
967 if (flags4 & (RF4_BR_NUKE))
969 set_damage(player_ptr, r_idx, (MS_BR_NUKE), _("放射性廃棄物%s", "toxic waste%s"), tmp_msg[vn]);
970 vp[vn] = tmp_msg[vn];
971 color[vn++] = TERM_L_GREEN;
973 if (flags4 & (RF4_BR_DISI))
975 set_damage(player_ptr, r_idx, (MS_BR_DISI), _("分解%s", "disintegration%s"), tmp_msg[vn]);
976 vp[vn] = tmp_msg[vn];
977 color[vn++] = TERM_SLATE;
980 /* Describe breaths */
987 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
990 for (n = 0; n < vn; n++)
994 if (n != 0) hooked_roff("や");
996 if (n == 0) hooked_roff(" may breathe ");
997 else if (n < vn - 1) hooked_roff(", ");
998 else hooked_roff(" or ");
1003 hook_c_roff(color[n], vp[n]);
1006 hooked_roff("のブレスを吐くことがある");
1011 /* Collect spells */
1013 if (a_ability_flags1 & (RF5_BA_ACID))
1015 set_damage(player_ptr, r_idx, (MS_BALL_ACID), _("アシッド・ボール%s", "produce acid balls%s"), tmp_msg[vn]);
1016 vp[vn] = tmp_msg[vn];
1017 color[vn++] = TERM_GREEN;
1019 if (a_ability_flags1 & (RF5_BA_ELEC))
1021 set_damage(player_ptr, r_idx, (MS_BALL_ELEC), _("サンダー・ボール%s", "produce lightning balls%s"), tmp_msg[vn]);
1022 vp[vn] = tmp_msg[vn];
1023 color[vn++] = TERM_BLUE;
1025 if (a_ability_flags1 & (RF5_BA_FIRE))
1027 set_damage(player_ptr, r_idx, (MS_BALL_FIRE), _("ファイア・ボール%s", "produce fire balls%s"), tmp_msg[vn]);
1028 vp[vn] = tmp_msg[vn];
1029 color[vn++] = TERM_RED;
1031 if (a_ability_flags1 & (RF5_BA_COLD))
1033 set_damage(player_ptr, r_idx, (MS_BALL_COLD), _("アイス・ボール%s", "produce frost balls%s"), tmp_msg[vn]);
1034 vp[vn] = tmp_msg[vn];
1035 color[vn++] = TERM_L_WHITE;
1037 if (a_ability_flags1 & (RF5_BA_POIS))
1039 set_damage(player_ptr, r_idx, (MS_BALL_POIS), _("悪臭雲%s", "produce poison balls%s"), tmp_msg[vn]);
1040 vp[vn] = tmp_msg[vn];
1041 color[vn++] = TERM_L_GREEN;
1043 if (a_ability_flags1 & (RF5_BA_NETH))
1045 set_damage(player_ptr, r_idx, (MS_BALL_NETHER), _("地獄球%s", "produce nether balls%s"), tmp_msg[vn]);
1046 vp[vn] = tmp_msg[vn];
1047 color[vn++] = TERM_L_DARK;
1049 if (a_ability_flags1 & (RF5_BA_WATE))
1051 set_damage(player_ptr, r_idx, (MS_BALL_WATER), _("ウォーター・ボール%s", "produce water balls%s"), tmp_msg[vn]);
1052 vp[vn] = tmp_msg[vn];
1053 color[vn++] = TERM_BLUE;
1055 if (flags4 & (RF4_BA_NUKE))
1057 set_damage(player_ptr, r_idx, (MS_BALL_NUKE), _("放射能球%s", "produce balls of radiation%s"), tmp_msg[vn]);
1058 vp[vn] = tmp_msg[vn];
1059 color[vn++] = TERM_L_GREEN;
1061 if (a_ability_flags1 & (RF5_BA_MANA))
1063 set_damage(player_ptr, r_idx, (MS_BALL_MANA), _("魔力の嵐%s", "invoke mana storms%s"), tmp_msg[vn]);
1064 vp[vn] = tmp_msg[vn];
1065 color[vn++] = TERM_L_BLUE;
1067 if (a_ability_flags1 & (RF5_BA_DARK))
1069 set_damage(player_ptr, r_idx, (MS_BALL_DARK), _("暗黒の嵐%s", "invoke darkness storms%s"), tmp_msg[vn]);
1070 vp[vn] = tmp_msg[vn];
1071 color[vn++] = TERM_L_DARK;
1073 if (a_ability_flags1 & (RF5_BA_LITE))
1075 set_damage(player_ptr, r_idx, (MS_STARBURST), _("スターバースト%s", "invoke starburst%s"), tmp_msg[vn]);
1076 vp[vn] = tmp_msg[vn];
1077 color[vn++] = TERM_YELLOW;
1079 if (flags4 & (RF4_BA_CHAO))
1081 set_damage(player_ptr, r_idx, (MS_BALL_CHAOS), _("純ログルス%s", "invoke raw Logrus%s"), tmp_msg[vn]);
1082 vp[vn] = tmp_msg[vn];
1083 color[vn++] = TERM_VIOLET;
1085 if (a_ability_flags2 & (RF6_HAND_DOOM)) { vp[vn] = _("破滅の手(40%-60%)", "invoke the Hand of Doom(40%-60%)"); color[vn++] = TERM_VIOLET; }
1086 if (a_ability_flags2 & (RF6_PSY_SPEAR))
1088 set_damage(player_ptr, r_idx, (MS_PSY_SPEAR), _("光の剣%s", "psycho-spear%s"), tmp_msg[vn]);
1089 vp[vn] = tmp_msg[vn];
1090 color[vn++] = TERM_YELLOW;
1092 if (a_ability_flags1 & (RF5_DRAIN_MANA))
1094 set_damage(player_ptr, r_idx, (MS_DRAIN_MANA), _("魔力吸収%s", "drain mana%s"), tmp_msg[vn]);
1095 vp[vn] = tmp_msg[vn];
1096 color[vn++] = TERM_SLATE;
1098 if (a_ability_flags1 & (RF5_MIND_BLAST))
1100 set_damage(player_ptr, r_idx, (MS_MIND_BLAST), _("精神攻撃%s", "cause mind blasting%s"), tmp_msg[vn]);
1101 vp[vn] = tmp_msg[vn];
1102 color[vn++] = TERM_L_RED;
1104 if (a_ability_flags1 & (RF5_BRAIN_SMASH))
1106 set_damage(player_ptr, r_idx, (MS_BRAIN_SMASH), _("脳攻撃%s", "cause brain smashing%s"), tmp_msg[vn]);
1107 vp[vn] = tmp_msg[vn];
1108 color[vn++] = TERM_RED;
1110 if (a_ability_flags1 & (RF5_CAUSE_1))
1112 set_damage(player_ptr, r_idx, (MS_CAUSE_1),
1113 _("軽傷+呪い%s", "cause light wounds and cursing%s"), tmp_msg[vn]);
1114 vp[vn] = tmp_msg[vn];
1115 color[vn++] = TERM_L_WHITE;
1117 if (a_ability_flags1 & (RF5_CAUSE_2))
1119 set_damage(player_ptr, r_idx, (MS_CAUSE_2),
1120 _("重傷+呪い%s", "cause serious wounds and cursing%s"), tmp_msg[vn]);
1121 vp[vn] = tmp_msg[vn];
1122 color[vn++] = TERM_L_WHITE;
1124 if (a_ability_flags1 & (RF5_CAUSE_3))
1126 set_damage(player_ptr, r_idx, (MS_CAUSE_3),
1127 _("致命傷+呪い%s", "cause critical wounds and cursing%s"), tmp_msg[vn]);
1128 vp[vn] = tmp_msg[vn];
1129 color[vn++] = TERM_L_WHITE;
1131 if (a_ability_flags1 & (RF5_CAUSE_4))
1133 set_damage(player_ptr, r_idx, (MS_CAUSE_4),
1134 _("秘孔を突く%s", "cause mortal wounds%s"), tmp_msg[vn]);
1135 vp[vn] = tmp_msg[vn];
1136 color[vn++] = TERM_L_WHITE;
1138 if (a_ability_flags1 & (RF5_BO_ACID))
1140 set_damage(player_ptr, r_idx, (MS_BOLT_ACID), _("アシッド・ボルト%s", "produce acid bolts%s"), tmp_msg[vn]);
1141 vp[vn] = tmp_msg[vn];
1142 color[vn++] = TERM_GREEN;
1144 if (a_ability_flags1 & (RF5_BO_ELEC))
1146 set_damage(player_ptr, r_idx, (MS_BOLT_ELEC), _("サンダー・ボルト%s", "produce lightning bolts%s"), tmp_msg[vn]);
1147 vp[vn] = tmp_msg[vn];
1148 color[vn++] = TERM_BLUE;
1150 if (a_ability_flags1 & (RF5_BO_FIRE))
1152 set_damage(player_ptr, r_idx, (MS_BOLT_FIRE), _("ファイア・ボルト%s", "produce fire bolts%s"), tmp_msg[vn]);
1153 vp[vn] = tmp_msg[vn];
1154 color[vn++] = TERM_RED;
1156 if (a_ability_flags1 & (RF5_BO_COLD))
1158 set_damage(player_ptr, r_idx, (MS_BOLT_COLD), _("アイス・ボルト%s", "produce frost bolts%s"), tmp_msg[vn]);
1159 vp[vn] = tmp_msg[vn];
1160 color[vn++] = TERM_L_WHITE;
1162 if (a_ability_flags1 & (RF5_BO_NETH))
1164 set_damage(player_ptr, r_idx, (MS_BOLT_NETHER), _("地獄の矢%s", "produce nether bolts%s"), tmp_msg[vn]);
1165 vp[vn] = tmp_msg[vn];
1166 color[vn++] = TERM_L_DARK;
1168 if (a_ability_flags1 & (RF5_BO_WATE))
1170 set_damage(player_ptr, r_idx, (MS_BOLT_WATER), _("ウォーター・ボルト%s", "produce water bolts%s"), tmp_msg[vn]);
1171 vp[vn] = tmp_msg[vn];
1172 color[vn++] = TERM_BLUE;
1174 if (a_ability_flags1 & (RF5_BO_MANA))
1176 set_damage(player_ptr, r_idx, (MS_BOLT_MANA), _("魔力の矢%s", "produce mana bolts%s"), tmp_msg[vn]);
1177 vp[vn] = tmp_msg[vn];
1178 color[vn++] = TERM_L_BLUE;
1180 if (a_ability_flags1 & (RF5_BO_PLAS))
1182 set_damage(player_ptr, r_idx, (MS_BOLT_PLASMA), _("プラズマ・ボルト%s", "produce plasma bolts%s"), tmp_msg[vn]);
1183 vp[vn] = tmp_msg[vn];
1184 color[vn++] = TERM_L_RED;
1186 if (a_ability_flags1 & (RF5_BO_ICEE))
1188 set_damage(player_ptr, r_idx, (MS_BOLT_ICE), _("極寒の矢%s", "produce ice bolts%s"), tmp_msg[vn]);
1189 vp[vn] = tmp_msg[vn];
1190 color[vn++] = TERM_WHITE;
1192 if (a_ability_flags1 & (RF5_MISSILE))
1194 set_damage(player_ptr, r_idx, (MS_MAGIC_MISSILE), _("マジックミサイル%s", "produce magic missiles%s"), tmp_msg[vn]);
1195 vp[vn] = tmp_msg[vn];
1196 color[vn++] = TERM_SLATE;
1198 if (a_ability_flags1 & (RF5_SCARE)) { vp[vn] = _("恐怖", "terrify"); color[vn++] = TERM_SLATE; }
1199 if (a_ability_flags1 & (RF5_BLIND)) { vp[vn] = _("目くらまし", "blind"); color[vn++] = TERM_L_DARK; }
1200 if (a_ability_flags1 & (RF5_CONF)) { vp[vn] = _("混乱", "confuse"); color[vn++] = TERM_L_UMBER; }
1201 if (a_ability_flags1 & (RF5_SLOW)) { vp[vn] = _("減速", "slow"); color[vn++] = TERM_UMBER; }
1202 if (a_ability_flags1 & (RF5_HOLD)) { vp[vn] = _("麻痺", "paralyze"); color[vn++] = TERM_RED; }
1203 if (a_ability_flags2 & (RF6_HASTE)) { vp[vn] = _("加速", "haste-self"); color[vn++] = TERM_L_GREEN; }
1204 if (a_ability_flags2 & (RF6_HEAL)) { vp[vn] = _("治癒", "heal-self"); color[vn++] = TERM_WHITE; }
1205 if (a_ability_flags2 & (RF6_INVULNER)) { vp[vn] = _("無敵化", "make invulnerable"); color[vn++] = TERM_WHITE; }
1206 if (flags4 & RF4_DISPEL) { vp[vn] = _("魔力消去", "dispel-magic"); color[vn++] = TERM_L_WHITE; }
1207 if (a_ability_flags2 & (RF6_BLINK)) { vp[vn] = _("ショートテレポート", "blink-self"); color[vn++] = TERM_UMBER; }
1208 if (a_ability_flags2 & (RF6_TPORT)) { vp[vn] = _("テレポート", "teleport-self"); color[vn++] = TERM_ORANGE; }
1209 if (a_ability_flags2 & (RF6_WORLD)) { vp[vn] = _("時を止める", "stop the time"); color[vn++] = TERM_L_BLUE; }
1210 if (a_ability_flags2 & (RF6_TELE_TO)) { vp[vn] = _("テレポートバック", "teleport to"); color[vn++] = TERM_L_UMBER; }
1211 if (a_ability_flags2 & (RF6_TELE_AWAY)) { vp[vn] = _("テレポートアウェイ", "teleport away"); color[vn++] = TERM_UMBER; }
1212 if (a_ability_flags2 & (RF6_TELE_LEVEL)) { vp[vn] = _("テレポート・レベル", "teleport level"); color[vn++] = TERM_ORANGE; }
1214 if (a_ability_flags2 & (RF6_DARKNESS))
1216 if ((player_ptr->pclass != CLASS_NINJA) || (r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) || (r_ptr->flags7 & RF7_DARK_MASK))
1218 vp[vn] = _("暗闇", "create darkness"); color[vn++] = TERM_L_DARK;
1222 vp[vn] = _("閃光", "create light"); color[vn++] = TERM_YELLOW;
1226 if (a_ability_flags2 & (RF6_TRAPS)) { vp[vn] = _("トラップ", "create traps"); color[vn++] = TERM_BLUE; }
1227 if (a_ability_flags2 & (RF6_FORGET)) { vp[vn] = _("記憶消去", "cause amnesia"); color[vn++] = TERM_BLUE; }
1228 if (a_ability_flags2 & (RF6_RAISE_DEAD)) { vp[vn] = _("死者復活", "raise dead"); color[vn++] = TERM_RED; }
1229 if (a_ability_flags2 & (RF6_S_MONSTER)) { vp[vn] = _("モンスター一体召喚", "summon a monster"); color[vn++] = TERM_SLATE; }
1230 if (a_ability_flags2 & (RF6_S_MONSTERS)) { vp[vn] = _("モンスター複数召喚", "summon monsters"); color[vn++] = TERM_L_WHITE; }
1231 if (a_ability_flags2 & (RF6_S_KIN)) { vp[vn] = _("救援召喚", "summon aid"); color[vn++] = TERM_ORANGE; }
1232 if (a_ability_flags2 & (RF6_S_ANT)) { vp[vn] = _("アリ召喚", "summon ants"); color[vn++] = TERM_RED; }
1233 if (a_ability_flags2 & (RF6_S_SPIDER)) { vp[vn] = _("クモ召喚", "summon spiders"); color[vn++] = TERM_L_DARK; }
1234 if (a_ability_flags2 & (RF6_S_HOUND)) { vp[vn] = _("ハウンド召喚", "summon hounds"); color[vn++] = TERM_L_UMBER; }
1235 if (a_ability_flags2 & (RF6_S_HYDRA)) { vp[vn] = _("ヒドラ召喚", "summon hydras"); color[vn++] = TERM_L_GREEN; }
1236 if (a_ability_flags2 & (RF6_S_ANGEL)) { vp[vn] = _("天使一体召喚", "summon an angel"); color[vn++] = TERM_YELLOW; }
1237 if (a_ability_flags2 & (RF6_S_DEMON)) { vp[vn] = _("デーモン一体召喚", "summon a demon"); color[vn++] = TERM_L_RED; }
1238 if (a_ability_flags2 & (RF6_S_UNDEAD)) { vp[vn] = _("アンデッド一体召喚", "summon an undead"); color[vn++] = TERM_L_DARK; }
1239 if (a_ability_flags2 & (RF6_S_DRAGON)) { vp[vn] = _("ドラゴン一体召喚", "summon a dragon"); color[vn++] = TERM_ORANGE; }
1240 if (a_ability_flags2 & (RF6_S_HI_UNDEAD)) { vp[vn] = _("強力なアンデッド召喚", "summon Greater Undead"); color[vn++] = TERM_L_DARK; }
1241 if (a_ability_flags2 & (RF6_S_HI_DRAGON)) { vp[vn] = _("古代ドラゴン召喚", "summon Ancient Dragons"); color[vn++] = TERM_ORANGE; }
1242 if (a_ability_flags2 & (RF6_S_CYBER)) { vp[vn] = _("サイバーデーモン召喚", "summon Cyberdemons"); color[vn++] = TERM_UMBER; }
1243 if (a_ability_flags2 & (RF6_S_AMBERITES)) { vp[vn] = _("アンバーの王族召喚", "summon Lords of Amber"); color[vn++] = TERM_VIOLET; }
1244 if (a_ability_flags2 & (RF6_S_UNIQUE)) { vp[vn] = _("ユニーク・モンスター召喚", "summon Unique Monsters"); color[vn++] = TERM_VIOLET; }
1247 /* Describe spells */
1256 hooked_roff(_("、なおかつ", ", and is also"));
1260 hooked_roff(format(_("%^sは", "%^s is"), wd_he[msex]));
1265 if (flags2 & (RF2_SMART)) hook_c_roff(TERM_YELLOW, "的確に");
1268 hooked_roff("魔法を使うことができ、");
1271 hooked_roff(" magical, casting spells");
1274 if (flags2 & RF2_SMART) hook_c_roff(TERM_YELLOW, " intelligently");
1279 for (n = 0; n < vn; n++)
1283 if (n != 0) hooked_roff("、");
1285 if (n == 0) hooked_roff(" which ");
1286 else if (n < vn - 1) hooked_roff(", ");
1287 else hooked_roff(" or ");
1292 hook_c_roff(color[n], vp[n]);
1295 hooked_roff("の呪文を唱えることがある");
1300 /* End the sentence about inate/other spells */
1301 if (breath || magic)
1304 m = r_ptr->r_cast_spell;
1306 /* Average frequency */
1307 n = r_ptr->freq_spell;
1309 /* Describe the spell frequency */
1310 if (m > 100 || know_everything)
1313 _("(確率:1/%d)", "; 1 time in %d"), 100 / n));
1316 /* Guess at the frequency */
1319 n = ((n + 9) / 10) * 10;
1321 _("(確率:約1/%d)", "; about 1 time in %d"), 100 / n));
1324 /* End this sentence */
1325 hooked_roff(_("。", ". "));
1328 /* Describe monster "toughness" */
1329 if (know_everything || know_armour(r_idx))
1333 _("%^sは AC%d の防御力と", "%^s has an armor rating of %d"),
1334 wd_he[msex], r_ptr->ac));
1336 /* Maximized hitpoints */
1337 if ((flags1 & RF1_FORCE_MAXHP) || (r_ptr->hside == 1))
1339 u32b hp = r_ptr->hdice * (nightmare ? 2 : 1) * r_ptr->hside;
1341 _(" %d の体力がある。", " and a life rating of %d. "),
1342 (s16b)MIN(30000, hp)));
1345 /* Variable hitpoints */
1349 _(" %dd%d の体力がある。", " and a life rating of %dd%d. "),
1350 r_ptr->hdice * (nightmare ? 2 : 1), r_ptr->hside));
1356 /* Collect special abilities. */
1358 if (flags7 & (RF7_HAS_LITE_1 | RF7_HAS_LITE_2)) { vp[vn] = _("ダンジョンを照らす", "illuminate the dungeon"); color[vn++] = TERM_WHITE; }
1359 if (flags7 & (RF7_HAS_DARK_1 | RF7_HAS_DARK_2)) { vp[vn] = _("ダンジョンを暗くする", "darken the dungeon"); color[vn++] = TERM_L_DARK; }
1360 if (flags2 & RF2_OPEN_DOOR) { vp[vn] = _("ドアを開ける", "open doors"); color[vn++] = TERM_WHITE; }
1361 if (flags2 & RF2_BASH_DOOR) { vp[vn] = _("ドアを打ち破る", "bash down doors"); color[vn++] = TERM_WHITE; }
1362 if (flags7 & RF7_CAN_FLY) { vp[vn] = _("空を飛ぶ", "fly"); color[vn++] = TERM_WHITE; }
1363 if (flags7 & RF7_CAN_SWIM) { vp[vn] = _("水を渡る", "swim"); color[vn++] = TERM_WHITE; }
1364 if (flags2 & RF2_PASS_WALL) { vp[vn] = _("壁をすり抜ける", "pass through walls"); color[vn++] = TERM_WHITE; }
1365 if (flags2 & RF2_KILL_WALL) { vp[vn] = _("壁を掘り進む", "bore through walls"); color[vn++] = TERM_WHITE; }
1366 if (flags2 & RF2_MOVE_BODY) { vp[vn] = _("弱いモンスターを押しのける", "push past weaker monsters"); color[vn++] = TERM_WHITE; }
1367 if (flags2 & RF2_KILL_BODY) { vp[vn] = _("弱いモンスターを倒す", "destroy weaker monsters"); color[vn++] = TERM_WHITE; }
1368 if (flags2 & RF2_TAKE_ITEM) { vp[vn] = _("アイテムを拾う", "pick up objects"); color[vn++] = TERM_WHITE; }
1369 if (flags2 & RF2_KILL_ITEM) { vp[vn] = _("アイテムを壊す", "destroy objects"); color[vn++] = TERM_WHITE; }
1372 /* Describe special abilities. */
1376 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1379 for (n = 0; n < vn; n++)
1385 jverb(vp[n], jverb_buf, JVERB_AND);
1386 hook_c_roff(color[n], jverb_buf);
1389 else hook_c_roff(color[n], vp[n]);
1391 if (n == 0) hooked_roff(" can ");
1392 else if (n < vn - 1) hooked_roff(", ");
1393 else hooked_roff(" and ");
1396 hook_c_roff(color[n], vp[n]);
1402 hooked_roff(_("ことができる。", ". "));
1407 if (flags7 & RF7_AQUATIC)
1409 hooked_roff(format(_("%^sは水中に棲んでいる。", "%^s lives in water. "), wd_he[msex]));
1412 /* Describe special abilities. */
1413 if (flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2))
1415 hooked_roff(format(_("%^sは光っている。", "%^s is shining. "), wd_he[msex]));
1417 if (flags7 & (RF7_SELF_DARK_1 | RF7_SELF_DARK_2))
1419 hook_c_roff(TERM_L_DARK, format(_("%^sは暗黒に包まれている。", "%^s is surrounded by darkness. "), wd_he[msex]));
1421 if (flags2 & RF2_INVISIBLE)
1423 hooked_roff(format(_("%^sは透明で目に見えない。", "%^s is invisible. "), wd_he[msex]));
1425 if (flags2 & RF2_COLD_BLOOD)
1427 hooked_roff(format(_("%^sは冷血動物である。", "%^s is cold blooded. "), wd_he[msex]));
1429 if (flags2 & RF2_EMPTY_MIND)
1431 hooked_roff(format(_("%^sはテレパシーでは感知できない。", "%^s is not detected by telepathy. "), wd_he[msex]));
1433 else if (flags2 & RF2_WEIRD_MIND)
1435 hooked_roff(format(_("%^sはまれにテレパシーで感知できる。", "%^s is rarely detected by telepathy. "), wd_he[msex]));
1437 if (flags2 & RF2_MULTIPLY)
1439 hook_c_roff(TERM_L_UMBER, format(_("%^sは爆発的に増殖する。", "%^s breeds explosively. "), wd_he[msex]));
1441 if (flags2 & RF2_REGENERATE)
1443 hook_c_roff(TERM_L_WHITE, format(_("%^sは素早く体力を回復する。", "%^s regenerates quickly. "), wd_he[msex]));
1445 if (flags7 & RF7_RIDING)
1447 hook_c_roff(TERM_SLATE, format(_("%^sに乗ることができる。", "%^s is suitable for riding. "), wd_he[msex]));
1451 /* Collect susceptibilities */
1453 if (flags3 & RF3_HURT_ROCK) { vp[vn] = _("岩を除去するもの", "rock remover"); color[vn++] = TERM_UMBER; }
1454 if (flags3 & RF3_HURT_LITE) { vp[vn] = _("明るい光", "bright light"); color[vn++] = TERM_YELLOW; }
1455 if (flags3 & RF3_HURT_FIRE) { vp[vn] = _("炎", "fire"); color[vn++] = TERM_RED; }
1456 if (flags3 & RF3_HURT_COLD) { vp[vn] = _("冷気", "cold"); color[vn++] = TERM_L_WHITE; }
1459 /* Describe susceptibilities */
1463 hooked_roff(format(_("%^sには", "%^s"), wd_he[msex]));
1466 for (n = 0; n < vn; n++)
1470 if (n != 0) hooked_roff("や");
1472 if (n == 0) hooked_roff(" is hurt by ");
1473 else if (n < vn - 1) hooked_roff(", ");
1474 else hooked_roff(" and ");
1479 hook_c_roff(color[n], vp[n]);
1483 hooked_roff(_("でダメージを与えられる。", ". "));
1487 /* Collect immunities */
1489 if (flagsr & RFR_IM_ACID) { vp[vn] = _("酸", "acid"); color[vn++] = TERM_GREEN; }
1490 if (flagsr & RFR_IM_ELEC) { vp[vn] = _("稲妻", "lightning"); color[vn++] = TERM_BLUE; }
1491 if (flagsr & RFR_IM_FIRE) { vp[vn] = _("炎", "fire"); color[vn++] = TERM_RED; }
1492 if (flagsr & RFR_IM_COLD) { vp[vn] = _("冷気", "cold"); color[vn++] = TERM_L_WHITE; }
1493 if (flagsr & RFR_IM_POIS) { vp[vn] = _("毒", "poison"); color[vn++] = TERM_L_GREEN; }
1496 /* Collect resistances */
1497 if (flagsr & RFR_RES_LITE) { vp[vn] = _("閃光", "light"); color[vn++] = TERM_YELLOW; }
1498 if (flagsr & RFR_RES_DARK) { vp[vn] = _("暗黒", "dark"); color[vn++] = TERM_L_DARK; }
1499 if (flagsr & RFR_RES_NETH) { vp[vn] = _("地獄", "nether"); color[vn++] = TERM_L_DARK; }
1500 if (flagsr & RFR_RES_WATE) { vp[vn] = _("水", "water"); color[vn++] = TERM_BLUE; }
1501 if (flagsr & RFR_RES_PLAS) { vp[vn] = _("プラズマ", "plasma"); color[vn++] = TERM_L_RED; }
1502 if (flagsr & RFR_RES_SHAR) { vp[vn] = _("破片", "shards"); color[vn++] = TERM_L_UMBER; }
1503 if (flagsr & RFR_RES_SOUN) { vp[vn] = _("轟音", "sound"); color[vn++] = TERM_ORANGE; }
1504 if (flagsr & RFR_RES_CHAO) { vp[vn] = _("カオス", "chaos"); color[vn++] = TERM_VIOLET; }
1505 if (flagsr & RFR_RES_NEXU) { vp[vn] = _("因果混乱", "nexus"); color[vn++] = TERM_VIOLET; }
1506 if (flagsr & RFR_RES_DISE) { vp[vn] = _("劣化", "disenchantment"); color[vn++] = TERM_VIOLET; }
1507 if (flagsr & RFR_RES_WALL) { vp[vn] = _("フォース", "force"); color[vn++] = TERM_UMBER; }
1508 if (flagsr & RFR_RES_INER) { vp[vn] = _("遅鈍", "inertia"); color[vn++] = TERM_SLATE; }
1509 if (flagsr & RFR_RES_TIME) { vp[vn] = _("時間逆転", "time"); color[vn++] = TERM_L_BLUE; }
1510 if (flagsr & RFR_RES_GRAV) { vp[vn] = _("重力", "gravity"); color[vn++] = TERM_SLATE; }
1511 if (flagsr & RFR_RES_ALL) { vp[vn] = _("あらゆる攻撃", "all"); color[vn++] = TERM_YELLOW; }
1512 if ((flagsr & RFR_RES_TELE) && !(r_ptr->flags1 & RF1_UNIQUE)) { vp[vn] = _("テレポート", "teleportation"); color[vn++] = TERM_ORANGE; }
1514 /* Describe immunities and resistances */
1518 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1521 for (n = 0; n < vn; n++)
1525 if (n != 0) hooked_roff("と");
1527 if (n == 0) hooked_roff(" resists ");
1528 else if (n < vn - 1) hooked_roff(", ");
1529 else hooked_roff(" and ");
1534 hook_c_roff(color[n], vp[n]);
1538 hooked_roff(_("の耐性を持っている。", ". "));
1542 if ((r_ptr->r_xtra1 & MR1_SINKA) || know_everything)
1544 if (r_ptr->next_r_idx)
1546 hooked_roff(format(_("%^sは経験を積むと、", "%^s will evolve into "), wd_he[msex]));
1547 hook_c_roff(TERM_YELLOW, format("%s", r_name + r_info[r_ptr->next_r_idx].name));
1551 format(" when %s gets enough experience. ", wd_he[msex])));
1553 else if (!(r_ptr->flags1 & RF1_UNIQUE))
1555 hooked_roff(format(_("%sは進化しない。", "%s won't evolve. "), wd_he[msex]));
1559 /* Collect non-effects */
1561 if (flags3 & RF3_NO_STUN) { vp[vn] = _("朦朧としない", "stunned"); color[vn++] = TERM_ORANGE; }
1562 if (flags3 & RF3_NO_FEAR) { vp[vn] = _("恐怖を感じない", "frightened"); color[vn++] = TERM_SLATE; }
1563 if (flags3 & RF3_NO_CONF) { vp[vn] = _("混乱しない", "confused"); color[vn++] = TERM_L_UMBER; }
1564 if (flags3 & RF3_NO_SLEEP) { vp[vn] = _("眠らされない", "slept"); color[vn++] = TERM_BLUE; }
1565 if ((flagsr & RFR_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) { vp[vn] = _("テレポートされない", "teleported"); color[vn++] = TERM_ORANGE; }
1567 /* Describe non-effects */
1572 _("%^sは", "%^s"), wd_he[msex]));
1575 for (n = 0; n < vn; n++)
1579 if (n != 0) hooked_roff("し、");
1581 if (n == 0) hooked_roff(" cannot be ");
1582 else if (n < vn - 1) hooked_roff(", ");
1583 else hooked_roff(" or ");
1588 hook_c_roff(color[n], vp[n]);
1592 hooked_roff(_("。", ". "));
1596 /* Do we know how aware it is? */
1597 if ((((int)r_ptr->r_wake * (int)r_ptr->r_wake) > r_ptr->sleep) ||
1598 (r_ptr->r_ignore == MAX_UCHAR) ||
1599 (r_ptr->sleep == 0 && r_ptr->r_tkills >= 10) || know_everything)
1603 if (r_ptr->sleep > 200)
1605 act = _("を無視しがちであるが", "prefers to ignore");
1607 else if (r_ptr->sleep > 95)
1609 act = _("に対してほとんど注意を払わないが", "pays very little attention to");
1611 else if (r_ptr->sleep > 75)
1613 act = _("に対してあまり注意を払わないが", "pays little attention to");
1615 else if (r_ptr->sleep > 45)
1617 act = _("を見過ごしがちであるが", "tends to overlook");
1619 else if (r_ptr->sleep > 25)
1621 act = _("をほんの少しは見ており", "takes quite a while to see");
1623 else if (r_ptr->sleep > 10)
1625 act = _("をしばらくは見ており", "takes a while to see");
1627 else if (r_ptr->sleep > 5)
1629 act = _("を幾分注意深く見ており", "is fairly observant of");
1631 else if (r_ptr->sleep > 3)
1633 act = _("を注意深く見ており", "is observant of");
1635 else if (r_ptr->sleep > 1)
1637 act = _("をかなり注意深く見ており", "is very observant of");
1639 else if (r_ptr->sleep > 0)
1641 act = _("を警戒しており", "is vigilant for");
1645 act = _("をかなり警戒しており", "is ever vigilant for");
1649 _(format("%^sは侵入者%s、 %d フィート先から侵入者に気付くことがある。", wd_he[msex], act, 10 * r_ptr->aaf),
1650 format("%^s %s intruders, which %s may notice from %d feet. ", wd_he[msex], act, wd_he[msex], 10 * r_ptr->aaf)));
1654 /* Drops gold and/or items */
1655 if (drop_gold || drop_item)
1659 _("%^sは", "%^s may carry"), wd_he[msex]));
1667 /* Count maximum drop */
1668 n = MAX(drop_gold, drop_item);
1670 /* One drop (may need an "n") */
1673 hooked_roff(_("一つの", " a"));
1684 _("一つか二つの", " one or two"));
1691 _(" %d 個までの", " up to %d"), n));
1696 if (flags1 & RF1_DROP_GREAT)
1698 p = _("特別な", " exceptional");
1701 /* Good (no "n" needed) */
1702 else if (flags1 & RF1_DROP_GOOD)
1704 p = _("上質な", " good");
1720 /* Handle singular "an" */
1723 if (sin) hooked_roff("n");
1727 /* Dump "object(s)" */
1728 if (p) hooked_roff(p);
1730 _("アイテム", " object"));
1734 if (n != 1) hooked_roff("s");
1737 /* Conjunction replaces variety, if needed for "gold" below */
1747 if (!p) sin = FALSE;
1749 /* Handle singular "an" */
1750 if (sin) hooked_roff("n");
1754 /* Dump "treasure(s)" */
1755 if (p) hooked_roff(p);
1756 hooked_roff(_("財宝", " treasure"));
1759 if (n != 1) hooked_roff("s");
1764 /* End this sentence */
1765 hooked_roff(_("を持っていることがある。", ". "));
1769 /* Count the number of "known" attacks */
1770 for (n = 0, m = 0; m < 4; m++)
1772 /* Skip non-attacks */
1773 if (!r_ptr->blow[m].method) continue;
1774 if (r_ptr->blow[m].method == RBM_SHOOT) continue;
1776 /* Count known attacks */
1777 if (r_ptr->r_blows[m] || know_everything) n++;
1780 /* Examine (and count) the actual attacks */
1781 for (r = 0, m = 0; m < 4; m++)
1783 int method, effect, d1, d2;
1785 /* Skip non-attacks */
1786 if (!r_ptr->blow[m].method) continue;
1787 if (r_ptr->blow[m].method == RBM_SHOOT) continue;
1789 /* Skip unknown attacks */
1790 if (!r_ptr->r_blows[m] && !know_everything) continue;
1792 /* Extract the attack info */
1793 method = r_ptr->blow[m].method;
1794 effect = r_ptr->blow[m].effect;
1795 d1 = r_ptr->blow[m].d_dice;
1796 d2 = r_ptr->blow[m].d_side;
1801 /* Acquire the method */
1804 case RBM_HIT: p = _("殴る", "hit"); break;
1805 case RBM_TOUCH: p = _("触る", "touch"); break;
1806 case RBM_PUNCH: p = _("パンチする", "punch"); break;
1807 case RBM_KICK: p = _("蹴る", "kick"); break;
1808 case RBM_CLAW: p = _("ひっかく", "claw"); break;
1809 case RBM_BITE: p = _("噛む", "bite"); break;
1810 case RBM_STING: p = _("刺す", "sting"); break;
1811 case RBM_SLASH: p = _("斬る", "slash"); break;
1812 case RBM_BUTT: p = _("角で突く", "butt"); break;
1813 case RBM_CRUSH: p = _("体当たりする", "crush"); break;
1814 case RBM_ENGULF: p = _("飲み込む", "engulf"); break;
1815 case RBM_CHARGE: p = _("請求書をよこす", "charge"); break;
1816 case RBM_CRAWL: p = _("体の上を這い回る", "crawl on you"); break;
1817 case RBM_DROOL: p = _("よだれをたらす", "drool on you"); break;
1818 case RBM_SPIT: p = _("つばを吐く", "spit"); break;
1819 case RBM_EXPLODE: p = _("爆発する", "explode"); break;
1820 case RBM_GAZE: p = _("にらむ", "gaze"); break;
1821 case RBM_WAIL: p = _("泣き叫ぶ", "wail"); break;
1822 case RBM_SPORE: p = _("胞子を飛ばす", "release spores"); break;
1823 case RBM_XXX4: break;
1824 case RBM_BEG: p = _("金をせがむ", "beg"); break;
1825 case RBM_INSULT: p = _("侮辱する", "insult"); break;
1826 case RBM_MOAN: p = _("うめく", "moan"); break;
1827 case RBM_SHOW: p = _("歌う", "sing"); break;
1831 /* Default effect */
1834 /* Acquire the effect */
1837 case RBE_SUPERHURT: q = _("強力に攻撃する", "slaughter"); break;
1838 case RBE_HURT: q = _("攻撃する", "attack"); break;
1839 case RBE_POISON: q = _("毒をくらわす", "poison"); break;
1840 case RBE_UN_BONUS: q = _("劣化させる", "disenchant"); break;
1841 case RBE_UN_POWER: q = _("充填魔力を吸収する", "drain charges"); break;
1842 case RBE_EAT_GOLD: q = _("金を盗む", "steal gold"); break;
1843 case RBE_EAT_ITEM: q = _("アイテムを盗む", "steal items"); break;
1844 case RBE_EAT_FOOD: q = _("あなたの食料を食べる", "eat your food"); break;
1845 case RBE_EAT_LITE: q = _("明かりを吸収する", "absorb light"); break;
1846 case RBE_ACID: q = _("酸を飛ばす", "shoot acid"); break;
1847 case RBE_ELEC: q = _("感電させる", "electrocute"); break;
1848 case RBE_FIRE: q = _("燃やす", "burn"); break;
1849 case RBE_COLD: q = _("凍らせる", "freeze"); break;
1850 case RBE_BLIND: q = _("盲目にする", "blind"); break;
1851 case RBE_CONFUSE: q = _("混乱させる", "confuse"); break;
1852 case RBE_TERRIFY: q = _("恐怖させる", "terrify"); break;
1853 case RBE_PARALYZE: q = _("麻痺させる", "paralyze"); break;
1854 case RBE_LOSE_STR: q = _("腕力を減少させる", "reduce strength"); break;
1855 case RBE_LOSE_INT: q = _("知能を減少させる", "reduce intelligence"); break;
1856 case RBE_LOSE_WIS: q = _("賢さを減少させる", "reduce wisdom"); break;
1857 case RBE_LOSE_DEX: q = _("器用さを減少させる", "reduce dexterity"); break;
1858 case RBE_LOSE_CON: q = _("耐久力を減少させる", "reduce constitution"); break;
1859 case RBE_LOSE_CHR: q = _("魅力を減少させる", "reduce charisma"); break;
1860 case RBE_LOSE_ALL: q = _("全ステータスを減少させる", "reduce all stats"); break;
1861 case RBE_SHATTER: q = _("粉砕する", "shatter"); break;
1862 case RBE_EXP_10: q = _("経験値を減少(10d6+)させる", "lower experience (by 10d6+)"); break;
1863 case RBE_EXP_20: q = _("経験値を減少(20d6+)させる", "lower experience (by 20d6+)"); break;
1864 case RBE_EXP_40: q = _("経験値を減少(40d6+)させる", "lower experience (by 40d6+)"); break;
1865 case RBE_EXP_80: q = _("経験値を減少(80d6+)させる", "lower experience (by 80d6+)"); break;
1866 case RBE_DISEASE: q = _("病気にする", "disease"); break;
1867 case RBE_TIME: q = _("時間を逆戻りさせる", "time"); break;
1868 case RBE_DR_LIFE: q = _("生命力を吸収する", "drain life"); break;
1869 case RBE_DR_MANA: q = _("魔力を奪う", "drain mana force"); break;
1870 case RBE_INERTIA: q = _("減速させる", "slow"); break;
1871 case RBE_STUN: q = _("朦朧とさせる", "stun"); break;
1876 if (r == 0) hooked_roff(format("%^sは", wd_he[msex]));
1878 /***若干表現を変更 ita ***/
1880 /* Describe damage (if known) */
1881 if (d1 && d2 && (know_everything || know_damage(r_idx, m)))
1884 /* Display the damage */
1885 hooked_roff(format(" %dd%d ", d1, d2));
1886 hooked_roff("のダメージで");
1888 /* Hack -- force a method */
1889 if (!p) p = "何か奇妙なことをする";
1891 /* Describe the method */
1892 /* XXしてYYし/XXしてYYする/XXし/XXする */
1893 if (q) jverb(p, jverb_buf, JVERB_TO);
1894 else if (r != n - 1) jverb(p, jverb_buf, JVERB_AND);
1895 else strcpy(jverb_buf, p);
1897 hooked_roff(jverb_buf);
1899 /* Describe the effect (if any) */
1902 if (r != n - 1) jverb(q, jverb_buf, JVERB_AND);
1903 else strcpy(jverb_buf, q);
1904 hooked_roff(jverb_buf);
1906 if (r != n - 1) hooked_roff("、");
1908 /* Introduce the attack description */
1911 hooked_roff(format("%^s can ", wd_he[msex]));
1919 hooked_roff(", and ");
1923 /* Hack -- force a method */
1924 if (!p) p = "do something weird";
1926 /* Describe the method */
1930 /* Describe the effect (if any) */
1933 /* Describe the attack type */
1934 hooked_roff(" to ");
1937 /* Describe damage (if known) */
1938 if (d1 && d2 && (know_everything || know_damage(r_idx, m)))
1940 /* Display the damage */
1941 hooked_roff(" with damage");
1942 hooked_roff(format(" %dd%d", d1, d2));
1949 /* Count the attacks as printed */
1953 /* Finish sentence above */
1956 hooked_roff(_("。", ". "));
1959 /* Notice lack of attacks */
1960 else if (flags1 & RF1_NEVER_BLOW)
1963 _("%^sは物理的な攻撃方法を持たない。",
1964 "%^s has no physical attacks. "), wd_he[msex]));
1967 /* Or describe the lack of knowledge */
1971 _("%s攻撃については何も知らない。",
1972 "Nothing is known about %s attack. "), wd_his[msex]));
1977 * Notice "Quest" monsters, but only if you
1978 * already encountered the monster.
1980 if ((flags1 & RF1_QUESTOR) && ((r_ptr->r_sights) && (r_ptr->max_num) && ((r_idx == MON_OBERON) || (r_idx == MON_SERPENT))))
1982 hook_c_roff(TERM_VIOLET,
1983 _("あなたはこのモンスターを殺したいという強い欲望を感じている...",
1984 "You feel an intense desire to kill this monster... "));
1987 else if (flags7 & RF7_GUARDIAN)
1989 hook_c_roff(TERM_L_RED,
1990 _("このモンスターはダンジョンの主である。",
1991 "This monster is the master of a dungeon."));
2002 * @brief モンスター情報のヘッダを記述する
2003 * Hack -- Display the "name" and "attr/chars" of a monster race
2004 * @param r_idx モンスターの種族ID
2007 void roff_top(MONRACE_IDX r_idx)
2009 monster_race *r_ptr = &r_info[r_idx];
2015 /* Access the chars */
2019 /* Access the attrs */
2024 /* Clear the top line */
2025 Term_erase(0, 0, 255);
2027 /* Reset the cursor */
2033 /* A title (use "The" for non-uniques) */
2034 if (!(r_ptr->flags1 & RF1_UNIQUE))
2036 Term_addstr(-1, TERM_WHITE, "The ");
2041 Term_addstr(-1, TERM_WHITE, (r_name + r_ptr->name));
2043 /* Append the "standard" attr/char info */
2044 Term_addstr(-1, TERM_WHITE, " ('");
2045 Term_add_bigch(a1, c1);
2046 Term_addstr(-1, TERM_WHITE, "')");
2048 /* Append the "optional" attr/char info */
2049 Term_addstr(-1, TERM_WHITE, "/('");
2050 Term_add_bigch(a2, c2);
2051 Term_addstr(-1, TERM_WHITE, "'):");
2053 /* Wizards get extra info */
2054 if (current_world_ptr->wizard)
2058 sprintf(buf, "%d", r_idx);
2060 Term_addstr(-1, TERM_WHITE, " (");
2061 Term_addstr(-1, TERM_L_BLUE, buf);
2062 Term_addch(TERM_WHITE, ')');
2069 * @brief モンスター情報の表示と共に画面を一時消去するサブルーチン /
2070 * Hack -- describe the given monster race at the top of the screen
2071 * @param r_idx モンスターの種族ID
2072 * @param mode 表示オプション
2075 void screen_roff(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
2080 Term_erase(0, 1, 255);
2082 hook_c_roff = c_roff;
2084 /* Recall monster */
2085 roff_aux(player_ptr, r_idx, mode);
2087 /* Describe monster */
2095 * @brief モンスター情報の現在のウィンドウに表示する /
2096 * Hack -- describe the given monster race in the current "term" window
2097 * @param r_idx モンスターの種族ID
2100 void display_roff(player_type *player_ptr)
2102 MONRACE_IDX r_idx = player_ptr->monster_race_idx;
2105 /* Erase the window */
2106 for (y = 0; y < Term->hgt; y++)
2108 /* Erase the line */
2109 Term_erase(0, y, 255);
2115 hook_c_roff = c_roff;
2117 /* Recall monster */
2118 roff_aux(player_ptr, r_idx, 0);
2120 /* Describe monster */
2126 * @brief モンスター詳細情報を自動スポイラー向けに出力する /
2127 * Hack -- output description of the given monster race
2128 * @param r_idx モンスターの種族ID
2129 * @param roff_func 出力処理を行う関数ポインタ
2132 void output_monster_spoiler(player_type *player_ptr, MONRACE_IDX r_idx, void(*roff_func)(TERM_COLOR attr, concptr str))
2134 hook_c_roff = roff_func;
2136 /* Recall monster */
2137 roff_aux(player_ptr, r_idx, 0x03);
2143 * @brief プレイヤーの現在の広域マップ座標から得た地勢を元にモンスターの生成条件関数を返す
2144 * @return 地勢にあったモンスターの生成条件関数
2146 monsterrace_hook_type get_monster_hook(player_type *player_ptr)
2148 if (!player_ptr->current_floor_ptr->dun_level && !player_ptr->current_floor_ptr->inside_quest)
2150 switch (wilderness[player_ptr->wilderness_y][player_ptr->wilderness_x].terrain)
2153 return (monsterrace_hook_type)mon_hook_town;
2154 case TERRAIN_DEEP_WATER:
2155 return (monsterrace_hook_type)mon_hook_ocean;
2156 case TERRAIN_SHALLOW_WATER:
2158 return (monsterrace_hook_type)mon_hook_shore;
2160 case TERRAIN_DESERT:
2161 return (monsterrace_hook_type)mon_hook_waste;
2163 return (monsterrace_hook_type)mon_hook_grass;
2165 return (monsterrace_hook_type)mon_hook_wood;
2166 case TERRAIN_SHALLOW_LAVA:
2167 case TERRAIN_DEEP_LAVA:
2168 return (monsterrace_hook_type)mon_hook_volcano;
2169 case TERRAIN_MOUNTAIN:
2170 return (monsterrace_hook_type)mon_hook_mountain;
2172 return (monsterrace_hook_type)mon_hook_dungeon;
2177 return (monsterrace_hook_type)mon_hook_dungeon;
2182 * @brief 指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す
2183 * @return 地勢にあったモンスターの生成条件関数
2185 monsterrace_hook_type get_monster_hook2(player_type *player_ptr, POSITION y, POSITION x)
2187 feature_type *f_ptr = &f_info[player_ptr->current_floor_ptr->grid_array[y][x].feat];
2189 /* Set the monster list */
2192 if (have_flag(f_ptr->flags, FF_WATER))
2195 if (have_flag(f_ptr->flags, FF_DEEP))
2197 return (monsterrace_hook_type)mon_hook_deep_water;
2203 return (monsterrace_hook_type)mon_hook_shallow_water;
2208 else if (have_flag(f_ptr->flags, FF_LAVA))
2210 return (monsterrace_hook_type)mon_hook_lava;
2213 else return (monsterrace_hook_type)mon_hook_floor;
2217 * @brief モンスターを友好的にする
2218 * @param m_ptr モンスター情報構造体の参照ポインタ
2221 void set_friendly(monster_type *m_ptr)
2223 m_ptr->smart |= SM_FRIENDLY;
2227 * @brief モンスターをペットにする
2228 * @param player_type プレーヤーへの参照ポインタ
2229 * @param m_ptr モンスター情報構造体の参照ポインタ
2232 void set_pet(player_type *player_ptr, monster_type *m_ptr)
2234 check_quest_completion(player_ptr, m_ptr);
2236 m_ptr->smart |= SM_PET;
2237 if (!(r_info[m_ptr->r_idx].flags3 & (RF3_EVIL | RF3_GOOD)))
2238 m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
2243 * Makes the monster hostile towards the player
2244 * @param m_ptr モンスター情報構造体の参照ポインタ
2247 void set_hostile(monster_type *m_ptr)
2249 if (p_ptr->phase_out) return;
2250 m_ptr->smart &= ~SM_PET;
2251 m_ptr->smart &= ~SM_FRIENDLY;
2258 * @param m_ptr モンスター情報構造体の参照ポインタ
2261 void anger_monster(player_type *player_ptr, monster_type *m_ptr)
2263 if (player_ptr->phase_out) return;
2264 if (is_friendly(m_ptr))
2266 GAME_TEXT m_name[MAX_NLEN];
2268 monster_desc(m_name, m_ptr, 0);
2269 msg_format(_("%^sは怒った!", "%^s gets angry!"), m_name);
2273 chg_virtue(player_ptr, V_INDIVIDUALISM, 1);
2274 chg_virtue(player_ptr, V_HONOUR, -1);
2275 chg_virtue(player_ptr, V_JUSTICE, -1);
2276 chg_virtue(player_ptr, V_COMPASSION, -1);
2282 * @brief モンスターが地形を踏破できるかどうかを返す
2283 * Check if monster can cross terrain
2285 * @param r_ptr モンスター種族構造体の参照ポインタ
2287 * @return 踏破可能ならばTRUEを返す
2289 bool monster_can_cross_terrain(FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode)
2291 feature_type *f_ptr = &f_info[feat];
2293 if (have_flag(f_ptr->flags, FF_PATTERN))
2295 if (!(mode & CEM_RIDING))
2297 if (!(r_ptr->flags7 & RF7_CAN_FLY)) return FALSE;
2301 if (!(mode & CEM_P_CAN_ENTER_PATTERN)) return FALSE;
2306 if (have_flag(f_ptr->flags, FF_CAN_FLY) && (r_ptr->flags7 & RF7_CAN_FLY)) return TRUE;
2307 if (have_flag(f_ptr->flags, FF_CAN_SWIM) && (r_ptr->flags7 & RF7_CAN_SWIM)) return TRUE;
2308 if (have_flag(f_ptr->flags, FF_CAN_PASS))
2310 if ((r_ptr->flags2 & RF2_PASS_WALL) && (!(mode & CEM_RIDING) || p_ptr->pass_wall)) return TRUE;
2313 if (!have_flag(f_ptr->flags, FF_MOVE)) return FALSE;
2315 /* Some monsters can walk on mountains */
2316 if (have_flag(f_ptr->flags, FF_MOUNTAIN) && (r_ptr->flags8 & RF8_WILD_MOUNTAIN)) return TRUE;
2319 if (have_flag(f_ptr->flags, FF_WATER))
2321 if (!(r_ptr->flags7 & RF7_AQUATIC))
2324 if (have_flag(f_ptr->flags, FF_DEEP)) return FALSE;
2327 else if (r_ptr->flags2 & RF2_AURA_FIRE) return FALSE;
2331 /* Aquatic monster into non-water? */
2332 else if (r_ptr->flags7 & RF7_AQUATIC) return FALSE;
2335 if (have_flag(f_ptr->flags, FF_LAVA))
2337 if (!(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)) return FALSE;
2341 if (have_flag(f_ptr->flags, FF_COLD_PUDDLE))
2343 if (!(r_ptr->flagsr & RFR_EFF_IM_COLD_MASK)) return FALSE;
2347 if (have_flag(f_ptr->flags, FF_ELEC_PUDDLE))
2349 if (!(r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK)) return FALSE;
2353 if (have_flag(f_ptr->flags, FF_ACID_PUDDLE))
2355 if (!(r_ptr->flagsr & RFR_EFF_IM_ACID_MASK)) return FALSE;
2359 if (have_flag(f_ptr->flags, FF_POISON_PUDDLE))
2361 if (!(r_ptr->flagsr & RFR_EFF_IM_POIS_MASK)) return FALSE;
2369 * @brief 指定された座標の地形をモンスターが踏破できるかどうかを返す
2370 * Strictly check if monster can enter the grid
2373 * @param r_ptr モンスター種族構造体の参照ポインタ
2375 * @return 踏破可能ならばTRUEを返す
2377 bool monster_can_enter(POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode)
2379 grid_type *g_ptr = &p_ptr->current_floor_ptr->grid_array[y][x];
2381 /* Player or other monster */
2382 if (player_bold(p_ptr, y, x)) return FALSE;
2383 if (g_ptr->m_idx) return FALSE;
2385 return monster_can_cross_terrain(g_ptr->feat, r_ptr, mode);
2390 * @brief モンスターの属性の基づいた敵対関係の有無を返す(サブルーチン)
2391 * Check if this monster has "hostile" alignment (aux)
2392 * @param sub_align1 モンスター1のサブフラグ
2393 * @param sub_align2 モンスター2のサブフラグ
2394 * @return 敵対関係にあるならばTRUEを返す
2396 static bool check_hostile_align(byte sub_align1, byte sub_align2)
2398 if (sub_align1 != sub_align2)
2400 if (((sub_align1 & SUB_ALIGN_EVIL) && (sub_align2 & SUB_ALIGN_GOOD)) ||
2401 ((sub_align1 & SUB_ALIGN_GOOD) && (sub_align2 & SUB_ALIGN_EVIL)))
2405 /* Non-hostile alignment */
2411 * @brief モンスターの属性の基づいた敵対関係の有無を返す
2412 * Check if two monsters are enemies
2413 * @param m_ptr モンスター1の構造体参照ポインタ
2414 * @param n_ptr モンスター2の構造体参照ポインタ
2415 * @return 敵対関係にあるならばTRUEを返す
2417 bool are_enemies(monster_type *m_ptr, monster_type *n_ptr)
2419 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2420 monster_race *s_ptr = &r_info[n_ptr->r_idx];
2422 if (p_ptr->phase_out)
2424 if (is_pet(m_ptr) || is_pet(n_ptr)) return FALSE;
2428 if ((r_ptr->flags8 & (RF8_WILD_TOWN | RF8_WILD_ALL))
2429 && (s_ptr->flags8 & (RF8_WILD_TOWN | RF8_WILD_ALL)))
2431 if (!is_pet(m_ptr) && !is_pet(n_ptr)) return FALSE;
2434 /* Friendly vs. opposite aligned normal or pet */
2435 if (check_hostile_align(m_ptr->sub_align, n_ptr->sub_align))
2437 if (!(m_ptr->mflag2 & MFLAG2_CHAMELEON) || !(n_ptr->mflag2 & MFLAG2_CHAMELEON)) return TRUE;
2440 /* Hostile vs. non-hostile */
2441 if (is_hostile(m_ptr) != is_hostile(n_ptr))
2452 * @brief モンスターがプレイヤーに対して敵意を抱くかどうかを返す
2453 * Check if this monster race has "hostile" alignment
2454 * @param m_ptr モンスター情報構造体の参照ポインタ
2455 * @param pa_good プレイヤーの善傾向値
2456 * @param pa_evil プレイヤーの悪傾向値
2457 * @param r_ptr モンスター種族情報の構造体参照ポインタ
2458 * @return プレイヤーに敵意を持つならばTRUEを返す
2460 * If user is player, m_ptr == NULL.
2462 bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr)
2464 byte sub_align1 = SUB_ALIGN_NEUTRAL;
2465 byte sub_align2 = SUB_ALIGN_NEUTRAL;
2467 if (m_ptr) /* For a monster */
2469 sub_align1 = m_ptr->sub_align;
2471 else /* For player */
2473 if (p_ptr->align >= pa_good) sub_align1 |= SUB_ALIGN_GOOD;
2474 if (p_ptr->align <= pa_evil) sub_align1 |= SUB_ALIGN_EVIL;
2477 /* Racial alignment flags */
2478 if (r_ptr->flags3 & RF3_EVIL) sub_align2 |= SUB_ALIGN_EVIL;
2479 if (r_ptr->flags3 & RF3_GOOD) sub_align2 |= SUB_ALIGN_GOOD;
2481 if (check_hostile_align(sub_align1, sub_align2)) return TRUE;
2483 /* Non-hostile alignment */
2488 * @brief モンスターを倒した際の財宝svalを返す
2489 * @param r_idx 倒したモンスターの種族ID
2492 * Hack -- Return the "automatic coin type" of a monster race
2493 * Used to allocate proper treasure when "Creeping coins" die
2494 * Note the use of actual "monster names"
2496 static OBJECT_SUBTYPE_VALUE get_coin_type(MONRACE_IDX r_idx)
2498 /* Analyze monsters */
2501 case MON_COPPER_COINS: return 2;
2502 case MON_SILVER_COINS: return 5;
2503 case MON_GOLD_COINS: return 10;
2504 case MON_MITHRIL_COINS:
2505 case MON_MITHRIL_GOLEM: return 16;
2506 case MON_ADAMANT_COINS: return 17;
2509 /* Assume nothing */
2515 * @brief モンスターが死亡した時の処理 /
2516 * Handle the "death" of a monster.
2517 * @param m_idx 死亡したモンスターのID
2518 * @param drop_item TRUEならばモンスターのドロップ処理を行う
2519 * @return 撃破されたモンスターの述語
2522 * Disperse treasures centered at the monster location based on the
2523 * various flags contained in the monster flags fields.
2524 * Check for "Quest" completion when a quest monster is killed.
2525 * Note that only the player can induce "monster_death()" on Uniques.
2526 * Thus (for now) all Quest monsters should be Uniques.
2527 * Note that monsters can now carry objects, and when a monster dies,
2528 * it drops all of its objects, which may disappear in crowded rooms.
2531 void monster_death(player_type *player_ptr, MONSTER_IDX m_idx, bool drop_item)
2540 floor_type *floor_ptr = player_ptr->current_floor_ptr;
2541 monster_type *m_ptr = &floor_ptr->m_list[m_idx];
2542 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2544 bool visible = ((m_ptr->ml && !player_ptr->image) || (r_ptr->flags1 & RF1_UNIQUE));
2548 bool do_gold = (!(r_ptr->flags1 & RF1_ONLY_ITEM));
2549 bool do_item = (!(r_ptr->flags1 & RF1_ONLY_GOLD));
2550 bool cloned = (m_ptr->smart & SM_CLONED) ? TRUE : FALSE;
2551 int force_coin = get_coin_type(m_ptr->r_idx);
2556 bool drop_chosen_item = drop_item && !cloned && !floor_ptr->inside_arena
2557 && !player_ptr->phase_out && !is_pet(m_ptr);
2559 /* The caster is dead? */
2560 if (current_world_ptr->timewalk_m_idx && current_world_ptr->timewalk_m_idx == m_idx) current_world_ptr->timewalk_m_idx = 0;
2562 /* Notice changes in view */
2563 if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
2565 player_ptr->update |= (PU_MON_LITE);
2571 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
2573 GAME_TEXT m_name[MAX_NLEN];
2575 monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
2576 exe_write_diary(player_ptr, DIARY_NAMED_PET, 3, m_name);
2579 /* Let monsters explode! */
2580 for (i = 0; i < 4; i++)
2582 if (r_ptr->blow[i].method == RBM_EXPLODE)
2584 BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
2585 EFFECT_ID typ = mbe_info[r_ptr->blow[i].effect].explode_type;
2586 DICE_NUMBER d_dice = r_ptr->blow[i].d_dice;
2587 DICE_SID d_side = r_ptr->blow[i].d_side;
2588 HIT_POINT damage = damroll(d_dice, d_side);
2590 project(player_ptr, m_idx, 3, y, x, damage, typ, flg, -1);
2595 if (m_ptr->mflag2 & MFLAG2_CHAMELEON)
2597 choose_new_monster(m_idx, TRUE, MON_CHAMELEON);
2598 r_ptr = &r_info[m_ptr->r_idx];
2601 check_quest_completion(player_ptr, m_ptr);
2603 /* Handle the possibility of player vanquishing arena combatant -KMW- */
2604 if (floor_ptr->inside_arena && !is_pet(m_ptr))
2606 player_ptr->exit_bldg = TRUE;
2608 if (player_ptr->arena_number > MAX_ARENA_MONS)
2610 msg_print(_("素晴らしい!君こそ真の勝利者だ。", "You are a Genuine Champion!"));
2614 msg_print(_("勝利!チャンピオンへの道を進んでいる。", "Victorious! You're on your way to becoming Champion."));
2617 if (arena_info[player_ptr->arena_number].tval)
2621 /* Prepare to make a prize */
2622 object_prep(q_ptr, lookup_kind(arena_info[player_ptr->arena_number].tval, arena_info[player_ptr->arena_number].sval));
2623 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART);
2624 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2627 if (player_ptr->arena_number > MAX_ARENA_MONS) player_ptr->arena_number++;
2628 player_ptr->arena_number++;
2631 GAME_TEXT m_name[MAX_NLEN];
2633 monster_desc(m_name, m_ptr, MD_WRONGDOER_NAME);
2635 exe_write_diary(player_ptr, DIARY_ARENA, player_ptr->arena_number, m_name);
2639 if (m_idx == player_ptr->riding)
2641 if (rakuba(player_ptr, -1, FALSE))
2643 msg_print(_("地面に落とされた。", "You have fallen from your riding pet."));
2647 /* Drop a dead corpse? */
2648 if (one_in_(r_ptr->flags1 & RF1_UNIQUE ? 1 : 4) &&
2649 (r_ptr->flags9 & (RF9_DROP_CORPSE | RF9_DROP_SKELETON)) &&
2650 !(floor_ptr->inside_arena || player_ptr->phase_out || cloned || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr))))
2652 /* Assume skeleton */
2653 bool corpse = FALSE;
2656 * We cannot drop a skeleton? Note, if we are in this check,
2657 * we *know* we can drop at least a corpse or a skeleton
2659 if (!(r_ptr->flags9 & RF9_DROP_SKELETON))
2661 else if ((r_ptr->flags9 & RF9_DROP_CORPSE) && (r_ptr->flags1 & RF1_UNIQUE))
2664 /* Else, a corpse is more likely unless we did a "lot" of damage */
2665 else if (r_ptr->flags9 & RF9_DROP_CORPSE)
2667 /* Lots of damage in one blow */
2668 if ((0 - ((m_ptr->maxhp) / 4)) > m_ptr->hp)
2670 if (one_in_(5)) corpse = TRUE;
2674 if (!one_in_(5)) corpse = TRUE;
2679 /* Prepare to make an object */
2680 object_prep(q_ptr, lookup_kind(TV_CORPSE, (corpse ? SV_CORPSE : SV_SKELETON)));
2682 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART);
2684 q_ptr->pval = m_ptr->r_idx;
2685 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2688 /* Drop objects being carried */
2689 monster_drop_carried_objects(m_ptr);
2691 if (r_ptr->flags1 & RF1_DROP_GOOD) mo_mode |= AM_GOOD;
2692 if (r_ptr->flags1 & RF1_DROP_GREAT) mo_mode |= AM_GREAT;
2694 switch (m_ptr->r_idx)
2696 case MON_PINK_HORROR:
2697 /* Pink horrors are replaced with 2 Blue horrors */
2698 if (!(floor_ptr->inside_arena || player_ptr->phase_out))
2700 bool notice = FALSE;
2702 for (i = 0; i < 2; i++)
2704 POSITION wy = y, wx = x;
2705 bool pet = is_pet(m_ptr);
2706 BIT_FLAGS mode = 0L;
2708 if (pet) mode |= PM_FORCE_PET;
2710 if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode))
2712 if (player_can_see_bold(player_ptr, wy, wx)) notice = TRUE;
2716 if (notice) msg_print(_("ピンク・ホラーは分裂した!", "The Pink horror divides!"));
2720 case MON_BLOODLETTER:
2721 /* Bloodletters of Khorne may drop a blade of chaos */
2722 if (drop_chosen_item && (randint1(100) < 15))
2726 /* Prepare to make a Blade of Chaos */
2727 object_prep(q_ptr, lookup_kind(TV_SWORD, SV_BLADE_OF_CHAOS));
2729 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART | mo_mode);
2730 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2735 if (drop_chosen_item && (floor_ptr->dun_level > 9))
2740 /* Activate restriction */
2741 if ((floor_ptr->dun_level > 49) && one_in_(5))
2742 get_obj_num_hook = kind_is_good_book;
2744 get_obj_num_hook = kind_is_book;
2747 make_object(player_ptr, q_ptr, mo_mode);
2748 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2754 * Mega^3-hack: killing a 'Warrior of the Dawn' is likely to
2755 * spawn another in the fallen one's place!
2757 if (!floor_ptr->inside_arena && !player_ptr->phase_out)
2761 POSITION wy = y, wx = x;
2763 bool pet = is_pet(m_ptr);
2767 scatter(player_ptr, &wy, &wx, y, x, 20, 0);
2768 } while (!(in_bounds(floor_ptr, wy, wx) && cave_empty_bold2(floor_ptr, wy, wx)) && --attempts);
2772 BIT_FLAGS mode = 0L;
2773 if (pet) mode |= PM_FORCE_PET;
2775 if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode))
2777 if (player_can_see_bold(player_ptr, wy, wx))
2778 msg_print(_("新たな戦士が現れた!", "A new warrior steps forth!"));
2786 /* One more ultra-hack: An Unmaker goes out with a big bang! */
2788 BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
2789 (void)project(player_ptr, m_idx, 6, y, x, 100, GF_CHAOS, flg, -1);
2793 case MON_UNICORN_ORD:
2796 /* Reward for "lazy" player */
2797 if (player_ptr->pseikaku == SEIKAKU_NAMAKE)
2799 ARTIFACT_IDX a_idx = 0;
2800 artifact_type *a_ptr = NULL;
2802 if (!drop_chosen_item) break;
2806 switch (randint0(3))
2809 a_idx = ART_NAMAKE_HAMMER;
2812 a_idx = ART_NAMAKE_BOW;
2815 a_idx = ART_NAMAKE_ARMOR;
2819 a_ptr = &a_info[a_idx];
2820 } while (a_ptr->cur_num);
2822 if (create_named_art(player_ptr, a_idx, y, x))
2826 /* Hack -- Memorize location of artifact in saved floors */
2827 if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
2829 else if (!preserve_mode) a_ptr->cur_num = 1;
2834 if (!drop_chosen_item) break;
2837 /* Mega-Hack -- Prepare to make "Grond" */
2838 object_prep(q_ptr, lookup_kind(TV_HAFTED, SV_GROND));
2840 /* Mega-Hack -- Mark this item as "Grond" */
2841 q_ptr->name1 = ART_GROND;
2843 /* Mega-Hack -- Actually create "Grond" */
2844 apply_magic(player_ptr, q_ptr, -1, AM_GOOD | AM_GREAT);
2845 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2848 /* Mega-Hack -- Prepare to make "Chaos" */
2849 object_prep(q_ptr, lookup_kind(TV_CROWN, SV_CHAOS));
2851 /* Mega-Hack -- Mark this item as "Chaos" */
2852 q_ptr->name1 = ART_CHAOS;
2854 /* Mega-Hack -- Actually create "Chaos" */
2855 apply_magic(player_ptr, q_ptr, -1, AM_GOOD | AM_GREAT);
2856 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2859 case MON_B_DEATH_SWORD:
2860 if (drop_chosen_item)
2864 /* Prepare to make a broken sword */
2865 object_prep(q_ptr, lookup_kind(TV_SWORD, randint1(2)));
2866 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2872 if (drop_chosen_item && ((m_ptr->r_idx == MON_A_GOLD) ||
2873 ((m_ptr->r_idx == MON_A_SILVER) && (r_ptr->r_akills % 5 == 0))))
2877 /* Prepare to make a Can of Toys */
2878 object_prep(q_ptr, lookup_kind(TV_CHEST, SV_CHEST_KANDUME));
2880 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART);
2881 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2887 BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
2888 (void)project(player_ptr, m_idx, 3, y, x, damroll(20, 10), GF_FIRE, flg, -1);
2893 if (!drop_chosen_item) break;
2895 switch (r_ptr->d_char)
2898 if (floor_ptr->dun_level > 0)
2903 /* Activate restriction */
2904 get_obj_num_hook = kind_is_cloak;
2907 make_object(player_ptr, q_ptr, mo_mode);
2908 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2913 if (floor_ptr->dun_level > 4)
2918 /* Activate restriction */
2919 get_obj_num_hook = kind_is_polearm;
2921 /* Make a poleweapon */
2922 make_object(player_ptr, q_ptr, mo_mode);
2923 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2928 if (floor_ptr->dun_level > 19)
2933 /* Activate restriction */
2934 get_obj_num_hook = kind_is_armor;
2936 /* Make a hard armor */
2937 make_object(player_ptr, q_ptr, mo_mode);
2938 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2943 if (floor_ptr->dun_level > 4)
2948 /* Activate restriction */
2949 get_obj_num_hook = kind_is_hafted;
2951 /* Make a hafted weapon */
2952 make_object(player_ptr, q_ptr, mo_mode);
2953 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2958 if (m_ptr->r_idx != MON_STORMBRINGER)
2963 /* Activate restriction */
2964 get_obj_num_hook = kind_is_sword;
2967 make_object(player_ptr, q_ptr, mo_mode);
2968 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2975 /* Mega-Hack -- drop fixed items */
2976 if (drop_chosen_item)
2978 ARTIFACT_IDX a_idx = 0;
2979 PERCENTAGE chance = 0;
2981 for (i = 0; i < 4; i++)
2983 if (!r_ptr->artifact_id[i]) break;
2984 a_idx = r_ptr->artifact_id[i];
2985 chance = r_ptr->artifact_percent[i];
2988 if ((a_idx > 0) && ((randint0(100) < chance) || current_world_ptr->wizard))
2990 artifact_type *a_ptr = &a_info[a_idx];
2992 if (!a_ptr->cur_num)
2994 if (create_named_art(player_ptr, a_idx, y, x))
2998 /* Hack -- Memorize location of artifact in saved floors */
2999 if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
3001 else if (!preserve_mode) a_ptr->cur_num = 1;
3005 if ((r_ptr->flags7 & RF7_GUARDIAN) && (d_info[player_ptr->dungeon_idx].final_guardian == m_ptr->r_idx))
3007 KIND_OBJECT_IDX k_idx = d_info[player_ptr->dungeon_idx].final_object ? d_info[player_ptr->dungeon_idx].final_object
3008 : lookup_kind(TV_SCROLL, SV_SCROLL_ACQUIREMENT);
3010 if (d_info[player_ptr->dungeon_idx].final_artifact)
3012 a_idx = d_info[player_ptr->dungeon_idx].final_artifact;
3013 artifact_type *a_ptr = &a_info[a_idx];
3015 if (!a_ptr->cur_num)
3017 if (create_named_art(player_ptr, a_idx, y, x))
3021 /* Hack -- Memorize location of artifact in saved floors */
3022 if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
3024 else if (!preserve_mode) a_ptr->cur_num = 1;
3026 /* Prevent rewarding both artifact and "default" object */
3027 if (!d_info[player_ptr->dungeon_idx].final_object) k_idx = 0;
3035 /* Prepare to make a reward */
3036 object_prep(q_ptr, k_idx);
3038 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART | AM_GOOD);
3039 (void)drop_near(player_ptr, q_ptr, -1, y, x);
3041 msg_format(_("あなたは%sを制覇した!", "You have conquered %s!"), d_name + d_info[player_ptr->dungeon_idx].name);
3045 /* Determine how much we can drop */
3046 if ((r_ptr->flags1 & RF1_DROP_60) && (randint0(100) < 60)) number++;
3047 if ((r_ptr->flags1 & RF1_DROP_90) && (randint0(100) < 90)) number++;
3048 if (r_ptr->flags1 & RF1_DROP_1D2) number += damroll(1, 2);
3049 if (r_ptr->flags1 & RF1_DROP_2D2) number += damroll(2, 2);
3050 if (r_ptr->flags1 & RF1_DROP_3D2) number += damroll(3, 2);
3051 if (r_ptr->flags1 & RF1_DROP_4D2) number += damroll(4, 2);
3053 if (cloned && !(r_ptr->flags1 & RF1_UNIQUE))
3054 number = 0; /* Clones drop no stuff unless Cloning Pits */
3056 if (is_pet(m_ptr) || player_ptr->phase_out || floor_ptr->inside_arena)
3057 number = 0; /* Pets drop no stuff */
3058 if (!drop_item && (r_ptr->d_char != '$')) number = 0;
3060 if ((r_ptr->flags2 & (RF2_MULTIPLY)) && (r_ptr->r_akills > 1024))
3061 number = 0; /* Limit of Multiply monster drop */
3063 /* Hack -- handle creeping coins */
3064 coin_type = force_coin;
3066 /* Average dungeon and monster levels */
3067 floor_ptr->object_level = (floor_ptr->dun_level + r_ptr->level) / 2;
3069 /* Drop some objects */
3070 for (j = 0; j < number; j++)
3075 if (do_gold && (!do_item || (randint0(100) < 50)))
3077 if (!make_gold(floor_ptr, q_ptr)) continue;
3082 if (!make_object(player_ptr, q_ptr, mo_mode)) continue;
3086 (void)drop_near(player_ptr, q_ptr, -1, y, x);
3089 /* Reset the object level */
3090 floor_ptr->object_level = floor_ptr->base_level;
3092 /* Reset "coin" type */
3096 /* Take note of any dropped treasure */
3097 if (visible && (dump_item || dump_gold))
3099 /* Take notes on treasure */
3100 lore_treasure(m_idx, dump_item, dump_gold);
3103 /* Only process "Quest Monsters" */
3104 if (!(r_ptr->flags1 & RF1_QUESTOR)) return;
3105 if (player_ptr->phase_out) return;
3108 if ((m_ptr->r_idx == MON_SERPENT) && !cloned)
3111 current_world_ptr->total_winner = TRUE;
3113 /* Redraw the "title" */
3114 player_ptr->redraw |= (PR_TITLE);
3116 play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FINAL_QUEST_CLEAR);
3118 exe_write_diary(player_ptr, DIARY_DESCRIPTION, 0, _("見事に変愚蛮怒の勝利者となった!", "become *WINNER* of Hengband finely!"));
3120 admire_from_patron(player_ptr);
3122 /* Congratulations */
3123 msg_print(_("*** おめでとう ***", "*** CONGRATULATIONS ***"));
3124 msg_print(_("あなたはゲームをコンプリートしました。", "You have won the game!"));
3125 msg_print(_("準備が整ったら引退(自殺コマンド)しても結構です。", "You may retire (commit suicide) when you are ready."));
3130 * @brief モンスターを撃破した際の述語メッセージを返す /
3131 * Return monster death string
3132 * @param r_ptr 撃破されたモンスターの種族情報を持つ構造体の参照ポインタ
3133 * @return 撃破されたモンスターの述語
3135 concptr extract_note_dies(MONRACE_IDX r_idx)
3137 monster_race *r_ptr = &r_info[r_idx];
3138 if (monster_living(r_idx)) return _("は死んだ。", " dies.");
3140 for (int i = 0; i < 4; i++)
3142 if (r_ptr->blow[i].method == RBM_EXPLODE)
3144 return _("は爆発して粉々になった。", " explodes into tiny shreds.");
3148 return _("を倒した。", " is destroyed.");
3152 * Monster health description
3154 concptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
3156 monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
3163 /* Determine if the monster is "living" */
3164 living = monster_living(m_ptr->ap_r_idx);
3166 /* Calculate a health "percentage" */
3167 perc = m_ptr->maxhp > 0 ? 100L * m_ptr->hp / m_ptr->maxhp : 0;
3169 /* Healthy monsters */
3170 if (m_ptr->hp >= m_ptr->maxhp)
3172 desc = living ? _("無傷", "unhurt") : _("無ダメージ", "undamaged");
3175 else if (perc >= 60)
3177 desc = living ? _("軽傷", "somewhat wounded") : _("小ダメージ", "somewhat damaged");
3180 else if (perc >= 25)
3182 desc = living ? _("負傷", "wounded") : _("中ダメージ", "damaged");
3185 else if (perc >= 10)
3187 desc = living ? _("重傷", "badly wounded") : _("大ダメージ", "badly damaged");
3192 desc = living ? _("半死半生", "almost dead") : _("倒れかけ", "almost destroyed");
3195 /* Need attitude information? */
3198 /* Full information is not needed */
3201 else if (is_pet(m_ptr))
3203 attitude = _(", ペット", ", pet");
3205 else if (is_friendly(m_ptr))
3207 attitude = _(", 友好的", ", friendly");
3211 attitude = _("", "");
3214 /* Clone monster? */
3215 if (m_ptr->smart & SM_CLONED)
3224 /* Display monster's level --- idea borrowed from ToME */
3225 if (ap_r_ptr->r_tkills && !(m_ptr->mflag2 & MFLAG2_KAGE))
3227 return format(_("レベル%d, %s%s%s", "Level %d, %s%s%s"), ap_r_ptr->level, desc, attitude, clone);
3231 return format(_("レベル???, %s%s%s", "Level ???, %s%s%s"), desc, attitude, clone);