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"
42 * Pronoun arrays, by gender.
44 static concptr wd_he[3] =
48 { "it", "he", "she" };
51 static concptr wd_his[3] =
53 { "それの", "彼の", "彼女の" };
55 { "its", "his", "her" };
59 * 英語の複数系記述用マクロ / Pluralizer. Args(count, singular, plural)
61 #define plural(c,s,p) \
62 (((c) == 1) ? (s) : (p))
65 * Prepare hook for c_roff(). It will be changed for spoiler generation in wizard1.c.
67 void(*hook_c_roff)(TERM_COLOR attr, concptr str) = c_roff;
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];
107 DEPTH level = r_ptr->level;
108 s32b a = r_ptr->r_blows[i];
110 s32b d1 = r_ptr->blow[i].d_dice;
111 s32b d2 = r_ptr->blow[i].d_side;
114 if (d >= ((4 + level)*MAX_UCHAR) / 80) d = ((4 + level)*MAX_UCHAR - 1) / 80;
115 if ((4 + level) * a > 80 * d) return TRUE;
116 if (!(r_ptr->flags1 & RF1_UNIQUE)) return FALSE;
117 if ((4 + level) * (2 * a) > 80 * d) return TRUE;
124 * @brief モンスターの思い出メッセージをあらかじめ指定された関数ポインタに基づき出力する
128 static void hooked_roff(concptr str)
130 hook_c_roff(TERM_WHITE, str);
135 * @brief ダイス目を文字列に変換する
136 * @param base_damage 固定値
137 * @param dice_num ダイス数
138 * @param dice_side ダイス面
139 * @param dice_mult ダイス倍率
140 * @param dice_div ダイス除数
141 * @param msg 文字列を格納するポインタ
144 void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg)
146 char base[80] = "", dice[80] = "", mult[80] = "";
150 sprintf(msg, "%d", base_damage);
154 if (base_damage != 0)
155 sprintf(base, "%d+", base_damage);
158 sprintf(dice, "d%d", dice_side);
160 sprintf(dice, "%dd%d", dice_num, dice_side);
162 if (dice_mult != 1 || dice_div != 1)
165 sprintf(mult, "*%d", dice_mult);
167 sprintf(mult, "*(%d/%d)", dice_mult, dice_div);
170 sprintf(msg, "%s%s%s", base, dice, mult);
175 * @brief 文字列にモンスターの攻撃力を加える
176 * @param r_idx モンスターの種族ID
177 * @param SPELL_NUM 呪文番号
179 * @param tmp 返すメッセージを格納する配列
182 void set_damage(player_type *player_ptr, MONRACE_IDX r_idx, int SPELL_NUM, char* msg, char* tmp)
184 int base_damage = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, BASE_DAM);
185 int dice_num = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, DICE_NUM);
186 int dice_side = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, DICE_SIDE);
187 int dice_mult = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, DICE_MULT);
188 int dice_div = monspell_race_damage(player_ptr, SPELL_NUM, r_idx, DICE_DIV);
189 char dmg_str[80], dice_str[80];
190 dice_to_string(base_damage, dice_num, dice_side, dice_mult, dice_div, dmg_str);
191 sprintf(dice_str, "(%s)", dmg_str);
193 if (know_armour(r_idx))
194 sprintf(tmp, msg, dice_str);
196 sprintf(tmp, msg, "");
201 * @brief モンスターの思い出情報を表示する
202 * Hack -- display monster information using "hooked_roff()"
203 * @param r_idx モンスターの種族ID
204 * @param mode 表示オプション
207 * This function should only be called with the cursor placed at the
208 * left edge of the screen, on a cleared line, in which the recall is
209 * to take place. One extra blank line is left after the recall.
211 static void roff_aux(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
219 bool nightmare = ironman_nightmare && !(mode & 0x02);
220 monster_race *r_ptr = &r_info[r_idx];
221 SPEED speed = nightmare ? r_ptr->speed + 5 : r_ptr->speed;
223 /* Obtain a copy of the "known" number of drops */
224 ITEM_NUMBER drop_gold = r_ptr->r_drop_gold;
225 ITEM_NUMBER drop_item = r_ptr->r_drop_item;
227 /* Obtain a copy of the "known" flags */
228 BIT_FLAGS flags1 = (r_ptr->flags1 & r_ptr->r_flags1);
229 BIT_FLAGS flags2 = (r_ptr->flags2 & r_ptr->r_flags2);
230 BIT_FLAGS flags3 = (r_ptr->flags3 & r_ptr->r_flags3);
231 BIT_FLAGS flags4 = (r_ptr->flags4 & r_ptr->r_flags4);
232 BIT_FLAGS a_ability_flags1 = (r_ptr->a_ability_flags1 & r_ptr->r_flags5);
233 BIT_FLAGS a_ability_flags2 = (r_ptr->a_ability_flags2 & r_ptr->r_flags6);
234 BIT_FLAGS flags7 = (r_ptr->flags7 & r_ptr->flags7);
235 BIT_FLAGS flagsr = (r_ptr->flagsr & r_ptr->r_flagsr);
237 bool reinforce = FALSE;
238 for (int n = 0; n < A_MAX; n++)
240 if (r_ptr->reinforce_id[n] > 0) reinforce = TRUE;
243 bool know_everything = FALSE;
244 if (cheat_know || (mode & 0x01))
246 know_everything = TRUE;
251 drop_gold = drop_item =
252 (((r_ptr->flags1 & RF1_DROP_4D2) ? 8 : 0) +
253 ((r_ptr->flags1 & RF1_DROP_3D2) ? 6 : 0) +
254 ((r_ptr->flags1 & RF1_DROP_2D2) ? 4 : 0) +
255 ((r_ptr->flags1 & RF1_DROP_1D2) ? 2 : 0) +
256 ((r_ptr->flags1 & RF1_DROP_90) ? 1 : 0) +
257 ((r_ptr->flags1 & RF1_DROP_60) ? 1 : 0));
259 if (r_ptr->flags1 & RF1_ONLY_GOLD) drop_item = 0;
260 if (r_ptr->flags1 & RF1_ONLY_ITEM) drop_gold = 0;
262 flags1 = r_ptr->flags1;
263 flags2 = r_ptr->flags2;
264 flags3 = r_ptr->flags3;
265 flags4 = r_ptr->flags4;
266 a_ability_flags1 = r_ptr->a_ability_flags1;
267 a_ability_flags2 = r_ptr->a_ability_flags2;
268 flagsr = r_ptr->flagsr;
272 if (r_ptr->flags1 & RF1_FEMALE) msex = 2;
273 else if (r_ptr->flags1 & RF1_MALE) msex = 1;
275 if (r_ptr->flags1 & RF1_UNIQUE) flags1 |= (RF1_UNIQUE);
276 if (r_ptr->flags1 & RF1_QUESTOR) flags1 |= (RF1_QUESTOR);
277 if (r_ptr->flags1 & RF1_MALE) flags1 |= (RF1_MALE);
278 if (r_ptr->flags1 & RF1_FEMALE) flags1 |= (RF1_FEMALE);
280 if (r_ptr->flags1 & RF1_FRIENDS) flags1 |= (RF1_FRIENDS);
281 if (r_ptr->flags1 & RF1_ESCORT) flags1 |= (RF1_ESCORT);
282 if (r_ptr->flags1 & RF1_ESCORTS) flags1 |= (RF1_ESCORTS);
284 if (r_ptr->r_tkills || know_everything)
286 if (r_ptr->flags3 & RF3_ORC) flags3 |= (RF3_ORC);
287 if (r_ptr->flags3 & RF3_TROLL) flags3 |= (RF3_TROLL);
288 if (r_ptr->flags3 & RF3_GIANT) flags3 |= (RF3_GIANT);
289 if (r_ptr->flags3 & RF3_DRAGON) flags3 |= (RF3_DRAGON);
290 if (r_ptr->flags3 & RF3_DEMON) flags3 |= (RF3_DEMON);
291 if (r_ptr->flags3 & RF3_UNDEAD) flags3 |= (RF3_UNDEAD);
292 if (r_ptr->flags3 & RF3_EVIL) flags3 |= (RF3_EVIL);
293 if (r_ptr->flags3 & RF3_GOOD) flags3 |= (RF3_GOOD);
294 if (r_ptr->flags3 & RF3_ANIMAL) flags3 |= (RF3_ANIMAL);
295 if (r_ptr->flags3 & RF3_AMBERITE) flags3 |= (RF3_AMBERITE);
296 if (r_ptr->flags2 & RF2_HUMAN) flags2 |= (RF2_HUMAN);
297 if (r_ptr->flags2 & RF2_QUANTUM) flags2 |= (RF2_QUANTUM);
299 if (r_ptr->flags1 & RF1_FORCE_DEPTH) flags1 |= (RF1_FORCE_DEPTH);
300 if (r_ptr->flags1 & RF1_FORCE_MAXHP) flags1 |= (RF1_FORCE_MAXHP);
305 if (flags1 & RF1_UNIQUE)
307 bool dead = (r_ptr->max_num == 0) ? TRUE : FALSE;
310 hooked_roff(format(_("%^sはあなたの先祖を %d 人葬っている", "%^s has slain %d of your ancestors"),
311 wd_he[msex], r_ptr->r_deaths));
316 _(format("が、すでに仇討ちは果たしている!"),
317 format(", but you have avenged %s! ", plural(r_ptr->r_deaths, "him", "them"))));
322 _(format("のに、まだ仇討ちを果たしていない。"),
323 format(", who %s unavenged. ", plural(r_ptr->r_deaths, "remains", "remain"))));
330 hooked_roff(_("あなたはこの仇敵をすでに葬り去っている。", "You have slain this foe. "));
334 else if (r_ptr->r_deaths)
337 _(format("このモンスターはあなたの先祖を %d 人葬っている", r_ptr->r_deaths),
338 format("%d of your ancestors %s been killed by this creature, ", r_ptr->r_deaths, plural(r_ptr->r_deaths, "has", "have"))));
343 _("が、あなたはこのモンスターを少なくとも %d 体は倒している。",
344 "and you have exterminated at least %d of the creatures. "), r_ptr->r_pkills));
346 else if (r_ptr->r_tkills)
349 _("が、あなたの先祖はこのモンスターを少なくとも %d 体は倒している。",
350 "and your ancestors have exterminated at least %d of the creatures. "), r_ptr->r_tkills));
355 _("が、まだ%sを倒したことはない。",
356 "and %s is not ever known to have been defeated. "), wd_he[msex]));
366 _("あなたはこのモンスターを少なくとも %d 体は殺している。",
367 "You have killed at least %d of these creatures. "), r_ptr->r_pkills));
369 else if (r_ptr->r_tkills)
372 _("あなたの先祖はこのモンスターを少なくとも %d 体は殺している。",
373 "Your ancestors have killed at least %d of these creatures. "), r_ptr->r_tkills));
377 hooked_roff(_("このモンスターを倒したことはない。", "No battles to the death are recalled. "));
384 concptr tmp = r_text + r_ptr->text;
391 if (r_idx == MON_KAGE)
398 if (r_ptr->level == 0)
400 hooked_roff(format(_("%^sは町に住み", "%^s lives in the town"), wd_he[msex]));
403 else if (r_ptr->r_tkills || know_everything)
408 _("%^sは通常地下 %d フィートで出現し", "%^s is normally found at depths of %d feet"),
409 wd_he[msex], r_ptr->level * 50));
414 _("%^sは通常地下 %d 階で出現し", "%^s is normally found on dungeon level %d"),
415 wd_he[msex], r_ptr->level));
421 if (r_idx == MON_CHAMELEON)
423 hooked_roff(_("、他のモンスターに化ける。", "and can take the shape of other monster."));
429 hooked_roff(_("、", ", and "));
433 hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
439 hooked_roff("moves");
442 if ((flags1 & RF1_RAND_50) || (flags1 & RF1_RAND_25))
444 if ((flags1 & RF1_RAND_50) && (flags1 & RF1_RAND_25))
446 hooked_roff(_("かなり", " extremely"));
448 else if (flags1 & RF1_RAND_50)
450 hooked_roff(_("幾分", " somewhat"));
452 else if (flags1 & RF1_RAND_25)
454 hooked_roff(_("少々", " a bit"));
457 hooked_roff(_("不規則に", " erratically"));
458 if (speed != 110) hooked_roff(_("、かつ", ", and"));
463 if (speed > 139) hook_c_roff(TERM_RED, _("信じ難いほど", " incredibly"));
464 else if (speed > 134) hook_c_roff(TERM_ORANGE, _("猛烈に", " extremely"));
465 else if (speed > 129) hook_c_roff(TERM_ORANGE, _("非常に", " very"));
466 else if (speed > 124) hook_c_roff(TERM_UMBER, _("かなり", " fairly"));
467 else if (speed < 120) hook_c_roff(TERM_L_UMBER, _("やや", " somewhat"));
468 hook_c_roff(TERM_L_RED, _("素早く", " quickly"));
470 else if (speed < 110)
472 if (speed < 90) hook_c_roff(TERM_L_GREEN, _("信じ難いほど", " incredibly"));
473 else if (speed < 95) hook_c_roff(TERM_BLUE, _("非常に", " very"));
474 else if (speed < 100) hook_c_roff(TERM_BLUE, _("かなり", " fairly"));
475 else if (speed > 104) hook_c_roff(TERM_GREEN, _("やや", " somewhat"));
476 hook_c_roff(TERM_L_BLUE, _("ゆっくりと", " slowly"));
480 hooked_roff(_("普通の速さで", " at normal speed"));
484 hooked_roff("動いている");
487 if (flags1 & RF1_NEVER_MOVE)
491 hooked_roff(_("、しかし", ", but "));
495 hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
499 hooked_roff(_("侵入者を追跡しない", "does not deign to chase intruders"));
504 hooked_roff(_("。", ". "));
508 if (r_ptr->r_tkills || know_everything)
513 if (flags1 & RF1_UNIQUE)
515 hooked_roff("Killing this");
519 hooked_roff("A kill of this");
523 if (flags2 & RF2_ELDRITCH_HORROR) hook_c_roff(TERM_VIOLET, _("狂気を誘う", " sanity-blasting"));
524 if (flags3 & RF3_ANIMAL) hook_c_roff(TERM_L_GREEN, _("自然界の", " natural"));
525 if (flags3 & RF3_EVIL) hook_c_roff(TERM_L_DARK, _("邪悪なる", " evil"));
526 if (flags3 & RF3_GOOD) hook_c_roff(TERM_YELLOW, _("善良な", " good"));
527 if (flags3 & RF3_UNDEAD) hook_c_roff(TERM_VIOLET, _("アンデッドの", " undead"));
528 if (flags3 & RF3_AMBERITE) hook_c_roff(TERM_VIOLET, _("アンバーの王族の", " Amberite"));
530 if ((flags3 & (RF3_DRAGON | RF3_DEMON | RF3_GIANT | RF3_TROLL | RF3_ORC | RF3_ANGEL)) || (flags2 & (RF2_QUANTUM | RF2_HUMAN)))
532 if (flags3 & RF3_DRAGON) hook_c_roff(TERM_ORANGE, _("ドラゴン", " dragon"));
533 if (flags3 & RF3_DEMON) hook_c_roff(TERM_VIOLET, _("デーモン", " demon"));
534 if (flags3 & RF3_GIANT) hook_c_roff(TERM_L_UMBER, _("巨人", " giant"));
535 if (flags3 & RF3_TROLL) hook_c_roff(TERM_BLUE, _("トロル", " troll"));
536 if (flags3 & RF3_ORC) hook_c_roff(TERM_UMBER, _("オーク", " orc"));
537 if (flags2 & RF2_HUMAN) hook_c_roff(TERM_L_WHITE, _("人間", " human"));
538 if (flags2 & RF2_QUANTUM) hook_c_roff(TERM_VIOLET, _("量子生物", " quantum creature"));
539 if (flags3 & RF3_ANGEL) hook_c_roff(TERM_YELLOW, _("天使", " angel"));
543 hooked_roff(_("モンスター", " creature"));
547 hooked_roff("を倒すことは");
549 long exp_integer = (long)r_ptr->mexp * r_ptr->level / (player_ptr->max_plv + 2) * 3 / 2;
550 long exp_decimal = ((((long)r_ptr->mexp * r_ptr->level % (player_ptr->max_plv + 2) * 3 / 2) *
551 (long)1000 / (player_ptr->max_plv + 2) + 5) / 10);
554 hooked_roff(format(" %d レベルのキャラクタにとって 約%ld.%02ld ポイントの経験となる。", player_ptr->lev, (long)exp_integer, (long)exp_decimal));
556 hooked_roff(format(" is worth about %ld.%02ld point%s",
557 (long)exp_integer, (long)exp_decimal, ((exp_integer == 1) && (exp_decimal == 0)) ? "" : "s"));
561 exp_integer = player_ptr->lev % 10;
562 if ((player_ptr->lev / 10) != 1)
564 if (exp_integer == 1) ordinal = "st";
565 else if (exp_integer == 2) ordinal = "nd";
566 else if (exp_integer == 3) ordinal = "rd";
571 exp_integer = player_ptr->lev;
572 if ((exp_integer == 8) || (exp_integer == 11) || (exp_integer == 18)) vowel = "n";
574 hooked_roff(format(" for a%s %lu%s level character. ", vowel, (long)exp_integer, ordinal));
578 if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC) && (flags3 & RF3_AURA_COLD))
580 hook_c_roff(TERM_VIOLET, format(
581 _("%^sは炎と氷とスパークに包まれている。", "%^s is surrounded by flames, ice and electricity. "), wd_he[msex]));
583 else if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC))
585 hook_c_roff(TERM_L_RED, format(
586 _("%^sは炎とスパークに包まれている。", "%^s is surrounded by flames and electricity. "), wd_he[msex]));
588 else if ((flags2 & RF2_AURA_FIRE) && (flags3 & RF3_AURA_COLD))
590 hook_c_roff(TERM_BLUE, format(
591 _("%^sは炎と氷に包まれている。", "%^s is surrounded by flames and ice. "), wd_he[msex]));
593 else if ((flags3 & RF3_AURA_COLD) && (flags2 & RF2_AURA_ELEC))
595 hook_c_roff(TERM_L_GREEN, format(
596 _("%^sは氷とスパークに包まれている。", "%^s is surrounded by ice and electricity. "), wd_he[msex]));
598 else if (flags2 & RF2_AURA_FIRE)
600 hook_c_roff(TERM_RED, format(
601 _("%^sは炎に包まれている。", "%^s is surrounded by flames. "), wd_he[msex]));
603 else if (flags3 & RF3_AURA_COLD)
605 hook_c_roff(TERM_BLUE, format(
606 _("%^sは氷に包まれている。", "%^s is surrounded by ice. "), wd_he[msex]));
608 else if (flags2 & RF2_AURA_ELEC)
610 hook_c_roff(TERM_L_BLUE, format(
611 _("%^sはスパークに包まれている。", "%^s is surrounded by electricity. "), wd_he[msex]));
614 if (flags2 & RF2_REFLECTING)
615 hooked_roff(format(_("%^sは矢の呪文を跳ね返す。", "%^s reflects bolt spells. "), wd_he[msex]));
617 if ((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS) || reinforce)
620 _("%^sは通常護衛を伴って現れる。", "%^s usually appears with escorts. "), wd_he[msex]));
624 hooked_roff(_("護衛の構成は", "These escorts"));
625 if ((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS))
627 hooked_roff(_("少なくとも", " at the least"));
631 hooked_roff(" contain ");
633 for (int n = 0; n < A_MAX; n++)
635 bool is_reinforced = r_ptr->reinforce_id[n] > 0;
636 is_reinforced &= r_ptr->reinforce_dd[n];
637 is_reinforced &= r_ptr->reinforce_ds[n];
638 if (!is_reinforced) continue;
640 monster_race *rf_ptr = &r_info[r_ptr->reinforce_id[n]];
641 if (rf_ptr->flags1 & RF1_UNIQUE)
643 hooked_roff(format(_("、%s", ", %s"), r_name + rf_ptr->name));
648 hooked_roff(format("、 %dd%d 体の%s", r_ptr->reinforce_dd[n], r_ptr->reinforce_ds[n], r_name + rf_ptr->name));
650 bool plural = (r_ptr->reinforce_dd[n] * r_ptr->reinforce_ds[n] > 1);
651 GAME_TEXT name[MAX_NLEN];
652 strcpy(name, r_name + rf_ptr->name);
653 if (plural) plural_aux(name);
654 hooked_roff(format(",%dd%d %s", r_ptr->reinforce_dd[n], r_ptr->reinforce_ds[n], name));
658 hooked_roff(_("で成り立っている。", "."));
662 else if (flags1 & RF1_FRIENDS)
664 hooked_roff(format(_("%^sは通常集団で現れる。", "%^s usually appears in groups. "), wd_he[msex]));
670 char tmp_msg[96][96];
671 if (flags4 & RF4_SHRIEK)
673 vp[vn] = _("悲鳴で助けを求める", "shriek for help");
674 color[vn++] = TERM_L_WHITE;
677 if (flags4 & RF4_ROCKET)
679 set_damage(player_ptr, r_idx, (MS_ROCKET), _("ロケット%sを発射する", "shoot a rocket%s"), tmp_msg[vn]);
680 vp[vn] = tmp_msg[vn];
681 color[vn++] = TERM_UMBER;
684 if (flags4 & RF4_SHOOT)
686 for (int m = 0; m < 4; m++)
688 if (r_ptr->blow[m].method != RBM_SHOOT) continue;
690 if (know_armour(r_idx))
691 sprintf(tmp_msg[vn], _("威力 %dd%d の射撃をする", "fire an arrow (Power:%dd%d)"), r_ptr->blow[m].d_side, r_ptr->blow[m].d_dice);
693 sprintf(tmp_msg[vn], _("射撃をする", "fire an arrow"));
694 vp[vn] = tmp_msg[vn]; color[vn++] = TERM_UMBER;
699 if (a_ability_flags2 & (RF6_SPECIAL))
701 vp[vn] = _("特別な行動をする", "do something");
702 color[vn++] = TERM_VIOLET;
707 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
708 for (int n = 0; n < vn; n++)
713 jverb(vp[n], jverb_buf, JVERB_OR);
714 hook_c_roff(color[n], jverb_buf);
715 hook_c_roff(color[n], "り");
718 else hook_c_roff(color[n], vp[n]);
720 if (n == 0) hooked_roff(" may ");
721 else if (n < vn - 1) hooked_roff(", ");
722 else hooked_roff(" or ");
724 hook_c_roff(color[n], vp[n]);
728 hooked_roff(_("ことがある。", ". "));
732 if (flags4 & (RF4_BR_ACID))
734 set_damage(player_ptr, r_idx, (MS_BR_ACID), _("酸%s", "acid%s"), tmp_msg[vn]);
735 vp[vn] = tmp_msg[vn];
736 color[vn++] = TERM_GREEN;
739 if (flags4 & (RF4_BR_ELEC))
741 set_damage(player_ptr, r_idx, (MS_BR_ELEC), _("稲妻%s", "lightning%s"), tmp_msg[vn]);
742 vp[vn] = tmp_msg[vn];
743 color[vn++] = TERM_BLUE;
746 if (flags4 & (RF4_BR_FIRE))
748 set_damage(player_ptr, r_idx, (MS_BR_FIRE), _("火炎%s", "fire%s"), tmp_msg[vn]);
749 vp[vn] = tmp_msg[vn];
750 color[vn++] = TERM_RED;
753 if (flags4 & (RF4_BR_COLD))
755 set_damage(player_ptr, r_idx, (MS_BR_COLD), _("冷気%s", "frost%s"), tmp_msg[vn]);
756 vp[vn] = tmp_msg[vn];
757 color[vn++] = TERM_L_WHITE;
760 if (flags4 & (RF4_BR_POIS))
762 set_damage(player_ptr, r_idx, (MS_BR_POIS), _("毒%s", "poison%s"), tmp_msg[vn]);
763 vp[vn] = tmp_msg[vn];
764 color[vn++] = TERM_L_GREEN;
767 if (flags4 & (RF4_BR_NETH))
769 set_damage(player_ptr, r_idx, (MS_BR_NETHER), _("地獄%s", "nether%s"), tmp_msg[vn]);
770 vp[vn] = tmp_msg[vn];
771 color[vn++] = TERM_L_DARK;
774 if (flags4 & (RF4_BR_LITE))
776 set_damage(player_ptr, r_idx, (MS_BR_LITE), _("閃光%s", "light%s"), tmp_msg[vn]);
777 vp[vn] = tmp_msg[vn];
778 color[vn++] = TERM_YELLOW;
781 if (flags4 & (RF4_BR_DARK))
783 set_damage(player_ptr, r_idx, (MS_BR_DARK), _("暗黒%s", "darkness%s"), tmp_msg[vn]);
784 vp[vn] = tmp_msg[vn];
785 color[vn++] = TERM_L_DARK;
788 if (flags4 & (RF4_BR_CONF))
790 set_damage(player_ptr, r_idx, (MS_BR_CONF), _("混乱%s", "confusion%s"), tmp_msg[vn]);
791 vp[vn] = tmp_msg[vn];
792 color[vn++] = TERM_L_UMBER;
795 if (flags4 & (RF4_BR_SOUN))
797 set_damage(player_ptr, r_idx, (MS_BR_SOUND), _("轟音%s", "sound%s"), tmp_msg[vn]);
798 vp[vn] = tmp_msg[vn];
799 color[vn++] = TERM_ORANGE;
802 if (flags4 & (RF4_BR_CHAO))
804 set_damage(player_ptr, r_idx, (MS_BR_CHAOS), _("カオス%s", "chaos%s"), tmp_msg[vn]);
805 vp[vn] = tmp_msg[vn];
806 color[vn++] = TERM_VIOLET;
809 if (flags4 & (RF4_BR_DISE))
811 set_damage(player_ptr, r_idx, (MS_BR_DISEN), _("劣化%s", "disenchantment%s"), tmp_msg[vn]);
812 vp[vn] = tmp_msg[vn];
813 color[vn++] = TERM_VIOLET;
816 if (flags4 & (RF4_BR_NEXU))
818 set_damage(player_ptr, r_idx, (MS_BR_NEXUS), _("因果混乱%s", "nexus%s"), tmp_msg[vn]);
819 vp[vn] = tmp_msg[vn];
820 color[vn++] = TERM_VIOLET;
823 if (flags4 & (RF4_BR_TIME))
825 set_damage(player_ptr, r_idx, (MS_BR_TIME), _("時間逆転%s", "time%s"), tmp_msg[vn]);
826 vp[vn] = tmp_msg[vn];
827 color[vn++] = TERM_L_BLUE;
830 if (flags4 & (RF4_BR_INER))
832 set_damage(player_ptr, r_idx, (MS_BR_INERTIA), _("遅鈍%s", "inertia%s"), tmp_msg[vn]);
833 vp[vn] = tmp_msg[vn];
834 color[vn++] = TERM_SLATE;
837 if (flags4 & (RF4_BR_GRAV))
839 set_damage(player_ptr, r_idx, (MS_BR_GRAVITY), _("重力%s", "gravity%s"), tmp_msg[vn]);
840 vp[vn] = tmp_msg[vn];
841 color[vn++] = TERM_SLATE;
844 if (flags4 & (RF4_BR_SHAR))
846 set_damage(player_ptr, r_idx, (MS_BR_SHARDS), _("破片%s", "shards%s"), tmp_msg[vn]);
847 vp[vn] = tmp_msg[vn];
848 color[vn++] = TERM_L_UMBER;
851 if (flags4 & (RF4_BR_PLAS))
853 set_damage(player_ptr, r_idx, (MS_BR_PLASMA), _("プラズマ%s", "plasma%s"), tmp_msg[vn]);
854 vp[vn] = tmp_msg[vn];
855 color[vn++] = TERM_L_RED;
858 if (flags4 & (RF4_BR_WALL))
860 set_damage(player_ptr, r_idx, (MS_BR_FORCE), _("フォース%s", "force%s"), tmp_msg[vn]);
861 vp[vn] = tmp_msg[vn];
862 color[vn++] = TERM_UMBER;
865 if (flags4 & (RF4_BR_MANA))
867 set_damage(player_ptr, r_idx, (MS_BR_MANA), _("魔力%s", "mana%s"), tmp_msg[vn]);
868 vp[vn] = tmp_msg[vn];
869 color[vn++] = TERM_L_BLUE;
872 if (flags4 & (RF4_BR_NUKE))
874 set_damage(player_ptr, r_idx, (MS_BR_NUKE), _("放射性廃棄物%s", "toxic waste%s"), tmp_msg[vn]);
875 vp[vn] = tmp_msg[vn];
876 color[vn++] = TERM_L_GREEN;
879 if (flags4 & (RF4_BR_DISI))
881 set_damage(player_ptr, r_idx, (MS_BR_DISI), _("分解%s", "disintegration%s"), tmp_msg[vn]);
882 vp[vn] = tmp_msg[vn];
883 color[vn++] = TERM_SLATE;
890 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
891 for (int n = 0; n < vn; n++)
894 if (n != 0) hooked_roff("や");
896 if (n == 0) hooked_roff(" may breathe ");
897 else if (n < vn - 1) hooked_roff(", ");
898 else hooked_roff(" or ");
900 hook_c_roff(color[n], vp[n]);
904 hooked_roff("のブレスを吐くことがある");
909 if (a_ability_flags1 & (RF5_BA_ACID))
911 set_damage(player_ptr, r_idx, (MS_BALL_ACID), _("アシッド・ボール%s", "produce acid balls%s"), tmp_msg[vn]);
912 vp[vn] = tmp_msg[vn];
913 color[vn++] = TERM_GREEN;
916 if (a_ability_flags1 & (RF5_BA_ELEC))
918 set_damage(player_ptr, r_idx, (MS_BALL_ELEC), _("サンダー・ボール%s", "produce lightning balls%s"), tmp_msg[vn]);
919 vp[vn] = tmp_msg[vn];
920 color[vn++] = TERM_BLUE;
923 if (a_ability_flags1 & (RF5_BA_FIRE))
925 set_damage(player_ptr, r_idx, (MS_BALL_FIRE), _("ファイア・ボール%s", "produce fire balls%s"), tmp_msg[vn]);
926 vp[vn] = tmp_msg[vn];
927 color[vn++] = TERM_RED;
930 if (a_ability_flags1 & (RF5_BA_COLD))
932 set_damage(player_ptr, r_idx, (MS_BALL_COLD), _("アイス・ボール%s", "produce frost balls%s"), tmp_msg[vn]);
933 vp[vn] = tmp_msg[vn];
934 color[vn++] = TERM_L_WHITE;
937 if (a_ability_flags1 & (RF5_BA_POIS))
939 set_damage(player_ptr, r_idx, (MS_BALL_POIS), _("悪臭雲%s", "produce poison balls%s"), tmp_msg[vn]);
940 vp[vn] = tmp_msg[vn];
941 color[vn++] = TERM_L_GREEN;
944 if (a_ability_flags1 & (RF5_BA_NETH))
946 set_damage(player_ptr, r_idx, (MS_BALL_NETHER), _("地獄球%s", "produce nether balls%s"), tmp_msg[vn]);
947 vp[vn] = tmp_msg[vn];
948 color[vn++] = TERM_L_DARK;
951 if (a_ability_flags1 & (RF5_BA_WATE))
953 set_damage(player_ptr, r_idx, (MS_BALL_WATER), _("ウォーター・ボール%s", "produce water balls%s"), tmp_msg[vn]);
954 vp[vn] = tmp_msg[vn];
955 color[vn++] = TERM_BLUE;
958 if (flags4 & (RF4_BA_NUKE))
960 set_damage(player_ptr, r_idx, (MS_BALL_NUKE), _("放射能球%s", "produce balls of radiation%s"), tmp_msg[vn]);
961 vp[vn] = tmp_msg[vn];
962 color[vn++] = TERM_L_GREEN;
965 if (a_ability_flags1 & (RF5_BA_MANA))
967 set_damage(player_ptr, r_idx, (MS_BALL_MANA), _("魔力の嵐%s", "invoke mana storms%s"), tmp_msg[vn]);
968 vp[vn] = tmp_msg[vn];
969 color[vn++] = TERM_L_BLUE;
972 if (a_ability_flags1 & (RF5_BA_DARK))
974 set_damage(player_ptr, r_idx, (MS_BALL_DARK), _("暗黒の嵐%s", "invoke darkness storms%s"), tmp_msg[vn]);
975 vp[vn] = tmp_msg[vn];
976 color[vn++] = TERM_L_DARK;
979 if (a_ability_flags1 & (RF5_BA_LITE))
981 set_damage(player_ptr, r_idx, (MS_STARBURST), _("スターバースト%s", "invoke starburst%s"), tmp_msg[vn]);
982 vp[vn] = tmp_msg[vn];
983 color[vn++] = TERM_YELLOW;
986 if (flags4 & (RF4_BA_CHAO))
988 set_damage(player_ptr, r_idx, (MS_BALL_CHAOS), _("純ログルス%s", "invoke raw Logrus%s"), tmp_msg[vn]);
989 vp[vn] = tmp_msg[vn];
990 color[vn++] = TERM_VIOLET;
993 if (a_ability_flags2 & (RF6_HAND_DOOM))
995 vp[vn] = _("破滅の手(40%-60%)", "invoke the Hand of Doom(40%-60%)");
996 color[vn++] = TERM_VIOLET;
999 if (a_ability_flags2 & (RF6_PSY_SPEAR))
1001 set_damage(player_ptr, r_idx, (MS_PSY_SPEAR), _("光の剣%s", "psycho-spear%s"), tmp_msg[vn]);
1002 vp[vn] = tmp_msg[vn];
1003 color[vn++] = TERM_YELLOW;
1006 if (a_ability_flags1 & (RF5_DRAIN_MANA))
1008 set_damage(player_ptr, r_idx, (MS_DRAIN_MANA), _("魔力吸収%s", "drain mana%s"), tmp_msg[vn]);
1009 vp[vn] = tmp_msg[vn];
1010 color[vn++] = TERM_SLATE;
1013 if (a_ability_flags1 & (RF5_MIND_BLAST))
1015 set_damage(player_ptr, r_idx, (MS_MIND_BLAST), _("精神攻撃%s", "cause mind blasting%s"), tmp_msg[vn]);
1016 vp[vn] = tmp_msg[vn];
1017 color[vn++] = TERM_L_RED;
1020 if (a_ability_flags1 & (RF5_BRAIN_SMASH))
1022 set_damage(player_ptr, r_idx, (MS_BRAIN_SMASH), _("脳攻撃%s", "cause brain smashing%s"), tmp_msg[vn]);
1023 vp[vn] = tmp_msg[vn];
1024 color[vn++] = TERM_RED;
1027 if (a_ability_flags1 & (RF5_CAUSE_1))
1029 set_damage(player_ptr, r_idx, (MS_CAUSE_1),
1030 _("軽傷+呪い%s", "cause light wounds and cursing%s"), tmp_msg[vn]);
1031 vp[vn] = tmp_msg[vn];
1032 color[vn++] = TERM_L_WHITE;
1035 if (a_ability_flags1 & (RF5_CAUSE_2))
1037 set_damage(player_ptr, r_idx, (MS_CAUSE_2),
1038 _("重傷+呪い%s", "cause serious wounds and cursing%s"), tmp_msg[vn]);
1039 vp[vn] = tmp_msg[vn];
1040 color[vn++] = TERM_L_WHITE;
1043 if (a_ability_flags1 & (RF5_CAUSE_3))
1045 set_damage(player_ptr, r_idx, (MS_CAUSE_3),
1046 _("致命傷+呪い%s", "cause critical wounds and cursing%s"), tmp_msg[vn]);
1047 vp[vn] = tmp_msg[vn];
1048 color[vn++] = TERM_L_WHITE;
1051 if (a_ability_flags1 & (RF5_CAUSE_4))
1053 set_damage(player_ptr, r_idx, (MS_CAUSE_4),
1054 _("秘孔を突く%s", "cause mortal wounds%s"), tmp_msg[vn]);
1055 vp[vn] = tmp_msg[vn];
1056 color[vn++] = TERM_L_WHITE;
1059 if (a_ability_flags1 & (RF5_BO_ACID))
1061 set_damage(player_ptr, r_idx, (MS_BOLT_ACID), _("アシッド・ボルト%s", "produce acid bolts%s"), tmp_msg[vn]);
1062 vp[vn] = tmp_msg[vn];
1063 color[vn++] = TERM_GREEN;
1066 if (a_ability_flags1 & (RF5_BO_ELEC))
1068 set_damage(player_ptr, r_idx, (MS_BOLT_ELEC), _("サンダー・ボルト%s", "produce lightning bolts%s"), tmp_msg[vn]);
1069 vp[vn] = tmp_msg[vn];
1070 color[vn++] = TERM_BLUE;
1073 if (a_ability_flags1 & (RF5_BO_FIRE))
1075 set_damage(player_ptr, r_idx, (MS_BOLT_FIRE), _("ファイア・ボルト%s", "produce fire bolts%s"), tmp_msg[vn]);
1076 vp[vn] = tmp_msg[vn];
1077 color[vn++] = TERM_RED;
1080 if (a_ability_flags1 & (RF5_BO_COLD))
1082 set_damage(player_ptr, r_idx, (MS_BOLT_COLD), _("アイス・ボルト%s", "produce frost bolts%s"), tmp_msg[vn]);
1083 vp[vn] = tmp_msg[vn];
1084 color[vn++] = TERM_L_WHITE;
1087 if (a_ability_flags1 & (RF5_BO_NETH))
1089 set_damage(player_ptr, r_idx, (MS_BOLT_NETHER), _("地獄の矢%s", "produce nether bolts%s"), tmp_msg[vn]);
1090 vp[vn] = tmp_msg[vn];
1091 color[vn++] = TERM_L_DARK;
1094 if (a_ability_flags1 & (RF5_BO_WATE))
1096 set_damage(player_ptr, r_idx, (MS_BOLT_WATER), _("ウォーター・ボルト%s", "produce water bolts%s"), tmp_msg[vn]);
1097 vp[vn] = tmp_msg[vn];
1098 color[vn++] = TERM_BLUE;
1101 if (a_ability_flags1 & (RF5_BO_MANA))
1103 set_damage(player_ptr, r_idx, (MS_BOLT_MANA), _("魔力の矢%s", "produce mana bolts%s"), tmp_msg[vn]);
1104 vp[vn] = tmp_msg[vn];
1105 color[vn++] = TERM_L_BLUE;
1108 if (a_ability_flags1 & (RF5_BO_PLAS))
1110 set_damage(player_ptr, r_idx, (MS_BOLT_PLASMA), _("プラズマ・ボルト%s", "produce plasma bolts%s"), tmp_msg[vn]);
1111 vp[vn] = tmp_msg[vn];
1112 color[vn++] = TERM_L_RED;
1115 if (a_ability_flags1 & (RF5_BO_ICEE))
1117 set_damage(player_ptr, r_idx, (MS_BOLT_ICE), _("極寒の矢%s", "produce ice bolts%s"), tmp_msg[vn]);
1118 vp[vn] = tmp_msg[vn];
1119 color[vn++] = TERM_WHITE;
1122 if (a_ability_flags1 & (RF5_MISSILE))
1124 set_damage(player_ptr, r_idx, (MS_MAGIC_MISSILE), _("マジックミサイル%s", "produce magic missiles%s"), tmp_msg[vn]);
1125 vp[vn] = tmp_msg[vn];
1126 color[vn++] = TERM_SLATE;
1129 if (a_ability_flags1 & (RF5_SCARE)) { vp[vn] = _("恐怖", "terrify"); color[vn++] = TERM_SLATE; }
1130 if (a_ability_flags1 & (RF5_BLIND)) { vp[vn] = _("目くらまし", "blind"); color[vn++] = TERM_L_DARK; }
1131 if (a_ability_flags1 & (RF5_CONF)) { vp[vn] = _("混乱", "confuse"); color[vn++] = TERM_L_UMBER; }
1132 if (a_ability_flags1 & (RF5_SLOW)) { vp[vn] = _("減速", "slow"); color[vn++] = TERM_UMBER; }
1133 if (a_ability_flags1 & (RF5_HOLD)) { vp[vn] = _("麻痺", "paralyze"); color[vn++] = TERM_RED; }
1134 if (a_ability_flags2 & (RF6_HASTE)) { vp[vn] = _("加速", "haste-self"); color[vn++] = TERM_L_GREEN; }
1135 if (a_ability_flags2 & (RF6_HEAL)) { vp[vn] = _("治癒", "heal-self"); color[vn++] = TERM_WHITE; }
1136 if (a_ability_flags2 & (RF6_INVULNER)) { vp[vn] = _("無敵化", "make invulnerable"); color[vn++] = TERM_WHITE; }
1137 if (flags4 & RF4_DISPEL) { vp[vn] = _("魔力消去", "dispel-magic"); color[vn++] = TERM_L_WHITE; }
1138 if (a_ability_flags2 & (RF6_BLINK)) { vp[vn] = _("ショートテレポート", "blink-self"); color[vn++] = TERM_UMBER; }
1139 if (a_ability_flags2 & (RF6_TPORT)) { vp[vn] = _("テレポート", "teleport-self"); color[vn++] = TERM_ORANGE; }
1140 if (a_ability_flags2 & (RF6_WORLD)) { vp[vn] = _("時を止める", "stop the time"); color[vn++] = TERM_L_BLUE; }
1141 if (a_ability_flags2 & (RF6_TELE_TO)) { vp[vn] = _("テレポートバック", "teleport to"); color[vn++] = TERM_L_UMBER; }
1142 if (a_ability_flags2 & (RF6_TELE_AWAY)) { vp[vn] = _("テレポートアウェイ", "teleport away"); color[vn++] = TERM_UMBER; }
1143 if (a_ability_flags2 & (RF6_TELE_LEVEL)) { vp[vn] = _("テレポート・レベル", "teleport level"); color[vn++] = TERM_ORANGE; }
1145 if (a_ability_flags2 & (RF6_DARKNESS))
1147 if ((player_ptr->pclass != CLASS_NINJA) || (r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) || (r_ptr->flags7 & RF7_DARK_MASK))
1149 vp[vn] = _("暗闇", "create darkness");
1150 color[vn++] = TERM_L_DARK;
1154 vp[vn] = _("閃光", "create light");
1155 color[vn++] = TERM_YELLOW;
1159 if (a_ability_flags2 & (RF6_TRAPS)) { vp[vn] = _("トラップ", "create traps"); color[vn++] = TERM_BLUE; }
1160 if (a_ability_flags2 & (RF6_FORGET)) { vp[vn] = _("記憶消去", "cause amnesia"); color[vn++] = TERM_BLUE; }
1161 if (a_ability_flags2 & (RF6_RAISE_DEAD)) { vp[vn] = _("死者復活", "raise dead"); color[vn++] = TERM_RED; }
1162 if (a_ability_flags2 & (RF6_S_MONSTER)) { vp[vn] = _("モンスター一体召喚", "summon a monster"); color[vn++] = TERM_SLATE; }
1163 if (a_ability_flags2 & (RF6_S_MONSTERS)) { vp[vn] = _("モンスター複数召喚", "summon monsters"); color[vn++] = TERM_L_WHITE; }
1164 if (a_ability_flags2 & (RF6_S_KIN)) { vp[vn] = _("救援召喚", "summon aid"); color[vn++] = TERM_ORANGE; }
1165 if (a_ability_flags2 & (RF6_S_ANT)) { vp[vn] = _("アリ召喚", "summon ants"); color[vn++] = TERM_RED; }
1166 if (a_ability_flags2 & (RF6_S_SPIDER)) { vp[vn] = _("クモ召喚", "summon spiders"); color[vn++] = TERM_L_DARK; }
1167 if (a_ability_flags2 & (RF6_S_HOUND)) { vp[vn] = _("ハウンド召喚", "summon hounds"); color[vn++] = TERM_L_UMBER; }
1168 if (a_ability_flags2 & (RF6_S_HYDRA)) { vp[vn] = _("ヒドラ召喚", "summon hydras"); color[vn++] = TERM_L_GREEN; }
1169 if (a_ability_flags2 & (RF6_S_ANGEL)) { vp[vn] = _("天使一体召喚", "summon an angel"); color[vn++] = TERM_YELLOW; }
1170 if (a_ability_flags2 & (RF6_S_DEMON)) { vp[vn] = _("デーモン一体召喚", "summon a demon"); color[vn++] = TERM_L_RED; }
1171 if (a_ability_flags2 & (RF6_S_UNDEAD)) { vp[vn] = _("アンデッド一体召喚", "summon an undead"); color[vn++] = TERM_L_DARK; }
1172 if (a_ability_flags2 & (RF6_S_DRAGON)) { vp[vn] = _("ドラゴン一体召喚", "summon a dragon"); color[vn++] = TERM_ORANGE; }
1173 if (a_ability_flags2 & (RF6_S_HI_UNDEAD)) { vp[vn] = _("強力なアンデッド召喚", "summon Greater Undead"); color[vn++] = TERM_L_DARK; }
1174 if (a_ability_flags2 & (RF6_S_HI_DRAGON)) { vp[vn] = _("古代ドラゴン召喚", "summon Ancient Dragons"); color[vn++] = TERM_ORANGE; }
1175 if (a_ability_flags2 & (RF6_S_CYBER)) { vp[vn] = _("サイバーデーモン召喚", "summon Cyberdemons"); color[vn++] = TERM_UMBER; }
1176 if (a_ability_flags2 & (RF6_S_AMBERITES)) { vp[vn] = _("アンバーの王族召喚", "summon Lords of Amber"); color[vn++] = TERM_VIOLET; }
1177 if (a_ability_flags2 & (RF6_S_UNIQUE)) { vp[vn] = _("ユニーク・モンスター召喚", "summon Unique Monsters"); color[vn++] = TERM_VIOLET; }
1185 hooked_roff(_("、なおかつ", ", and is also"));
1189 hooked_roff(format(_("%^sは", "%^s is"), wd_he[msex]));
1193 if (flags2 & (RF2_SMART)) hook_c_roff(TERM_YELLOW, "的確に");
1194 hooked_roff("魔法を使うことができ、");
1196 hooked_roff(" magical, casting spells");
1197 if (flags2 & RF2_SMART) hook_c_roff(TERM_YELLOW, " intelligently");
1200 for (int n = 0; n < vn; n++)
1203 if (n != 0) hooked_roff("、");
1205 if (n == 0) hooked_roff(" which ");
1206 else if (n < vn - 1) hooked_roff(", ");
1207 else hooked_roff(" or ");
1209 hook_c_roff(color[n], vp[n]);
1213 hooked_roff("の呪文を唱えることがある");
1217 if (breath || magic)
1219 int m = r_ptr->r_cast_spell;
1220 int n = r_ptr->freq_spell;
1221 if (m > 100 || know_everything)
1224 _("(確率:1/%d)", "; 1 time in %d"), 100 / n));
1228 n = ((n + 9) / 10) * 10;
1230 _("(確率:約1/%d)", "; about 1 time in %d"), 100 / n));
1233 hooked_roff(_("。", ". "));
1236 if (know_everything || know_armour(r_idx))
1239 _("%^sは AC%d の防御力と", "%^s has an armor rating of %d"),
1240 wd_he[msex], r_ptr->ac));
1242 if ((flags1 & RF1_FORCE_MAXHP) || (r_ptr->hside == 1))
1244 u32b hp = r_ptr->hdice * (nightmare ? 2 : 1) * r_ptr->hside;
1246 _(" %d の体力がある。", " and a life rating of %d. "),
1247 (s16b)MIN(30000, hp)));
1252 _(" %dd%d の体力がある。", " and a life rating of %dd%d. "),
1253 r_ptr->hdice * (nightmare ? 2 : 1), r_ptr->hside));
1258 if (flags7 & (RF7_HAS_LITE_1 | RF7_HAS_LITE_2)) { vp[vn] = _("ダンジョンを照らす", "illuminate the dungeon"); color[vn++] = TERM_WHITE; }
1259 if (flags7 & (RF7_HAS_DARK_1 | RF7_HAS_DARK_2)) { vp[vn] = _("ダンジョンを暗くする", "darken the dungeon"); color[vn++] = TERM_L_DARK; }
1260 if (flags2 & RF2_OPEN_DOOR) { vp[vn] = _("ドアを開ける", "open doors"); color[vn++] = TERM_WHITE; }
1261 if (flags2 & RF2_BASH_DOOR) { vp[vn] = _("ドアを打ち破る", "bash down doors"); color[vn++] = TERM_WHITE; }
1262 if (flags7 & RF7_CAN_FLY) { vp[vn] = _("空を飛ぶ", "fly"); color[vn++] = TERM_WHITE; }
1263 if (flags7 & RF7_CAN_SWIM) { vp[vn] = _("水を渡る", "swim"); color[vn++] = TERM_WHITE; }
1264 if (flags2 & RF2_PASS_WALL) { vp[vn] = _("壁をすり抜ける", "pass through walls"); color[vn++] = TERM_WHITE; }
1265 if (flags2 & RF2_KILL_WALL) { vp[vn] = _("壁を掘り進む", "bore through walls"); color[vn++] = TERM_WHITE; }
1266 if (flags2 & RF2_MOVE_BODY) { vp[vn] = _("弱いモンスターを押しのける", "push past weaker monsters"); color[vn++] = TERM_WHITE; }
1267 if (flags2 & RF2_KILL_BODY) { vp[vn] = _("弱いモンスターを倒す", "destroy weaker monsters"); color[vn++] = TERM_WHITE; }
1268 if (flags2 & RF2_TAKE_ITEM) { vp[vn] = _("アイテムを拾う", "pick up objects"); color[vn++] = TERM_WHITE; }
1269 if (flags2 & RF2_KILL_ITEM) { vp[vn] = _("アイテムを壊す", "destroy objects"); color[vn++] = TERM_WHITE; }
1273 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1274 for (int n = 0; n < vn; n++)
1279 jverb(vp[n], jverb_buf, JVERB_AND);
1280 hook_c_roff(color[n], jverb_buf);
1285 hook_c_roff(color[n], vp[n]);
1288 if (n == 0) hooked_roff(" can ");
1289 else if (n < vn - 1) hooked_roff(", ");
1290 else hooked_roff(" and ");
1292 hook_c_roff(color[n], vp[n]);
1297 hooked_roff(_("ことができる。", ". "));
1300 if (flags7 & RF7_AQUATIC)
1302 hooked_roff(format(_("%^sは水中に棲んでいる。", "%^s lives in water. "), wd_he[msex]));
1305 if (flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2))
1307 hooked_roff(format(_("%^sは光っている。", "%^s is shining. "), wd_he[msex]));
1310 if (flags7 & (RF7_SELF_DARK_1 | RF7_SELF_DARK_2))
1312 hook_c_roff(TERM_L_DARK, format(_("%^sは暗黒に包まれている。", "%^s is surrounded by darkness. "), wd_he[msex]));
1315 if (flags2 & RF2_INVISIBLE)
1317 hooked_roff(format(_("%^sは透明で目に見えない。", "%^s is invisible. "), wd_he[msex]));
1320 if (flags2 & RF2_COLD_BLOOD)
1322 hooked_roff(format(_("%^sは冷血動物である。", "%^s is cold blooded. "), wd_he[msex]));
1325 if (flags2 & RF2_EMPTY_MIND)
1327 hooked_roff(format(_("%^sはテレパシーでは感知できない。", "%^s is not detected by telepathy. "), wd_he[msex]));
1329 else if (flags2 & RF2_WEIRD_MIND)
1331 hooked_roff(format(_("%^sはまれにテレパシーで感知できる。", "%^s is rarely detected by telepathy. "), wd_he[msex]));
1334 if (flags2 & RF2_MULTIPLY)
1336 hook_c_roff(TERM_L_UMBER, format(_("%^sは爆発的に増殖する。", "%^s breeds explosively. "), wd_he[msex]));
1339 if (flags2 & RF2_REGENERATE)
1341 hook_c_roff(TERM_L_WHITE, format(_("%^sは素早く体力を回復する。", "%^s regenerates quickly. "), wd_he[msex]));
1344 if (flags7 & RF7_RIDING)
1346 hook_c_roff(TERM_SLATE, format(_("%^sに乗ることができる。", "%^s is suitable for riding. "), wd_he[msex]));
1350 if (flags3 & RF3_HURT_ROCK) { vp[vn] = _("岩を除去するもの", "rock remover"); color[vn++] = TERM_UMBER; }
1351 if (flags3 & RF3_HURT_LITE) { vp[vn] = _("明るい光", "bright light"); color[vn++] = TERM_YELLOW; }
1352 if (flags3 & RF3_HURT_FIRE) { vp[vn] = _("炎", "fire"); color[vn++] = TERM_RED; }
1353 if (flags3 & RF3_HURT_COLD) { vp[vn] = _("冷気", "cold"); color[vn++] = TERM_L_WHITE; }
1357 hooked_roff(format(_("%^sには", "%^s"), wd_he[msex]));
1359 for (int n = 0; n < vn; n++)
1362 if (n != 0) hooked_roff("や");
1364 if (n == 0) hooked_roff(" is hurt by ");
1365 else if (n < vn - 1) hooked_roff(", ");
1366 else hooked_roff(" and ");
1368 hook_c_roff(color[n], vp[n]);
1371 hooked_roff(_("でダメージを与えられる。", ". "));
1375 if (flagsr & RFR_IM_ACID) { vp[vn] = _("酸", "acid"); color[vn++] = TERM_GREEN; }
1376 if (flagsr & RFR_IM_ELEC) { vp[vn] = _("稲妻", "lightning"); color[vn++] = TERM_BLUE; }
1377 if (flagsr & RFR_IM_FIRE) { vp[vn] = _("炎", "fire"); color[vn++] = TERM_RED; }
1378 if (flagsr & RFR_IM_COLD) { vp[vn] = _("冷気", "cold"); color[vn++] = TERM_L_WHITE; }
1379 if (flagsr & RFR_IM_POIS) { vp[vn] = _("毒", "poison"); color[vn++] = TERM_L_GREEN; }
1381 if (flagsr & RFR_RES_LITE) { vp[vn] = _("閃光", "light"); color[vn++] = TERM_YELLOW; }
1382 if (flagsr & RFR_RES_DARK) { vp[vn] = _("暗黒", "dark"); color[vn++] = TERM_L_DARK; }
1383 if (flagsr & RFR_RES_NETH) { vp[vn] = _("地獄", "nether"); color[vn++] = TERM_L_DARK; }
1384 if (flagsr & RFR_RES_WATE) { vp[vn] = _("水", "water"); color[vn++] = TERM_BLUE; }
1385 if (flagsr & RFR_RES_PLAS) { vp[vn] = _("プラズマ", "plasma"); color[vn++] = TERM_L_RED; }
1386 if (flagsr & RFR_RES_SHAR) { vp[vn] = _("破片", "shards"); color[vn++] = TERM_L_UMBER; }
1387 if (flagsr & RFR_RES_SOUN) { vp[vn] = _("轟音", "sound"); color[vn++] = TERM_ORANGE; }
1388 if (flagsr & RFR_RES_CHAO) { vp[vn] = _("カオス", "chaos"); color[vn++] = TERM_VIOLET; }
1389 if (flagsr & RFR_RES_NEXU) { vp[vn] = _("因果混乱", "nexus"); color[vn++] = TERM_VIOLET; }
1390 if (flagsr & RFR_RES_DISE) { vp[vn] = _("劣化", "disenchantment"); color[vn++] = TERM_VIOLET; }
1391 if (flagsr & RFR_RES_WALL) { vp[vn] = _("フォース", "force"); color[vn++] = TERM_UMBER; }
1392 if (flagsr & RFR_RES_INER) { vp[vn] = _("遅鈍", "inertia"); color[vn++] = TERM_SLATE; }
1393 if (flagsr & RFR_RES_TIME) { vp[vn] = _("時間逆転", "time"); color[vn++] = TERM_L_BLUE; }
1394 if (flagsr & RFR_RES_GRAV) { vp[vn] = _("重力", "gravity"); color[vn++] = TERM_SLATE; }
1395 if (flagsr & RFR_RES_ALL) { vp[vn] = _("あらゆる攻撃", "all"); color[vn++] = TERM_YELLOW; }
1396 if ((flagsr & RFR_RES_TELE) && !(r_ptr->flags1 & RF1_UNIQUE)) { vp[vn] = _("テレポート", "teleportation"); color[vn++] = TERM_ORANGE; }
1400 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1401 for (int n = 0; n < vn; n++)
1404 if (n != 0) hooked_roff("と");
1406 if (n == 0) hooked_roff(" resists ");
1407 else if (n < vn - 1) hooked_roff(", ");
1408 else hooked_roff(" and ");
1410 hook_c_roff(color[n], vp[n]);
1413 hooked_roff(_("の耐性を持っている。", ". "));
1416 if ((r_ptr->r_xtra1 & MR1_SINKA) || know_everything)
1418 if (r_ptr->next_r_idx)
1420 hooked_roff(format(_("%^sは経験を積むと、", "%^s will evolve into "), wd_he[msex]));
1421 hook_c_roff(TERM_YELLOW, format("%s", r_name + r_info[r_ptr->next_r_idx].name));
1425 format(" when %s gets enough experience. ", wd_he[msex])));
1427 else if (!(r_ptr->flags1 & RF1_UNIQUE))
1429 hooked_roff(format(_("%sは進化しない。", "%s won't evolve. "), wd_he[msex]));
1434 if (flags3 & RF3_NO_STUN) { vp[vn] = _("朦朧としない", "stunned"); color[vn++] = TERM_ORANGE; }
1435 if (flags3 & RF3_NO_FEAR) { vp[vn] = _("恐怖を感じない", "frightened"); color[vn++] = TERM_SLATE; }
1436 if (flags3 & RF3_NO_CONF) { vp[vn] = _("混乱しない", "confused"); color[vn++] = TERM_L_UMBER; }
1437 if (flags3 & RF3_NO_SLEEP) { vp[vn] = _("眠らされない", "slept"); color[vn++] = TERM_BLUE; }
1438 if ((flagsr & RFR_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) { vp[vn] = _("テレポートされない", "teleported"); color[vn++] = TERM_ORANGE; }
1442 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1443 for (int n = 0; n < vn; n++)
1446 if (n != 0) hooked_roff("し、");
1448 if (n == 0) hooked_roff(" cannot be ");
1449 else if (n < vn - 1) hooked_roff(", ");
1450 else hooked_roff(" or ");
1452 hook_c_roff(color[n], vp[n]);
1455 hooked_roff(_("。", ". "));
1458 if ((((int)r_ptr->r_wake * (int)r_ptr->r_wake) > r_ptr->sleep) ||
1459 (r_ptr->r_ignore == MAX_UCHAR) ||
1460 (r_ptr->sleep == 0 && r_ptr->r_tkills >= 10) || know_everything)
1463 if (r_ptr->sleep > 200)
1465 act = _("を無視しがちであるが", "prefers to ignore");
1467 else if (r_ptr->sleep > 95)
1469 act = _("に対してほとんど注意を払わないが", "pays very little attention to");
1471 else if (r_ptr->sleep > 75)
1473 act = _("に対してあまり注意を払わないが", "pays little attention to");
1475 else if (r_ptr->sleep > 45)
1477 act = _("を見過ごしがちであるが", "tends to overlook");
1479 else if (r_ptr->sleep > 25)
1481 act = _("をほんの少しは見ており", "takes quite a while to see");
1483 else if (r_ptr->sleep > 10)
1485 act = _("をしばらくは見ており", "takes a while to see");
1487 else if (r_ptr->sleep > 5)
1489 act = _("を幾分注意深く見ており", "is fairly observant of");
1491 else if (r_ptr->sleep > 3)
1493 act = _("を注意深く見ており", "is observant of");
1495 else if (r_ptr->sleep > 1)
1497 act = _("をかなり注意深く見ており", "is very observant of");
1499 else if (r_ptr->sleep > 0)
1501 act = _("を警戒しており", "is vigilant for");
1505 act = _("をかなり警戒しており", "is ever vigilant for");
1509 _(format("%^sは侵入者%s、 %d フィート先から侵入者に気付くことがある。", wd_he[msex], act, 10 * r_ptr->aaf),
1510 format("%^s %s intruders, which %s may notice from %d feet. ", wd_he[msex], act, wd_he[msex], 10 * r_ptr->aaf)));
1513 if (drop_gold || drop_item)
1515 hooked_roff(format(_("%^sは", "%^s may carry"), wd_he[msex]));
1521 int n = MAX(drop_gold, drop_item);
1524 hooked_roff(_("一つの", " a"));
1532 hooked_roff(_("一つか二つの", " one or two"));
1536 hooked_roff(format(_(" %d 個までの", " up to %d"), n));
1540 if (flags1 & RF1_DROP_GREAT)
1542 p = _("特別な", " exceptional");
1544 else if (flags1 & RF1_DROP_GOOD)
1546 p = _("上質な", " good");
1561 if (sin) hooked_roff("n");
1564 if (p) hooked_roff(p);
1565 hooked_roff(_("アイテム", " object"));
1568 if (n != 1) hooked_roff("s");
1577 if (!p) sin = FALSE;
1578 if (sin) hooked_roff("n");
1581 if (p) hooked_roff(p);
1582 hooked_roff(_("財宝", " treasure"));
1585 if (n != 1) hooked_roff("s");
1589 hooked_roff(_("を持っていることがある。", ". "));
1592 const int max_attack_numbers = 4;
1594 for (int m = 0; m < max_attack_numbers; m++)
1596 if (!r_ptr->blow[m].method) continue;
1597 if (r_ptr->blow[m].method == RBM_SHOOT) continue;
1599 if (r_ptr->r_blows[m] || know_everything) count++;
1602 int attack_numbers = 0;
1603 for (int m = 0; m < max_attack_numbers; m++)
1605 if (!r_ptr->blow[m].method) continue;
1606 if (r_ptr->blow[m].method == RBM_SHOOT) continue;
1607 if (!r_ptr->r_blows[m] && !know_everything) continue;
1609 int method = r_ptr->blow[m].method;
1610 int effect = r_ptr->blow[m].effect;
1611 int d1 = r_ptr->blow[m].d_dice;
1612 int d2 = r_ptr->blow[m].d_side;
1617 case RBM_HIT: p = _("殴る", "hit"); break;
1618 case RBM_TOUCH: p = _("触る", "touch"); break;
1619 case RBM_PUNCH: p = _("パンチする", "punch"); break;
1620 case RBM_KICK: p = _("蹴る", "kick"); break;
1621 case RBM_CLAW: p = _("ひっかく", "claw"); break;
1622 case RBM_BITE: p = _("噛む", "bite"); break;
1623 case RBM_STING: p = _("刺す", "sting"); break;
1624 case RBM_SLASH: p = _("斬る", "slash"); break;
1625 case RBM_BUTT: p = _("角で突く", "butt"); break;
1626 case RBM_CRUSH: p = _("体当たりする", "crush"); break;
1627 case RBM_ENGULF: p = _("飲み込む", "engulf"); break;
1628 case RBM_CHARGE: p = _("請求書をよこす", "charge"); break;
1629 case RBM_CRAWL: p = _("体の上を這い回る", "crawl on you"); break;
1630 case RBM_DROOL: p = _("よだれをたらす", "drool on you"); break;
1631 case RBM_SPIT: p = _("つばを吐く", "spit"); break;
1632 case RBM_EXPLODE: p = _("爆発する", "explode"); break;
1633 case RBM_GAZE: p = _("にらむ", "gaze"); break;
1634 case RBM_WAIL: p = _("泣き叫ぶ", "wail"); break;
1635 case RBM_SPORE: p = _("胞子を飛ばす", "release spores"); break;
1636 case RBM_XXX4: break;
1637 case RBM_BEG: p = _("金をせがむ", "beg"); break;
1638 case RBM_INSULT: p = _("侮辱する", "insult"); break;
1639 case RBM_MOAN: p = _("うめく", "moan"); break;
1640 case RBM_SHOW: p = _("歌う", "sing"); break;
1646 case RBE_SUPERHURT: q = _("強力に攻撃する", "slaughter"); break;
1647 case RBE_HURT: q = _("攻撃する", "attack"); break;
1648 case RBE_POISON: q = _("毒をくらわす", "poison"); break;
1649 case RBE_UN_BONUS: q = _("劣化させる", "disenchant"); break;
1650 case RBE_UN_POWER: q = _("充填魔力を吸収する", "drain charges"); break;
1651 case RBE_EAT_GOLD: q = _("金を盗む", "steal gold"); break;
1652 case RBE_EAT_ITEM: q = _("アイテムを盗む", "steal items"); break;
1653 case RBE_EAT_FOOD: q = _("あなたの食料を食べる", "eat your food"); break;
1654 case RBE_EAT_LITE: q = _("明かりを吸収する", "absorb light"); break;
1655 case RBE_ACID: q = _("酸を飛ばす", "shoot acid"); break;
1656 case RBE_ELEC: q = _("感電させる", "electrocute"); break;
1657 case RBE_FIRE: q = _("燃やす", "burn"); break;
1658 case RBE_COLD: q = _("凍らせる", "freeze"); break;
1659 case RBE_BLIND: q = _("盲目にする", "blind"); break;
1660 case RBE_CONFUSE: q = _("混乱させる", "confuse"); break;
1661 case RBE_TERRIFY: q = _("恐怖させる", "terrify"); break;
1662 case RBE_PARALYZE: q = _("麻痺させる", "paralyze"); break;
1663 case RBE_LOSE_STR: q = _("腕力を減少させる", "reduce strength"); break;
1664 case RBE_LOSE_INT: q = _("知能を減少させる", "reduce intelligence"); break;
1665 case RBE_LOSE_WIS: q = _("賢さを減少させる", "reduce wisdom"); break;
1666 case RBE_LOSE_DEX: q = _("器用さを減少させる", "reduce dexterity"); break;
1667 case RBE_LOSE_CON: q = _("耐久力を減少させる", "reduce constitution"); break;
1668 case RBE_LOSE_CHR: q = _("魅力を減少させる", "reduce charisma"); break;
1669 case RBE_LOSE_ALL: q = _("全ステータスを減少させる", "reduce all stats"); break;
1670 case RBE_SHATTER: q = _("粉砕する", "shatter"); break;
1671 case RBE_EXP_10: q = _("経験値を減少(10d6+)させる", "lower experience (by 10d6+)"); break;
1672 case RBE_EXP_20: q = _("経験値を減少(20d6+)させる", "lower experience (by 20d6+)"); break;
1673 case RBE_EXP_40: q = _("経験値を減少(40d6+)させる", "lower experience (by 40d6+)"); break;
1674 case RBE_EXP_80: q = _("経験値を減少(80d6+)させる", "lower experience (by 80d6+)"); break;
1675 case RBE_DISEASE: q = _("病気にする", "disease"); break;
1676 case RBE_TIME: q = _("時間を逆戻りさせる", "time"); break;
1677 case RBE_DR_LIFE: q = _("生命力を吸収する", "drain life"); break;
1678 case RBE_DR_MANA: q = _("魔力を奪う", "drain mana force"); break;
1679 case RBE_INERTIA: q = _("減速させる", "slow"); break;
1680 case RBE_STUN: q = _("朦朧とさせる", "stun"); break;
1684 if (attack_numbers == 0)
1686 hooked_roff(format("%^sは", wd_he[msex]));
1689 if (d1 && d2 && (know_everything || know_damage(r_idx, m)))
1691 hooked_roff(format(" %dd%d ", d1, d2));
1692 hooked_roff("のダメージで");
1695 if (!p) p = "何か奇妙なことをする";
1697 /* XXしてYYし/XXしてYYする/XXし/XXする */
1698 if (q != NULL) jverb(p, jverb_buf, JVERB_TO);
1699 else if (attack_numbers != count - 1) jverb(p, jverb_buf, JVERB_AND);
1700 else strcpy(jverb_buf, p);
1702 hooked_roff(jverb_buf);
1705 if (attack_numbers != count - 1) jverb(q, jverb_buf, JVERB_AND);
1706 else strcpy(jverb_buf, q);
1707 hooked_roff(jverb_buf);
1710 if (attack_numbers != count - 1) hooked_roff("、");
1712 if (attack_numbers == 0)
1714 hooked_roff(format("%^s can ", wd_he[msex]));
1716 else if (attack_numbers < count - 1)
1722 hooked_roff(", and ");
1725 if (!p) p = "do something weird";
1729 hooked_roff(" to ");
1731 if (d1 && d2 && (know_everything || know_damage(r_idx, m)))
1733 hooked_roff(" with damage");
1734 hooked_roff(format(" %dd%d", d1, d2));
1742 if (attack_numbers > 0)
1744 hooked_roff(_("。", ". "));
1746 else if (flags1 & RF1_NEVER_BLOW)
1749 _("%^sは物理的な攻撃方法を持たない。",
1750 "%^s has no physical attacks. "), wd_he[msex]));
1755 _("%s攻撃については何も知らない。",
1756 "Nothing is known about %s attack. "), wd_his[msex]));
1759 bool is_kingpin = (flags1 & RF1_QUESTOR) != 0;
1760 is_kingpin &= r_ptr->r_sights > 0;
1761 is_kingpin &= r_ptr->max_num > 0;
1762 is_kingpin &= (r_idx == MON_OBERON) || (r_idx == MON_SERPENT);
1765 hook_c_roff(TERM_VIOLET,
1766 _("あなたはこのモンスターを殺したいという強い欲望を感じている...",
1767 "You feel an intense desire to kill this monster... "));
1769 else if (flags7 & RF7_GUARDIAN)
1771 hook_c_roff(TERM_L_RED,
1772 _("このモンスターはダンジョンの主である。",
1773 "This monster is the master of a dungeon."));
1781 * @brief モンスター情報のヘッダを記述する
1782 * Hack -- Display the "name" and "attr/chars" of a monster race
1783 * @param r_idx モンスターの種族ID
1786 void roff_top(MONRACE_IDX r_idx)
1788 monster_race *r_ptr = &r_info[r_idx];
1789 char c1 = r_ptr->d_char;
1790 char c2 = r_ptr->x_char;
1792 TERM_COLOR a1 = r_ptr->d_attr;
1793 TERM_COLOR a2 = r_ptr->x_attr;
1795 Term_erase(0, 0, 255);
1800 if (!(r_ptr->flags1 & RF1_UNIQUE))
1802 Term_addstr(-1, TERM_WHITE, "The ");
1806 Term_addstr(-1, TERM_WHITE, (r_name + r_ptr->name));
1808 Term_addstr(-1, TERM_WHITE, " ('");
1809 Term_add_bigch(a1, c1);
1810 Term_addstr(-1, TERM_WHITE, "')");
1812 Term_addstr(-1, TERM_WHITE, "/('");
1813 Term_add_bigch(a2, c2);
1814 Term_addstr(-1, TERM_WHITE, "'):");
1816 if (!current_world_ptr->wizard) return;
1819 sprintf(buf, "%d", r_idx);
1820 Term_addstr(-1, TERM_WHITE, " (");
1821 Term_addstr(-1, TERM_L_BLUE, buf);
1822 Term_addch(TERM_WHITE, ')');
1827 * @brief モンスター情報の表示と共に画面を一時消去するサブルーチン /
1828 * Hack -- describe the given monster race at the top of the screen
1829 * @param r_idx モンスターの種族ID
1830 * @param mode 表示オプション
1833 void screen_roff(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
1836 Term_erase(0, 1, 255);
1837 hook_c_roff = c_roff;
1838 roff_aux(player_ptr, r_idx, mode);
1844 * @brief モンスター情報の現在のウィンドウに表示する /
1845 * Hack -- describe the given monster race in the current "term" window
1846 * @param r_idx モンスターの種族ID
1849 void display_roff(player_type *player_ptr)
1851 for (int y = 0; y < Term->hgt; y++)
1853 Term_erase(0, y, 255);
1857 hook_c_roff = c_roff;
1858 MONRACE_IDX r_idx = player_ptr->monster_race_idx;
1859 roff_aux(player_ptr, r_idx, 0);
1865 * @brief モンスター詳細情報を自動スポイラー向けに出力する /
1866 * Hack -- output description of the given monster race
1867 * @param r_idx モンスターの種族ID
1868 * @param roff_func 出力処理を行う関数ポインタ
1871 void output_monster_spoiler(player_type *player_ptr, MONRACE_IDX r_idx, void(*roff_func)(TERM_COLOR attr, concptr str))
1873 hook_c_roff = roff_func;
1874 roff_aux(player_ptr, r_idx, 0x03);
1879 * @brief プレイヤーの現在の広域マップ座標から得た地勢を元にモンスターの生成条件関数を返す
1880 * @param player_ptr プレーヤーへの参照ポインタ
1881 * @return 地勢にあったモンスターの生成条件関数
1883 monsterrace_hook_type get_monster_hook(player_type *player_ptr)
1885 if ((player_ptr->current_floor_ptr->dun_level > 0) || (player_ptr->current_floor_ptr->inside_quest > 0))
1886 return (monsterrace_hook_type)mon_hook_dungeon;
1888 switch (wilderness[player_ptr->wilderness_y][player_ptr->wilderness_x].terrain)
1891 return (monsterrace_hook_type)mon_hook_town;
1892 case TERRAIN_DEEP_WATER:
1893 return (monsterrace_hook_type)mon_hook_ocean;
1894 case TERRAIN_SHALLOW_WATER:
1896 return (monsterrace_hook_type)mon_hook_shore;
1898 case TERRAIN_DESERT:
1899 return (monsterrace_hook_type)mon_hook_waste;
1901 return (monsterrace_hook_type)mon_hook_grass;
1903 return (monsterrace_hook_type)mon_hook_wood;
1904 case TERRAIN_SHALLOW_LAVA:
1905 case TERRAIN_DEEP_LAVA:
1906 return (monsterrace_hook_type)mon_hook_volcano;
1907 case TERRAIN_MOUNTAIN:
1908 return (monsterrace_hook_type)mon_hook_mountain;
1910 return (monsterrace_hook_type)mon_hook_dungeon;
1916 * @brief 指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す
1917 * @return 地勢にあったモンスターの生成条件関数
1919 monsterrace_hook_type get_monster_hook2(player_type *player_ptr, POSITION y, POSITION x)
1921 feature_type *f_ptr = &f_info[player_ptr->current_floor_ptr->grid_array[y][x].feat];
1922 if (have_flag(f_ptr->flags, FF_WATER))
1924 if (have_flag(f_ptr->flags, FF_DEEP))
1926 return (monsterrace_hook_type)mon_hook_deep_water;
1930 return (monsterrace_hook_type)mon_hook_shallow_water;
1934 if (have_flag(f_ptr->flags, FF_LAVA))
1936 return (monsterrace_hook_type)mon_hook_lava;
1939 return (monsterrace_hook_type)mon_hook_floor;
1944 * @brief モンスターを友好的にする
1945 * @param m_ptr モンスター情報構造体の参照ポインタ
1948 void set_friendly(monster_type *m_ptr)
1950 m_ptr->smart |= SM_FRIENDLY;
1955 * @brief モンスターをペットにする
1956 * @param player_type プレーヤーへの参照ポインタ
1957 * @param m_ptr モンスター情報構造体の参照ポインタ
1960 void set_pet(player_type *player_ptr, monster_type *m_ptr)
1962 check_quest_completion(player_ptr, m_ptr);
1963 m_ptr->smart |= SM_PET;
1964 if (!(r_info[m_ptr->r_idx].flags3 & (RF3_EVIL | RF3_GOOD)))
1965 m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
1971 * Makes the monster hostile towards the player
1972 * @param m_ptr モンスター情報構造体の参照ポインタ
1975 void set_hostile(player_type *player_ptr, monster_type *m_ptr)
1977 if (player_ptr->phase_out) return;
1978 m_ptr->smart &= ~SM_PET;
1979 m_ptr->smart &= ~SM_FRIENDLY;
1986 * @param m_ptr モンスター情報構造体の参照ポインタ
1989 void anger_monster(player_type *player_ptr, monster_type *m_ptr)
1991 if (player_ptr->phase_out) return;
1992 if (!is_friendly(m_ptr)) return;
1994 GAME_TEXT m_name[MAX_NLEN];
1996 monster_desc(player_ptr, m_name, m_ptr, 0);
1997 msg_format(_("%^sは怒った!", "%^s gets angry!"), m_name);
1998 set_hostile(player_ptr, m_ptr);
1999 chg_virtue(player_ptr, V_INDIVIDUALISM, 1);
2000 chg_virtue(player_ptr, V_HONOUR, -1);
2001 chg_virtue(player_ptr, V_JUSTICE, -1);
2002 chg_virtue(player_ptr, V_COMPASSION, -1);
2007 * @brief モンスターが地形を踏破できるかどうかを返す
2008 * Check if monster can cross terrain
2009 * @param player_ptr プレーヤーへの参照ポインタ
2011 * @param r_ptr モンスター種族構造体の参照ポインタ
2013 * @return 踏破可能ならばTRUEを返す
2015 bool monster_can_cross_terrain(player_type *player_ptr, FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode)
2017 feature_type *f_ptr = &f_info[feat];
2019 if (have_flag(f_ptr->flags, FF_PATTERN))
2021 if (!(mode & CEM_RIDING))
2023 if (!(r_ptr->flags7 & RF7_CAN_FLY)) return FALSE;
2027 if (!(mode & CEM_P_CAN_ENTER_PATTERN)) return FALSE;
2031 if (have_flag(f_ptr->flags, FF_CAN_FLY) && (r_ptr->flags7 & RF7_CAN_FLY)) return TRUE;
2032 if (have_flag(f_ptr->flags, FF_CAN_SWIM) && (r_ptr->flags7 & RF7_CAN_SWIM)) return TRUE;
2033 if (have_flag(f_ptr->flags, FF_CAN_PASS))
2035 if ((r_ptr->flags2 & RF2_PASS_WALL) && (!(mode & CEM_RIDING) || player_ptr->pass_wall)) return TRUE;
2038 if (!have_flag(f_ptr->flags, FF_MOVE)) return FALSE;
2040 if (have_flag(f_ptr->flags, FF_MOUNTAIN) && (r_ptr->flags8 & RF8_WILD_MOUNTAIN)) return TRUE;
2042 if (have_flag(f_ptr->flags, FF_WATER))
2044 if (!(r_ptr->flags7 & RF7_AQUATIC))
2046 if (have_flag(f_ptr->flags, FF_DEEP)) return FALSE;
2047 else if (r_ptr->flags2 & RF2_AURA_FIRE) return FALSE;
2050 else if (r_ptr->flags7 & RF7_AQUATIC) return FALSE;
2052 if (have_flag(f_ptr->flags, FF_LAVA))
2054 if (!(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)) return FALSE;
2057 if (have_flag(f_ptr->flags, FF_COLD_PUDDLE))
2059 if (!(r_ptr->flagsr & RFR_EFF_IM_COLD_MASK)) return FALSE;
2062 if (have_flag(f_ptr->flags, FF_ELEC_PUDDLE))
2064 if (!(r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK)) return FALSE;
2067 if (have_flag(f_ptr->flags, FF_ACID_PUDDLE))
2069 if (!(r_ptr->flagsr & RFR_EFF_IM_ACID_MASK)) return FALSE;
2072 if (have_flag(f_ptr->flags, FF_POISON_PUDDLE))
2074 if (!(r_ptr->flagsr & RFR_EFF_IM_POIS_MASK)) return FALSE;
2082 * @brief 指定された座標の地形をモンスターが踏破できるかどうかを返す
2083 * Strictly check if monster can enter the grid
2084 * @param player_ptr プレーヤーへの参照ポインタ
2087 * @param r_ptr モンスター種族構造体の参照ポインタ
2089 * @return 踏破可能ならばTRUEを返す
2091 bool monster_can_enter(player_type *player_ptr, POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode)
2093 grid_type *g_ptr = &player_ptr->current_floor_ptr->grid_array[y][x];
2094 if (player_bold(player_ptr, y, x)) return FALSE;
2095 if (g_ptr->m_idx) return FALSE;
2097 return monster_can_cross_terrain(player_ptr, g_ptr->feat, r_ptr, mode);
2102 * @brief モンスターの属性の基づいた敵対関係の有無を返す(サブルーチン)
2103 * Check if this monster has "hostile" alignment (aux)
2104 * @param sub_align1 モンスター1のサブフラグ
2105 * @param sub_align2 モンスター2のサブフラグ
2106 * @return 敵対関係にあるならばTRUEを返す
2108 static bool check_hostile_align(byte sub_align1, byte sub_align2)
2110 if (sub_align1 != sub_align2)
2112 if (((sub_align1 & SUB_ALIGN_EVIL) && (sub_align2 & SUB_ALIGN_GOOD)) ||
2113 ((sub_align1 & SUB_ALIGN_GOOD) && (sub_align2 & SUB_ALIGN_EVIL)))
2122 * @brief モンスターの属性の基づいた敵対関係の有無を返す
2123 * Check if two monsters are enemies
2124 * @param m_ptr モンスター1の構造体参照ポインタ
2125 * @param n_ptr モンスター2の構造体参照ポインタ
2126 * @return 敵対関係にあるならばTRUEを返す
2128 bool are_enemies(player_type *player_ptr, monster_type *m_ptr, monster_type *n_ptr)
2130 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2131 monster_race *s_ptr = &r_info[n_ptr->r_idx];
2133 if (player_ptr->phase_out)
2135 if (is_pet(m_ptr) || is_pet(n_ptr)) return FALSE;
2139 if ((r_ptr->flags8 & (RF8_WILD_TOWN | RF8_WILD_ALL))
2140 && (s_ptr->flags8 & (RF8_WILD_TOWN | RF8_WILD_ALL)))
2142 if (!is_pet(m_ptr) && !is_pet(n_ptr)) return FALSE;
2145 if (check_hostile_align(m_ptr->sub_align, n_ptr->sub_align))
2147 if (!(m_ptr->mflag2 & MFLAG2_CHAMELEON) || !(n_ptr->mflag2 & MFLAG2_CHAMELEON)) return TRUE;
2150 if (is_hostile(m_ptr) != is_hostile(n_ptr))
2160 * @brief モンスターがプレイヤーに対して敵意を抱くかどうかを返す
2161 * Check if this monster race has "hostile" alignment
2162 * @param player_ptr プレーヤーへの参照ポインタ
2163 * @param m_ptr モンスター情報構造体の参照ポインタ
2164 * @param pa_good プレイヤーの善傾向値
2165 * @param pa_evil プレイヤーの悪傾向値
2166 * @param r_ptr モンスター種族情報の構造体参照ポインタ
2167 * @return プレイヤーに敵意を持つならばTRUEを返す
2169 * If user is player, m_ptr == NULL.
2171 bool monster_has_hostile_align(player_type *player_ptr, monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr)
2173 byte sub_align1 = SUB_ALIGN_NEUTRAL;
2174 byte sub_align2 = SUB_ALIGN_NEUTRAL;
2176 if (m_ptr) /* For a monster */
2178 sub_align1 = m_ptr->sub_align;
2180 else /* For player */
2182 if (player_ptr->align >= pa_good) sub_align1 |= SUB_ALIGN_GOOD;
2183 if (player_ptr->align <= pa_evil) sub_align1 |= SUB_ALIGN_EVIL;
2186 /* Racial alignment flags */
2187 if (r_ptr->flags3 & RF3_EVIL) sub_align2 |= SUB_ALIGN_EVIL;
2188 if (r_ptr->flags3 & RF3_GOOD) sub_align2 |= SUB_ALIGN_GOOD;
2190 if (check_hostile_align(sub_align1, sub_align2)) return TRUE;
2197 * @brief モンスターを倒した際の財宝svalを返す
2198 * @param r_idx 倒したモンスターの種族ID
2201 * Hack -- Return the "automatic coin type" of a monster race
2202 * Used to allocate proper treasure when "Creeping coins" die
2203 * Note the use of actual "monster names"
2205 static OBJECT_SUBTYPE_VALUE get_coin_type(MONRACE_IDX r_idx)
2209 case MON_COPPER_COINS: return 2;
2210 case MON_SILVER_COINS: return 5;
2211 case MON_GOLD_COINS: return 10;
2212 case MON_MITHRIL_COINS:
2213 case MON_MITHRIL_GOLEM: return 16;
2214 case MON_ADAMANT_COINS: return 17;
2222 * @brief モンスターが死亡した時の処理 /
2223 * Handle the "death" of a monster.
2224 * @param m_idx 死亡したモンスターのID
2225 * @param drop_item TRUEならばモンスターのドロップ処理を行う
2226 * @return 撃破されたモンスターの述語
2229 * Disperse treasures centered at the monster location based on the
2230 * various flags contained in the monster flags fields.
2231 * Check for "Quest" completion when a quest monster is killed.
2232 * Note that only the player can induce "monster_death()" on Uniques.
2233 * Thus (for now) all Quest monsters should be Uniques.
2234 * Note that monsters can now carry objects, and when a monster dies,
2235 * it drops all of its objects, which may disappear in crowded rooms.
2238 void monster_death(player_type *player_ptr, MONSTER_IDX m_idx, bool drop_item)
2240 floor_type *floor_ptr = player_ptr->current_floor_ptr;
2241 monster_type *m_ptr = &floor_ptr->m_list[m_idx];
2242 monster_race *r_ptr = &r_info[m_ptr->r_idx];
2244 bool do_gold = (!(r_ptr->flags1 & RF1_ONLY_ITEM));
2245 bool do_item = (!(r_ptr->flags1 & RF1_ONLY_GOLD));
2246 bool cloned = (m_ptr->smart & SM_CLONED) ? TRUE : FALSE;
2247 int force_coin = get_coin_type(m_ptr->r_idx);
2249 bool drop_chosen_item = drop_item && !cloned && !floor_ptr->inside_arena && !player_ptr->phase_out && !is_pet(m_ptr);
2251 if (current_world_ptr->timewalk_m_idx && current_world_ptr->timewalk_m_idx == m_idx)
2253 current_world_ptr->timewalk_m_idx = 0;
2256 if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
2258 player_ptr->update |= (PU_MON_LITE);
2261 POSITION y = m_ptr->fy;
2262 POSITION x = m_ptr->fx;
2264 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
2266 GAME_TEXT m_name[MAX_NLEN];
2268 monster_desc(player_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
2269 exe_write_diary(player_ptr, DIARY_NAMED_PET, 3, m_name);
2272 for (int i = 0; i < 4; i++)
2274 if (r_ptr->blow[i].method != RBM_EXPLODE) continue;
2276 BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
2277 EFFECT_ID typ = mbe_info[r_ptr->blow[i].effect].explode_type;
2278 DICE_NUMBER d_dice = r_ptr->blow[i].d_dice;
2279 DICE_SID d_side = r_ptr->blow[i].d_side;
2280 HIT_POINT damage = damroll(d_dice, d_side);
2282 project(player_ptr, m_idx, 3, y, x, damage, typ, flg, -1);
2286 if (m_ptr->mflag2 & MFLAG2_CHAMELEON)
2288 choose_new_monster(player_ptr, m_idx, TRUE, MON_CHAMELEON);
2289 r_ptr = &r_info[m_ptr->r_idx];
2292 check_quest_completion(player_ptr, m_ptr);
2296 if (floor_ptr->inside_arena && !is_pet(m_ptr))
2298 player_ptr->exit_bldg = TRUE;
2299 if (player_ptr->arena_number > MAX_ARENA_MONS)
2301 msg_print(_("素晴らしい!君こそ真の勝利者だ。", "You are a Genuine Champion!"));
2305 msg_print(_("勝利!チャンピオンへの道を進んでいる。", "Victorious! You're on your way to becoming Champion."));
2308 if (arena_info[player_ptr->arena_number].tval)
2311 object_prep(q_ptr, lookup_kind(arena_info[player_ptr->arena_number].tval, arena_info[player_ptr->arena_number].sval));
2312 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART);
2313 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2316 if (player_ptr->arena_number > MAX_ARENA_MONS) player_ptr->arena_number++;
2317 player_ptr->arena_number++;
2320 GAME_TEXT m_name[MAX_NLEN];
2321 monster_desc(player_ptr, m_name, m_ptr, MD_WRONGDOER_NAME);
2322 exe_write_diary(player_ptr, DIARY_ARENA, player_ptr->arena_number, m_name);
2326 if (m_idx == player_ptr->riding && rakuba(player_ptr, -1, FALSE))
2328 msg_print(_("地面に落とされた。", "You have fallen from the pet you were riding."));
2331 bool is_drop_corpse = one_in_(r_ptr->flags1 & RF1_UNIQUE ? 1 : 4);
2332 is_drop_corpse &= (r_ptr->flags9 & (RF9_DROP_CORPSE | RF9_DROP_SKELETON)) != 0;
2333 is_drop_corpse &= !(floor_ptr->inside_arena || player_ptr->phase_out || cloned || ((m_ptr->r_idx == today_mon) && is_pet(m_ptr)));
2336 bool corpse = FALSE;
2338 if (!(r_ptr->flags9 & RF9_DROP_SKELETON))
2340 else if ((r_ptr->flags9 & RF9_DROP_CORPSE) && (r_ptr->flags1 & RF1_UNIQUE))
2342 else if (r_ptr->flags9 & RF9_DROP_CORPSE)
2344 if ((0 - ((m_ptr->maxhp) / 4)) > m_ptr->hp)
2346 if (one_in_(5)) corpse = TRUE;
2350 if (!one_in_(5)) corpse = TRUE;
2355 object_prep(q_ptr, lookup_kind(TV_CORPSE, (corpse ? SV_CORPSE : SV_SKELETON)));
2356 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART);
2357 q_ptr->pval = m_ptr->r_idx;
2358 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2361 monster_drop_carried_objects(player_ptr, m_ptr);
2364 if (r_ptr->flags1 & RF1_DROP_GOOD) mo_mode |= AM_GOOD;
2365 if (r_ptr->flags1 & RF1_DROP_GREAT) mo_mode |= AM_GREAT;
2367 switch (m_ptr->r_idx)
2369 case MON_PINK_HORROR:
2371 if (floor_ptr->inside_arena || player_ptr->phase_out) break;
2373 bool notice = FALSE;
2374 for (int i = 0; i < 2; i++)
2376 POSITION wy = y, wx = x;
2377 bool pet = is_pet(m_ptr);
2378 BIT_FLAGS mode = 0L;
2382 mode |= PM_FORCE_PET;
2385 if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode))
2387 if (player_can_see_bold(player_ptr, wy, wx)) notice = TRUE;
2393 msg_print(_("ピンク・ホラーは分裂した!", "The Pink horror divides!"));
2398 case MON_BLOODLETTER:
2400 if (!drop_chosen_item || (randint1(100) >= 15)) break;
2403 object_prep(q_ptr, lookup_kind(TV_SWORD, SV_BLADE_OF_CHAOS));
2404 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART | mo_mode);
2405 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2410 if (!drop_chosen_item || (floor_ptr->dun_level <= 9)) break;
2414 if ((floor_ptr->dun_level > 49) && one_in_(5))
2415 get_obj_num_hook = kind_is_good_book;
2417 get_obj_num_hook = kind_is_book;
2419 make_object(player_ptr, q_ptr, mo_mode);
2420 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2425 if (floor_ptr->inside_arena || player_ptr->phase_out) break;
2426 if (one_in_(7)) break;
2428 POSITION wy = y, wx = x;
2430 bool pet = is_pet(m_ptr);
2433 scatter(player_ptr, &wy, &wx, y, x, 20, 0);
2434 } while (!(in_bounds(floor_ptr, wy, wx) && is_cave_empty_bold2(player_ptr, wy, wx)) && --attempts);
2436 if (attempts <= 0) break;
2438 BIT_FLAGS mode = 0L;
2439 if (pet) mode |= PM_FORCE_PET;
2441 if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode))
2443 if (player_can_see_bold(player_ptr, wy, wx))
2444 msg_print(_("新たな戦士が現れた!", "A new warrior steps forth!"));
2451 BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
2452 (void)project(player_ptr, m_idx, 6, y, x, 100, GF_CHAOS, flg, -1);
2455 case MON_UNICORN_ORD:
2459 if (player_ptr->pseikaku != SEIKAKU_NAMAKE) break;
2460 if (!drop_chosen_item) break;
2462 ARTIFACT_IDX a_idx = 0;
2463 artifact_type *a_ptr = NULL;
2466 switch (randint0(3))
2469 a_idx = ART_NAMAKE_HAMMER;
2472 a_idx = ART_NAMAKE_BOW;
2475 a_idx = ART_NAMAKE_ARMOR;
2479 a_ptr = &a_info[a_idx];
2480 } while (a_ptr->cur_num);
2482 if (create_named_art(player_ptr, a_idx, y, x))
2485 if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
2487 else if (!preserve_mode) a_ptr->cur_num = 1;
2493 if (!drop_chosen_item) break;
2496 object_prep(q_ptr, lookup_kind(TV_HAFTED, SV_GROND));
2497 q_ptr->name1 = ART_GROND;
2498 apply_magic(player_ptr, q_ptr, -1, AM_GOOD | AM_GREAT);
2499 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2501 object_prep(q_ptr, lookup_kind(TV_CROWN, SV_CHAOS));
2502 q_ptr->name1 = ART_CHAOS;
2503 apply_magic(player_ptr, q_ptr, -1, AM_GOOD | AM_GREAT);
2504 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2507 case MON_B_DEATH_SWORD:
2509 if (!drop_chosen_item) break;
2512 object_prep(q_ptr, lookup_kind(TV_SWORD, randint1(2)));
2513 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2519 bool is_drop_can = drop_chosen_item;
2520 bool is_silver = m_ptr->r_idx == MON_A_SILVER;
2521 is_silver &= r_ptr->r_akills % 5 == 0;
2522 is_drop_can &= (m_ptr->r_idx == MON_A_GOLD) || is_silver;
2523 if (!is_drop_can) break;
2526 object_prep(q_ptr, lookup_kind(TV_CHEST, SV_CHEST_KANDUME));
2527 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART);
2528 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2534 BIT_FLAGS flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
2535 (void)project(player_ptr, m_idx, 3, y, x, damroll(20, 10), GF_FIRE, flg, -1);
2540 if (!drop_chosen_item) break;
2542 switch (r_ptr->d_char)
2546 if (floor_ptr->dun_level <= 0) break;
2550 get_obj_num_hook = kind_is_cloak;
2551 make_object(player_ptr, q_ptr, mo_mode);
2552 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2557 if (floor_ptr->dun_level <= 4) break;
2561 get_obj_num_hook = kind_is_polearm;
2562 make_object(player_ptr, q_ptr, mo_mode);
2563 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2568 if (floor_ptr->dun_level <= 19) break;
2572 get_obj_num_hook = kind_is_armor;
2573 make_object(player_ptr, q_ptr, mo_mode);
2574 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2579 if (floor_ptr->dun_level <= 4) break;
2582 get_obj_num_hook = kind_is_hafted;
2583 make_object(player_ptr, q_ptr, mo_mode);
2584 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2589 if (m_ptr->r_idx == MON_STORMBRINGER) break;
2593 get_obj_num_hook = kind_is_sword;
2594 make_object(player_ptr, q_ptr, mo_mode);
2595 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2602 if (drop_chosen_item)
2604 ARTIFACT_IDX a_idx = 0;
2605 PERCENTAGE chance = 0;
2606 for (int i = 0; i < 4; i++)
2608 if (!r_ptr->artifact_id[i]) break;
2609 a_idx = r_ptr->artifact_id[i];
2610 chance = r_ptr->artifact_percent[i];
2613 if ((a_idx > 0) && ((randint0(100) < chance) || current_world_ptr->wizard))
2615 artifact_type *a_ptr = &a_info[a_idx];
2616 if (!a_ptr->cur_num)
2618 if (create_named_art(player_ptr, a_idx, y, x))
2621 if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
2623 else if (!preserve_mode)
2630 if ((r_ptr->flags7 & RF7_GUARDIAN) && (d_info[player_ptr->dungeon_idx].final_guardian == m_ptr->r_idx))
2632 KIND_OBJECT_IDX k_idx = d_info[player_ptr->dungeon_idx].final_object != 0
2633 ? d_info[player_ptr->dungeon_idx].final_object
2634 : lookup_kind(TV_SCROLL, SV_SCROLL_ACQUIREMENT);
2636 if (d_info[player_ptr->dungeon_idx].final_artifact != 0)
2638 a_idx = d_info[player_ptr->dungeon_idx].final_artifact;
2639 artifact_type *a_ptr = &a_info[a_idx];
2640 if (!a_ptr->cur_num)
2642 if (create_named_art(player_ptr, a_idx, y, x))
2645 if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
2647 else if (!preserve_mode)
2652 if (!d_info[player_ptr->dungeon_idx].final_object) k_idx = 0;
2659 object_prep(q_ptr, k_idx);
2660 apply_magic(player_ptr, q_ptr, floor_ptr->object_level, AM_NO_FIXED_ART | AM_GOOD);
2661 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2664 msg_format(_("あなたは%sを制覇した!", "You have conquered %s!"), d_name + d_info[player_ptr->dungeon_idx].name);
2669 if ((r_ptr->flags1 & RF1_DROP_60) && (randint0(100) < 60)) number++;
2670 if ((r_ptr->flags1 & RF1_DROP_90) && (randint0(100) < 90)) number++;
2671 if (r_ptr->flags1 & RF1_DROP_1D2) number += damroll(1, 2);
2672 if (r_ptr->flags1 & RF1_DROP_2D2) number += damroll(2, 2);
2673 if (r_ptr->flags1 & RF1_DROP_3D2) number += damroll(3, 2);
2674 if (r_ptr->flags1 & RF1_DROP_4D2) number += damroll(4, 2);
2676 if (cloned && !(r_ptr->flags1 & RF1_UNIQUE))
2679 if (is_pet(m_ptr) || player_ptr->phase_out || floor_ptr->inside_arena)
2682 if (!drop_item && (r_ptr->d_char != '$'))
2685 if ((r_ptr->flags2 & (RF2_MULTIPLY)) && (r_ptr->r_akills > 1024))
2688 coin_type = force_coin;
2689 floor_ptr->object_level = (floor_ptr->dun_level + r_ptr->level) / 2;
2693 for (int i = 0; i < number; i++)
2698 if (do_gold && (!do_item || (randint0(100) < 50)))
2700 if (!make_gold(floor_ptr, q_ptr)) continue;
2705 if (!make_object(player_ptr, q_ptr, mo_mode)) continue;
2709 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2712 floor_ptr->object_level = floor_ptr->base_level;
2714 bool visible = (m_ptr->ml && !player_ptr->image) || (r_ptr->flags1 & RF1_UNIQUE);
2715 if (visible && (dump_item || dump_gold))
2717 lore_treasure(player_ptr, m_idx, dump_item, dump_gold);
2720 if (!(r_ptr->flags1 & RF1_QUESTOR)) return;
2721 if (player_ptr->phase_out) return;
2722 if ((m_ptr->r_idx != MON_SERPENT) || cloned) return;
2724 current_world_ptr->total_winner = TRUE;
2725 player_ptr->redraw |= (PR_TITLE);
2726 play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_FINAL_QUEST_CLEAR);
2727 exe_write_diary(player_ptr, DIARY_DESCRIPTION, 0, _("見事に変愚蛮怒の勝利者となった!", "become *WINNER* of Hengband finely!"));
2728 admire_from_patron(player_ptr);
2729 msg_print(_("*** おめでとう ***", "*** CONGRATULATIONS ***"));
2730 msg_print(_("あなたはゲームをコンプリートしました。", "You have won the game!"));
2731 msg_print(_("準備が整ったら引退(自殺コマンド)しても結構です。", "You may retire (commit suicide) when you are ready."));
2736 * @brief モンスターを撃破した際の述語メッセージを返す /
2737 * Return monster death string
2738 * @param r_ptr 撃破されたモンスターの種族情報を持つ構造体の参照ポインタ
2739 * @return 撃破されたモンスターの述語
2741 concptr extract_note_dies(MONRACE_IDX r_idx)
2743 monster_race *r_ptr = &r_info[r_idx];
2744 if (monster_living(r_idx)) return _("は死んだ。", " dies.");
2746 for (int i = 0; i < 4; i++)
2748 if (r_ptr->blow[i].method == RBM_EXPLODE)
2750 return _("は爆発して粉々になった。", " explodes into tiny shreds.");
2754 return _("を倒した。", " is destroyed.");
2759 * Monster health description
2761 concptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
2763 bool living = monster_living(m_ptr->ap_r_idx);
2764 int perc = m_ptr->maxhp > 0 ? 100L * m_ptr->hp / m_ptr->maxhp : 0;
2767 if (m_ptr->hp >= m_ptr->maxhp)
2769 desc = living ? _("無傷", "unhurt") : _("無ダメージ", "undamaged");
2771 else if (perc >= 60)
2773 desc = living ? _("軽傷", "somewhat wounded") : _("小ダメージ", "somewhat damaged");
2775 else if (perc >= 25)
2777 desc = living ? _("負傷", "wounded") : _("中ダメージ", "damaged");
2779 else if (perc >= 10)
2781 desc = living ? _("重傷", "badly wounded") : _("大ダメージ", "badly damaged");
2785 desc = living ? _("半死半生", "almost dead") : _("倒れかけ", "almost destroyed");
2793 else if (is_pet(m_ptr))
2795 attitude = _(", ペット", ", pet");
2797 else if (is_friendly(m_ptr))
2799 attitude = _(", 友好的", ", friendly");
2803 attitude = _("", "");
2806 concptr clone = (m_ptr->smart & SM_CLONED) ? ", clone" : "";
2807 monster_race *ap_r_ptr = &r_info[m_ptr->ap_r_idx];
2808 if (ap_r_ptr->r_tkills && !(m_ptr->mflag2 & MFLAG2_KAGE))
2810 return format(_("レベル%d, %s%s%s", "Level %d, %s%s%s"), ap_r_ptr->level, desc, attitude, clone);
2813 return format(_("レベル???, %s%s%s", "Level ???, %s%s%s"), desc, attitude, clone);
2817 bool is_original_ap_and_seen(player_type *player_ptr, monster_type *m_ptr)
2819 return m_ptr->ml && !player_ptr->image && (m_ptr->ap_r_idx == m_ptr->r_idx);