OSDN Git Service

[Refactor] #37353 モンスター条件処理を monster1.c と birth.c から monster-hook.c/h へ分離。
[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 "cmd-pet.h"
15 #include "monster-hook.h"
16
17
18 /*
19  * Pronoun arrays, by gender.
20  */
21 static cptr wd_he[3] =
22 #ifdef JP
23 { "それ", "彼", "彼女" };
24 #else
25 { "it", "he", "she" };
26 #endif
27
28 static cptr wd_his[3] =
29 #ifdef JP
30 { "それの", "彼の", "彼女の" };
31 #else
32 { "its", "his", "her" };
33 #endif
34
35
36
37 /*!
38  * 英語の複数系記述用マクロ / Pluralizer.  Args(count, singular, plural)
39  */
40 #define plural(c,s,p) \
41     (((c) == 1) ? (s) : (p))
42
43
44
45 /*!
46  * @brief モンスターのAC情報を得ることができるかを返す / Determine if the "armor" is known
47  * @param r_idx モンスターの種族ID
48  * @return 敵のACを知る条件が満たされているならTRUEを返す
49  * @details
50  * The higher the level, the fewer kills needed.
51  */
52 static bool know_armour(MONRACE_IDX r_idx)
53 {
54         monster_race *r_ptr = &r_info[r_idx];
55
56         s32b level = r_ptr->level;
57
58         s32b kills = r_ptr->r_tkills;
59
60     bool known = (r_ptr->r_cast_spell == MAX_UCHAR)? TRUE: FALSE;
61
62         if (cheat_know || known) return (TRUE);
63
64         /* Normal monsters */
65         if (kills > 304 / (4 + level)) return (TRUE);
66
67         /* Skip non-uniques */
68         if (!(r_ptr->flags1 & RF1_UNIQUE)) return (FALSE);
69
70         /* Unique monsters */
71         if (kills > 304 / (38 + (5 * level) / 4)) return (TRUE);
72
73         /* Assume false */
74         return (FALSE);
75 }
76
77
78 /*!
79  * @brief モンスターの打撃威力を知ることができるかどうかを返す
80  * Determine if the "damage" of the given attack is known
81  * @param r_idx モンスターの種族ID
82  * @param i 確認したい攻撃手番
83  * @return 敵のダメージダイスを知る条件が満たされているならTRUEを返す
84  * @details
85  * <pre>
86  * the higher the level of the monster, the fewer the attacks you need,
87  * the more damage an attack does, the more attacks you need
88  * </pre>
89  */
90 static bool know_damage(MONRACE_IDX r_idx, int i)
91 {
92         monster_race *r_ptr = &r_info[r_idx];
93
94         s32b level = r_ptr->level;
95
96         s32b a = r_ptr->r_blows[i];
97
98         s32b d1 = r_ptr->blow[i].d_dice;
99         s32b d2 = r_ptr->blow[i].d_side;
100
101         s32b d = d1 * d2;
102
103         if (d >= ((4+level)*MAX_UCHAR)/80) d = ((4+level)*MAX_UCHAR-1)/80;
104
105         /* Normal monsters */
106         if ((4 + level) * a > 80 * d) return (TRUE);
107
108         /* Skip non-uniques */
109         if (!(r_ptr->flags1 & RF1_UNIQUE)) return (FALSE);
110
111         /* Unique monsters */
112         if ((4 + level) * (2 * a) > 80 * d) return (TRUE);
113
114         /* Assume false */
115         return (FALSE);
116 }
117
118
119 /*
120  * Prepare hook for c_roff(). It will be changed for spoiler generation in wizard1.c.
121  */
122 void (*hook_c_roff)(byte attr, cptr str) = c_roff;
123
124 /*!
125  * @brief モンスターの思い出メッセージをあらかじめ指定された関数ポインタに基づき出力する
126  * @param str 出力文字列
127  * @return なし
128  */
129 static void hooked_roff(cptr str)
130 {
131         /* Spawn */
132         hook_c_roff(TERM_WHITE, str);
133 }
134
135 /*!
136 * @brief ダイス目を文字列に変換する
137 * @param base_damage 固定値
138 * @param dice_num ダイス数
139 * @param dice_side ダイス面
140 * @param dice_mult ダイス倍率
141 * @param dice_div ダイス除数
142 * @param msg 文字列を格納するポインタ
143 * @return なし
144 */
145 void dice_to_string(int base_damage, int dice_num, int dice_side, int dice_mult, int dice_div, char* msg)
146 {
147     char base[80] = "", dice[80] = "", mult[80]="";
148
149     if (dice_num == 0)
150     {
151         sprintf(msg, "%d", base_damage);
152     }
153     else
154     {
155         if (base_damage != 0)
156             sprintf(base, "%d+", base_damage);
157
158         if (dice_num == 1)
159             sprintf(dice, "d%d", dice_side);
160         else
161             sprintf(dice, "%dd%d", dice_num, dice_side);
162
163         if (dice_mult != 1 || dice_div != 1)
164         {
165             if (dice_div == 1)
166                 sprintf(mult, "*%d", dice_mult);
167             else
168                 sprintf(mult, "*(%d/%d)", dice_mult, dice_div);
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(MONRACE_IDX r_idx, int SPELL_NUM, char* msg, char* tmp)
183 {
184     int base_damage = monspell_race_damage(SPELL_NUM, r_idx, BASE_DAM);
185     int dice_num = monspell_race_damage(SPELL_NUM, r_idx, DICE_NUM);
186     int dice_side = monspell_race_damage(SPELL_NUM, r_idx, DICE_SIDE);
187     int dice_mult = monspell_race_damage(SPELL_NUM, r_idx, DICE_MULT);
188     int dice_div = monspell_race_damage(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  * @brief モンスターの思い出情報を表示する
201  * Hack -- display monster information using "hooked_roff()"
202  * @param r_idx モンスターの種族ID
203  * @param mode 表示オプション
204  * @return なし
205  * @details
206  * This function should only be called with the cursor placed at the
207  * left edge of the screen, on a cleared line, in which the recall is
208  * to take place.  One extra blank line is left after the recall.
209  */
210 static void roff_aux(MONRACE_IDX r_idx, BIT_FLAGS mode)
211 {
212         monster_race    *r_ptr = &r_info[r_idx];
213
214         bool            old = FALSE;
215
216         int             m, n, r;
217
218         cptr            p, q;
219
220 #ifdef JP
221         char            jverb_buf[64];
222 #else
223         bool            sin = FALSE;
224 #endif
225         int             msex = 0;
226
227         bool nightmare = ironman_nightmare && !(mode & 0x02);
228         int speed = nightmare ? r_ptr->speed + 5 : r_ptr->speed;
229
230         bool            breath = FALSE;
231         bool            magic = FALSE;
232         bool            reinforce = FALSE;
233
234         BIT_FLAGS flags1;
235         BIT_FLAGS flags2;
236         BIT_FLAGS flags3;
237         BIT_FLAGS flags4;
238         BIT_FLAGS a_ability_flags1;
239         BIT_FLAGS a_ability_flags2;
240         BIT_FLAGS flags7;
241         BIT_FLAGS flagsr;
242
243         ITEM_NUMBER drop_gold, drop_item;
244
245         int             vn = 0;
246         byte            color[96];
247         cptr            vp[96];
248         char tmp_msg[96][96];
249
250         bool know_everything = FALSE;
251
252         /* Obtain a copy of the "known" number of drops */
253         drop_gold = r_ptr->r_drop_gold;
254         drop_item = r_ptr->r_drop_item;
255
256         /* Obtain a copy of the "known" flags */
257         flags1 = (r_ptr->flags1 & r_ptr->r_flags1);
258         flags2 = (r_ptr->flags2 & r_ptr->r_flags2);
259         flags3 = (r_ptr->flags3 & r_ptr->r_flags3);
260         flags4 = (r_ptr->flags4 & r_ptr->r_flags4);
261         a_ability_flags1 = (r_ptr->a_ability_flags1 & r_ptr->r_flags5);
262         a_ability_flags2 = (r_ptr->a_ability_flags2 & r_ptr->r_flags6);
263         flags7 = (r_ptr->flags7 & r_ptr->flags7);
264         flagsr = (r_ptr->flagsr & r_ptr->r_flagsr);
265
266         for(n = 0; n < 6; n++)
267         {
268                 if(r_ptr->reinforce_id[n] > 0) reinforce = TRUE;
269         }
270
271         /* cheat_know or research_mon() */
272         if (cheat_know || (mode & 0x01))
273                 know_everything = TRUE;
274
275         /* Cheat -- Know everything */
276         if (know_everything)
277         {
278                 /* Hack -- maximal drops */
279                 drop_gold = drop_item =
280                 (((r_ptr->flags1 & RF1_DROP_4D2) ? 8 : 0) +
281                  ((r_ptr->flags1 & RF1_DROP_3D2) ? 6 : 0) +
282                  ((r_ptr->flags1 & RF1_DROP_2D2) ? 4 : 0) +
283                  ((r_ptr->flags1 & RF1_DROP_1D2) ? 2 : 0) +
284                  ((r_ptr->flags1 & RF1_DROP_90)  ? 1 : 0) +
285                  ((r_ptr->flags1 & RF1_DROP_60)  ? 1 : 0));
286
287                 /* Hack -- but only "valid" drops */
288                 if (r_ptr->flags1 & RF1_ONLY_GOLD) drop_item = 0;
289                 if (r_ptr->flags1 & RF1_ONLY_ITEM) drop_gold = 0;
290
291                 /* Hack -- know all the flags */
292                 flags1 = r_ptr->flags1;
293                 flags2 = r_ptr->flags2;
294                 flags3 = r_ptr->flags3;
295                 flags4 = r_ptr->flags4;
296                 a_ability_flags1 = r_ptr->a_ability_flags1;
297                 a_ability_flags2 = r_ptr->a_ability_flags2;
298                 flagsr = r_ptr->flagsr;
299         }
300
301
302         /* Extract a gender (if applicable) */
303         if (r_ptr->flags1 & RF1_FEMALE) msex = 2;
304         else if (r_ptr->flags1 & RF1_MALE) msex = 1;
305
306         /* Assume some "obvious" flags */
307         if (r_ptr->flags1 & RF1_UNIQUE)  flags1 |= (RF1_UNIQUE);
308         if (r_ptr->flags1 & RF1_QUESTOR) flags1 |= (RF1_QUESTOR);
309         if (r_ptr->flags1 & RF1_MALE)    flags1 |= (RF1_MALE);
310         if (r_ptr->flags1 & RF1_FEMALE)  flags1 |= (RF1_FEMALE);
311
312         /* Assume some "creation" flags */
313         if (r_ptr->flags1 & RF1_FRIENDS) flags1 |= (RF1_FRIENDS);
314         if (r_ptr->flags1 & RF1_ESCORT)  flags1 |= (RF1_ESCORT);
315         if (r_ptr->flags1 & RF1_ESCORTS) flags1 |= (RF1_ESCORTS);
316
317         /* Killing a monster reveals some properties */
318         if (r_ptr->r_tkills || know_everything)
319         {
320                 /* Know "race" flags */
321                 if (r_ptr->flags3 & RF3_ORC)      flags3 |= (RF3_ORC);
322                 if (r_ptr->flags3 & RF3_TROLL)    flags3 |= (RF3_TROLL);
323                 if (r_ptr->flags3 & RF3_GIANT)    flags3 |= (RF3_GIANT);
324                 if (r_ptr->flags3 & RF3_DRAGON)   flags3 |= (RF3_DRAGON);
325                 if (r_ptr->flags3 & RF3_DEMON)    flags3 |= (RF3_DEMON);
326                 if (r_ptr->flags3 & RF3_UNDEAD)   flags3 |= (RF3_UNDEAD);
327                 if (r_ptr->flags3 & RF3_EVIL)     flags3 |= (RF3_EVIL);
328                 if (r_ptr->flags3 & RF3_GOOD)     flags3 |= (RF3_GOOD);
329                 if (r_ptr->flags3 & RF3_ANIMAL)   flags3 |= (RF3_ANIMAL);
330                 if (r_ptr->flags3 & RF3_AMBERITE) flags3 |= (RF3_AMBERITE);
331                 if (r_ptr->flags2 & RF2_HUMAN)    flags2 |= (RF2_HUMAN);
332
333                 /* Know 'quantum' flag */
334                 if (r_ptr->flags2 & RF2_QUANTUM)  flags2 |= (RF2_QUANTUM);
335
336                 /* Know "forced" flags */
337                 if (r_ptr->flags1 & RF1_FORCE_DEPTH) flags1 |= (RF1_FORCE_DEPTH);
338                 if (r_ptr->flags1 & RF1_FORCE_MAXHP) flags1 |= (RF1_FORCE_MAXHP);
339         }
340
341         /* For output_monster_spoiler() */
342         if (mode & 0x02)
343         {
344                 /* Nothing to do */
345         }
346         else
347
348         /* Treat uniques differently */
349         if (flags1 & RF1_UNIQUE)
350         {
351                 /* Hack -- Determine if the unique is "dead" */
352                 bool dead = (r_ptr->max_num == 0) ? TRUE : FALSE;
353
354                 /* We've been killed... */
355                 if (r_ptr->r_deaths)
356                 {
357                         /* Killed ancestors */
358                         hooked_roff(format(_("%^sはあなたの先祖を %d 人葬っている", "%^s has slain %d of your ancestors"),
359                                            wd_he[msex], r_ptr->r_deaths));
360
361                         /* But we've also killed it */
362                         if (dead)
363                         {
364                                 hooked_roff(format(
365                                         _("が、すでに仇討ちは果たしている!", 
366                                          (", but you have avenged %s!  ", plural(r_ptr->r_deaths, "him", "them")))));
367                         }
368
369                         /* Unavenged (ever) */
370                         else
371                         {
372                                 hooked_roff(format(
373                                         _("のに、まだ仇討ちを果たしていない。", 
374                                          (", who %s unavenged.  ", plural(r_ptr->r_deaths, "remains", "remain")))));
375                         }
376
377                         /* Start a new line */
378                         hooked_roff("\n");
379                 }
380
381                 /* Dead unique who never hurt us */
382                 else if (dead)
383                 {
384                         hooked_roff(_("あなたはこの仇敵をすでに葬り去っている。", "You have slain this foe.  "));
385
386                         /* Start a new line */
387                         hooked_roff("\n");
388                 }
389         }
390
391         /* Not unique, but killed us */
392         else if (r_ptr->r_deaths)
393         {
394                 /* Dead ancestors */
395                 hooked_roff(
396                         _(format("このモンスターはあなたの先祖を %d 人葬っている", r_ptr->r_deaths),
397                           format("%d of your ancestors %s been killed by this creature, ", r_ptr->r_deaths, plural(r_ptr->r_deaths, "has", "have"))));
398
399                 /* Some kills this life */
400                 if (r_ptr->r_pkills)
401                 {
402                         hooked_roff(format(
403                                 _("が、あなたはこのモンスターを少なくとも %d 体は倒している。", 
404                                  "and you have exterminated at least %d of the creatures.  "), r_ptr->r_pkills));
405                 }
406
407                 /* Some kills past lives */
408                 else if (r_ptr->r_tkills)
409                 {
410                         hooked_roff(format(
411                                 _("が、あなたの先祖はこのモンスターを少なくとも %d 体は倒している。", 
412                                   "and your ancestors have exterminated at least %d of the creatures.  "), r_ptr->r_tkills));
413                 }
414
415                 /* No kills */
416                 else
417                 {
418                         hooked_roff(format(
419                                 _("が、まだ%sを倒したことはない。", 
420                                   "and %s is not ever known to have been defeated.  "), wd_he[msex]));
421                 }
422
423                 /* Start a new line */
424                 hooked_roff("\n");
425         }
426
427         /* Normal monsters */
428         else
429         {
430                 /* Killed some this life */
431                 if (r_ptr->r_pkills)
432                 {
433                         hooked_roff(format(
434                                 _("あなたはこのモンスターを少なくとも %d 体は殺している。",
435                                   "You have killed at least %d of these creatures.  "), r_ptr->r_pkills));
436                 }
437
438                 /* Killed some last life */
439                 else if (r_ptr->r_tkills)
440                 {
441                         hooked_roff(format(
442                                 _("あなたの先祖はこのモンスターを少なくとも %d 体は殺している。", 
443                                   "Your ancestors have killed at least %d of these creatures.  "), r_ptr->r_tkills));
444                 }
445
446                 /* Killed none */
447                 else
448                 {
449                         hooked_roff(_("このモンスターを倒したことはない。", "No battles to the death are recalled.  "));
450                 }
451
452                 /* Start a new line */
453                 hooked_roff("\n");
454         }
455
456         /* Descriptions */
457         {
458                 cptr tmp = r_text + r_ptr->text;
459
460                 if (tmp[0])
461                 {
462                         /* Dump it */
463                         hooked_roff(tmp);
464
465                         /* Start a new line */
466                         hooked_roff("\n");
467                 }
468         }
469
470         if (r_idx == MON_KAGE)
471         {
472                 /* All done */
473                 hooked_roff("\n");
474
475                 return;
476         }
477
478         /* Nothing yet */
479         old = FALSE;
480
481         /* Describe location */
482         if (r_ptr->level == 0)
483         {
484                 hooked_roff(format(_("%^sは町に住み", "%^s lives in the town"), wd_he[msex]));
485                 old = TRUE;
486         }
487         else if (r_ptr->r_tkills || know_everything)
488         {
489                 if (depth_in_feet)
490                 {
491                         hooked_roff(format(
492                                 _("%^sは通常地下 %d フィートで出現し", "%^s is normally found at depths of %d feet"),
493                                   wd_he[msex], r_ptr->level * 50));
494                 }
495                 else
496                 {
497                         hooked_roff(format(
498                                 _("%^sは通常地下 %d 階で出現し", "%^s is normally found on dungeon level %d"),
499                                   wd_he[msex], r_ptr->level));
500                 }
501                 old = TRUE;
502         }
503
504
505         /* Describe movement */
506         if (r_idx == MON_CHAMELEON)
507         {
508                 hooked_roff(_("、他のモンスターに化ける。", "and can take the shape of other monster."));
509                 return;
510         }
511         else
512         {
513                 /* Introduction */
514                 if (old)
515                 {
516                         hooked_roff(_("、", ", and "));
517                 }
518                 else
519                 {
520                         hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
521                         old = TRUE;
522                 }
523 #ifndef JP
524                 hooked_roff("moves");
525 #endif
526
527                 /* Random-ness */
528                 if ((flags1 & RF1_RAND_50) || (flags1 & RF1_RAND_25))
529                 {
530                         /* Adverb */
531                         if ((flags1 & RF1_RAND_50) && (flags1 & RF1_RAND_25))
532                         {
533                                 hooked_roff(_("かなり", " extremely"));
534                         }
535                         else if (flags1 & RF1_RAND_50)
536                         {
537                                 hooked_roff(_("幾分", " somewhat"));
538                         }
539                         else if (flags1 & RF1_RAND_25)
540                         {
541                                 hooked_roff(_("少々", " a bit"));
542                         }
543
544                         /* Adjective */
545                         hooked_roff(_("不規則に", " erratically"));
546
547                         /* Hack -- Occasional conjunction */
548                         if (speed != 110) hooked_roff(_("、かつ", ", and"));
549                 }
550
551                 /* Speed */
552                 if (speed > 110)
553                 {
554                         if (speed > 139) hook_c_roff(TERM_RED, _("信じ難いほど", " incredibly"));
555                         else if (speed > 134) hook_c_roff(TERM_ORANGE, _("猛烈に", " extremely"));
556                         else if (speed > 129) hook_c_roff(TERM_ORANGE, _("非常に", " very"));
557                         else if (speed > 124) hook_c_roff(TERM_UMBER, _("かなり", " fairly"));
558                         else if (speed < 120) hook_c_roff(TERM_L_UMBER, _("やや", " somewhat"));
559                         hook_c_roff(TERM_L_RED, _("素早く", " quickly"));
560                 }
561                 else if (speed < 110)
562                 {
563                         if (speed < 90) hook_c_roff(TERM_L_GREEN, _("信じ難いほど", " incredibly"));
564                         else if (speed < 95) hook_c_roff(TERM_BLUE, _("非常に", " very"));
565                         else if (speed < 100) hook_c_roff(TERM_BLUE, _("かなり", " fairly"));
566                         else if (speed > 104) hook_c_roff(TERM_GREEN, _("やや", " somewhat"));
567                         hook_c_roff(TERM_L_BLUE, _("ゆっくりと", " slowly"));
568                 }
569                 else
570                 {
571                         hooked_roff(_("普通の速さで", " at normal speed"));
572                 }
573 #ifdef JP
574                 hooked_roff("動いている");
575 #endif
576         }
577
578         /* The code above includes "attack speed" */
579         if (flags1 & RF1_NEVER_MOVE)
580         {
581                 /* Introduce */
582                 if (old)
583                 {
584                         hooked_roff(_("、しかし", ", but "));
585                 }
586                 else
587                 {
588                         hooked_roff(format(_("%^sは", "%^s "), wd_he[msex]));
589                         old = TRUE;
590                 }
591
592                 /* Describe */
593                 hooked_roff(_("侵入者を追跡しない", "does not deign to chase intruders"));
594         }
595
596         /* End this sentence */
597         if (old)
598         {
599                 hooked_roff(_("。", ".  "));
600                 old = FALSE;
601         }
602
603
604         /* Describe experience if known */
605         if (r_ptr->r_tkills || know_everything)
606         {
607                 /* Introduction */
608 #ifdef JP
609                 hooked_roff("この");
610 #else
611                 if (flags1 & RF1_UNIQUE)
612                 {
613                         hooked_roff("Killing this");
614                 }
615                 else
616                 {
617                         hooked_roff("A kill of this");
618                 }
619 #endif
620
621
622                 /* Describe the "quality" */
623                 if (flags2 & RF2_ELDRITCH_HORROR) hook_c_roff(TERM_VIOLET, _("狂気を誘う", " sanity-blasting"));/*nuke me*/
624                 if (flags3 & RF3_ANIMAL)          hook_c_roff(TERM_L_GREEN, _("自然界の", " natural"));
625                 if (flags3 & RF3_EVIL)            hook_c_roff(TERM_L_DARK, _("邪悪なる", " evil"));
626                 if (flags3 & RF3_GOOD)            hook_c_roff(TERM_YELLOW, _("善良な", " good"));
627                 if (flags3 & RF3_UNDEAD)          hook_c_roff(TERM_VIOLET, _("アンデッドの", " undead"));
628                 if (flags3 & RF3_AMBERITE)        hook_c_roff(TERM_VIOLET, _("アンバーの王族の", " Amberite"));
629
630                 if ((flags3 & (RF3_DRAGON | RF3_DEMON | RF3_GIANT | RF3_TROLL | RF3_ORC | RF3_ANGEL)) || (flags2 & (RF2_QUANTUM | RF2_HUMAN)))
631                 {
632                 /* Describe the "race" */
633                         if (flags3 & RF3_DRAGON)   hook_c_roff(TERM_ORANGE, _("ドラゴン", " dragon"));
634                         if (flags3 & RF3_DEMON)    hook_c_roff(TERM_VIOLET, _("デーモン", " demon"));
635                         if (flags3 & RF3_GIANT)    hook_c_roff(TERM_L_UMBER, _("ジャイアント", " giant"));
636                         if (flags3 & RF3_TROLL)    hook_c_roff(TERM_BLUE, _("トロル", " troll"));
637                         if (flags3 & RF3_ORC)      hook_c_roff(TERM_UMBER, _("オーク", " orc"));
638                         if (flags2 & RF2_HUMAN)    hook_c_roff(TERM_L_WHITE, _("人間", " human"));
639                         if (flags2 & RF2_QUANTUM)  hook_c_roff(TERM_VIOLET, _("量子生物", " quantum creature"));
640                         if (flags3 & RF3_ANGEL)    hook_c_roff(TERM_YELLOW, _("天使", " angel"));
641                 }
642                 else
643                 {
644                         hooked_roff(_("モンスター", " creature"));
645                 }
646
647 #ifdef JP
648                 hooked_roff("を倒すことは");
649 #endif
650                 /* Group some variables */
651                 {
652                         long i, j;
653
654                         /* calculate the integer exp part */
655                         i = (long)r_ptr->mexp * r_ptr->level / (p_ptr->max_plv + 2) * 3 / 2;
656
657                         /* calculate the fractional exp part scaled by 100, */
658                         /* must use long arithmetic to avoid overflow  */
659                         j = ((((long)r_ptr->mexp * r_ptr->level % (p_ptr->max_plv + 2) * 3 / 2) *
660                                 (long)1000 / (p_ptr->max_plv + 2) + 5) / 10);
661
662 #ifdef JP
663                         hooked_roff(format(" %d レベルのキャラクタにとって 約%ld.%02ld ポイントの経験となる。",
664                                 p_ptr->lev, (long)i, (long)j ));
665 #else
666
667                         /* Mention the experience */
668                         hooked_roff(format(" is worth about %ld.%02ld point%s for level %d player",
669                                 (long)i, (long)j,
670                                 (((i == 1) && (j == 0)) ? "" : "s")), p_ptr->lev);
671
672                         /* Take account of annoying English */
673                         p = "th";
674                         i = p_ptr->lev % 10;
675                         if ((p_ptr->lev / 10) == 1) /* nothing */;
676                         else if (i == 1) p = "st";
677                         else if (i == 2) p = "nd";
678                         else if (i == 3) p = "rd";
679
680                         /* Take account of "leading vowels" in numbers */
681                         q = "";
682                         i = p_ptr->lev;
683                         if ((i == 8) || (i == 11) || (i == 18)) q = "n";
684
685                         /* Mention the dependance on the player's level */
686                         hooked_roff(format(" for a%s %lu%s level character.  ",
687                                     q, (long)i, p));
688 #endif
689
690                 }
691         }
692
693         if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC) && (flags3 & RF3_AURA_COLD))
694         {
695                 hook_c_roff(TERM_VIOLET, format(
696                         _("%^sは炎と氷とスパークに包まれている。", "%^s is surrounded by flames, ice and electricity.  "), wd_he[msex]));
697         }
698         else if ((flags2 & RF2_AURA_FIRE) && (flags2 & RF2_AURA_ELEC))
699         {
700                 hook_c_roff(TERM_L_RED, format(
701                         _("%^sは炎とスパークに包まれている。", "%^s is surrounded by flames and electricity.  "), wd_he[msex]));
702         }
703         else if ((flags2 & RF2_AURA_FIRE) && (flags3 & RF3_AURA_COLD))
704         {
705                 hook_c_roff(TERM_BLUE, format(
706                         _("%^sは炎と氷に包まれている。", "%^s is surrounded by flames and ice.  "), wd_he[msex]));
707         }
708         else if ((flags3 & RF3_AURA_COLD) && (flags2 & RF2_AURA_ELEC))
709         {
710                 hook_c_roff(TERM_L_GREEN, format(
711                         _("%^sは氷とスパークに包まれている。", "%^s is surrounded by ice and electricity.  "), wd_he[msex]));
712         }
713         else if (flags2 & RF2_AURA_FIRE)
714         {
715                 hook_c_roff(TERM_RED, format(
716                         _("%^sは炎に包まれている。", "%^s is surrounded by flames.  "), wd_he[msex]));
717         }
718         else if (flags3 & RF3_AURA_COLD)
719         {
720                 hook_c_roff(TERM_BLUE, format(
721                         _("%^sは氷に包まれている。", "%^s is surrounded by ice.  "), wd_he[msex]));
722         }
723         else if (flags2 & RF2_AURA_ELEC)
724         {
725                 hook_c_roff(TERM_L_BLUE, format(
726                         _("%^sはスパークに包まれている。", "%^s is surrounded by electricity.  "), wd_he[msex]));
727         }
728
729         if (flags2 & RF2_REFLECTING)
730                 hooked_roff(format(_("%^sは矢の呪文を跳ね返す。", "%^s reflects bolt spells.  "), wd_he[msex]));
731
732         /* Describe escorts */
733         if ((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS) || reinforce)
734         {
735                 hooked_roff(format(
736                         _("%^sは通常護衛を伴って現れる。", "%^s usually appears with escorts.  "), wd_he[msex]));
737
738                 if(reinforce)
739                 {
740                         hooked_roff(_("護衛の構成は", "These escorts"));
741                         if((flags1 & RF1_ESCORT) || (flags1 & RF1_ESCORTS))
742                         {
743                                 hooked_roff(_("少なくとも", " at the least"));
744                         }
745 #ifndef JP
746                         hooked_roff(" contain ");
747 #endif                  
748                         for(n = 0; n < 6; n++)
749                         {
750                                 if(r_ptr->reinforce_id[n] && r_ptr->reinforce_dd[n] && r_ptr->reinforce_ds[n])
751                                 {
752                                         monster_race *rf_ptr = &r_info[r_ptr->reinforce_id[n]];
753                                         if(rf_ptr->flags1 & RF1_UNIQUE)
754                                         {
755                                                 hooked_roff(format(_("、%s", ", %s"), r_name + rf_ptr->name));
756                                         }
757                                         else
758                                         {
759 #ifdef JP
760                                                 hooked_roff(format("、 %dd%d 体の%s", r_ptr->reinforce_dd[n], r_ptr->reinforce_ds[n],
761                                                         r_name + rf_ptr->name));
762 #else
763                                                 bool plural = (r_ptr->reinforce_dd[n] * r_ptr->reinforce_ds[n] > 1);
764                                                 char name[80];
765                                                 strcpy(name, r_name + rf_ptr->name);
766                                                 if(plural) plural_aux(name);
767                                                 hooked_roff(format(",%dd%d %s", r_ptr->reinforce_dd[n], r_ptr->reinforce_ds[n], name));
768 #endif
769                                         }
770                                 }
771                         }
772                         hooked_roff(_("で成り立っている。", "."));
773                 }
774         }
775
776         /* Describe friends */
777         else if (flags1 & RF1_FRIENDS)
778         {
779                 hooked_roff(format(_("%^sは通常集団で現れる。", "%^s usually appears in groups.  "), wd_he[msex]));
780         }
781
782
783         /* Collect inate attacks */
784         vn = 0;
785         if (flags4 & RF4_SHRIEK)  { vp[vn] = _("悲鳴で助けを求める", "shriek for help"); color[vn++] = TERM_L_WHITE; }
786         if (flags4 & RF4_ROCKET)  
787     {
788                 set_damage(r_idx, (MS_ROCKET), _("ロケット%sを発射する", "shoot a rocket%s"), tmp_msg[vn]);
789         vp[vn] = tmp_msg[vn];
790         color[vn++] = TERM_UMBER; 
791     }
792     
793         if (flags4 & RF4_SHOOT)
794         { 
795                 for (r = 0, m = 0; m < 4; m++)
796                 {
797                         if (r_ptr->blow[m].method == RBM_SHOOT)
798             {
799                 if (know_armour(r_idx))
800                                     sprintf(tmp_msg[vn], _("威力 %dd%d の射撃をする","fire an arrow (Power:%dd%d)"), r_ptr->blow[m].d_side, r_ptr->blow[m].d_dice);
801                 else
802                     sprintf(tmp_msg[vn], _("射撃をする", "fire an arrow"));
803                 vp[vn] = tmp_msg[vn]; color[vn++] = TERM_UMBER;
804                                 break;
805                         }
806                 }               
807         }
808         if (a_ability_flags2 & (RF6_SPECIAL)) { vp[vn] = _("特別な行動をする", "do something"); color[vn++] = TERM_VIOLET; }
809
810         /* Describe inate attacks */
811         if (vn)
812         {
813                 /* Intro */
814                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
815
816
817                 /* Scan */
818                 for (n = 0; n < vn; n++)
819                 {
820 #ifdef JP
821                         if (n != vn - 1)
822                         {
823                                 jverb(vp[n], jverb_buf, JVERB_OR);
824                                 hook_c_roff(color[n], jverb_buf);
825                                 hook_c_roff(color[n], "り");
826                                 hooked_roff("、");
827                         }
828                         else hook_c_roff(color[n], vp[n]);
829 #else
830                         /* Intro */
831                         if (n == 0) hooked_roff(" may ");
832                         else if (n < vn - 1) hooked_roff(", ");
833                         else hooked_roff(" or ");
834
835                         /* Dump */
836                         hook_c_roff(color[n], vp[n]);
837 #endif
838
839                 }
840
841                 /* End */
842                 hooked_roff(_("ことがある。", ".  "));
843         }
844
845
846         /* Collect breaths */
847         vn = 0;
848         if (flags4 & (RF4_BR_ACID))             
849         { 
850                 set_damage(r_idx, (MS_BR_ACID), _("酸%s", "acid%s"), tmp_msg[vn]);
851         vp[vn] = tmp_msg[vn];
852                 color[vn++] = TERM_GREEN; 
853         }
854         if (flags4 & (RF4_BR_ELEC))             
855         { 
856                 set_damage(r_idx, (MS_BR_ELEC), _("稲妻%s", "lightning%s"), tmp_msg[vn]);
857         vp[vn] = tmp_msg[vn];
858                 color[vn++] = TERM_BLUE; 
859         }
860         if (flags4 & (RF4_BR_FIRE))             
861         { 
862                 set_damage(r_idx, (MS_BR_FIRE), _("火炎%s", "fire%s"), tmp_msg[vn]);
863         vp[vn] = tmp_msg[vn];
864                 color[vn++] = TERM_RED; 
865         }
866         if (flags4 & (RF4_BR_COLD))             
867         { 
868                 set_damage(r_idx, (MS_BR_COLD), _("冷気%s", "frost%s"), tmp_msg[vn]);
869         vp[vn] = tmp_msg[vn];
870                 color[vn++] = TERM_L_WHITE; 
871         }
872         if (flags4 & (RF4_BR_POIS))             
873         { 
874                 set_damage(r_idx, (MS_BR_POIS), _("毒%s", "poison%s"), tmp_msg[vn]);
875         vp[vn] = tmp_msg[vn];
876                 color[vn++] = TERM_L_GREEN; 
877         }
878         if (flags4 & (RF4_BR_NETH))
879         { 
880                 set_damage(r_idx, (MS_BR_NETHER), _("地獄%s", "nether%s"), tmp_msg[vn]);
881         vp[vn] = tmp_msg[vn];
882                 color[vn++] = TERM_L_DARK; 
883         }
884         if (flags4 & (RF4_BR_LITE))             
885         { 
886                 set_damage(r_idx, (MS_BR_LITE), _("閃光%s", "light%s"), tmp_msg[vn]);
887         vp[vn] = tmp_msg[vn];
888                 color[vn++] = TERM_YELLOW; 
889         }
890         if (flags4 & (RF4_BR_DARK))             
891         { 
892                 set_damage(r_idx, (MS_BR_DARK), _("暗黒%s", "darkness%s"), tmp_msg[vn]);
893         vp[vn] = tmp_msg[vn];
894                 color[vn++] = TERM_L_DARK; 
895         }
896         if (flags4 & (RF4_BR_CONF))
897         { 
898                 set_damage(r_idx, (MS_BR_CONF), _("混乱%s", "confusion%s"), tmp_msg[vn]);
899         vp[vn] = tmp_msg[vn];
900                 color[vn++] = TERM_L_UMBER; 
901         }
902         if (flags4 & (RF4_BR_SOUN))             
903         {
904                 set_damage(r_idx, (MS_BR_SOUND), _("轟音%s", "sound%s"), tmp_msg[vn]);
905         vp[vn] = tmp_msg[vn];
906                 color[vn++] = TERM_ORANGE; 
907         }
908         if (flags4 & (RF4_BR_CHAO))             
909         { 
910                 set_damage(r_idx, (MS_BR_CHAOS), _("カオス%s", "chaos%s"), tmp_msg[vn]);
911         vp[vn] = tmp_msg[vn];
912                 color[vn++] = TERM_VIOLET; 
913         }
914         if (flags4 & (RF4_BR_DISE))             
915         { 
916                 set_damage(r_idx, (MS_BR_DISEN), _("劣化%s", "disenchantment%s"), tmp_msg[vn]);
917         vp[vn] = tmp_msg[vn];
918                 color[vn++] = TERM_VIOLET; 
919         }
920         if (flags4 & (RF4_BR_NEXU))             
921         { 
922                 set_damage(r_idx, (MS_BR_NEXUS), _("因果混乱%s", "nexus%s"), tmp_msg[vn]);
923         vp[vn] = tmp_msg[vn];
924                 color[vn++] = TERM_VIOLET; 
925         }
926         if (flags4 & (RF4_BR_TIME))             
927         { 
928                 set_damage(r_idx, (MS_BR_TIME), _("時間逆転%s", "time%s"), tmp_msg[vn]);
929         vp[vn] = tmp_msg[vn];
930                 color[vn++] = TERM_L_BLUE; 
931         }
932         if (flags4 & (RF4_BR_INER))             
933         { 
934                 set_damage(r_idx, (MS_BR_INERTIA), _("遅鈍%s", "inertia%s"), tmp_msg[vn]);
935         vp[vn] = tmp_msg[vn];
936                 color[vn++] = TERM_SLATE; 
937         }
938         if (flags4 & (RF4_BR_GRAV))             
939         { 
940                 set_damage(r_idx, (MS_BR_GRAVITY), _("重力%s", "gravity%s"), tmp_msg[vn]);
941         vp[vn] = tmp_msg[vn];
942                 color[vn++] = TERM_SLATE; 
943         }
944         if (flags4 & (RF4_BR_SHAR))             
945         { 
946                 set_damage(r_idx, (MS_BR_SHARDS), _("破片%s", "shards%s"), tmp_msg[vn]);
947         vp[vn] = tmp_msg[vn];
948                 color[vn++] = TERM_L_UMBER; 
949         }
950         if (flags4 & (RF4_BR_PLAS))             
951         { 
952                 set_damage(r_idx, (MS_BR_PLASMA), _("プラズマ%s", "plasma%s"), tmp_msg[vn]);
953         vp[vn] = tmp_msg[vn];
954                 color[vn++] = TERM_L_RED; 
955         }
956         if (flags4 & (RF4_BR_WALL))             
957         { 
958                 set_damage(r_idx, (MS_BR_FORCE), _("フォース%s", "force%s"), tmp_msg[vn]);
959         vp[vn] = tmp_msg[vn];
960                 color[vn++] = TERM_UMBER; 
961         }
962         if (flags4 & (RF4_BR_MANA))             
963         { 
964                 set_damage(r_idx, (MS_BR_MANA), _("魔力%s", "mana%s"), tmp_msg[vn]);
965         vp[vn] = tmp_msg[vn];
966                 color[vn++] = TERM_L_BLUE; 
967         }
968         if (flags4 & (RF4_BR_NUKE))             
969         { 
970                 set_damage(r_idx, (MS_BR_NUKE), _("放射性廃棄物%s", "toxic waste%s"), tmp_msg[vn]);
971         vp[vn] = tmp_msg[vn];
972                 color[vn++] = TERM_L_GREEN; 
973         }
974         if (flags4 & (RF4_BR_DISI))             
975         { 
976                 set_damage(r_idx, (MS_BR_DISI), _("分解%s", "disintegration%s"), tmp_msg[vn]);
977         vp[vn] = tmp_msg[vn];
978                 color[vn++] = TERM_SLATE; 
979         }
980
981         /* Describe breaths */
982         if (vn)
983         {
984                 /* Note breath */
985                 breath = TRUE;
986
987                 /* Intro */
988                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
989
990                 /* Scan */
991                 for (n = 0; n < vn; n++)
992                 {
993                         /* Intro */
994 #ifdef JP
995                         if ( n != 0 ) hooked_roff("や");
996 #else
997                         if (n == 0) hooked_roff(" may breathe ");
998                         else if (n < vn-1) hooked_roff(", ");
999                         else hooked_roff(" or ");
1000 #endif
1001
1002
1003                         /* Dump */
1004                         hook_c_roff(color[n], vp[n]);
1005                 }
1006 #ifdef JP
1007                 hooked_roff("のブレスを吐くことがある");
1008 #endif
1009         }
1010
1011
1012         /* Collect spells */
1013         vn = 0;
1014         if (a_ability_flags1 & (RF5_BA_ACID))         
1015         {
1016                 set_damage(r_idx, (MS_BALL_ACID), _("アシッド・ボール%s", "produce acid balls%s"), tmp_msg[vn]);
1017         vp[vn] = tmp_msg[vn];
1018                 color[vn++] = TERM_GREEN;
1019         }
1020         if (a_ability_flags1 & (RF5_BA_ELEC))         
1021         {
1022                 set_damage(r_idx, (MS_BALL_ELEC), _("サンダー・ボール%s", "produce lightning balls%s"), tmp_msg[vn]);
1023         vp[vn] = tmp_msg[vn];
1024                 color[vn++] = TERM_BLUE;
1025         }
1026         if (a_ability_flags1 & (RF5_BA_FIRE))         
1027         {
1028                 set_damage(r_idx, (MS_BALL_FIRE), _("ファイア・ボール%s", "produce fire balls%s"), tmp_msg[vn]);
1029         vp[vn] = tmp_msg[vn];
1030                 color[vn++] = TERM_RED;
1031         }
1032         if (a_ability_flags1 & (RF5_BA_COLD))         
1033         {
1034                 set_damage(r_idx, (MS_BALL_COLD), _("アイス・ボール%s", "produce frost balls%s"), tmp_msg[vn]);
1035         vp[vn] = tmp_msg[vn];
1036                 color[vn++] = TERM_L_WHITE;
1037         }
1038         if (a_ability_flags1 & (RF5_BA_POIS))         
1039         {
1040                 set_damage(r_idx, (MS_BALL_POIS), _("悪臭雲%s", "produce poison balls%s"), tmp_msg[vn]);
1041         vp[vn] = tmp_msg[vn];
1042                 color[vn++] = TERM_L_GREEN;
1043         }
1044         if (a_ability_flags1 & (RF5_BA_NETH))         
1045         {
1046                 set_damage(r_idx, (MS_BALL_NETHER), _("地獄球%s", "produce nether balls%s"), tmp_msg[vn]);
1047         vp[vn] = tmp_msg[vn];
1048                 color[vn++] = TERM_L_DARK;
1049         }
1050         if (a_ability_flags1 & (RF5_BA_WATE))         
1051         {
1052                 set_damage(r_idx, (MS_BALL_WATER), _("ウォーター・ボール%s", "produce water balls%s"), tmp_msg[vn]);
1053         vp[vn] = tmp_msg[vn];
1054                 color[vn++] = TERM_BLUE;
1055         }
1056         if (flags4 & (RF4_BA_NUKE))         
1057         {
1058                 set_damage(r_idx, (MS_BALL_NUKE), _("放射能球%s", "produce balls of radiation%s"), tmp_msg[vn]);
1059         vp[vn] = tmp_msg[vn];
1060                 color[vn++] = TERM_L_GREEN;
1061         }
1062         if (a_ability_flags1 & (RF5_BA_MANA))         
1063         {
1064                 set_damage(r_idx, (MS_BALL_MANA), _("魔力の嵐%s", "invoke mana storms%s"), tmp_msg[vn]);
1065         vp[vn] = tmp_msg[vn];
1066                 color[vn++] = TERM_L_BLUE;
1067         }
1068         if (a_ability_flags1 & (RF5_BA_DARK))         
1069         {
1070                 set_damage(r_idx, (MS_BALL_DARK), _("暗黒の嵐%s", "invoke darkness storms%s"), tmp_msg[vn]);
1071         vp[vn] = tmp_msg[vn];
1072                 color[vn++] = TERM_L_DARK;
1073         }
1074         if (a_ability_flags1 & (RF5_BA_LITE))         
1075         {
1076                 set_damage(r_idx, (MS_STARBURST), _("スターバースト%s", "invoke starburst%s"), tmp_msg[vn]);
1077         vp[vn] = tmp_msg[vn];
1078                 color[vn++] = TERM_YELLOW;
1079         }
1080         if (flags4 & (RF4_BA_CHAO))         
1081         {
1082                 set_damage(r_idx, (MS_BALL_CHAOS), _("純ログルス%s", "invoke raw Logrus%s"), tmp_msg[vn]);
1083         vp[vn] = tmp_msg[vn];
1084                 color[vn++] = TERM_VIOLET;
1085         }
1086         if (a_ability_flags2 & (RF6_HAND_DOOM)){ vp[vn] = _("破滅の手(40%-60%)", "invoke the Hand of Doom(40%-60%)"); color[vn++] = TERM_VIOLET; }
1087         if (a_ability_flags2 & (RF6_PSY_SPEAR))
1088         {
1089                 set_damage(r_idx, (MS_PSY_SPEAR), _("光の剣%s", "psycho-spear%s"), tmp_msg[vn]);
1090         vp[vn] = tmp_msg[vn];
1091                 color[vn++] = TERM_YELLOW;
1092         }
1093         if (a_ability_flags1 & (RF5_DRAIN_MANA))
1094         {
1095                 set_damage(r_idx, (MS_DRAIN_MANA), _("魔力吸収%s", "drain mana%s"), tmp_msg[vn]);
1096         vp[vn] = tmp_msg[vn];
1097                 color[vn++] = TERM_SLATE;
1098         }
1099         if (a_ability_flags1 & (RF5_MIND_BLAST))         
1100         {
1101                 set_damage(r_idx, (MS_MIND_BLAST), _("精神攻撃%s", "cause mind blasting%s"), tmp_msg[vn]);
1102         vp[vn] = tmp_msg[vn];
1103                 color[vn++] = TERM_L_RED;
1104         }
1105         if (a_ability_flags1 & (RF5_BRAIN_SMASH))         
1106         {
1107                 set_damage(r_idx, (MS_BRAIN_SMASH), _("脳攻撃%s", "cause brain smashing%s"), tmp_msg[vn]);
1108         vp[vn] = tmp_msg[vn];
1109                 color[vn++] = TERM_RED;
1110         }
1111         if (a_ability_flags1 & (RF5_CAUSE_1))         
1112         {
1113                 set_damage(r_idx, (MS_CAUSE_1), 
1114                         _("軽傷+呪い%s", "cause light wounds and cursing%s"), tmp_msg[vn]);
1115         vp[vn] = tmp_msg[vn];
1116                 color[vn++] = TERM_L_WHITE;
1117         }
1118         if (a_ability_flags1 & (RF5_CAUSE_2))         
1119         {
1120                 set_damage(r_idx, (MS_CAUSE_2), 
1121                         _("重傷+呪い%s", "cause serious wounds and cursing%s"), tmp_msg[vn]);
1122         vp[vn] = tmp_msg[vn];
1123                 color[vn++] = TERM_L_WHITE;
1124         }
1125         if (a_ability_flags1 & (RF5_CAUSE_3))         
1126         {
1127                 set_damage(r_idx, (MS_CAUSE_3), 
1128                         _("致命傷+呪い%s", "cause critical wounds and cursing%s"), tmp_msg[vn]);
1129         vp[vn] = tmp_msg[vn];
1130                 color[vn++] = TERM_L_WHITE;
1131         }
1132         if (a_ability_flags1 & (RF5_CAUSE_4))         
1133         {
1134                 set_damage(r_idx, (MS_CAUSE_4), 
1135                         _("秘孔を突く%s", "cause mortal wounds%s"), tmp_msg[vn]);
1136         vp[vn] = tmp_msg[vn];
1137                 color[vn++] = TERM_L_WHITE;
1138         }
1139         if (a_ability_flags1 & (RF5_BO_ACID))         
1140         {
1141                 set_damage(r_idx, (MS_BOLT_ACID), _("アシッド・ボルト%s", "produce acid bolts%s"), tmp_msg[vn]);
1142         vp[vn] = tmp_msg[vn];
1143                 color[vn++] = TERM_GREEN;
1144         }
1145         if (a_ability_flags1 & (RF5_BO_ELEC))         
1146         {
1147                 set_damage(r_idx, (MS_BOLT_ELEC), _("サンダー・ボルト%s", "produce lightning bolts%s"), tmp_msg[vn]);
1148         vp[vn] = tmp_msg[vn];
1149                 color[vn++] = TERM_BLUE;
1150         }
1151         if (a_ability_flags1 & (RF5_BO_FIRE))         
1152         {
1153                 set_damage(r_idx, (MS_BOLT_FIRE), _("ファイア・ボルト%s", "produce fire bolts%s"), tmp_msg[vn]);
1154         vp[vn] = tmp_msg[vn];
1155                 color[vn++] = TERM_RED;
1156         }
1157         if (a_ability_flags1 & (RF5_BO_COLD))         
1158         {
1159                 set_damage(r_idx, (MS_BOLT_COLD), _("アイス・ボルト%s", "produce frost bolts%s"), tmp_msg[vn]);
1160         vp[vn] = tmp_msg[vn];
1161                 color[vn++] = TERM_L_WHITE;
1162         }
1163         if (a_ability_flags1 & (RF5_BO_NETH))         
1164         {
1165                 set_damage(r_idx, (MS_BOLT_NETHER), _("地獄の矢%s", "produce nether bolts%s"), tmp_msg[vn]);
1166         vp[vn] = tmp_msg[vn];
1167                 color[vn++] = TERM_L_DARK;
1168         }
1169         if (a_ability_flags1 & (RF5_BO_WATE))         
1170         {
1171                 set_damage(r_idx, (MS_BOLT_WATER), _("ウォーター・ボルト%s", "produce water bolts%s"), tmp_msg[vn]);
1172         vp[vn] = tmp_msg[vn];
1173                 color[vn++] = TERM_BLUE;
1174         }
1175         if (a_ability_flags1 & (RF5_BO_MANA))         
1176         {
1177                 set_damage(r_idx, (MS_BOLT_MANA), _("魔力の矢%s", "produce mana bolts%s"), tmp_msg[vn]);
1178         vp[vn] = tmp_msg[vn];
1179                 color[vn++] = TERM_L_BLUE;
1180         }
1181         if (a_ability_flags1 & (RF5_BO_PLAS))         
1182         {
1183                 set_damage(r_idx, (MS_BOLT_PLASMA), _("プラズマ・ボルト%s", "produce plasma bolts%s"), tmp_msg[vn]);
1184         vp[vn] = tmp_msg[vn];
1185                 color[vn++] = TERM_L_RED;
1186         }
1187         if (a_ability_flags1 & (RF5_BO_ICEE))         
1188         {
1189                 set_damage(r_idx, (MS_BOLT_ICE), _("極寒の矢%s", "produce ice bolts%s"), tmp_msg[vn]);
1190         vp[vn] = tmp_msg[vn];
1191                 color[vn++] = TERM_WHITE;
1192         }
1193         if (a_ability_flags1 & (RF5_MISSILE))         
1194         {
1195                 set_damage(r_idx, (MS_MAGIC_MISSILE), _("マジックミサイル%s", "produce magic missiles%s"), tmp_msg[vn]);
1196         vp[vn] = tmp_msg[vn];
1197                 color[vn++] = TERM_SLATE;
1198         }
1199         if (a_ability_flags1 & (RF5_SCARE))           { vp[vn] = _("恐怖", "terrify"); color[vn++] = TERM_SLATE; }
1200         if (a_ability_flags1 & (RF5_BLIND))           { vp[vn] = _("目くらまし", "blind"); color[vn++] = TERM_L_DARK; }
1201         if (a_ability_flags1 & (RF5_CONF))            { vp[vn] = _("混乱", "confuse"); color[vn++] = TERM_L_UMBER; }
1202         if (a_ability_flags1 & (RF5_SLOW))            { vp[vn] = _("減速", "slow"); color[vn++] = TERM_UMBER; }
1203         if (a_ability_flags1 & (RF5_HOLD))            { vp[vn] = _("麻痺", "paralyze"); color[vn++] = TERM_RED; }
1204         if (a_ability_flags2 & (RF6_HASTE))           { vp[vn] = _("加速", "haste-self"); color[vn++] = TERM_L_GREEN; }
1205         if (a_ability_flags2 & (RF6_HEAL))            { vp[vn] = _("治癒", "heal-self"); color[vn++] = TERM_WHITE; }
1206         if (a_ability_flags2 & (RF6_INVULNER))        { vp[vn] = _("無敵化", "make invulnerable"); color[vn++] = TERM_WHITE; }
1207         if (flags4 & RF4_DISPEL)            { vp[vn] = _("魔力消去", "dispel-magic"); color[vn++] = TERM_L_WHITE; }
1208         if (a_ability_flags2 & (RF6_BLINK))           { vp[vn] = _("ショートテレポート", "blink-self"); color[vn++] = TERM_UMBER; }
1209         if (a_ability_flags2 & (RF6_TPORT))           { vp[vn] = _("テレポート", "teleport-self"); color[vn++] = TERM_ORANGE; }
1210         if (a_ability_flags2 & (RF6_WORLD))           { vp[vn] = _("時を止める", "stop the time"); color[vn++] = TERM_L_BLUE; }
1211         if (a_ability_flags2 & (RF6_TELE_TO))         { vp[vn] = _("テレポートバック", "teleport to"); color[vn++] = TERM_L_UMBER; }
1212         if (a_ability_flags2 & (RF6_TELE_AWAY))       { vp[vn] = _("テレポートアウェイ", "teleport away"); color[vn++] = TERM_UMBER; }
1213         if (a_ability_flags2 & (RF6_TELE_LEVEL))      { vp[vn] = _("テレポート・レベル", "teleport level"); color[vn++] = TERM_ORANGE; }
1214
1215         if (a_ability_flags2 & (RF6_DARKNESS))
1216         {
1217                 if ((p_ptr->pclass != CLASS_NINJA) || (r_ptr->flags3 & (RF3_UNDEAD | RF3_HURT_LITE)) || (r_ptr->flags7 & RF7_DARK_MASK))
1218                 {
1219                         vp[vn] = _("暗闇", "create darkness"); color[vn++] = TERM_L_DARK;
1220                 }
1221                 else
1222                 {
1223                         vp[vn] = _("閃光", "create light"); color[vn++] = TERM_YELLOW;
1224                 }
1225         }
1226
1227         if (a_ability_flags2 & (RF6_TRAPS))           { vp[vn] = _("トラップ", "create traps"); color[vn++] = TERM_BLUE; }
1228         if (a_ability_flags2 & (RF6_FORGET))          { vp[vn] = _("記憶消去", "cause amnesia"); color[vn++] = TERM_BLUE; }
1229         if (a_ability_flags2 & (RF6_RAISE_DEAD))      { vp[vn] = _("死者復活", "raise dead"); color[vn++] = TERM_RED; }
1230         if (a_ability_flags2 & (RF6_S_MONSTER))       { vp[vn] = _("モンスター一体召喚", "summon a monster"); color[vn++] = TERM_SLATE; }
1231         if (a_ability_flags2 & (RF6_S_MONSTERS))      { vp[vn] = _("モンスター複数召喚", "summon monsters"); color[vn++] = TERM_L_WHITE; }
1232         if (a_ability_flags2 & (RF6_S_KIN))           { vp[vn] = _("救援召喚", "summon aid"); color[vn++] = TERM_ORANGE; }
1233         if (a_ability_flags2 & (RF6_S_ANT))           { vp[vn] = _("アリ召喚", "summon ants"); color[vn++] = TERM_RED; }
1234         if (a_ability_flags2 & (RF6_S_SPIDER))        { vp[vn] = _("クモ召喚", "summon spiders"); color[vn++] = TERM_L_DARK; }
1235         if (a_ability_flags2 & (RF6_S_HOUND))         { vp[vn] = _("ハウンド召喚", "summon hounds"); color[vn++] = TERM_L_UMBER; }
1236         if (a_ability_flags2 & (RF6_S_HYDRA))         { vp[vn] = _("ヒドラ召喚", "summon hydras"); color[vn++] = TERM_L_GREEN; }
1237         if (a_ability_flags2 & (RF6_S_ANGEL))         { vp[vn] = _("天使一体召喚", "summon an angel"); color[vn++] = TERM_YELLOW; }
1238         if (a_ability_flags2 & (RF6_S_DEMON))         { vp[vn] = _("デーモン一体召喚", "summon a demon"); color[vn++] = TERM_L_RED; }
1239         if (a_ability_flags2 & (RF6_S_UNDEAD))        { vp[vn] = _("アンデッド一体召喚", "summon an undead"); color[vn++] = TERM_L_DARK; }
1240         if (a_ability_flags2 & (RF6_S_DRAGON))        { vp[vn] = _("ドラゴン一体召喚", "summon a dragon"); color[vn++] = TERM_ORANGE; }
1241         if (a_ability_flags2 & (RF6_S_HI_UNDEAD))     { vp[vn] = _("強力なアンデッド召喚", "summon Greater Undead"); color[vn++] = TERM_L_DARK; }
1242         if (a_ability_flags2 & (RF6_S_HI_DRAGON))     { vp[vn] = _("古代ドラゴン召喚", "summon Ancient Dragons"); color[vn++] = TERM_ORANGE; }  
1243         if (a_ability_flags2 & (RF6_S_CYBER))         { vp[vn] = _("サイバーデーモン召喚", "summon Cyberdemons"); color[vn++] = TERM_UMBER; }
1244         if (a_ability_flags2 & (RF6_S_AMBERITES))     { vp[vn] = _("アンバーの王族召喚", "summon Lords of Amber"); color[vn++] = TERM_VIOLET; }
1245         if (a_ability_flags2 & (RF6_S_UNIQUE))        { vp[vn] = _("ユニーク・モンスター召喚", "summon Unique Monsters"); color[vn++] = TERM_VIOLET; }
1246
1247
1248         /* Describe spells */
1249         if (vn)
1250         {
1251                 /* Note magic */
1252                 magic = TRUE;
1253
1254                 /* Intro */
1255                 if (breath)
1256                 {
1257                         hooked_roff(_("、なおかつ", ", and is also"));
1258                 }
1259                 else
1260                 {
1261                         hooked_roff(format(_("%^sは", "%^s is"), wd_he[msex]));
1262                 }
1263
1264 #ifdef JP
1265                 /* Adverb */
1266                 if (flags2 & (RF2_SMART)) hook_c_roff(TERM_YELLOW, "的確に");
1267
1268                 /* Verb Phrase */
1269                 hooked_roff("魔法を使うことができ、");
1270 #else
1271                 /* Verb Phrase */
1272                 hooked_roff(" magical, casting spells");
1273
1274                 /* Adverb */
1275                 if (flags2 & RF2_SMART) hook_c_roff(TERM_YELLOW, " intelligently");
1276 #endif
1277
1278
1279                 /* Scan */
1280                 for (n = 0; n < vn; n++)
1281                 {
1282                         /* Intro */
1283 #ifdef JP
1284                         if ( n != 0 ) hooked_roff("、");
1285 #else
1286                         if (n == 0) hooked_roff(" which ");
1287                         else if (n < vn-1) hooked_roff(", ");
1288                         else hooked_roff(" or ");
1289 #endif
1290
1291
1292                         /* Dump */
1293                         hook_c_roff(color[n], vp[n]);
1294                 }
1295 #ifdef JP
1296                 hooked_roff("の呪文を唱えることがある");
1297 #endif
1298         }
1299
1300
1301         /* End the sentence about inate/other spells */
1302         if (breath || magic)
1303         {
1304                 /* Total casting */
1305                 m = r_ptr->r_cast_spell;
1306
1307                 /* Average frequency */
1308                 n = r_ptr->freq_spell;
1309
1310                 /* Describe the spell frequency */
1311                 if (m > 100 || know_everything)
1312                 {
1313                         hooked_roff(format(
1314                                 _("(確率:1/%d)", "; 1 time in %d"), 100 / n));
1315                 }
1316
1317                 /* Guess at the frequency */
1318                 else if (m)
1319                 {
1320                         n = ((n + 9) / 10) * 10;
1321                         hooked_roff(format(
1322                                 _("(確率:約1/%d)", "; about 1 time in %d"), 100 / n));
1323                 }
1324
1325                 /* End this sentence */
1326                 hooked_roff(_("。", ".  "));
1327         }
1328
1329         /* Describe monster "toughness" */
1330     if (know_everything || know_armour(r_idx))
1331         {
1332                 /* Armor */
1333                 hooked_roff(format(
1334                         _("%^sは AC%d の防御力と", "%^s has an armor rating of %d"),
1335                             wd_he[msex], r_ptr->ac));
1336
1337                 /* Maximized hitpoints */
1338                 if ((flags1 & RF1_FORCE_MAXHP) || (r_ptr->hside == 1))
1339                 {
1340                         u32b hp = r_ptr->hdice * (nightmare ? 2 : 1) * r_ptr->hside;
1341                         hooked_roff(format(
1342                                 _(" %d の体力がある。", " and a life rating of %d.  "),
1343                                     (s16b)MIN(30000, hp)));
1344                 }
1345
1346                 /* Variable hitpoints */
1347                 else
1348                 {
1349                         hooked_roff(format(
1350                                 _(" %dd%d の体力がある。", " and a life rating of %dd%d.  "),
1351                                     r_ptr->hdice * (nightmare ? 2 : 1), r_ptr->hside));
1352                 }
1353         }
1354
1355
1356
1357         /* Collect special abilities. */
1358         vn = 0;
1359         if (flags7 & (RF7_HAS_LITE_1 | RF7_HAS_LITE_2)) { vp[vn] = _("ダンジョンを照らす", "illuminate the dungeon");     color[vn++] = TERM_WHITE; }
1360         if (flags7 & (RF7_HAS_DARK_1 | RF7_HAS_DARK_2)) { vp[vn] = _("ダンジョンを暗くする", "darken the dungeon");   color[vn++] = TERM_L_DARK; }
1361         if (flags2 & RF2_OPEN_DOOR) { vp[vn] = _("ドアを開ける", "open doors"); color[vn++] = TERM_WHITE; }
1362         if (flags2 & RF2_BASH_DOOR) { vp[vn] = _("ドアを打ち破る", "bash down doors"); color[vn++] = TERM_WHITE; }
1363         if (flags7 & RF7_CAN_FLY)  { vp[vn] = _("空を飛ぶ", "fly"); color[vn++] = TERM_WHITE; }
1364         if (flags7 & RF7_CAN_SWIM)   { vp[vn] = _("水を渡る", "swim"); color[vn++] = TERM_WHITE; }
1365         if (flags2 & RF2_PASS_WALL) { vp[vn] = _("壁をすり抜ける", "pass through walls"); color[vn++] = TERM_WHITE; }
1366         if (flags2 & RF2_KILL_WALL) { vp[vn] = _("壁を掘り進む", "bore through walls"); color[vn++] = TERM_WHITE; }
1367         if (flags2 & RF2_MOVE_BODY) { vp[vn] = _("弱いモンスターを押しのける", "push past weaker monsters"); color[vn++] = TERM_WHITE; }
1368         if (flags2 & RF2_KILL_BODY) { vp[vn] = _("弱いモンスターを倒す", "destroy weaker monsters"); color[vn++] = TERM_WHITE; }
1369         if (flags2 & RF2_TAKE_ITEM) { vp[vn] = _("アイテムを拾う", "pick up objects"); color[vn++] = TERM_WHITE; }
1370         if (flags2 & RF2_KILL_ITEM) { vp[vn] = _("アイテムを壊す", "destroy objects"); color[vn++] = TERM_WHITE; }
1371
1372
1373         /* Describe special abilities. */
1374         if (vn)
1375         {
1376                 /* Intro */
1377                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1378
1379                 /* Scan */
1380                 for (n = 0; n < vn; n++)
1381                 {
1382                         /* Intro */
1383 #ifdef JP
1384                         if (n != vn - 1)
1385                         {
1386                                 jverb(vp[n], jverb_buf, JVERB_AND);
1387                                 hook_c_roff(color[n], jverb_buf);
1388                                 hooked_roff("、");
1389                         }
1390                         else hook_c_roff(color[n], vp[n]);
1391 #else
1392                         if (n == 0) hooked_roff(" can ");
1393                         else if (n < vn - 1) hooked_roff(", ");
1394                         else hooked_roff(" and ");
1395
1396                         /* Dump */
1397                         hook_c_roff(color[n], vp[n]);
1398 #endif
1399
1400                 }
1401
1402                 /* End */
1403                 hooked_roff(_("ことができる。", ".  "));
1404
1405         }
1406         
1407         /* Aquatic */
1408         if (flags7 & RF7_AQUATIC)
1409         {
1410                 hooked_roff(format(_("%^sは水中に棲んでいる。", "%^s lives in water.  "), wd_he[msex]));
1411         }
1412
1413         /* Describe special abilities. */
1414         if (flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2))
1415         {
1416                 hooked_roff(format(_("%^sは光っている。", "%^s is shining.  "), wd_he[msex]));
1417         }
1418         if (flags7 & (RF7_SELF_DARK_1 | RF7_SELF_DARK_2))
1419         {
1420                 hook_c_roff(TERM_L_DARK, format(_("%^sは暗黒に包まれている。", "%^s is surrounded by darkness.  "), wd_he[msex]));
1421         }
1422         if (flags2 & RF2_INVISIBLE)
1423         {
1424                 hooked_roff(format(_("%^sは透明で目に見えない。", "%^s is invisible.  "), wd_he[msex]));
1425         }
1426         if (flags2 & RF2_COLD_BLOOD)
1427         {
1428                 hooked_roff(format(_("%^sは冷血動物である。", "%^s is cold blooded.  "), wd_he[msex]));
1429         }
1430         if (flags2 & RF2_EMPTY_MIND)
1431         {
1432                 hooked_roff(format(_("%^sはテレパシーでは感知できない。", "%^s is not detected by telepathy.  "), wd_he[msex]));
1433         }
1434         else if (flags2 & RF2_WEIRD_MIND)
1435         {
1436                 hooked_roff(format(_("%^sはまれにテレパシーで感知できる。", "%^s is rarely detected by telepathy.  "), wd_he[msex]));
1437         }
1438         if (flags2 & RF2_MULTIPLY)
1439         {
1440                 hook_c_roff(TERM_L_UMBER, format(_("%^sは爆発的に増殖する。", "%^s breeds explosively.  "), wd_he[msex]));
1441         }
1442         if (flags2 & RF2_REGENERATE)
1443         {
1444                 hook_c_roff(TERM_L_WHITE, format(_("%^sは素早く体力を回復する。", "%^s regenerates quickly.  "), wd_he[msex]));
1445         }
1446         if (flags7 & RF7_RIDING)
1447         {
1448                 hook_c_roff(TERM_SLATE, format(_("%^sに乗ることができる。", "%^s is suitable for riding.  "), wd_he[msex]));
1449         }
1450
1451
1452         /* Collect susceptibilities */
1453         vn = 0;
1454         if (flags3 & RF3_HURT_ROCK) { vp[vn] = _("岩を除去するもの", "rock remover"); color[vn++] = TERM_UMBER; }
1455         if (flags3 & RF3_HURT_LITE) { vp[vn] = _("明るい光", "bright light"); color[vn++] = TERM_YELLOW; }
1456         if (flags3 & RF3_HURT_FIRE) { vp[vn] = _("炎", "fire"); color[vn++] = TERM_RED; }
1457         if (flags3 & RF3_HURT_COLD) { vp[vn] = _("冷気", "cold"); color[vn++] = TERM_L_WHITE; }
1458
1459
1460         /* Describe susceptibilities */
1461         if (vn)
1462         {
1463                 /* Intro */
1464                 hooked_roff(format(_("%^sには", "%^s"), wd_he[msex]));
1465
1466                 /* Scan */
1467                 for (n = 0; n < vn; n++)
1468                 {
1469                         /* Intro */
1470 #ifdef JP
1471                         if ( n != 0 ) hooked_roff("や");
1472 #else
1473                         if (n == 0) hooked_roff(" is hurt by ");
1474                         else if (n < vn-1) hooked_roff(", ");
1475                         else hooked_roff(" and ");
1476 #endif
1477
1478
1479                         /* Dump */
1480                         hook_c_roff(color[n], vp[n]);
1481                 }
1482
1483                 /* End */
1484                 hooked_roff(_("でダメージを与えられる。", ".  "));
1485         }
1486
1487
1488         /* Collect immunities */
1489         vn = 0;
1490         if (flagsr & RFR_IM_ACID) { vp[vn] = _("酸", "acid"); color[vn++] = TERM_GREEN; }
1491         if (flagsr & RFR_IM_ELEC) { vp[vn] = _("稲妻", "lightning"); color[vn++] = TERM_BLUE; }
1492         if (flagsr & RFR_IM_FIRE) { vp[vn] = _("炎", "fire"); color[vn++] = TERM_RED; }
1493         if (flagsr & RFR_IM_COLD) { vp[vn] = _("冷気", "cold"); color[vn++] = TERM_L_WHITE; }
1494         if (flagsr & RFR_IM_POIS) { vp[vn] = _("毒", "poison"); color[vn++] = TERM_L_GREEN; }
1495
1496
1497         /* Collect resistances */
1498         if (flagsr & RFR_RES_LITE) { vp[vn] = _("閃光", "light"); color[vn++] = TERM_YELLOW; }
1499         if (flagsr & RFR_RES_DARK) { vp[vn] = _("暗黒", "dark"); color[vn++] = TERM_L_DARK; }
1500         if (flagsr & RFR_RES_NETH) { vp[vn] = _("地獄", "nether"); color[vn++] = TERM_L_DARK; }
1501         if (flagsr & RFR_RES_WATE) { vp[vn] = _("水", "water"); color[vn++] = TERM_BLUE; }
1502         if (flagsr & RFR_RES_PLAS) { vp[vn] = _("プラズマ", "plasma"); color[vn++] = TERM_L_RED; }
1503         if (flagsr & RFR_RES_SHAR) { vp[vn] = _("破片", "shards"); color[vn++] = TERM_L_UMBER; }
1504         if (flagsr & RFR_RES_SOUN) { vp[vn] = _("轟音", "sound"); color[vn++] = TERM_ORANGE; }
1505         if (flagsr & RFR_RES_CHAO) { vp[vn] = _("カオス", "chaos"); color[vn++] = TERM_VIOLET; }
1506         if (flagsr & RFR_RES_NEXU) { vp[vn] = _("因果混乱", "nexus"); color[vn++] = TERM_VIOLET; }
1507         if (flagsr & RFR_RES_DISE) { vp[vn] = _("劣化", "disenchantment"); color[vn++] = TERM_VIOLET; }
1508         if (flagsr & RFR_RES_WALL) { vp[vn] = _("フォース", "force"); color[vn++] = TERM_UMBER; }
1509         if (flagsr & RFR_RES_INER) { vp[vn] = _("遅鈍", "inertia"); color[vn++] = TERM_SLATE; }
1510         if (flagsr & RFR_RES_TIME) { vp[vn] = _("時間逆転", "time"); color[vn++] = TERM_L_BLUE; }
1511         if (flagsr & RFR_RES_GRAV) { vp[vn] = _("重力", "gravity"); color[vn++] = TERM_SLATE; }
1512         if (flagsr & RFR_RES_ALL) { vp[vn] = _("あらゆる攻撃", "all"); color[vn++] = TERM_YELLOW; }
1513         if ((flagsr & RFR_RES_TELE) && !(r_ptr->flags1 & RF1_UNIQUE)) { vp[vn] = _("テレポート", "teleportation"); color[vn++] = TERM_ORANGE; }
1514
1515         /* Describe immunities and resistances */
1516         if (vn)
1517         {
1518                 /* Intro */
1519                 hooked_roff(format(_("%^sは", "%^s"), wd_he[msex]));
1520
1521                 /* Scan */
1522                 for (n = 0; n < vn; n++)
1523                 {
1524                         /* Intro */
1525 #ifdef JP
1526                         if ( n != 0 ) hooked_roff("と");
1527 #else
1528                         if (n == 0) hooked_roff(" resists ");
1529                         else if (n < vn-1) hooked_roff(", ");
1530                         else hooked_roff(" and ");
1531 #endif
1532
1533
1534                         /* Dump */
1535                         hook_c_roff(color[n], vp[n]);
1536                 }
1537
1538                 /* End */
1539                 hooked_roff(_("の耐性を持っている。", ".  "));
1540         }
1541
1542
1543         if ((r_ptr->r_xtra1 & MR1_SINKA) || know_everything)
1544         {
1545                 if (r_ptr->next_r_idx)
1546                 {
1547                         hooked_roff(format(_("%^sは経験を積むと、", "%^s will evolve into "), wd_he[msex]));
1548                         hook_c_roff(TERM_YELLOW, format("%s", r_name+r_info[r_ptr->next_r_idx].name));
1549                         hooked_roff(format(
1550                                 _(("に進化する。"), 
1551                                   (" when %s gets enugh experience.  ", wd_he[msex]))));
1552                 }
1553                 else if (!(r_ptr->flags1 & RF1_UNIQUE))
1554                 {
1555                         hooked_roff(format(_("%sは進化しない。", "%s won't evolve.  "), wd_he[msex]));
1556                 }
1557         }
1558
1559         /* Collect non-effects */
1560         vn = 0;
1561         if (flags3 & RF3_NO_STUN)  { vp[vn] = _("朦朧としない", "stunned"); color[vn++] = TERM_ORANGE; }
1562         if (flags3 & RF3_NO_FEAR)  { vp[vn] = _("恐怖を感じない", "frightened"); color[vn++] = TERM_SLATE; }
1563         if (flags3 & RF3_NO_CONF)  { vp[vn] = _("混乱しない", "confused"); color[vn++] = TERM_L_UMBER; }
1564         if (flags3 & RF3_NO_SLEEP) { vp[vn] = _("眠らされない", "slept"); color[vn++] = TERM_BLUE; }
1565         if ((flagsr & RFR_RES_TELE) && (r_ptr->flags1 & RF1_UNIQUE)) { vp[vn] = _("テレポートされない", "teleported"); color[vn++] = TERM_ORANGE; }
1566
1567         /* Describe non-effects */
1568         if (vn)
1569         {
1570                 /* Intro */
1571                 hooked_roff(format(
1572                         _("%^sは", "%^s"), wd_he[msex]));
1573
1574                 /* Scan */
1575                 for (n = 0; n < vn; n++)
1576                 {
1577                         /* Intro */
1578 #ifdef JP
1579                         if ( n != 0 ) hooked_roff("し、");
1580 #else
1581                         if (n == 0) hooked_roff(" cannot be ");
1582                         else if (n < vn - 1) hooked_roff(", ");
1583                         else hooked_roff(" or ");
1584 #endif
1585
1586
1587                         /* Dump */
1588                         hook_c_roff(color[n], vp[n]);
1589                 }
1590
1591                 /* End */
1592                 hooked_roff(_("。", ".  "));
1593         }
1594
1595
1596         /* Do we know how aware it is? */
1597         if ((((int)r_ptr->r_wake * (int)r_ptr->r_wake) > r_ptr->sleep) ||
1598                   (r_ptr->r_ignore == MAX_UCHAR) ||
1599             (r_ptr->sleep == 0 && r_ptr->r_tkills >= 10) || know_everything)
1600         {
1601                 cptr act;
1602
1603                 if (r_ptr->sleep > 200)
1604                 {
1605                         act = _("を無視しがちであるが", "prefers to ignore");
1606                 }
1607                 else if (r_ptr->sleep > 95)
1608                 {
1609                         act = _("に対してほとんど注意を払わないが", "pays very little attention to");
1610                 }
1611                 else if (r_ptr->sleep > 75)
1612                 {
1613                         act = _("に対してあまり注意を払わないが", "pays little attention to");
1614                 }
1615                 else if (r_ptr->sleep > 45)
1616                 {
1617                         act = _("を見過ごしがちであるが", "tends to overlook");
1618                 }
1619                 else if (r_ptr->sleep > 25)
1620                 {
1621                         act = _("をほんの少しは見ており", "takes quite a while to see");
1622                 }
1623                 else if (r_ptr->sleep > 10)
1624                 {
1625                         act = _("をしばらくは見ており", "takes a while to see");
1626                 }
1627                 else if (r_ptr->sleep > 5)
1628                 {
1629                         act = _("を幾分注意深く見ており", "is fairly observant of");
1630                 }
1631                 else if (r_ptr->sleep > 3)
1632                 {
1633                         act = _("を注意深く見ており", "is observant of");
1634                 }
1635                 else if (r_ptr->sleep > 1)
1636                 {
1637                         act = _("をかなり注意深く見ており", "is very observant of");
1638                 }
1639                 else if (r_ptr->sleep > 0)
1640                 {
1641                         act = _("を警戒しており", "is vigilant for");
1642                 }
1643                 else
1644                 {
1645                         act = _("をかなり警戒しており", "is ever vigilant for");
1646                 }
1647
1648                 hooked_roff(
1649                         _(format("%^sは侵入者%s、 %d フィート先から侵入者に気付くことがある。", wd_he[msex], act, 10 * r_ptr->aaf),
1650                           format("%^s %s intruders, which %s may notice from %d feet.  ", wd_he[msex], act, wd_he[msex], 10 * r_ptr->aaf)));
1651         }
1652
1653
1654         /* Drops gold and/or items */
1655         if (drop_gold || drop_item)
1656         {
1657                 /* Intro */
1658                 hooked_roff(format(
1659                         _("%^sは", "%^s may carry"), wd_he[msex]));
1660 #ifndef JP
1661                 /* No "n" needed */
1662                 sin = FALSE;
1663 #endif
1664
1665
1666                 /* Count maximum drop */
1667                 n = MAX(drop_gold, drop_item);
1668
1669                 /* One drop (may need an "n") */
1670                 if (n == 1)
1671                 {
1672                         hooked_roff(_("一つの", " a"));
1673 #ifndef JP
1674                         sin = TRUE;
1675 #endif
1676                 }
1677
1678                 /* Two drops */
1679                 else if (n == 2)
1680                 {
1681                         hooked_roff(
1682                                 _("一つか二つの", " one or two"));
1683                 }
1684
1685                 /* Many drops */
1686                 else
1687                 {
1688                         hooked_roff(format(
1689                                 _(" %d 個までの", " up to %d"), n));
1690                 }
1691
1692
1693                 /* Great */
1694                 if (flags1 & RF1_DROP_GREAT)
1695                 {
1696                         p = _("特別な", " exceptional");
1697                 }
1698
1699                 /* Good (no "n" needed) */
1700                 else if (flags1 & RF1_DROP_GOOD)
1701                 {
1702                         p = _("上質な", " good");
1703 #ifndef JP
1704                         sin = FALSE;
1705 #endif
1706                 }
1707
1708                 /* Okay */
1709                 else
1710                 {
1711                         p = NULL;
1712                 }
1713
1714
1715                 /* Objects */
1716                 if (drop_item)
1717                 {
1718                         /* Handle singular "an" */
1719 #ifndef JP
1720                         if (sin) hooked_roff("n");
1721                         sin = FALSE;
1722 #endif
1723
1724                         /* Dump "object(s)" */
1725                         if (p) hooked_roff(p);
1726                         hooked_roff(
1727                                 _("アイテム", " object"));
1728
1729 #ifndef JP
1730                         if (n != 1) hooked_roff("s");
1731 #endif
1732
1733                         /* Conjunction replaces variety, if needed for "gold" below */
1734                         p = _("や", " or");
1735                 }
1736
1737                 /* Treasures */
1738                 if (drop_gold)
1739                 {
1740 #ifndef JP
1741                         /* Cancel prefix */
1742                         if (!p) sin = FALSE;
1743
1744                         /* Handle singular "an" */
1745                         if (sin) hooked_roff("n");
1746                         sin = FALSE;
1747 #endif
1748
1749                         /* Dump "treasure(s)" */
1750                         if (p) hooked_roff(p);
1751                         hooked_roff(_("財宝", " treasure"));
1752 #ifndef JP
1753                         if (n != 1) hooked_roff("s");
1754 #endif
1755
1756                 }
1757
1758                 /* End this sentence */
1759                 hooked_roff(_("を持っていることがある。", ".  "));
1760         }
1761
1762
1763         /* Count the number of "known" attacks */
1764         for (n = 0, m = 0; m < 4; m++)
1765         {
1766                 /* Skip non-attacks */
1767                 if (!r_ptr->blow[m].method) continue;
1768                 if (r_ptr->blow[m].method == RBM_SHOOT) continue;
1769
1770                 /* Count known attacks */
1771                 if (r_ptr->r_blows[m] || know_everything) n++;
1772         }
1773
1774         /* Examine (and count) the actual attacks */
1775         for (r = 0, m = 0; m < 4; m++)
1776         {
1777                 int method, effect, d1, d2;
1778
1779                 /* Skip non-attacks */
1780                 if (!r_ptr->blow[m].method) continue;
1781                 if (r_ptr->blow[m].method == RBM_SHOOT) continue;
1782
1783                 /* Skip unknown attacks */
1784                 if (!r_ptr->r_blows[m] && !know_everything) continue;
1785
1786                 /* Extract the attack info */
1787                 method = r_ptr->blow[m].method;
1788                 effect = r_ptr->blow[m].effect;
1789                 d1 = r_ptr->blow[m].d_dice;
1790                 d2 = r_ptr->blow[m].d_side;
1791
1792                 /* No method yet */
1793                 p = NULL;
1794
1795                 /* Acquire the method */
1796                 switch (method)
1797                 {
1798                         case RBM_HIT:           p = _("殴る", "hit"); break;
1799                         case RBM_TOUCH:         p = _("触る", "touch"); break;
1800                         case RBM_PUNCH:         p = _("パンチする", "punch"); break;
1801                         case RBM_KICK:          p = _("蹴る", "kick"); break;
1802                         case RBM_CLAW:          p = _("ひっかく", "claw"); break;
1803                         case RBM_BITE:          p = _("噛む", "bite"); break;
1804                         case RBM_STING:         p = _("刺す", "sting"); break;
1805                         case RBM_SLASH:         p = _("斬る", "slash"); break;
1806                         case RBM_BUTT:          p = _("角で突く", "butt"); break;
1807                         case RBM_CRUSH:         p = _("体当たりする", "crush"); break;
1808                         case RBM_ENGULF:        p = _("飲み込む", "engulf"); break;
1809                         case RBM_CHARGE:        p = _("請求書をよこす", "charge"); break;
1810                         case RBM_CRAWL:         p = _("体の上を這い回る", "crawl on you"); break;
1811                         case RBM_DROOL:         p = _("よだれをたらす", "drool on you"); break;
1812                         case RBM_SPIT:          p = _("つばを吐く", "spit"); break;
1813                         case RBM_EXPLODE:       p = _("爆発する", "explode"); break;
1814                         case RBM_GAZE:          p = _("にらむ", "gaze"); break;
1815                         case RBM_WAIL:          p = _("泣き叫ぶ", "wail"); break;
1816                         case RBM_SPORE:         p = _("胞子を飛ばす", "release spores"); break;
1817                         case RBM_XXX4:          break;
1818                         case RBM_BEG:           p = _("金をせがむ", "beg"); break;
1819                         case RBM_INSULT:        p = _("侮辱する", "insult"); break;
1820                         case RBM_MOAN:          p = _("うめく", "moan"); break;
1821                         case RBM_SHOW:          p = _("歌う", "sing"); break;
1822                 }
1823
1824
1825                 /* Default effect */
1826                 q = NULL;
1827
1828                 /* Acquire the effect */
1829                 switch (effect)
1830                 {
1831                         case RBE_SUPERHURT: q = _("強力に攻撃する", "slaughter"); break;
1832                         case RBE_HURT:          q = _("攻撃する", "attack"); break;
1833                         case RBE_POISON:        q = _("毒をくらわす", "poison"); break;
1834                         case RBE_UN_BONUS:      q = _("劣化させる", "disenchant"); break;
1835                         case RBE_UN_POWER:      q = _("充填魔力を吸収する", "drain charges"); break;
1836                         case RBE_EAT_GOLD:      q = _("金を盗む", "steal gold"); break;
1837                         case RBE_EAT_ITEM:      q = _("アイテムを盗む", "steal items"); break;
1838                         case RBE_EAT_FOOD:      q = _("あなたの食料を食べる", "eat your food"); break;
1839                         case RBE_EAT_LITE:      q = _("明かりを吸収する", "absorb light"); break;
1840                         case RBE_ACID:          q = _("酸を飛ばす", "shoot acid"); break;
1841                         case RBE_ELEC:          q = _("感電させる", "electrocute"); break;
1842                         case RBE_FIRE:          q = _("燃やす", "burn"); break;
1843                         case RBE_COLD:          q = _("凍らせる", "freeze"); break;
1844                         case RBE_BLIND:         q = _("盲目にする", "blind"); break;
1845                         case RBE_CONFUSE:       q = _("混乱させる", "confuse"); break;
1846                         case RBE_TERRIFY:       q = _("恐怖させる", "terrify"); break;
1847                         case RBE_PARALYZE:      q = _("麻痺させる", "paralyze"); break;
1848                         case RBE_LOSE_STR:      q = _("腕力を減少させる", "reduce strength"); break;
1849                         case RBE_LOSE_INT:      q = _("知能を減少させる", "reduce intelligence"); break;
1850                         case RBE_LOSE_WIS:      q = _("賢さを減少させる", "reduce wisdom"); break;
1851                         case RBE_LOSE_DEX:      q = _("器用さを減少させる", "reduce dexterity"); break;
1852                         case RBE_LOSE_CON:      q = _("耐久力を減少させる", "reduce constitution"); break;
1853                         case RBE_LOSE_CHR:      q = _("魅力を減少させる", "reduce charisma"); break;
1854                         case RBE_LOSE_ALL:      q = _("全ステータスを減少させる", "reduce all stats"); break;
1855                         case RBE_SHATTER:       q = _("粉砕する", "shatter"); break;
1856                         case RBE_EXP_10:        q = _("経験値を減少(10d6+)させる", "lower experience (by 10d6+)"); break;
1857                         case RBE_EXP_20:        q = _("経験値を減少(20d6+)させる", "lower experience (by 20d6+)"); break;
1858                         case RBE_EXP_40:        q = _("経験値を減少(40d6+)させる", "lower experience (by 40d6+)"); break;
1859                         case RBE_EXP_80:        q = _("経験値を減少(80d6+)させる", "lower experience (by 80d6+)"); break;
1860                         case RBE_DISEASE:       q = _("病気にする", "disease"); break;
1861                         case RBE_TIME:      q = _("時間を逆戻りさせる", "time"); break;
1862                         case RBE_DR_LIFE:   q = _("生命力を吸収する", "drain life"); break;
1863                         case RBE_DR_MANA:   q = _("魔力を奪う", "drain mana force"); break;
1864                         case RBE_INERTIA:   q = _("減速させる", "slow"); break;
1865                         case RBE_STUN:      q = _("朦朧とさせる", "stun"); break;
1866                 }
1867
1868
1869 #ifdef JP
1870                 if ( r == 0 ) hooked_roff( format("%^sは", wd_he[msex]) );
1871
1872                 /***若干表現を変更 ita ***/
1873
1874                         /* Describe damage (if known) */
1875                 if (d1 && d2 && (know_everything || know_damage(r_idx, m)))
1876                   {
1877                     
1878                     /* Display the damage */
1879                     hooked_roff(format(" %dd%d ", d1, d2));
1880                     hooked_roff("のダメージで");
1881                   }
1882                 /* Hack -- force a method */
1883                 if (!p) p = "何か奇妙なことをする";
1884
1885                 /* Describe the method */
1886                 /* XXしてYYし/XXしてYYする/XXし/XXする */
1887                 if(q) jverb( p ,jverb_buf, JVERB_TO);
1888                 else if(r!=n-1) jverb( p ,jverb_buf, JVERB_AND);
1889                 else strcpy(jverb_buf, p);
1890
1891                 hooked_roff(jverb_buf);
1892
1893                 /* Describe the effect (if any) */
1894                 if (q)
1895                 {
1896                   if(r!=n-1) jverb( q,jverb_buf, JVERB_AND);
1897                   else strcpy(jverb_buf,q); 
1898                   hooked_roff(jverb_buf);
1899                 }
1900                 if(r!=n-1) hooked_roff("、");
1901 #else
1902                 /* Introduce the attack description */
1903                 if (!r)
1904                 {
1905                         hooked_roff(format("%^s can ", wd_he[msex]));
1906                 }
1907                 else if (r < n-1)
1908                 {
1909                         hooked_roff(", ");
1910                 }
1911                 else
1912                 {
1913                         hooked_roff(", and ");
1914                 }
1915
1916
1917                 /* Hack -- force a method */
1918                 if (!p) p = "do something weird";
1919
1920                 /* Describe the method */
1921                 hooked_roff(p);
1922
1923
1924                 /* Describe the effect (if any) */
1925                 if (q)
1926                 {
1927                         /* Describe the attack type */
1928                         hooked_roff(" to ");
1929                         hooked_roff(q);
1930
1931                         /* Describe damage (if known) */
1932                         if (d1 && d2 && (know_everything || know_damage(r_idx, m)))
1933                         {
1934                                 /* Display the damage */
1935                                 hooked_roff(" with damage");
1936                                 hooked_roff(format(" %dd%d", d1, d2));
1937                         }
1938                 }
1939 #endif
1940
1941
1942
1943                 /* Count the attacks as printed */
1944                 r++;
1945         }
1946
1947         /* Finish sentence above */
1948         if (r)
1949         {
1950                 hooked_roff(_("。", ".  "));
1951         }
1952
1953         /* Notice lack of attacks */
1954         else if (flags1 & RF1_NEVER_BLOW)
1955         {
1956                 hooked_roff(format(
1957                         _("%^sは物理的な攻撃方法を持たない。",
1958                           "%^s has no physical attacks.  "), wd_he[msex]));
1959         }
1960
1961         /* Or describe the lack of knowledge */
1962         else
1963         {
1964                 hooked_roff(format(
1965                         _("%s攻撃については何も知らない。",
1966                           "Nothing is known about %s attack.  "), wd_his[msex]));
1967         }
1968
1969
1970         /*
1971          * Notice "Quest" monsters, but only if you
1972          * already encountered the monster.
1973          */
1974         if ((flags1 & RF1_QUESTOR) && ((r_ptr->r_sights) && (r_ptr->max_num) && ((r_idx == MON_OBERON) || (r_idx == MON_SERPENT))))
1975         {
1976                 hook_c_roff(TERM_VIOLET, 
1977                         _("あなたはこのモンスターを殺したいという強い欲望を感じている...",
1978                           "You feel an intense desire to kill this monster...  "));
1979         }
1980
1981         else if (flags7 & RF7_GUARDIAN)
1982         {
1983                 hook_c_roff(TERM_L_RED, 
1984                         _("このモンスターはダンジョンの主である。",
1985                           "This monster is the master of a dungeon."));
1986         }
1987
1988
1989         /* All done */
1990         hooked_roff("\n");
1991
1992 }
1993
1994
1995 /*!
1996  * @brief モンスター情報のヘッダを記述する
1997  * Hack -- Display the "name" and "attr/chars" of a monster race
1998  * @param r_idx モンスターの種族ID
1999  * @return なし
2000  */
2001 void roff_top(MONRACE_IDX r_idx)
2002 {
2003         monster_race    *r_ptr = &r_info[r_idx];
2004
2005         byte            a1, a2;
2006         char            c1, c2;
2007
2008
2009         /* Access the chars */
2010         c1 = r_ptr->d_char;
2011         c2 = r_ptr->x_char;
2012
2013         /* Access the attrs */
2014         a1 = r_ptr->d_attr;
2015         a2 = r_ptr->x_attr;
2016
2017
2018         /* Clear the top line */
2019         Term_erase(0, 0, 255);
2020
2021         /* Reset the cursor */
2022         Term_gotoxy(0, 0);
2023
2024 #ifndef JP
2025         /* A title (use "The" for non-uniques) */
2026         if (!(r_ptr->flags1 & RF1_UNIQUE))
2027         {
2028                 Term_addstr(-1, TERM_WHITE, "The ");
2029         }
2030 #endif
2031
2032         /* Dump the name */
2033         Term_addstr(-1, TERM_WHITE, (r_name + r_ptr->name));
2034
2035         /* Append the "standard" attr/char info */
2036         Term_addstr(-1, TERM_WHITE, " ('");
2037         Term_add_bigch(a1, c1);
2038         Term_addstr(-1, TERM_WHITE, "')");
2039
2040         /* Append the "optional" attr/char info */
2041         Term_addstr(-1, TERM_WHITE, "/('");
2042         Term_add_bigch(a2, c2);
2043         Term_addstr(-1, TERM_WHITE, "'):");
2044
2045         /* Wizards get extra info */
2046         if (p_ptr->wizard)
2047         {
2048                 char buf[16];
2049
2050                 sprintf(buf, "%d", r_idx);
2051
2052                 Term_addstr(-1, TERM_WHITE, " (");
2053                 Term_addstr(-1, TERM_L_BLUE, buf);
2054                 Term_addch(TERM_WHITE, ')');
2055         }
2056 }
2057
2058
2059
2060 /*!
2061  * @brief  モンスター情報の表示と共に画面を一時消去するサブルーチン /
2062  * Hack -- describe the given monster race at the top of the screen
2063  * @param r_idx モンスターの種族ID
2064  * @param mode 表示オプション
2065  * @return なし
2066  */
2067 void screen_roff(MONRACE_IDX r_idx, BIT_FLAGS mode)
2068 {
2069         /* Flush messages */
2070         msg_print(NULL);
2071
2072         /* Begin recall */
2073         Term_erase(0, 1, 255);
2074
2075         hook_c_roff = c_roff;
2076
2077         /* Recall monster */
2078         roff_aux(r_idx, mode);
2079
2080         /* Describe monster */
2081         roff_top(r_idx);
2082 }
2083
2084
2085
2086
2087 /*!
2088  * @brief モンスター情報の現在のウィンドウに表示する /
2089  * Hack -- describe the given monster race in the current "term" window
2090  * @param r_idx モンスターの種族ID
2091  * @return なし
2092  */
2093 void display_roff(MONRACE_IDX r_idx)
2094 {
2095         int y;
2096
2097         /* Erase the window */
2098         for (y = 0; y < Term->hgt; y++)
2099         {
2100                 /* Erase the line */
2101                 Term_erase(0, y, 255);
2102         }
2103
2104         /* Begin recall */
2105         Term_gotoxy(0, 1);
2106
2107         hook_c_roff = c_roff;
2108
2109         /* Recall monster */
2110         roff_aux(r_idx, 0);
2111
2112         /* Describe monster */
2113         roff_top(r_idx);
2114 }
2115
2116
2117 /*!
2118  * @brief モンスター詳細情報を自動スポイラー向けに出力する /
2119  * Hack -- output description of the given monster race
2120  * @param r_idx モンスターの種族ID
2121  * @param roff_func 出力処理を行う関数ポインタ
2122  * @return なし
2123  */
2124 void output_monster_spoiler(MONRACE_IDX r_idx, void (*roff_func)(byte attr, cptr str))
2125 {
2126         hook_c_roff = roff_func;
2127
2128         /* Recall monster */
2129         roff_aux(r_idx, 0x03);
2130 }
2131
2132
2133
2134 /*!
2135  * @brief プレイヤーの現在の広域マップ座標から得た地勢を元にモンスターの生成条件関数を返す
2136  * @return 地勢にあったモンスターの生成条件関数
2137  */
2138 monster_hook_type get_monster_hook(void)
2139 {
2140         if (!dun_level && !p_ptr->inside_quest)
2141         {
2142                 switch (wilderness[p_ptr->wilderness_y][p_ptr->wilderness_x].terrain)
2143                 {
2144                 case TERRAIN_TOWN:
2145                         return (monster_hook_type)mon_hook_town;
2146                 case TERRAIN_DEEP_WATER:
2147                         return (monster_hook_type)mon_hook_ocean;
2148                 case TERRAIN_SHALLOW_WATER:
2149                 case TERRAIN_SWAMP:
2150                         return (monster_hook_type)mon_hook_shore;
2151                 case TERRAIN_DIRT:
2152                 case TERRAIN_DESERT:
2153                         return (monster_hook_type)mon_hook_waste;
2154                 case TERRAIN_GRASS:
2155                         return (monster_hook_type)mon_hook_grass;
2156                 case TERRAIN_TREES:
2157                         return (monster_hook_type)mon_hook_wood;
2158                 case TERRAIN_SHALLOW_LAVA:
2159                 case TERRAIN_DEEP_LAVA:
2160                         return (monster_hook_type)mon_hook_volcano;
2161                 case TERRAIN_MOUNTAIN:
2162                         return (monster_hook_type)mon_hook_mountain;
2163                 default:
2164                         return (monster_hook_type)mon_hook_dungeon;
2165                 }
2166         }
2167         else
2168         {
2169                 return (monster_hook_type)mon_hook_dungeon;
2170         }
2171 }
2172
2173 /*!
2174  * @brief 指定された広域マップ座標の地勢を元にモンスターの生成条件関数を返す
2175  * @return 地勢にあったモンスターの生成条件関数
2176  */
2177 monster_hook_type get_monster_hook2(int y, int x)
2178 {
2179         feature_type *f_ptr = &f_info[cave[y][x].feat];
2180
2181         /* Set the monster list */
2182
2183         /* Water */
2184         if (have_flag(f_ptr->flags, FF_WATER))
2185         {
2186                 /* Deep water */
2187                 if (have_flag(f_ptr->flags, FF_DEEP))
2188                 {
2189                         return (monster_hook_type)mon_hook_deep_water;
2190                 }
2191
2192                 /* Shallow water */
2193                 else
2194                 {
2195                         return (monster_hook_type)mon_hook_shallow_water;
2196                 }
2197         }
2198
2199         /* Lava */
2200         else if (have_flag(f_ptr->flags, FF_LAVA))
2201         {
2202                 return (monster_hook_type)mon_hook_lava;
2203         }
2204
2205         else return (monster_hook_type)mon_hook_floor;
2206 }
2207
2208 /*!
2209  * @brief モンスターを友好的にする
2210  * @param m_ptr モンスター情報構造体の参照ポインタ
2211  * @return なし
2212  */
2213 void set_friendly(monster_type *m_ptr)
2214 {
2215         m_ptr->smart |= SM_FRIENDLY;
2216 }
2217
2218 /*!
2219  * @brief モンスターをペットにする
2220  * @param m_ptr モンスター情報構造体の参照ポインタ
2221  * @return なし
2222  */
2223 void set_pet(monster_type *m_ptr)
2224 {
2225         if (!is_pet(m_ptr)) check_pets_num_and_align(m_ptr, TRUE);
2226
2227         /* Check for quest completion */
2228         check_quest_completion(m_ptr);
2229
2230         m_ptr->smart |= SM_PET;
2231         if (!(r_info[m_ptr->r_idx].flags3 & (RF3_EVIL | RF3_GOOD)))
2232                 m_ptr->sub_align = SUB_ALIGN_NEUTRAL;
2233 }
2234
2235 /*!
2236  * @brief モンスターを敵に回す
2237  * Makes the monster hostile towards the player
2238  * @param m_ptr モンスター情報構造体の参照ポインタ
2239  * @return なし
2240  */
2241 void set_hostile(monster_type *m_ptr)
2242 {
2243         if (p_ptr->inside_battle) return;
2244
2245         if (is_pet(m_ptr)) check_pets_num_and_align(m_ptr, FALSE);
2246
2247         m_ptr->smart &= ~SM_PET;
2248         m_ptr->smart &= ~SM_FRIENDLY;
2249 }
2250
2251
2252 /*!
2253  * @brief モンスターを怒らせる
2254  * Anger the monster
2255  * @param m_ptr モンスター情報構造体の参照ポインタ
2256  * @return なし
2257  */
2258 void anger_monster(monster_type *m_ptr)
2259 {
2260         if (p_ptr->inside_battle) return;
2261         if (is_friendly(m_ptr))
2262         {
2263                 char m_name[80];
2264
2265                 monster_desc(m_name, m_ptr, 0);
2266                 msg_format(_("%^sは怒った!", "%^s gets angry!"), m_name);
2267
2268                 set_hostile(m_ptr);
2269
2270                 chg_virtue(V_INDIVIDUALISM, 1);
2271                 chg_virtue(V_HONOUR, -1);
2272                 chg_virtue(V_JUSTICE, -1);
2273                 chg_virtue(V_COMPASSION, -1);
2274         }
2275 }
2276
2277
2278 /*!
2279  * @brief モンスターが地形を踏破できるかどうかを返す
2280  * Check if monster can cross terrain
2281  * @param feat 地形ID
2282  * @param r_ptr モンスター種族構造体の参照ポインタ
2283  * @param mode オプション
2284  * @return 踏破可能ならばTRUEを返す
2285  */
2286 bool monster_can_cross_terrain(s16b feat, monster_race *r_ptr, u16b mode)
2287 {
2288         feature_type *f_ptr = &f_info[feat];
2289
2290         /* Pattern */
2291         if (have_flag(f_ptr->flags, FF_PATTERN))
2292         {
2293                 if (!(mode & CEM_RIDING))
2294                 {
2295                         if (!(r_ptr->flags7 & RF7_CAN_FLY)) return FALSE;
2296                 }
2297                 else
2298                 {
2299                         if (!(mode & CEM_P_CAN_ENTER_PATTERN)) return FALSE;
2300                 }
2301         }
2302
2303         /* "CAN" flags */
2304         if (have_flag(f_ptr->flags, FF_CAN_FLY) && (r_ptr->flags7 & RF7_CAN_FLY)) return TRUE;
2305         if (have_flag(f_ptr->flags, FF_CAN_SWIM) && (r_ptr->flags7 & RF7_CAN_SWIM)) return TRUE;
2306         if (have_flag(f_ptr->flags, FF_CAN_PASS))
2307         {
2308                 if ((r_ptr->flags2 & RF2_PASS_WALL) && (!(mode & CEM_RIDING) || p_ptr->pass_wall)) return TRUE;
2309         }
2310
2311         if (!have_flag(f_ptr->flags, FF_MOVE)) return FALSE;
2312
2313         /* Some monsters can walk on mountains */
2314         if (have_flag(f_ptr->flags, FF_MOUNTAIN) && (r_ptr->flags8 & RF8_WILD_MOUNTAIN)) return TRUE;
2315
2316         /* Water */
2317         if (have_flag(f_ptr->flags, FF_WATER))
2318         {
2319                 if (!(r_ptr->flags7 & RF7_AQUATIC))
2320                 {
2321                         /* Deep water */
2322                         if (have_flag(f_ptr->flags, FF_DEEP)) return FALSE;
2323
2324                         /* Shallow water */
2325                         else if (r_ptr->flags2 & RF2_AURA_FIRE) return FALSE;
2326                 }
2327         }
2328
2329         /* Aquatic monster into non-water? */
2330         else if (r_ptr->flags7 & RF7_AQUATIC) return FALSE;
2331
2332         /* Lava */
2333         if (have_flag(f_ptr->flags, FF_LAVA))
2334         {
2335                 if (!(r_ptr->flagsr & RFR_EFF_IM_FIRE_MASK)) return FALSE;
2336         }
2337
2338         return TRUE;
2339 }
2340
2341
2342 /*!
2343  * @brief 指定された座標の地形をモンスターが踏破できるかどうかを返す
2344  * Strictly check if monster can enter the grid
2345  * @param y 地形のY座標
2346  * @param x 地形のX座標
2347  * @param r_ptr モンスター種族構造体の参照ポインタ
2348  * @param mode オプション
2349  * @return 踏破可能ならばTRUEを返す
2350  */
2351 bool monster_can_enter(int y, int x, monster_race *r_ptr, u16b mode)
2352 {
2353         cave_type *c_ptr = &cave[y][x];
2354
2355         /* Player or other monster */
2356         if (player_bold(y, x)) return FALSE;
2357         if (c_ptr->m_idx) return FALSE;
2358
2359         return monster_can_cross_terrain(c_ptr->feat, r_ptr, mode);
2360 }
2361
2362
2363 /*!
2364  * @brief モンスターの属性の基づいた敵対関係の有無を返す(サブルーチン)
2365  * Check if this monster has "hostile" alignment (aux)
2366  * @param sub_align1 モンスター1のサブフラグ
2367  * @param sub_align2 モンスター2のサブフラグ
2368  * @return 敵対関係にあるならばTRUEを返す
2369  */
2370 static bool check_hostile_align(byte sub_align1, byte sub_align2)
2371 {
2372         if (sub_align1 != sub_align2)
2373         {
2374                 if (((sub_align1 & SUB_ALIGN_EVIL) && (sub_align2 & SUB_ALIGN_GOOD)) ||
2375                         ((sub_align1 & SUB_ALIGN_GOOD) && (sub_align2 & SUB_ALIGN_EVIL)))
2376                         return TRUE;
2377         }
2378
2379         /* Non-hostile alignment */
2380         return FALSE;
2381 }
2382
2383
2384 /*!
2385  * @brief モンスターの属性の基づいた敵対関係の有無を返す
2386  * Check if two monsters are enemies
2387  * @param m_ptr モンスター1の構造体参照ポインタ
2388  * @param n_ptr モンスター2の構造体参照ポインタ
2389  * @return 敵対関係にあるならばTRUEを返す
2390  */
2391 bool are_enemies(monster_type *m_ptr, monster_type *n_ptr)
2392 {
2393         monster_race *r_ptr = &r_info[m_ptr->r_idx];
2394         monster_race *s_ptr = &r_info[n_ptr->r_idx];
2395
2396         if (p_ptr->inside_battle)
2397         {
2398                 if (is_pet(m_ptr) || is_pet(n_ptr)) return FALSE;
2399                 return TRUE;
2400         }
2401
2402         if ((r_ptr->flags8 & (RF8_WILD_TOWN | RF8_WILD_ALL))
2403             && (s_ptr->flags8 & (RF8_WILD_TOWN | RF8_WILD_ALL)))
2404         {
2405                 if (!is_pet(m_ptr) && !is_pet(n_ptr)) return FALSE;
2406         }
2407
2408         /* Friendly vs. opposite aligned normal or pet */
2409         if (check_hostile_align(m_ptr->sub_align, n_ptr->sub_align))
2410         {
2411                 if (!(m_ptr->mflag2 & MFLAG2_CHAMELEON) || !(n_ptr->mflag2 & MFLAG2_CHAMELEON)) return TRUE;
2412         }
2413
2414         /* Hostile vs. non-hostile */
2415         if (is_hostile(m_ptr) != is_hostile(n_ptr))
2416         {
2417                 return TRUE;
2418         }
2419
2420         /* Default */
2421         return FALSE;
2422 }
2423
2424
2425 /*!
2426  * @brief モンスターがプレイヤーに対して敵意を抱くかどうかを返す
2427  * Check if this monster race has "hostile" alignment
2428  * @param m_ptr モンスター情報構造体の参照ポインタ
2429  * @param pa_good プレイヤーの善傾向値
2430  * @param pa_evil プレイヤーの悪傾向値
2431  * @param r_ptr モンスター種族情報の構造体参照ポインタ
2432  * @return プレイヤーに敵意を持つならばTRUEを返す
2433  * @details
2434  * If user is player, m_ptr == NULL.
2435  */
2436 bool monster_has_hostile_align(monster_type *m_ptr, int pa_good, int pa_evil, monster_race *r_ptr)
2437 {
2438         byte sub_align1 = SUB_ALIGN_NEUTRAL;
2439         byte sub_align2 = SUB_ALIGN_NEUTRAL;
2440
2441         if (m_ptr) /* For a monster */
2442         {
2443                 sub_align1 = m_ptr->sub_align;
2444         }
2445         else /* For player */
2446         {
2447                 if (p_ptr->align >= pa_good) sub_align1 |= SUB_ALIGN_GOOD;
2448                 if (p_ptr->align <= pa_evil) sub_align1 |= SUB_ALIGN_EVIL;
2449         }
2450
2451         /* Racial alignment flags */
2452         if (r_ptr->flags3 & RF3_EVIL) sub_align2 |= SUB_ALIGN_EVIL;
2453         if (r_ptr->flags3 & RF3_GOOD) sub_align2 |= SUB_ALIGN_GOOD;
2454
2455         if (check_hostile_align(sub_align1, sub_align2)) return TRUE;
2456
2457         /* Non-hostile alignment */
2458         return FALSE;
2459 }
2460
2461
2462 /*!
2463  * @brief モンスターが生命体かどうかを返す
2464  * Is the monster "alive"?
2465  * @param r_ptr 判定するモンスターの種族情報構造体参照ポインタ
2466  * @return 生命体ならばTRUEを返す
2467  * @details
2468  * Used to determine the message to print for a killed monster.
2469  * ("dies", "destroyed")
2470  */
2471 bool monster_living(monster_race *r_ptr)
2472 {
2473         /* Non-living, undead, or demon */
2474         if (r_ptr->flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING))
2475                 return FALSE;
2476         else
2477                 return TRUE;
2478 }
2479
2480
2481 /*!
2482  * @brief モンスターが特殊能力上、賞金首から排除する必要があるかどうかを返す。
2483  * Is the monster "alive"? / Is this monster declined to be questor or bounty?
2484  * @param r_idx モンスターの種族ID
2485  * @return 賞金首に加えられないならばTRUEを返す
2486  * @details
2487  * 実質バーノール=ルパート用。
2488  */
2489 bool no_questor_or_bounty_uniques(MONRACE_IDX r_idx)
2490 {
2491         switch (r_idx)
2492         {
2493         /*
2494          * Decline them to be questor or bounty because they use
2495          * special motion "split and combine"
2496          */
2497         case MON_BANORLUPART:
2498         case MON_BANOR:
2499         case MON_LUPART:
2500                 return TRUE;
2501         default:
2502                 return FALSE;
2503         }
2504 }