OSDN Git Service

Merge branch 'For2.2.2-Refactoring' into For2.2.2-Fix-Hourier
[hengband/hengband.git] / src / monster1.c
1 /*!
2  * @file monster1.c
3  * @brief モンスター情報の記述 / describe monsters (using monster memory)
4  * @date 2013/12/11
5  * @author
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.
11  */
12
13 #include "angband.h"
14 #include "util.h"
15 #include "term.h"
16
17 #include "cmd-dump.h"
18 #include "bldg.h"
19 #include "cmd-pet.h"
20 #include "floor.h"
21 #include "objectkind-hook.h"
22 #include "player-personality.h"
23 #include "monster.h"
24 #include "monster-spell.h"
25 #include "monsterrace-hook.h"
26 #include "spells-summon.h"
27 #include "patron.h"
28 #include "quest.h"
29 #include "artifact.h"
30 #include "avatar.h"
31 #include "wild.h"
32 #include "spells.h"
33 #include "dungeon.h"
34 #include "world.h"
35 #include "melee.h"
36 #include "japanese.h"
37 #include "view-mainwindow.h"
38 #include "player-class.h"
39 #include "english.h"
40
41  /*
42   * Pronoun arrays, by gender.
43   */
44 static concptr wd_he[3] =
45 #ifdef JP
46 { "それ", "彼", "彼女" };
47 #else
48 { "it", "he", "she" };
49 #endif
50
51 static concptr wd_his[3] =
52 #ifdef JP
53 { "それの", "彼の", "彼女の" };
54 #else
55 { "its", "his", "her" };
56 #endif
57
58 /*!
59  * 英語の複数系記述用マクロ / Pluralizer.  Args(count, singular, plural)
60  */
61 #define plural(c,s,p) \
62     (((c) == 1) ? (s) : (p))
63
64 /*
65  * Prepare hook for c_roff(). It will be changed for spoiler generation in wizard1.c.
66  */
67 void(*hook_c_roff)(TERM_COLOR attr, concptr str) = c_roff;
68
69 /*!
70   * @brief モンスターのAC情報を得ることができるかを返す / Determine if the "armor" is known
71   * @param r_idx モンスターの種族ID
72   * @return 敵のACを知る条件が満たされているならTRUEを返す
73   * @details
74   * The higher the level, the fewer kills needed.
75   */
76 static bool know_armour(MONRACE_IDX r_idx)
77 {
78         monster_race *r_ptr = &r_info[r_idx];
79         DEPTH level = r_ptr->level;
80         MONSTER_NUMBER kills = r_ptr->r_tkills;
81
82         bool known = (r_ptr->r_cast_spell == MAX_UCHAR) ? TRUE : FALSE;
83
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;
88         return FALSE;
89 }
90
91
92 /*!
93  * @brief モンスターの打撃威力を知ることができるかどうかを返す
94  * Determine if the "damage" of the given attack is known
95  * @param r_idx モンスターの種族ID
96  * @param i 確認したい攻撃手番
97  * @return 敵のダメージダイスを知る条件が満たされているならTRUEを返す
98  * @details
99  * <pre>
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
102  * </pre>
103  */
104 static bool know_damage(MONRACE_IDX r_idx, int i)
105 {
106         monster_race *r_ptr = &r_info[r_idx];
107         DEPTH level = r_ptr->level;
108         s32b a = r_ptr->r_blows[i];
109
110         s32b d1 = r_ptr->blow[i].d_dice;
111         s32b d2 = r_ptr->blow[i].d_side;
112         s32b d = d1 * d2;
113
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;
118
119         return FALSE;
120 }
121
122
123 /*!
124  * @brief モンスターの思い出メッセージをあらかじめ指定された関数ポインタに基づき出力する
125  * @param str 出力文字列
126  * @return なし
127  */
128 static void hooked_roff(concptr str)
129 {
130         hook_c_roff(TERM_WHITE, str);
131 }
132
133
134 /*!
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 文字列を格納するポインタ
142 * @return なし
143 */
144 void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg)
145 {
146         char base[80] = "", dice[80] = "", mult[80] = "";
147
148         if (dice_num == 0)
149         {
150                 sprintf(msg, "%d", base_damage);
151                 return;
152         }
153
154         if (base_damage != 0)
155                 sprintf(base, "%d+", base_damage);
156
157         if (dice_num == 1)
158                 sprintf(dice, "d%d", dice_side);
159         else
160                 sprintf(dice, "%dd%d", dice_num, dice_side);
161
162         if (dice_mult != 1 || dice_div != 1)
163         {
164                 if (dice_div == 1)
165                         sprintf(mult, "*%d", dice_mult);
166                 else
167                         sprintf(mult, "*(%d/%d)", dice_mult, dice_div);
168         }
169
170         sprintf(msg, "%s%s%s", base, dice, mult);
171 }
172
173
174 /*!
175 * @brief 文字列にモンスターの攻撃力を加える
176 * @param r_idx モンスターの種族ID
177 * @param SPELL_NUM 呪文番号
178 * @param msg 表示する文字列
179 * @param tmp 返すメッセージを格納する配列
180 * @return なし
181 */
182 void set_damage(player_type *player_ptr, MONRACE_IDX r_idx, int SPELL_NUM, char* msg, char* tmp)
183 {
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);
192
193         if (know_armour(r_idx))
194                 sprintf(tmp, msg, dice_str);
195         else
196                 sprintf(tmp, msg, "");
197 }
198
199
200 /*!
201  * @brief モンスターの思い出情報を表示する
202  * Hack -- display monster information using "hooked_roff()"
203  * @param r_idx モンスターの種族ID
204  * @param mode 表示オプション
205  * @return なし
206  * @details
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.
210  */
211 static void roff_aux(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
212 {
213 #ifdef JP
214         char jverb_buf[64];
215 #else
216         bool sin = FALSE;
217 #endif
218
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;
222
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;
226
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);
236
237         bool reinforce = FALSE;
238         for (int n = 0; n < A_MAX; n++)
239         {
240                 if (r_ptr->reinforce_id[n] > 0) reinforce = TRUE;
241         }
242
243         bool know_everything = FALSE;
244         if (cheat_know || (mode & 0x01))
245         {
246                 know_everything = TRUE;
247         }
248
249         if (know_everything)
250         {
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));
258
259                 if (r_ptr->flags1 & RF1_ONLY_GOLD) drop_item = 0;
260                 if (r_ptr->flags1 & RF1_ONLY_ITEM) drop_gold = 0;
261
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;
269         }
270
271         int msex = 0;
272         if (r_ptr->flags1 & RF1_FEMALE) msex = 2;
273         else if (r_ptr->flags1 & RF1_MALE) msex = 1;
274
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);
279
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);
283
284         if (r_ptr->r_tkills || know_everything)
285         {
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);
298
299                 if (r_ptr->flags1 & RF1_FORCE_DEPTH) flags1 |= (RF1_FORCE_DEPTH);
300                 if (r_ptr->flags1 & RF1_FORCE_MAXHP) flags1 |= (RF1_FORCE_MAXHP);
301         }
302
303         if (!(mode & 0x02))
304         {
305                 if (flags1 & RF1_UNIQUE)
306                 {
307                         bool dead = (r_ptr->max_num == 0) ? TRUE : FALSE;
308                         if (r_ptr->r_deaths)
309                         {
310                                 hooked_roff(format(_("%^sはあなたの先祖を %d 人葬っている", "%^s has slain %d of your ancestors"),
311                                         wd_he[msex], r_ptr->r_deaths));
312
313                                 if (dead)
314                                 {
315                                         hooked_roff(
316                                                 _(format("が、すでに仇討ちは果たしている!"),
317                                                         format(", but you have avenged %s!  ", plural(r_ptr->r_deaths, "him", "them"))));
318                                 }
319                                 else
320                                 {
321                                         hooked_roff(
322                                                 _(format("のに、まだ仇討ちを果たしていない。"),
323                                                         format(", who %s unavenged.  ", plural(r_ptr->r_deaths, "remains", "remain"))));
324                                 }
325
326                                 hooked_roff("\n");
327                         }
328                         else if (dead)
329                         {
330                                 hooked_roff(_("あなたはこの仇敵をすでに葬り去っている。", "You have slain this foe.  "));
331                                 hooked_roff("\n");
332                         }
333                 }
334                 else if (r_ptr->r_deaths)
335                 {
336                         hooked_roff(
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"))));
339
340                         if (r_ptr->r_pkills)
341                         {
342                                 hooked_roff(format(
343                                         _("が、あなたはこのモンスターを少なくとも %d 体は倒している。",
344                                                 "and you have exterminated at least %d of the creatures.  "), r_ptr->r_pkills));
345                         }
346                         else if (r_ptr->r_tkills)
347                         {
348                                 hooked_roff(format(
349                                         _("が、あなたの先祖はこのモンスターを少なくとも %d 体は倒している。",
350                                                 "and your ancestors have exterminated at least %d of the creatures.  "), r_ptr->r_tkills));
351                         }
352                         else
353                         {
354                                 hooked_roff(format(
355                                         _("が、まだ%sを倒したことはない。",
356                                                 "and %s is not ever known to have been defeated.  "), wd_he[msex]));
357                         }
358
359                         hooked_roff("\n");
360                 }
361                 else
362                 {
363                         if (r_ptr->r_pkills)
364                         {
365                                 hooked_roff(format(
366                                         _("あなたはこのモンスターを少なくとも %d 体は殺している。",
367                                                 "You have killed at least %d of these creatures.  "), r_ptr->r_pkills));
368                         }
369                         else if (r_ptr->r_tkills)
370                         {
371                                 hooked_roff(format(
372                                         _("あなたの先祖はこのモンスターを少なくとも %d 体は殺している。",
373                                                 "Your ancestors have killed at least %d of these creatures.  "), r_ptr->r_tkills));
374                         }
375                         else
376                         {
377                                 hooked_roff(_("このモンスターを倒したことはない。", "No battles to the death are recalled.  "));
378                         }
379
380                         hooked_roff("\n");
381                 }
382         }
383
384         concptr tmp = r_text + r_ptr->text;
385         if (tmp[0])
386         {
387                 hooked_roff(tmp);
388                 hooked_roff("\n");
389         }
390
391         if (r_idx == MON_KAGE)
392         {
393                 hooked_roff("\n");
394                 return;
395         }
396
397         bool old = FALSE;
398         if (r_ptr->level == 0)
399         {
400                 hooked_roff(format(_("%^sは町に住み", "%^s lives in the town"), wd_he[msex]));
401                 old = TRUE;
402         }
403         else if (r_ptr->r_tkills || know_everything)
404         {
405                 if (depth_in_feet)
406                 {
407                         hooked_roff(format(
408                                 _("%^sは通常地下 %d フィートで出現し", "%^s is normally found at depths of %d feet"),
409                                 wd_he[msex], r_ptr->level * 50));
410                 }
411                 else
412                 {
413                         hooked_roff(format(
414                                 _("%^sは通常地下 %d 階で出現し", "%^s is normally found on dungeon level %d"),
415                                 wd_he[msex], r_ptr->level));
416                 }
417
418                 old = TRUE;
419         }
420
421         if (r_idx == MON_CHAMELEON)
422         {
423                 hooked_roff(_("、他のモンスターに化ける。", "and can take the shape of other monster."));
424                 return;
425         }
426         
427         if (old)
428         {
429                 hooked_roff(_("、", ", and "));
430         }
431         else
432         {
433                 hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
434                 old = TRUE;
435         }
436
437 #ifdef JP
438 #else
439         hooked_roff("moves");
440 #endif
441
442         if ((flags1 & RF1_RAND_50) || (flags1 & RF1_RAND_25))
443         {
444                 if ((flags1 & RF1_RAND_50) && (flags1 & RF1_RAND_25))
445                 {
446                         hooked_roff(_("かなり", " extremely"));
447                 }
448                 else if (flags1 & RF1_RAND_50)
449                 {
450                         hooked_roff(_("幾分", " somewhat"));
451                 }
452                 else if (flags1 & RF1_RAND_25)
453                 {
454                         hooked_roff(_("少々", " a bit"));
455                 }
456
457                 hooked_roff(_("不規則に", " erratically"));
458                 if (speed != 110) hooked_roff(_("、かつ", ", and"));
459         }
460
461         if (speed > 110)
462         {
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"));
469         }
470         else if (speed < 110)
471         {
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"));
477         }
478         else
479         {
480                 hooked_roff(_("普通の速さで", " at normal speed"));
481         }
482
483 #ifdef JP
484         hooked_roff("動いている");
485 #endif
486
487         if (flags1 & RF1_NEVER_MOVE)
488         {
489                 if (old)
490                 {
491                         hooked_roff(_("、しかし", ", but "));
492                 }
493                 else
494                 {
495                         hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
496                         old = TRUE;
497                 }
498
499                 hooked_roff(_("侵入者を追跡しない", "does not deign to chase intruders"));
500         }
501
502         if (old)
503         {
504                 hooked_roff(_("。", ".  "));
505                 old = FALSE;
506         }
507
508         if (r_ptr->r_tkills || know_everything)
509         {
510 #ifdef JP
511                 hooked_roff("この");
512 #else
513                 if (flags1 & RF1_UNIQUE)
514                 {
515                         hooked_roff("Killing this");
516                 }
517                 else
518                 {
519                         hooked_roff("A kill of this");
520                 }
521 #endif
522
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"));
529
530                 if ((flags3 & (RF3_DRAGON | RF3_DEMON | RF3_GIANT | RF3_TROLL | RF3_ORC | RF3_ANGEL)) || (flags2 & (RF2_QUANTUM | RF2_HUMAN)))
531                 {
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"));
540                 }
541                 else
542                 {
543                         hooked_roff(_("モンスター", " creature"));
544                 }
545
546 #ifdef JP
547                 hooked_roff("を倒すことは");
548 #endif
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);
552
553 #ifdef JP
554                 hooked_roff(format(" %d レベルのキャラクタにとって 約%ld.%02ld ポイントの経験となる。", player_ptr->lev, (long)exp_integer, (long)exp_decimal));
555 #else
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"));
558
559                 char *ordinal;
560                 ordinal = "th";
561                 exp_integer = player_ptr->lev % 10;
562                 if ((player_ptr->lev / 10) != 1)
563                 {
564                         if (exp_integer == 1) ordinal = "st";
565                         else if (exp_integer == 2) ordinal = "nd";
566                         else if (exp_integer == 3) ordinal = "rd";
567                 }
568
569                 char *vowel;
570                 vowel = "";
571                 exp_integer = player_ptr->lev;
572                 if ((exp_integer == 8) || (exp_integer == 11) || (exp_integer == 18)) vowel = "n";
573
574                 hooked_roff(format(" for a%s %lu%s level character.  ", vowel, (long)exp_integer, ordinal));
575 #endif
576         }
577
578         if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC) && (flags3 & RF3_AURA_COLD))
579         {
580                 hook_c_roff(TERM_VIOLET, format(
581                         _("%^sは炎と氷とスパークに包まれている。", "%^s is surrounded by flames, ice and electricity.  "), wd_he[msex]));
582         }
583         else if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC))
584         {
585                 hook_c_roff(TERM_L_RED, format(
586                         _("%^sは炎とスパークに包まれている。", "%^s is surrounded by flames and electricity.  "), wd_he[msex]));
587         }
588         else if ((flags2 & RF2_AURA_FIRE) && (flags3 & RF3_AURA_COLD))
589         {
590                 hook_c_roff(TERM_BLUE, format(
591                         _("%^sは炎と氷に包まれている。", "%^s is surrounded by flames and ice.  "), wd_he[msex]));
592         }
593         else if ((flags3 & RF3_AURA_COLD) && (flags2 & RF2_AURA_ELEC))
594         {
595                 hook_c_roff(TERM_L_GREEN, format(
596                         _("%^sは氷とスパークに包まれている。", "%^s is surrounded by ice and electricity.  "), wd_he[msex]));
597         }
598         else if (flags2 & RF2_AURA_FIRE)
599         {
600                 hook_c_roff(TERM_RED, format(
601                         _("%^sは炎に包まれている。", "%^s is surrounded by flames.  "), wd_he[msex]));
602         }
603         else if (flags3 & RF3_AURA_COLD)
604         {
605                 hook_c_roff(TERM_BLUE, format(
606                         _("%^sは氷に包まれている。", "%^s is surrounded by ice.  "), wd_he[msex]));
607         }
608         else if (flags2 & RF2_AURA_ELEC)
609         {
610                 hook_c_roff(TERM_L_BLUE, format(
611                         _("%^sはスパークに包まれている。", "%^s is surrounded by electricity.  "), wd_he[msex]));
612         }
613
614         if (flags2 & RF2_REFLECTING)
615                 hooked_roff(format(_("%^sは矢の呪文を跳ね返す。", "%^s reflects bolt spells.  "), wd_he[msex]));
616
617         if ((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS) || reinforce)
618         {
619                 hooked_roff(format(
620                         _("%^sは通常護衛を伴って現れる。", "%^s usually appears with escorts.  "), wd_he[msex]));
621
622                 if (reinforce)
623                 {
624                         hooked_roff(_("護衛の構成は", "These escorts"));
625                         if ((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS))
626                         {
627                                 hooked_roff(_("少なくとも", " at the least"));
628                         }
629 #ifdef JP
630 #else
631                         hooked_roff(" contain ");
632 #endif                  
633                         for (int n = 0; n < A_MAX; n++)
634                         {
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;
639
640                                 monster_race *rf_ptr = &r_info[r_ptr->reinforce_id[n]];
641                                 if (rf_ptr->flags1 & RF1_UNIQUE)
642                                 {
643                                         hooked_roff(format(_("、%s", ", %s"), r_name + rf_ptr->name));
644                                         continue;
645                                 }
646
647 #ifdef JP
648                                 hooked_roff(format("、 %dd%d 体の%s", r_ptr->reinforce_dd[n], r_ptr->reinforce_ds[n], r_name + rf_ptr->name));
649 #else
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));
655 #endif
656                         }
657
658                         hooked_roff(_("で成り立っている。", "."));
659                 }
660         }
661
662         else if (flags1 & RF1_FRIENDS)
663         {
664                 hooked_roff(format(_("%^sは通常集団で現れる。", "%^s usually appears in groups.  "), wd_he[msex]));
665         }
666
667         int vn = 0;
668         byte color[96];
669         concptr vp[96];
670         char tmp_msg[96][96];
671         if (flags4 & RF4_SHRIEK)
672         {
673                 vp[vn] = _("悲鳴で助けを求める", "shriek for help");
674                 color[vn++] = TERM_L_WHITE;
675         }
676
677         if (flags4 & RF4_ROCKET)
678         {
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;
682         }
683
684         if (flags4 & RF4_SHOOT)
685         {
686                 for (int m = 0; m < 4; m++)
687                 {
688                         if (r_ptr->blow[m].method != RBM_SHOOT) continue;
689
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);
692                         else
693                                 sprintf(tmp_msg[vn], _("射撃をする", "fire an arrow"));
694                         vp[vn] = tmp_msg[vn]; color[vn++] = TERM_UMBER;
695                         break;
696                 }
697         }
698
699         if (a_ability_flags2 & (RF6_SPECIAL))
700         {
701                 vp[vn] = _("特別な行動をする", "do something");
702                 color[vn++] = TERM_VIOLET;
703         }
704
705         if (vn > 0)
706         {
707                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
708                 for (int n = 0; n < vn; n++)
709                 {
710 #ifdef JP
711                         if (n != vn - 1)
712                         {
713                                 jverb(vp[n], jverb_buf, JVERB_OR);
714                                 hook_c_roff(color[n], jverb_buf);
715                                 hook_c_roff(color[n], "り");
716                                 hooked_roff("、");
717                         }
718                         else hook_c_roff(color[n], vp[n]);
719 #else
720                         if (n == 0) hooked_roff(" may ");
721                         else if (n < vn - 1) hooked_roff(", ");
722                         else hooked_roff(" or ");
723
724                         hook_c_roff(color[n], vp[n]);
725 #endif
726                 }
727
728                 hooked_roff(_("ことがある。", ".  "));
729         }
730
731         vn = 0;
732         if (flags4 & (RF4_BR_ACID))
733         {
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;
737         }
738
739         if (flags4 & (RF4_BR_ELEC))
740         {
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;
744         }
745
746         if (flags4 & (RF4_BR_FIRE))
747         {
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;
751         }
752
753         if (flags4 & (RF4_BR_COLD))
754         {
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;
758         }
759
760         if (flags4 & (RF4_BR_POIS))
761         {
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;
765         }
766
767         if (flags4 & (RF4_BR_NETH))
768         {
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;
772         }
773
774         if (flags4 & (RF4_BR_LITE))
775         {
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;
779         }
780
781         if (flags4 & (RF4_BR_DARK))
782         {
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;
786         }
787
788         if (flags4 & (RF4_BR_CONF))
789         {
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;
793         }
794
795         if (flags4 & (RF4_BR_SOUN))
796         {
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;
800         }
801
802         if (flags4 & (RF4_BR_CHAO))
803         {
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;
807         }
808
809         if (flags4 & (RF4_BR_DISE))
810         {
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;
814         }
815
816         if (flags4 & (RF4_BR_NEXU))
817         {
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;
821         }
822
823         if (flags4 & (RF4_BR_TIME))
824         {
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;
828         }
829
830         if (flags4 & (RF4_BR_INER))
831         {
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;
835         }
836
837         if (flags4 & (RF4_BR_GRAV))
838         {
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;
842         }
843
844         if (flags4 & (RF4_BR_SHAR))
845         {
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;
849         }
850
851         if (flags4 & (RF4_BR_PLAS))
852         {
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;
856         }
857
858         if (flags4 & (RF4_BR_WALL))
859         {
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;
863         }
864
865         if (flags4 & (RF4_BR_MANA))
866         {
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;
870         }
871
872         if (flags4 & (RF4_BR_NUKE))
873         {
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;
877         }
878
879         if (flags4 & (RF4_BR_DISI))
880         {
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;
884         }
885
886         bool breath = FALSE;
887         if (vn > 0)
888         {
889                 breath = TRUE;
890                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
891                 for (int n = 0; n < vn; n++)
892                 {
893 #ifdef JP
894                         if (n != 0) hooked_roff("や");
895 #else
896                         if (n == 0) hooked_roff(" may breathe ");
897                         else if (n < vn - 1) hooked_roff(", ");
898                         else hooked_roff(" or ");
899 #endif
900                         hook_c_roff(color[n], vp[n]);
901                 }
902
903 #ifdef JP
904                 hooked_roff("のブレスを吐くことがある");
905 #endif
906         }
907
908         vn = 0;
909         if (a_ability_flags1 & (RF5_BA_ACID))
910         {
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;
914         }
915
916         if (a_ability_flags1 & (RF5_BA_ELEC))
917         {
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;
921         }
922
923         if (a_ability_flags1 & (RF5_BA_FIRE))
924         {
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;
928         }
929
930         if (a_ability_flags1 & (RF5_BA_COLD))
931         {
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;
935         }
936
937         if (a_ability_flags1 & (RF5_BA_POIS))
938         {
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;
942         }
943
944         if (a_ability_flags1 & (RF5_BA_NETH))
945         {
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;
949         }
950
951         if (a_ability_flags1 & (RF5_BA_WATE))
952         {
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;
956         }
957
958         if (flags4 & (RF4_BA_NUKE))
959         {
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;
963         }
964
965         if (a_ability_flags1 & (RF5_BA_MANA))
966         {
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;
970         }
971
972         if (a_ability_flags1 & (RF5_BA_DARK))
973         {
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;
977         }
978
979         if (a_ability_flags1 & (RF5_BA_LITE))
980         {
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;
984         }
985
986         if (flags4 & (RF4_BA_CHAO))
987         {
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;
991         }
992
993         if (a_ability_flags2 & (RF6_HAND_DOOM))
994         {
995                 vp[vn] = _("破滅の手(40%-60%)", "invoke the Hand of Doom(40%-60%)");
996                 color[vn++] = TERM_VIOLET;
997         }
998
999         if (a_ability_flags2 & (RF6_PSY_SPEAR))
1000         {
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;
1004         }
1005
1006         if (a_ability_flags1 & (RF5_DRAIN_MANA))
1007         {
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;
1011         }
1012
1013         if (a_ability_flags1 & (RF5_MIND_BLAST))
1014         {
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;
1018         }
1019
1020         if (a_ability_flags1 & (RF5_BRAIN_SMASH))
1021         {
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;
1025         }
1026
1027         if (a_ability_flags1 & (RF5_CAUSE_1))
1028         {
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;
1033         }
1034
1035         if (a_ability_flags1 & (RF5_CAUSE_2))
1036         {
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;
1041         }
1042
1043         if (a_ability_flags1 & (RF5_CAUSE_3))
1044         {
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;
1049         }
1050
1051         if (a_ability_flags1 & (RF5_CAUSE_4))
1052         {
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;
1057         }
1058
1059         if (a_ability_flags1 & (RF5_BO_ACID))
1060         {
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;
1064         }
1065
1066         if (a_ability_flags1 & (RF5_BO_ELEC))
1067         {
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;
1071         }
1072
1073         if (a_ability_flags1 & (RF5_BO_FIRE))
1074         {
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;
1078         }
1079
1080         if (a_ability_flags1 & (RF5_BO_COLD))
1081         {
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;
1085         }
1086
1087         if (a_ability_flags1 & (RF5_BO_NETH))
1088         {
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;
1092         }
1093
1094         if (a_ability_flags1 & (RF5_BO_WATE))
1095         {
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;
1099         }
1100
1101         if (a_ability_flags1 & (RF5_BO_MANA))
1102         {
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;
1106         }
1107
1108         if (a_ability_flags1 & (RF5_BO_PLAS))
1109         {
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;
1113         }
1114
1115         if (a_ability_flags1 & (RF5_BO_ICEE))
1116         {
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;
1120         }
1121
1122         if (a_ability_flags1 & (RF5_MISSILE))
1123         {
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;
1127         }
1128
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; }
1144
1145         if (a_ability_flags2 & (RF6_DARKNESS))
1146         {
1147                 if ((player_ptr->pclass != CLASS_NINJA) || (r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) || (r_ptr->flags7 & RF7_DARK_MASK))
1148                 {
1149                         vp[vn] = _("暗闇", "create darkness");
1150                         color[vn++] = TERM_L_DARK;
1151                 }
1152                 else
1153                 {
1154                         vp[vn] = _("閃光", "create light");
1155                         color[vn++] = TERM_YELLOW;
1156                 }
1157         }
1158
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; }
1178
1179         bool magic = FALSE;
1180         if (vn)
1181         {
1182                 magic = TRUE;
1183                 if (breath)
1184                 {
1185                         hooked_roff(_("、なおかつ", ", and is also"));
1186                 }
1187                 else
1188                 {
1189                         hooked_roff(format(_("%^sは", "%^s is"), wd_he[msex]));
1190                 }
1191
1192 #ifdef JP
1193                 if (flags2 & (RF2_SMART)) hook_c_roff(TERM_YELLOW, "的確に");
1194                 hooked_roff("魔法を使うことができ、");
1195 #else
1196                 hooked_roff(" magical, casting spells");
1197                 if (flags2 & RF2_SMART) hook_c_roff(TERM_YELLOW, " intelligently");
1198 #endif
1199
1200                 for (int n = 0; n < vn; n++)
1201                 {
1202 #ifdef JP
1203                         if (n != 0) hooked_roff("、");
1204 #else
1205                         if (n == 0) hooked_roff(" which ");
1206                         else if (n < vn - 1) hooked_roff(", ");
1207                         else hooked_roff(" or ");
1208 #endif
1209                         hook_c_roff(color[n], vp[n]);
1210                 }
1211
1212 #ifdef JP
1213                 hooked_roff("の呪文を唱えることがある");
1214 #endif
1215         }
1216
1217         if (breath || magic)
1218         {
1219                 int m = r_ptr->r_cast_spell;
1220                 int n = r_ptr->freq_spell;
1221                 if (m > 100 || know_everything)
1222                 {
1223                         hooked_roff(format(
1224                                 _("(確率:1/%d)", "; 1 time in %d"), 100 / n));
1225                 }
1226                 else if (m)
1227                 {
1228                         n = ((n + 9) / 10) * 10;
1229                         hooked_roff(format(
1230                                 _("(確率:約1/%d)", "; about 1 time in %d"), 100 / n));
1231                 }
1232
1233                 hooked_roff(_("。", ".  "));
1234         }
1235
1236         if (know_everything || know_armour(r_idx))
1237         {
1238                 hooked_roff(format(
1239                         _("%^sは AC%d の防御力と", "%^s has an armor rating of %d"),
1240                         wd_he[msex], r_ptr->ac));
1241
1242                 if ((flags1 & RF1_FORCE_MAXHP) || (r_ptr->hside == 1))
1243                 {
1244                         u32b hp = r_ptr->hdice * (nightmare ? 2 : 1) * r_ptr->hside;
1245                         hooked_roff(format(
1246                                 _(" %d の体力がある。", " and a life rating of %d.  "),
1247                                 (s16b)MIN(30000, hp)));
1248                 }
1249                 else
1250                 {
1251                         hooked_roff(format(
1252                                 _(" %dd%d の体力がある。", " and a life rating of %dd%d.  "),
1253                                 r_ptr->hdice * (nightmare ? 2 : 1), r_ptr->hside));
1254                 }
1255         }
1256
1257         vn = 0;
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; }
1270
1271         if (vn > 0)
1272         {
1273                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1274                 for (int n = 0; n < vn; n++)
1275                 {
1276 #ifdef JP
1277                         if (n != vn - 1)
1278                         {
1279                                 jverb(vp[n], jverb_buf, JVERB_AND);
1280                                 hook_c_roff(color[n], jverb_buf);
1281                                 hooked_roff("、");
1282                         }
1283                         else
1284                         {
1285                                 hook_c_roff(color[n], vp[n]);
1286                         }
1287 #else
1288                         if (n == 0) hooked_roff(" can ");
1289                         else if (n < vn - 1) hooked_roff(", ");
1290                         else hooked_roff(" and ");
1291
1292                         hook_c_roff(color[n], vp[n]);
1293 #endif
1294
1295                 }
1296
1297                 hooked_roff(_("ことができる。", ".  "));
1298         }
1299
1300         if (flags7 & RF7_AQUATIC)
1301         {
1302                 hooked_roff(format(_("%^sは水中に棲んでいる。", "%^s lives in water.  "), wd_he[msex]));
1303         }
1304
1305         if (flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2))
1306         {
1307                 hooked_roff(format(_("%^sは光っている。", "%^s is shining.  "), wd_he[msex]));
1308         }
1309
1310         if (flags7 & (RF7_SELF_DARK_1 | RF7_SELF_DARK_2))
1311         {
1312                 hook_c_roff(TERM_L_DARK, format(_("%^sは暗黒に包まれている。", "%^s is surrounded by darkness.  "), wd_he[msex]));
1313         }
1314
1315         if (flags2 & RF2_INVISIBLE)
1316         {
1317                 hooked_roff(format(_("%^sは透明で目に見えない。", "%^s is invisible.  "), wd_he[msex]));
1318         }
1319
1320         if (flags2 & RF2_COLD_BLOOD)
1321         {
1322                 hooked_roff(format(_("%^sは冷血動物である。", "%^s is cold blooded.  "), wd_he[msex]));
1323         }
1324
1325         if (flags2 & RF2_EMPTY_MIND)
1326         {
1327                 hooked_roff(format(_("%^sはテレパシーでは感知できない。", "%^s is not detected by telepathy.  "), wd_he[msex]));
1328         }
1329         else if (flags2 & RF2_WEIRD_MIND)
1330         {
1331                 hooked_roff(format(_("%^sはまれにテレパシーで感知できる。", "%^s is rarely detected by telepathy.  "), wd_he[msex]));
1332         }
1333
1334         if (flags2 & RF2_MULTIPLY)
1335         {
1336                 hook_c_roff(TERM_L_UMBER, format(_("%^sは爆発的に増殖する。", "%^s breeds explosively.  "), wd_he[msex]));
1337         }
1338
1339         if (flags2 & RF2_REGENERATE)
1340         {
1341                 hook_c_roff(TERM_L_WHITE, format(_("%^sは素早く体力を回復する。", "%^s regenerates quickly.  "), wd_he[msex]));
1342         }
1343
1344         if (flags7 & RF7_RIDING)
1345         {
1346                 hook_c_roff(TERM_SLATE, format(_("%^sに乗ることができる。", "%^s is suitable for riding.  "), wd_he[msex]));
1347         }
1348
1349         vn = 0;
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; }
1354
1355         if (vn > 0)
1356         {
1357                 hooked_roff(format(_("%^sには", "%^s"), wd_he[msex]));
1358
1359                 for (int n = 0; n < vn; n++)
1360                 {
1361 #ifdef JP
1362                         if (n != 0) hooked_roff("や");
1363 #else
1364                         if (n == 0) hooked_roff(" is hurt by ");
1365                         else if (n < vn - 1) hooked_roff(", ");
1366                         else hooked_roff(" and ");
1367 #endif
1368                         hook_c_roff(color[n], vp[n]);
1369                 }
1370
1371                 hooked_roff(_("でダメージを与えられる。", ".  "));
1372         }
1373
1374         vn = 0;
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; }
1380
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; }
1397
1398         if (vn > 0)
1399         {
1400                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1401                 for (int n = 0; n < vn; n++)
1402                 {
1403 #ifdef JP
1404                         if (n != 0) hooked_roff("と");
1405 #else
1406                         if (n == 0) hooked_roff(" resists ");
1407                         else if (n < vn - 1) hooked_roff(", ");
1408                         else hooked_roff(" and ");
1409 #endif
1410                         hook_c_roff(color[n], vp[n]);
1411                 }
1412
1413                 hooked_roff(_("の耐性を持っている。", ".  "));
1414         }
1415
1416         if ((r_ptr->r_xtra1 & MR1_SINKA) || know_everything)
1417         {
1418                 if (r_ptr->next_r_idx)
1419                 {
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));
1422
1423                         hooked_roff(
1424                                 _(format("に進化する。"),
1425                                         format(" when %s gets enough experience.  ", wd_he[msex])));
1426                 }
1427                 else if (!(r_ptr->flags1 & RF1_UNIQUE))
1428                 {
1429                         hooked_roff(format(_("%sは進化しない。", "%s won't evolve.  "), wd_he[msex]));
1430                 }
1431         }
1432
1433         vn = 0;
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; }
1439
1440         if (vn > 0)
1441         {
1442                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1443                 for (int n = 0; n < vn; n++)
1444                 {
1445 #ifdef JP
1446                         if (n != 0) hooked_roff("し、");
1447 #else
1448                         if (n == 0) hooked_roff(" cannot be ");
1449                         else if (n < vn - 1) hooked_roff(", ");
1450                         else hooked_roff(" or ");
1451 #endif
1452                         hook_c_roff(color[n], vp[n]);
1453                 }
1454
1455                 hooked_roff(_("。", ".  "));
1456         }
1457
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)
1461         {
1462                 concptr act;
1463                 if (r_ptr->sleep > 200)
1464                 {
1465                         act = _("を無視しがちであるが", "prefers to ignore");
1466                 }
1467                 else if (r_ptr->sleep > 95)
1468                 {
1469                         act = _("に対してほとんど注意を払わないが", "pays very little attention to");
1470                 }
1471                 else if (r_ptr->sleep > 75)
1472                 {
1473                         act = _("に対してあまり注意を払わないが", "pays little attention to");
1474                 }
1475                 else if (r_ptr->sleep > 45)
1476                 {
1477                         act = _("を見過ごしがちであるが", "tends to overlook");
1478                 }
1479                 else if (r_ptr->sleep > 25)
1480                 {
1481                         act = _("をほんの少しは見ており", "takes quite a while to see");
1482                 }
1483                 else if (r_ptr->sleep > 10)
1484                 {
1485                         act = _("をしばらくは見ており", "takes a while to see");
1486                 }
1487                 else if (r_ptr->sleep > 5)
1488                 {
1489                         act = _("を幾分注意深く見ており", "is fairly observant of");
1490                 }
1491                 else if (r_ptr->sleep > 3)
1492                 {
1493                         act = _("を注意深く見ており", "is observant of");
1494                 }
1495                 else if (r_ptr->sleep > 1)
1496                 {
1497                         act = _("をかなり注意深く見ており", "is very observant of");
1498                 }
1499                 else if (r_ptr->sleep > 0)
1500                 {
1501                         act = _("を警戒しており", "is vigilant for");
1502                 }
1503                 else
1504                 {
1505                         act = _("をかなり警戒しており", "is ever vigilant for");
1506                 }
1507
1508                 hooked_roff(
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)));
1511         }
1512
1513         if (drop_gold || drop_item)
1514         {
1515                 hooked_roff(format(_("%^sは", "%^s may carry"), wd_he[msex]));
1516 #ifdef JP
1517 #else
1518                 sin = FALSE;
1519 #endif
1520
1521                 int n = MAX(drop_gold, drop_item);
1522                 if (n == 1)
1523                 {
1524                         hooked_roff(_("一つの", " a"));
1525 #ifdef JP
1526 #else
1527                         sin = TRUE;
1528 #endif
1529                 }
1530                 else if (n == 2)
1531                 {
1532                         hooked_roff(_("一つか二つの", " one or two"));
1533                 }
1534                 else
1535                 {
1536                         hooked_roff(format(_(" %d 個までの", " up to %d"), n));
1537                 }
1538
1539                 concptr p;
1540                 if (flags1 & RF1_DROP_GREAT)
1541                 {
1542                         p = _("特別な", " exceptional");
1543                 }
1544                 else if (flags1 & RF1_DROP_GOOD)
1545                 {
1546                         p = _("上質な", " good");
1547 #ifdef JP
1548 #else
1549                         sin = FALSE;
1550 #endif
1551                 }
1552                 else
1553                 {
1554                         p = NULL;
1555                 }
1556
1557                 if (drop_item)
1558                 {
1559 #ifdef JP
1560 #else
1561                         if (sin) hooked_roff("n");
1562                         sin = FALSE;
1563 #endif
1564                         if (p) hooked_roff(p);
1565                         hooked_roff(_("アイテム", " object"));
1566 #ifdef JP
1567 #else
1568                         if (n != 1) hooked_roff("s");
1569 #endif
1570                         p = _("や", " or");
1571                 }
1572
1573                 if (drop_gold)
1574                 {
1575 #ifdef JP
1576 #else
1577                         if (!p) sin = FALSE;
1578                         if (sin) hooked_roff("n");
1579                         sin = FALSE;
1580 #endif
1581                         if (p) hooked_roff(p);
1582                         hooked_roff(_("財宝", " treasure"));
1583 #ifdef JP
1584 #else
1585                         if (n != 1) hooked_roff("s");
1586 #endif
1587                 }
1588
1589                 hooked_roff(_("を持っていることがある。", ".  "));
1590         }
1591
1592         const int max_attack_numbers = 4;
1593         int count = 0;
1594         for (int m = 0; m < max_attack_numbers; m++)
1595         {
1596                 if (!r_ptr->blow[m].method) continue;
1597                 if (r_ptr->blow[m].method == RBM_SHOOT) continue;
1598
1599                 if (r_ptr->r_blows[m] || know_everything) count++;
1600         }
1601
1602         int attack_numbers = 0;
1603         for (int m = 0; m < max_attack_numbers; m++)
1604         {
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;
1608
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;
1613
1614                 concptr p = NULL;
1615                 switch (method)
1616                 {
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;
1641                 }
1642
1643                 concptr q = NULL;
1644                 switch (effect)
1645                 {
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;
1681                 }
1682
1683 #ifdef JP
1684                 if (attack_numbers == 0)
1685                 {
1686                         hooked_roff(format("%^sは", wd_he[msex]));
1687                 }
1688
1689                 if (d1 && d2 && (know_everything || know_damage(r_idx, m)))
1690                 {
1691                         hooked_roff(format(" %dd%d ", d1, d2));
1692                         hooked_roff("のダメージで");
1693                 }
1694
1695                 if (!p) p = "何か奇妙なことをする";
1696
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);
1701
1702                 hooked_roff(jverb_buf);
1703                 if (q)
1704                 {
1705                         if (attack_numbers != count - 1) jverb(q, jverb_buf, JVERB_AND);
1706                         else strcpy(jverb_buf, q);
1707                         hooked_roff(jverb_buf);
1708                 }
1709
1710                 if (attack_numbers != count - 1) hooked_roff("、");
1711 #else
1712                 if (attack_numbers == 0)
1713                 {
1714                         hooked_roff(format("%^s can ", wd_he[msex]));
1715                 }
1716                 else if (attack_numbers < count - 1)
1717                 {
1718                         hooked_roff(", ");
1719                 }
1720                 else
1721                 {
1722                         hooked_roff(", and ");
1723                 }
1724
1725                 if (!p) p = "do something weird";
1726                 hooked_roff(p);
1727                 if (q)
1728                 {
1729                         hooked_roff(" to ");
1730                         hooked_roff(q);
1731                         if (d1 && d2 && (know_everything || know_damage(r_idx, m)))
1732                         {
1733                                 hooked_roff(" with damage");
1734                                 hooked_roff(format(" %dd%d", d1, d2));
1735                         }
1736                 }
1737 #endif
1738
1739                 attack_numbers++;
1740         }
1741
1742         if (attack_numbers > 0)
1743         {
1744                 hooked_roff(_("。", ".  "));
1745         }
1746         else if (flags1 & RF1_NEVER_BLOW)
1747         {
1748                 hooked_roff(format(
1749                         _("%^sは物理的な攻撃方法を持たない。",
1750                                 "%^s has no physical attacks.  "), wd_he[msex]));
1751         }
1752         else
1753         {
1754                 hooked_roff(format(
1755                         _("%s攻撃については何も知らない。",
1756                                 "Nothing is known about %s attack.  "), wd_his[msex]));
1757         }
1758
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);
1763         if (is_kingpin)
1764         {
1765                 hook_c_roff(TERM_VIOLET,
1766                         _("あなたはこのモンスターを殺したいという強い欲望を感じている...",
1767                                 "You feel an intense desire to kill this monster...  "));
1768         }
1769         else if (flags7 & RF7_GUARDIAN)
1770         {
1771                 hook_c_roff(TERM_L_RED,
1772                         _("このモンスターはダンジョンの主である。",
1773                                 "This monster is the master of a dungeon."));
1774         }
1775
1776         hooked_roff("\n");
1777 }
1778
1779
1780 /*!
1781  * @brief モンスター情報のヘッダを記述する
1782  * Hack -- Display the "name" and "attr/chars" of a monster race
1783  * @param r_idx モンスターの種族ID
1784  * @return なし
1785  */
1786 void roff_top(MONRACE_IDX r_idx)
1787 {
1788         monster_race *r_ptr = &r_info[r_idx];
1789         char c1 = r_ptr->d_char;
1790         char c2 = r_ptr->x_char;
1791
1792         TERM_COLOR a1 = r_ptr->d_attr;
1793         TERM_COLOR a2 = r_ptr->x_attr;
1794
1795         Term_erase(0, 0, 255);
1796         Term_gotoxy(0, 0);
1797
1798 #ifdef JP
1799 #else
1800         if (!(r_ptr->flags1 & RF1_UNIQUE))
1801         {
1802                 Term_addstr(-1, TERM_WHITE, "The ");
1803         }
1804 #endif
1805
1806         Term_addstr(-1, TERM_WHITE, (r_name + r_ptr->name));
1807
1808         Term_addstr(-1, TERM_WHITE, " ('");
1809         Term_add_bigch(a1, c1);
1810         Term_addstr(-1, TERM_WHITE, "')");
1811
1812         Term_addstr(-1, TERM_WHITE, "/('");
1813         Term_add_bigch(a2, c2);
1814         Term_addstr(-1, TERM_WHITE, "'):");
1815
1816         if (!current_world_ptr->wizard) return;
1817
1818         char buf[16];
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, ')');
1823 }
1824
1825
1826 /*!
1827  * @brief  モンスター情報の表示と共に画面を一時消去するサブルーチン /
1828  * Hack -- describe the given monster race at the top of the screen
1829  * @param r_idx モンスターの種族ID
1830  * @param mode 表示オプション
1831  * @return なし
1832  */
1833 void screen_roff(player_type *player_ptr, MONRACE_IDX r_idx, BIT_FLAGS mode)
1834 {
1835         msg_erase();
1836         Term_erase(0, 1, 255);
1837         hook_c_roff = c_roff;
1838         roff_aux(player_ptr, r_idx, mode);
1839         roff_top(r_idx);
1840 }
1841
1842
1843 /*!
1844  * @brief モンスター情報の現在のウィンドウに表示する /
1845  * Hack -- describe the given monster race in the current "term" window
1846  * @param r_idx モンスターの種族ID
1847  * @return なし
1848  */
1849 void display_roff(player_type *player_ptr)
1850 {
1851         for (int y = 0; y < Term->hgt; y++)
1852         {
1853                 Term_erase(0, y, 255);
1854         }
1855
1856         Term_gotoxy(0, 1);
1857         hook_c_roff = c_roff;
1858         MONRACE_IDX r_idx = player_ptr->monster_race_idx;
1859         roff_aux(player_ptr, r_idx, 0);
1860         roff_top(r_idx);
1861 }
1862
1863
1864 /*!
1865  * @brief モンスター詳細情報を自動スポイラー向けに出力する /
1866  * Hack -- output description of the given monster race
1867  * @param r_idx モンスターの種族ID
1868  * @param roff_func 出力処理を行う関数ポインタ
1869  * @return なし
1870  */
1871 void output_monster_spoiler(player_type *player_ptr, MONRACE_IDX r_idx, void(*roff_func)(TERM_COLOR attr, concptr str))
1872 {
1873         hook_c_roff = roff_func;
1874         roff_aux(player_ptr, r_idx, 0x03);
1875 }
1876
1877
1878 /*!
1879  * @brief プレイヤーの現在の広域マップ座標から得た地勢を元にモンスターの生成条件関数を返す
1880  * @param player_ptr プレーヤーへの参照ポインタ
1881  * @return 地勢にあったモンスターの生成条件関数
1882  */
1883 monsterrace_hook_type get_monster_hook(player_type *player_ptr)
1884 {
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;
1887
1888         switch (wilderness[player_ptr->wilderness_y][player_ptr->wilderness_x].terrain)
1889         {
1890         case TERRAIN_TOWN:
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:
1895         case TERRAIN_SWAMP:
1896                 return (monsterrace_hook_type)mon_hook_shore;
1897         case TERRAIN_DIRT:
1898         case TERRAIN_DESERT:
1899                 return (monsterrace_hook_type)mon_hook_waste;
1900         case TERRAIN_GRASS:
1901                 return (monsterrace_hook_type)mon_hook_grass;
1902         case TERRAIN_TREES:
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;
1909         default:
1910                 return (monsterrace_hook_type)mon_hook_dungeon;
1911         }
1912 }
1913
1914
1915 /*!
1916  * @brief 指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す
1917  * @return 地勢にあったモンスターの生成条件関数
1918  */
1919 monsterrace_hook_type get_monster_hook2(player_type *player_ptr, POSITION y, POSITION x)
1920 {
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))
1923         {
1924                 if (have_flag(f_ptr->flags, FF_DEEP))
1925                 {
1926                         return (monsterrace_hook_type)mon_hook_deep_water;
1927                 }
1928                 else
1929                 {
1930                         return (monsterrace_hook_type)mon_hook_shallow_water;
1931                 }
1932         }
1933
1934         if (have_flag(f_ptr->flags, FF_LAVA))
1935         {
1936                 return (monsterrace_hook_type)mon_hook_lava;
1937         }
1938
1939         return (monsterrace_hook_type)mon_hook_floor;
1940 }
1941
1942
1943 /*!
1944  * @brief モンスターを友好的にする
1945  * @param m_ptr モンスター情報構造体の参照ポインタ
1946  * @return なし
1947  */
1948 void set_friendly(monster_type *m_ptr)
1949 {
1950         m_ptr->smart |= SM_FRIENDLY;
1951 }
1952
1953
1954 /*!
1955  * @brief モンスターをペットにする
1956  * @param player_type プレーヤーへの参照ポインタ
1957  * @param m_ptr モンスター情報構造体の参照ポインタ
1958  * @return なし
1959  */
1960 void set_pet(player_type *player_ptr, monster_type *m_ptr)
1961 {
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;
1966 }
1967
1968
1969 /*!
1970  * @brief モンスターを敵に回す
1971  * Makes the monster hostile towards the player
1972  * @param m_ptr モンスター情報構造体の参照ポインタ
1973  * @return なし
1974  */
1975 void set_hostile(player_type *player_ptr, monster_type *m_ptr)
1976 {
1977         if (player_ptr->phase_out) return;
1978         m_ptr->smart &= ~SM_PET;
1979         m_ptr->smart &= ~SM_FRIENDLY;
1980 }
1981
1982
1983 /*!
1984  * @brief モンスターを怒らせる
1985  * Anger the monster
1986  * @param m_ptr モンスター情報構造体の参照ポインタ
1987  * @return なし
1988  */
1989 void anger_monster(player_type *player_ptr, monster_type *m_ptr)
1990 {
1991         if (player_ptr->phase_out) return;
1992         if (!is_friendly(m_ptr)) return;
1993
1994         GAME_TEXT m_name[MAX_NLEN];
1995
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);
2003 }
2004
2005
2006 /*!
2007  * @brief モンスターが地形を踏破できるかどうかを返す
2008  * Check if monster can cross terrain
2009  * @param player_ptr プレーヤーへの参照ポインタ
2010  * @param feat 地形ID
2011  * @param r_ptr モンスター種族構造体の参照ポインタ
2012  * @param mode オプション
2013  * @return 踏破可能ならばTRUEを返す
2014  */
2015 bool monster_can_cross_terrain(player_type *player_ptr, FEAT_IDX feat, monster_race *r_ptr, BIT_FLAGS16 mode)
2016 {
2017         feature_type *f_ptr = &f_info[feat];
2018
2019         if (have_flag(f_ptr->flags, FF_PATTERN))
2020         {
2021                 if (!(mode & CEM_RIDING))
2022                 {
2023                         if (!(r_ptr->flags7 & RF7_CAN_FLY)) return FALSE;
2024                 }
2025                 else
2026                 {
2027                         if (!(mode & CEM_P_CAN_ENTER_PATTERN)) return FALSE;
2028                 }
2029         }
2030
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))
2034         {
2035                 if ((r_ptr->flags2 & RF2_PASS_WALL) && (!(mode & CEM_RIDING) || player_ptr->pass_wall)) return TRUE;
2036         }
2037
2038         if (!have_flag(f_ptr->flags, FF_MOVE)) return FALSE;
2039
2040         if (have_flag(f_ptr->flags, FF_MOUNTAIN) && (r_ptr->flags8 & RF8_WILD_MOUNTAIN)) return TRUE;
2041
2042         if (have_flag(f_ptr->flags, FF_WATER))
2043         {
2044                 if (!(r_ptr->flags7 & RF7_AQUATIC))
2045                 {
2046                         if (have_flag(f_ptr->flags, FF_DEEP)) return FALSE;
2047                         else if (r_ptr->flags2 & RF2_AURA_FIRE) return FALSE;
2048                 }
2049         }
2050         else if (r_ptr->flags7 & RF7_AQUATIC) return FALSE;
2051
2052         if (have_flag(f_ptr->flags, FF_LAVA))
2053         {
2054                 if (!(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)) return FALSE;
2055         }
2056
2057         if (have_flag(f_ptr->flags, FF_COLD_PUDDLE))
2058         {
2059                 if (!(r_ptr->flagsr & RFR_EFF_IM_COLD_MASK)) return FALSE;
2060         }
2061
2062         if (have_flag(f_ptr->flags, FF_ELEC_PUDDLE))
2063         {
2064                 if (!(r_ptr->flagsr & RFR_EFF_IM_ELEC_MASK)) return FALSE;
2065         }
2066
2067         if (have_flag(f_ptr->flags, FF_ACID_PUDDLE))
2068         {
2069                 if (!(r_ptr->flagsr & RFR_EFF_IM_ACID_MASK)) return FALSE;
2070         }
2071
2072         if (have_flag(f_ptr->flags, FF_POISON_PUDDLE))
2073         {
2074                 if (!(r_ptr->flagsr & RFR_EFF_IM_POIS_MASK)) return FALSE;
2075         }
2076
2077         return TRUE;
2078 }
2079
2080
2081 /*!
2082  * @brief 指定された座標の地形をモンスターが踏破できるかどうかを返す
2083  * Strictly check if monster can enter the grid
2084  * @param player_ptr プレーヤーへの参照ポインタ
2085  * @param y 地形のY座標
2086  * @param x 地形のX座標
2087  * @param r_ptr モンスター種族構造体の参照ポインタ
2088  * @param mode オプション
2089  * @return 踏破可能ならばTRUEを返す
2090  */
2091 bool monster_can_enter(player_type *player_ptr, POSITION y, POSITION x, monster_race *r_ptr, BIT_FLAGS16 mode)
2092 {
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;
2096
2097         return monster_can_cross_terrain(player_ptr, g_ptr->feat, r_ptr, mode);
2098 }
2099
2100
2101 /*!
2102  * @brief モンスターの属性の基づいた敵対関係の有無を返す(サブルーチン)
2103  * Check if this monster has "hostile" alignment (aux)
2104  * @param sub_align1 モンスター1のサブフラグ
2105  * @param sub_align2 モンスター2のサブフラグ
2106  * @return 敵対関係にあるならばTRUEを返す
2107  */
2108 static bool check_hostile_align(byte sub_align1, byte sub_align2)
2109 {
2110         if (sub_align1 != sub_align2)
2111         {
2112                 if (((sub_align1 & SUB_ALIGN_EVIL) && (sub_align2 & SUB_ALIGN_GOOD)) ||
2113                         ((sub_align1 & SUB_ALIGN_GOOD) && (sub_align2 & SUB_ALIGN_EVIL)))
2114                         return TRUE;
2115         }
2116
2117         return FALSE;
2118 }
2119
2120
2121 /*!
2122  * @brief モンスターの属性の基づいた敵対関係の有無を返す
2123  * Check if two monsters are enemies
2124  * @param m_ptr モンスター1の構造体参照ポインタ
2125  * @param n_ptr モンスター2の構造体参照ポインタ
2126  * @return 敵対関係にあるならばTRUEを返す
2127  */
2128 bool are_enemies(player_type *player_ptr, monster_type *m_ptr, monster_type *n_ptr)
2129 {
2130         monster_race *r_ptr = &r_info[m_ptr->r_idx];
2131         monster_race *s_ptr = &r_info[n_ptr->r_idx];
2132
2133         if (player_ptr->phase_out)
2134         {
2135                 if (is_pet(m_ptr) || is_pet(n_ptr)) return FALSE;
2136                 return TRUE;
2137         }
2138
2139         if ((r_ptr->flags8 & (RF8_WILD_TOWN | RF8_WILD_ALL))
2140                 && (s_ptr->flags8 & (RF8_WILD_TOWN | RF8_WILD_ALL)))
2141         {
2142                 if (!is_pet(m_ptr) && !is_pet(n_ptr)) return FALSE;
2143         }
2144
2145         if (check_hostile_align(m_ptr->sub_align, n_ptr->sub_align))
2146         {
2147                 if (!(m_ptr->mflag2 & MFLAG2_CHAMELEON) || !(n_ptr->mflag2 & MFLAG2_CHAMELEON)) return TRUE;
2148         }
2149
2150         if (is_hostile(m_ptr) != is_hostile(n_ptr))
2151         {
2152                 return TRUE;
2153         }
2154
2155         return FALSE;
2156 }
2157
2158
2159 /*!
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を返す
2168  * @details
2169  * If user is player, m_ptr == NULL.
2170  */
2171 bool monster_has_hostile_align(player_type *player_ptr, monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr)
2172 {
2173         byte sub_align1 = SUB_ALIGN_NEUTRAL;
2174         byte sub_align2 = SUB_ALIGN_NEUTRAL;
2175
2176         if (m_ptr) /* For a monster */
2177         {
2178                 sub_align1 = m_ptr->sub_align;
2179         }
2180         else /* For player */
2181         {
2182                 if (player_ptr->align >= pa_good) sub_align1 |= SUB_ALIGN_GOOD;
2183                 if (player_ptr->align <= pa_evil) sub_align1 |= SUB_ALIGN_EVIL;
2184         }
2185
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;
2189
2190         if (check_hostile_align(sub_align1, sub_align2)) return TRUE;
2191
2192         return FALSE;
2193 }
2194
2195
2196 /*!
2197  * @brief モンスターを倒した際の財宝svalを返す
2198  * @param r_idx 倒したモンスターの種族ID
2199  * @return 財宝のsval
2200  * @details
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"
2204  */
2205 static OBJECT_SUBTYPE_VALUE get_coin_type(MONRACE_IDX r_idx)
2206 {
2207         switch (r_idx)
2208         {
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;
2215         }
2216
2217         return 0;
2218 }
2219
2220
2221 /*!
2222  * @brief モンスターが死亡した時の処理 /
2223  * Handle the "death" of a monster.
2224  * @param m_idx 死亡したモンスターのID
2225  * @param drop_item TRUEならばモンスターのドロップ処理を行う
2226  * @return 撃破されたモンスターの述語
2227  * @details
2228  * <pre>
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.
2236  * </pre>
2237  */
2238 void monster_death(player_type *player_ptr, MONSTER_IDX m_idx, bool drop_item)
2239 {
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];
2243
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);
2248
2249         bool drop_chosen_item = drop_item && !cloned && !floor_ptr->inside_arena && !player_ptr->phase_out && !is_pet(m_ptr);
2250
2251         if (current_world_ptr->timewalk_m_idx && current_world_ptr->timewalk_m_idx == m_idx)
2252         {
2253                 current_world_ptr->timewalk_m_idx = 0;
2254         }
2255
2256         if (r_ptr->flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
2257         {
2258                 player_ptr->update |= (PU_MON_LITE);
2259         }
2260
2261         POSITION y = m_ptr->fy;
2262         POSITION x = m_ptr->fx;
2263
2264         if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
2265         {
2266                 GAME_TEXT m_name[MAX_NLEN];
2267
2268                 monster_desc(player_ptr, m_name, m_ptr, MD_INDEF_VISIBLE);
2269                 exe_write_diary(player_ptr, DIARY_NAMED_PET, 3, m_name);
2270         }
2271
2272         for (int i = 0; i < 4; i++)
2273         {
2274                 if (r_ptr->blow[i].method != RBM_EXPLODE) continue;
2275
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);
2281
2282                 project(player_ptr, m_idx, 3, y, x, damage, typ, flg, -1);
2283                 break;
2284         }
2285
2286         if (m_ptr->mflag2 & MFLAG2_CHAMELEON)
2287         {
2288                 choose_new_monster(player_ptr, m_idx, TRUE, MON_CHAMELEON);
2289                 r_ptr = &r_info[m_ptr->r_idx];
2290         }
2291
2292         check_quest_completion(player_ptr, m_ptr);
2293
2294         object_type forge;
2295         object_type *q_ptr;
2296         if (floor_ptr->inside_arena && !is_pet(m_ptr))
2297         {
2298                 player_ptr->exit_bldg = TRUE;
2299                 if (player_ptr->arena_number > MAX_ARENA_MONS)
2300                 {
2301                         msg_print(_("素晴らしい!君こそ真の勝利者だ。", "You are a Genuine Champion!"));
2302                 }
2303                 else
2304                 {
2305                         msg_print(_("勝利!チャンピオンへの道を進んでいる。", "Victorious! You're on your way to becoming Champion."));
2306                 }
2307
2308                 if (arena_info[player_ptr->arena_number].tval)
2309                 {
2310                         q_ptr = &forge;
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);
2314                 }
2315
2316                 if (player_ptr->arena_number > MAX_ARENA_MONS) player_ptr->arena_number++;
2317                 player_ptr->arena_number++;
2318                 if (record_arena)
2319                 {
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);
2323                 }
2324         }
2325         
2326         if (m_idx == player_ptr->riding && rakuba(player_ptr, -1, FALSE))
2327         {
2328                         msg_print(_("地面に落とされた。", "You have fallen from the pet you were riding."));
2329         }
2330
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)));
2334         if (is_drop_corpse)
2335         {
2336                 bool corpse = FALSE;
2337
2338                 if (!(r_ptr->flags9 & RF9_DROP_SKELETON))
2339                         corpse = TRUE;
2340                 else if ((r_ptr->flags9 & RF9_DROP_CORPSE) && (r_ptr->flags1 & RF1_UNIQUE))
2341                         corpse = TRUE;
2342                 else if (r_ptr->flags9 & RF9_DROP_CORPSE)
2343                 {
2344                         if ((0 - ((m_ptr->maxhp) / 4)) > m_ptr->hp)
2345                         {
2346                                 if (one_in_(5)) corpse = TRUE;
2347                         }
2348                         else
2349                         {
2350                                 if (!one_in_(5)) corpse = TRUE;
2351                         }
2352                 }
2353
2354                 q_ptr = &forge;
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);
2359         }
2360
2361         monster_drop_carried_objects(player_ptr, m_ptr);
2362
2363         u32b mo_mode = 0L;
2364         if (r_ptr->flags1 & RF1_DROP_GOOD) mo_mode |= AM_GOOD;
2365         if (r_ptr->flags1 & RF1_DROP_GREAT) mo_mode |= AM_GREAT;
2366
2367         switch (m_ptr->r_idx)
2368         {
2369         case MON_PINK_HORROR:
2370         {
2371                 if (floor_ptr->inside_arena || player_ptr->phase_out) break;
2372
2373                 bool notice = FALSE;
2374                 for (int i = 0; i < 2; i++)
2375                 {
2376                         POSITION wy = y, wx = x;
2377                         bool pet = is_pet(m_ptr);
2378                         BIT_FLAGS mode = 0L;
2379
2380                         if (pet)
2381                         {
2382                                 mode |= PM_FORCE_PET;
2383                         }
2384
2385                         if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_BLUE_HORROR, mode))
2386                         {
2387                                 if (player_can_see_bold(player_ptr, wy, wx)) notice = TRUE;
2388                         }
2389                 }
2390
2391                 if (notice)
2392                 {
2393                         msg_print(_("ピンク・ホラーは分裂した!", "The Pink horror divides!"));
2394                 }
2395
2396                 break;
2397         }
2398         case MON_BLOODLETTER:
2399         {
2400                 if (!drop_chosen_item || (randint1(100) >= 15)) break;
2401
2402                 q_ptr = &forge;
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);
2406                 break;
2407         }
2408         case MON_RAAL:
2409         {
2410                 if (!drop_chosen_item || (floor_ptr->dun_level <= 9)) break;
2411
2412                 q_ptr = &forge;
2413                 object_wipe(q_ptr);
2414                 if ((floor_ptr->dun_level > 49) && one_in_(5))
2415                         get_obj_num_hook = kind_is_good_book;
2416                 else
2417                         get_obj_num_hook = kind_is_book;
2418
2419                 make_object(player_ptr, q_ptr, mo_mode);
2420                 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2421                 break;
2422         }
2423         case MON_DAWN:
2424         {
2425                 if (floor_ptr->inside_arena || player_ptr->phase_out) break;
2426                 if (one_in_(7)) break;
2427
2428                 POSITION wy = y, wx = x;
2429                 int attempts = 100;
2430                 bool pet = is_pet(m_ptr);
2431                 do
2432                 {
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);
2435
2436                 if (attempts <= 0) break;
2437
2438                 BIT_FLAGS mode = 0L;
2439                 if (pet) mode |= PM_FORCE_PET;
2440
2441                 if (summon_specific(player_ptr, (pet ? -1 : m_idx), wy, wx, 100, SUMMON_DAWN, mode))
2442                 {
2443                         if (player_can_see_bold(player_ptr, wy, wx))
2444                                 msg_print(_("新たな戦士が現れた!", "A new warrior steps forth!"));
2445                 }
2446
2447                 break;
2448         }
2449         case MON_UNMAKER:
2450         {
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);
2453                 break;
2454         }
2455         case MON_UNICORN_ORD:
2456         case MON_MORGOTH:
2457         case MON_ONE_RING:
2458         {
2459                 if (player_ptr->pseikaku != SEIKAKU_NAMAKE) break;
2460                 if (!drop_chosen_item) break;
2461
2462                 ARTIFACT_IDX a_idx = 0;
2463                 artifact_type *a_ptr = NULL;
2464                 do
2465                 {
2466                         switch (randint0(3))
2467                         {
2468                         case 0:
2469                                 a_idx = ART_NAMAKE_HAMMER;
2470                                 break;
2471                         case 1:
2472                                 a_idx = ART_NAMAKE_BOW;
2473                                 break;
2474                         case 2:
2475                                 a_idx = ART_NAMAKE_ARMOR;
2476                                 break;
2477                         }
2478
2479                         a_ptr = &a_info[a_idx];
2480                 } while (a_ptr->cur_num);
2481
2482                 if (create_named_art(player_ptr, a_idx, y, x))
2483                 {
2484                         a_ptr->cur_num = 1;
2485                         if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
2486                 }
2487                 else if (!preserve_mode) a_ptr->cur_num = 1;
2488
2489                 break;
2490         }
2491         case MON_SERPENT:
2492         {
2493                 if (!drop_chosen_item) break;
2494
2495                 q_ptr = &forge;
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);
2500                 q_ptr = &forge;
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);
2505                 break;
2506         }
2507         case MON_B_DEATH_SWORD:
2508         {
2509                 if (!drop_chosen_item) break;
2510
2511                 q_ptr = &forge;
2512                 object_prep(q_ptr, lookup_kind(TV_SWORD, randint1(2)));
2513                 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2514                 break;
2515         }
2516         case MON_A_GOLD:
2517         case MON_A_SILVER:
2518         {
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;
2524
2525                 q_ptr = &forge;
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);
2529                 break;
2530         }
2531
2532         case MON_ROLENTO:
2533         {
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);
2536                 break;
2537         }
2538         default:
2539         {
2540                 if (!drop_chosen_item) break;
2541
2542                 switch (r_ptr->d_char)
2543                 {
2544                 case '(':
2545                 {
2546                         if (floor_ptr->dun_level <= 0) break;
2547
2548                         q_ptr = &forge;
2549                         object_wipe(q_ptr);
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);
2553                         break;
2554                 }
2555                 case '/':
2556                 {
2557                         if (floor_ptr->dun_level <= 4) break;
2558
2559                         q_ptr = &forge;
2560                         object_wipe(q_ptr);
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);
2564                         break;
2565                 }
2566                 case '[':
2567                 {
2568                         if (floor_ptr->dun_level <= 19) break;
2569
2570                         q_ptr = &forge;
2571                         object_wipe(q_ptr);
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);
2575                         break;
2576                 }
2577                 case '\\':
2578                 {
2579                         if (floor_ptr->dun_level <= 4) break;
2580                         q_ptr = &forge;
2581                         object_wipe(q_ptr);
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);
2585                         break;
2586                 }
2587                 case '|':
2588                 {
2589                         if (m_ptr->r_idx == MON_STORMBRINGER) break;
2590
2591                         q_ptr = &forge;
2592                         object_wipe(q_ptr);
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);
2596                         break;
2597                 }
2598                 }
2599         }
2600         }
2601
2602         if (drop_chosen_item)
2603         {
2604                 ARTIFACT_IDX a_idx = 0;
2605                 PERCENTAGE chance = 0;
2606                 for (int i = 0; i < 4; i++)
2607                 {
2608                         if (!r_ptr->artifact_id[i]) break;
2609                         a_idx = r_ptr->artifact_id[i];
2610                         chance = r_ptr->artifact_percent[i];
2611                 }
2612
2613                 if ((a_idx > 0) && ((randint0(100) < chance) || current_world_ptr->wizard))
2614                 {
2615                         artifact_type *a_ptr = &a_info[a_idx];
2616                         if (!a_ptr->cur_num)
2617                         {
2618                                 if (create_named_art(player_ptr, a_idx, y, x))
2619                                 {
2620                                         a_ptr->cur_num = 1;
2621                                         if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
2622                                 }
2623                                 else if (!preserve_mode)
2624                                 {
2625                                         a_ptr->cur_num = 1;
2626                                 }
2627                         }
2628                 }
2629
2630                 if ((r_ptr->flags7 & RF7_GUARDIAN) && (d_info[player_ptr->dungeon_idx].final_guardian == m_ptr->r_idx))
2631                 {
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);
2635
2636                         if (d_info[player_ptr->dungeon_idx].final_artifact != 0)
2637                         {
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)
2641                                 {
2642                                         if (create_named_art(player_ptr, a_idx, y, x))
2643                                         {
2644                                                 a_ptr->cur_num = 1;
2645                                                 if (current_world_ptr->character_dungeon) a_ptr->floor_id = player_ptr->floor_id;
2646                                         }
2647                                         else if (!preserve_mode)
2648                                         {
2649                                                 a_ptr->cur_num = 1;
2650                                         }
2651
2652                                         if (!d_info[player_ptr->dungeon_idx].final_object) k_idx = 0;
2653                                 }
2654                         }
2655
2656                         if (k_idx != 0)
2657                         {
2658                                 q_ptr = &forge;
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);
2662                         }
2663
2664                         msg_format(_("あなたは%sを制覇した!", "You have conquered %s!"), d_name + d_info[player_ptr->dungeon_idx].name);
2665                 }
2666         }
2667
2668         int number = 0;
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);
2675
2676         if (cloned && !(r_ptr->flags1 & RF1_UNIQUE))
2677                 number = 0;
2678
2679         if (is_pet(m_ptr) || player_ptr->phase_out || floor_ptr->inside_arena)
2680                 number = 0;
2681
2682         if (!drop_item && (r_ptr->d_char != '$'))
2683                 number = 0;
2684
2685         if ((r_ptr->flags2 & (RF2_MULTIPLY)) && (r_ptr->r_akills > 1024))
2686                 number = 0;
2687
2688         coin_type = force_coin;
2689         floor_ptr->object_level = (floor_ptr->dun_level + r_ptr->level) / 2;
2690
2691         int dump_item = 0;
2692         int dump_gold = 0;
2693         for (int i = 0; i < number; i++)
2694         {
2695                 q_ptr = &forge;
2696                 object_wipe(q_ptr);
2697
2698                 if (do_gold && (!do_item || (randint0(100) < 50)))
2699                 {
2700                         if (!make_gold(floor_ptr, q_ptr)) continue;
2701                         dump_gold++;
2702                 }
2703                 else
2704                 {
2705                         if (!make_object(player_ptr, q_ptr, mo_mode)) continue;
2706                         dump_item++;
2707                 }
2708
2709                 (void)drop_near(player_ptr, q_ptr, -1, y, x);
2710         }
2711
2712         floor_ptr->object_level = floor_ptr->base_level;
2713         coin_type = 0;
2714         bool visible = (m_ptr->ml && !player_ptr->image) || ((r_ptr->flags1 & RF1_UNIQUE) != 0);
2715         if (visible && (dump_item || dump_gold))
2716         {
2717                 lore_treasure(player_ptr, m_idx, dump_item, dump_gold);
2718         }
2719
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;
2723
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, _("見事に変愚蛮怒の勝利者となった!", "finally become *WINNER* of Hengband!"));
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."));
2732 }
2733
2734
2735 /*!
2736  * @brief モンスターを撃破した際の述語メッセージを返す /
2737  * Return monster death string
2738  * @param r_ptr 撃破されたモンスターの種族情報を持つ構造体の参照ポインタ
2739  * @return 撃破されたモンスターの述語
2740  */
2741 concptr extract_note_dies(MONRACE_IDX r_idx)
2742 {
2743         monster_race *r_ptr = &r_info[r_idx];
2744         if (monster_living(r_idx)) return _("は死んだ。", " dies.");
2745
2746         for (int i = 0; i < 4; i++)
2747         {
2748                 if (r_ptr->blow[i].method == RBM_EXPLODE)
2749                 {
2750                         return _("は爆発して粉々になった。", " explodes into tiny shreds.");
2751                 }
2752         }
2753
2754         return _("を倒した。", " is destroyed.");
2755 }
2756
2757
2758 /*
2759  * Monster health description
2760  */
2761 concptr look_mon_desc(monster_type *m_ptr, BIT_FLAGS mode)
2762 {
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;
2765
2766         concptr desc;
2767         if (m_ptr->hp >= m_ptr->maxhp)
2768         {
2769                 desc = living ? _("無傷", "unhurt") : _("無ダメージ", "undamaged");
2770         }
2771         else if (perc >= 60)
2772         {
2773                 desc = living ? _("軽傷", "somewhat wounded") : _("小ダメージ", "somewhat damaged");
2774         }
2775         else if (perc >= 25)
2776         {
2777                 desc = living ? _("負傷", "wounded") : _("中ダメージ", "damaged");
2778         }
2779         else if (perc >= 10)
2780         {
2781                 desc = living ? _("重傷", "badly wounded") : _("大ダメージ", "badly damaged");
2782         }
2783         else
2784         {
2785                 desc = living ? _("半死半生", "almost dead") : _("倒れかけ", "almost destroyed");
2786         }
2787
2788         concptr attitude;
2789         if (!(mode & 0x01))
2790         {
2791                 attitude = "";
2792         }
2793         else if (is_pet(m_ptr))
2794         {
2795                 attitude = _(", ペット", ", pet");
2796         }
2797         else if (is_friendly(m_ptr))
2798         {
2799                 attitude = _(", 友好的", ", friendly");
2800         }
2801         else
2802         {
2803                 attitude = _("", "");
2804         }
2805
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))
2809         {
2810                 return format(_("レベル%d, %s%s%s", "Level %d, %s%s%s"), ap_r_ptr->level, desc, attitude, clone);
2811         }
2812
2813         return format(_("レベル???, %s%s%s", "Level ???, %s%s%s"), desc, attitude, clone);
2814 }
2815
2816
2817 bool is_original_ap_and_seen(player_type *player_ptr, monster_type *m_ptr)
2818 {
2819         return m_ptr->ml && !player_ptr->image && (m_ptr->ap_r_idx == m_ptr->r_idx);
2820 }