OSDN Git Service

Fix a bug in monster info.
[hengband/hengband.git] / src / spells2.c
1 /* File: spells2.c */
2
3 /*
4  * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
5  *
6  * This software may be copied and distributed for educational, research,
7  * and not for profit purposes provided that this copyright and statement
8  * are included in all such copies.  Other copyrights may also apply.
9  */
10
11 /* Purpose: Spell code (part 2) */
12
13 #include "angband.h"
14 #include "grid.h"
15
16
17 /*
18  * self-knowledge... idea from nethack.  Useful for determining powers and
19  * resistences of items.  It saves the screen, clears it, then starts listing
20  * attributes, a screenful at a time.  (There are a LOT of attributes to
21  * list.  It will probably take 2 or 3 screens for a powerful character whose
22  * using several artifacts...) -CFT
23  *
24  * It is now a lot more efficient. -BEN-
25  *
26  * See also "identify_fully()".
27  *
28  * XXX XXX XXX Use the "show_file()" method, perhaps.
29  */
30 void self_knowledge(void)
31 {
32         int i = 0, j, k;
33
34         int v_nr = 0;
35         char v_string [8] [128];
36         char s_string [6] [128];
37
38         u32b flgs[TR_FLAG_SIZE];
39
40         object_type *o_ptr;
41
42         char Dummy[80];
43         char buf[2][80];
44
45         cptr info[220];
46
47         int plev = p_ptr->lev;
48
49         int percent;
50
51         for (j = 0; j < TR_FLAG_SIZE; j++)
52                 flgs[j] = 0L;
53
54         p_ptr->knowledge |= (KNOW_STAT | KNOW_HPRATE);
55
56         strcpy(Dummy, "");
57
58         percent = (int)(((long)p_ptr->player_hp[PY_MAX_LEVEL - 1] * 200L) /
59                 (2 * p_ptr->hitdie +
60                 ((PY_MAX_LEVEL - 1+3) * (p_ptr->hitdie + 1))));
61
62 #ifdef JP
63 sprintf(Dummy, "¸½ºß¤ÎÂÎÎÏ¥é¥ó¥¯ : %d/100", percent);
64 #else
65         sprintf(Dummy, "Your current Life Rating is %d/100.", percent);
66 #endif
67
68         strcpy(buf[0], Dummy);
69         info[i++] = buf[0];
70         info[i++] = "";
71
72         chg_virtue(V_KNOWLEDGE, 1);
73         chg_virtue(V_ENLIGHTEN, 1);
74
75         /* Acquire item flags from equipment */
76         for (k = INVEN_RARM; k < INVEN_TOTAL; k++)
77         {
78                 u32b tflgs[TR_FLAG_SIZE];
79
80                 o_ptr = &inventory[k];
81
82                 /* Skip non-objects */
83                 if (!o_ptr->k_idx) continue;
84
85                 /* Extract the flags */
86                 object_flags(o_ptr, tflgs);
87
88                 /* Extract flags */
89                 for (j = 0; j < TR_FLAG_SIZE; j++)
90                         flgs[j] |= tflgs[j];
91         }
92
93 #ifdef JP
94         info[i++] = "ǽÎϤκÇÂçÃÍ";
95 #else
96         info[i++] = "Limits of maximum stats";
97 #endif
98
99         for (v_nr = 0; v_nr < 6; v_nr++)
100         {
101                 char stat_desc[80];
102
103                 sprintf(stat_desc, "%s 18/%d", stat_names[v_nr], p_ptr->stat_max_max[v_nr]-18);
104
105                 strcpy(s_string[v_nr], stat_desc);
106
107                 info[i++] = s_string[v_nr];
108         }
109         info[i++] = "";
110
111 #ifdef JP
112         sprintf(Dummy, "¸½ºß¤Î°À­ : %s(%ld)", your_alignment(), (long int)p_ptr->align);
113 #else
114         sprintf(Dummy, "Your alighnment : %s(%ld)", your_alignment(), (long int)p_ptr->align);
115 #endif
116         strcpy(buf[1], Dummy);
117         info[i++] = buf[1];
118         for (v_nr = 0; v_nr < 8; v_nr++)
119         {
120                 char v_name [20];
121                 char vir_desc[80];
122                 int tester = p_ptr->virtues[v_nr];
123         
124                 strcpy(v_name, virtue[(p_ptr->vir_types[v_nr])-1]);
125  
126 #ifdef JP
127                 sprintf(vir_desc, "¤ª¤Ã¤È¡£%s¤Î¾ðÊó¤Ê¤·¡£", v_name);
128 #else
129                 sprintf(vir_desc, "Oops. No info about %s.", v_name);
130 #endif
131                 if (tester < -100)
132 #ifdef JP
133                         sprintf(vir_desc, "[%s]¤ÎÂжˠ(%d)",
134 #else
135                         sprintf(vir_desc, "You are the polar opposite of %s (%d).",
136 #endif
137                                 v_name, tester);
138                 else if (tester < -80)
139 #ifdef JP
140                         sprintf(vir_desc, "[%s]¤ÎÂçŨ (%d)",
141 #else
142                         sprintf(vir_desc, "You are an arch-enemy of %s (%d).",
143 #endif
144                                 v_name, tester);
145                 else if (tester < -60)
146 #ifdef JP
147                         sprintf(vir_desc, "[%s]¤Î¶¯Å¨ (%d)",
148 #else
149                         sprintf(vir_desc, "You are a bitter enemy of %s (%d).",
150 #endif
151                                 v_name, tester);
152                 else if (tester < -40)
153 #ifdef JP
154                         sprintf(vir_desc, "[%s]¤ÎŨ (%d)",
155 #else
156                         sprintf(vir_desc, "You are an enemy of %s (%d).",
157 #endif
158                                 v_name, tester);
159                 else if (tester < -20)
160 #ifdef JP
161                         sprintf(vir_desc, "[%s]¤Îºá¼Ô (%d)",
162 #else
163                         sprintf(vir_desc, "You have sinned against %s (%d).",
164 #endif
165                                 v_name, tester);
166                 else if (tester < 0)
167 #ifdef JP
168                         sprintf(vir_desc, "[%s]¤ÎÌÂÆ»¼Ô (%d)",
169 #else
170                         sprintf(vir_desc, "You have strayed from the path of %s (%d).",
171 #endif
172                                 v_name, tester);
173                 else if (tester == 0)                   
174 #ifdef JP
175                         sprintf(vir_desc, "[%s]¤ÎÃæΩ¼Ô (%d)",
176 #else
177                         sprintf(vir_desc,"You are neutral to %s (%d).",
178 #endif
179                                 v_name, tester);
180                 else if (tester < 20)
181 #ifdef JP
182                         sprintf(vir_desc, "[%s]¤Î¾®ÆÁ¼Ô (%d)",
183 #else
184                         sprintf(vir_desc,"You are somewhat virtuous in %s (%d).",
185 #endif
186                                 v_name, tester);
187                 else if (tester < 40)
188 #ifdef JP
189                         sprintf(vir_desc, "[%s]¤ÎÃæÆÁ¼Ô (%d)",
190 #else
191                         sprintf(vir_desc,"You are virtuous in %s (%d).",
192 #endif
193                                 v_name, tester);
194                 else if (tester < 60)
195 #ifdef JP
196                         sprintf(vir_desc, "[%s]¤Î¹âÆÁ¼Ô (%d)",
197 #else
198                         sprintf(vir_desc,"You are very virtuous in %s (%d).",
199 #endif
200                                 v_name, tester);
201                 else if (tester < 80)
202 #ifdef JP
203                         sprintf(vir_desc, "[%s]¤ÎÇƼԠ(%d)",
204 #else
205                         sprintf(vir_desc,"You are a champion of %s (%d).",
206 #endif
207                                 v_name, tester);
208                 else if (tester < 100)
209 #ifdef JP
210                         sprintf(vir_desc, "[%s]¤Î°ÎÂç¤ÊÇƼԠ(%d)",
211 #else
212                         sprintf(vir_desc,"You are a great champion of %s (%d).",
213 #endif
214                                 v_name, tester);
215                 else
216 #ifdef JP
217                         sprintf(vir_desc, "[%s]¤Î¶ñ¸½¼Ô (%d)",
218 #else
219                         sprintf(vir_desc,"You are the living embodiment of %s (%d).",
220 #endif
221                 v_name, tester);
222         
223                 strcpy(v_string[v_nr], vir_desc);
224         
225                 info[i++] = v_string[v_nr];
226         }
227         info[i++] = "";
228         
229         /* Racial powers... */
230         if (p_ptr->mimic_form)
231         {
232                 switch (p_ptr->mimic_form)
233                 {
234                         case MIMIC_DEMON:
235                         case MIMIC_DEMON_LORD:
236 #ifdef JP
237 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÃϹö¤«²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤­¤ë¡£(%d MP)", 3 * plev, 10+plev/3);
238 #else
239                                 sprintf(Dummy, "You can nether breathe, dam. %d (cost %d).", 3 * plev, 10+plev/3);
240 #endif
241
242                                 info[i++] = Dummy;
243                         break;
244                 case MIMIC_VAMPIRE:
245                         if (plev > 1)
246                         {
247 #ifdef JP
248 sprintf(Dummy, "¤¢¤Ê¤¿¤ÏŨ¤«¤é %d-%d HP ¤ÎÀ¸Ì¿ÎϤòµÛ¼ý¤Ç¤­¤ë¡£(%d MP)",
249 #else
250                                 sprintf(Dummy, "You can steal life from a foe, dam. %d-%d (cost %d).",
251 #endif
252
253                                     plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
254                                 info[i++] = Dummy;
255                         }
256                         break;
257                 }
258         }
259         else
260         {
261         switch (p_ptr->prace)
262         {
263                 case RACE_NIBELUNG:
264                 case RACE_DWARF:
265                         if (plev > 4)
266 #ifdef JP
267 info[i++] = "¤¢¤Ê¤¿¤Ï櫤ȥɥ¢¤È³¬Ãʤò´¶ÃΤǤ­¤ë¡£(5 MP)";
268 #else
269                                 info[i++] = "You can find traps, doors and stairs (cost 5).";
270 #endif
271
272                         break;
273                 case RACE_HOBBIT:
274                         if (plev > 14)
275                         {
276 #ifdef JP
277 info[i++] = "¤¢¤Ê¤¿¤Ï¿©ÎÁ¤òÀ¸À®¤Ç¤­¤ë¡£(10 MP)";
278 #else
279                                 info[i++] = "You can produce food (cost 10).";
280 #endif
281
282                         }
283                         break;
284                 case RACE_GNOME:
285                         if (plev > 4)
286                         {
287 #ifdef JP
288 sprintf(Dummy, "¤¢¤Ê¤¿¤ÏÈÏ°Ï %d °ÊÆâ¤Ë¥Æ¥ì¥Ý¡¼¥È¤Ç¤­¤ë¡£(%d MP)",
289 #else
290                                 sprintf(Dummy, "You can teleport, range %d (cost %d).",
291 #endif
292
293                                     (1 + plev), (5 + (plev / 5)));
294                                 info[i++] = Dummy;
295                         }
296                         break;
297                 case RACE_HALF_ORC:
298                         if (plev > 2)
299 #ifdef JP
300 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤò½üµî¤Ç¤­¤ë¡£(5 MP)";
301 #else
302                                 info[i++] = "You can remove fear (cost 5).";
303 #endif
304
305                         break;
306                 case RACE_HALF_TROLL:
307                         if (plev > 9)
308 #ifdef JP
309 info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Ë½²½¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(12 MP) ";
310 #else
311                                 info[i++] = "You enter berserk fury (cost 12).";
312 #endif
313
314                         break;
315                 case RACE_AMBERITE:
316                         if (plev > 29)
317 #ifdef JP
318 info[i++] = "¤¢¤Ê¤¿¤Ï¥·¥ã¥É¥¦¥·¥Õ¥È¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(50 MP)";
319 #else
320                                 info[i++] = "You can Shift Shadows (cost 50).";
321 #endif
322
323                         if (plev > 39)
324 #ifdef JP
325 info[i++] = "¤¢¤Ê¤¿¤Ï¡Ö¥Ñ¥¿¡¼¥ó¡×¤ò¿´¤ËÉÁ¤¤¤ÆÊ⤯¤³¤È¤¬¤Ç¤­¤ë¡£(75 MP)";
326 #else
327                                 info[i++] = "You can mentally Walk the Pattern (cost 75).";
328 #endif
329
330                         break;
331                 case RACE_BARBARIAN:
332                         if (plev > 7)
333 #ifdef JP
334 info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Ë½²½¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(10 MP) ";
335 #else
336                                 info[i++] = "You can enter berserk fury (cost 10).";
337 #endif
338
339                         break;
340                 case RACE_HALF_OGRE:
341                         if (plev > 24)
342 #ifdef JP
343 info[i++] = "¤¢¤Ê¤¿¤ÏÇúȯ¤Î¥ë¡¼¥ó¤ò»Å³Ý¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(35 MP)";
344 #else
345                                 info[i++] = "You can set an Explosive Rune (cost 35).";
346 #endif
347
348                         break;
349                 case RACE_HALF_GIANT:
350                         if (plev > 19)
351 #ifdef JP
352 info[i++] = "¤¢¤Ê¤¿¤ÏÀФÎÊɤò²õ¤¹¤³¤È¤¬¤Ç¤­¤ë¡£(10 MP)";
353 #else
354                                 info[i++] = "You can break stone walls (cost 10).";
355 #endif
356
357                         break;
358                 case RACE_HALF_TITAN:
359                         if (plev > 34)
360 #ifdef JP
361 info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤ò¥¹¥­¥ã¥ó¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(20 MP)";
362 #else
363                                 info[i++] = "You can probe monsters (cost 20).";
364 #endif
365
366                         break;
367                 case RACE_CYCLOPS:
368                         if (plev > 19)
369                         {
370 #ifdef JP
371 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î´äÀФòÅꤲ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(15 MP)",
372 #else
373                                 sprintf(Dummy, "You can throw a boulder, dam. %d (cost 15).",
374 #endif
375
376                                     3 * plev);
377                                 info[i++] = Dummy;
378                         }
379                         break;
380                 case RACE_YEEK:
381                         if (plev > 14)
382 #ifdef JP
383 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤò¸Æ¤Óµ¯¤³¤¹¶«¤ÓÀ¼¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(15 MP)";
384 #else
385                                 info[i++] = "You can make a terrifying scream (cost 15).";
386 #endif
387
388                         break;
389                 case RACE_KLACKON:
390                         if (plev > 8)
391                         {
392 #ifdef JP
393 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î»À¤ò¿á¤­¤«¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(9 MP)", plev);
394 #else
395                                 sprintf(Dummy, "You can spit acid, dam. %d (cost 9).", plev);
396 #endif
397
398                                 info[i++] = Dummy;
399                         }
400                         break;
401                 case RACE_KOBOLD:
402                         if (plev > 11)
403                         {
404                                 sprintf(Dummy,
405 #ifdef JP
406     "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÆÇÌð¤òÅꤲ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(8 MP)", plev);
407 #else
408                                     "You can throw a dart of poison, dam. %d (cost 8).", plev);
409 #endif
410
411                                 info[i++] = Dummy;
412                         }
413                         break;
414                 case RACE_DARK_ELF:
415                         if (plev > 1)
416                         {
417 #ifdef JP
418 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò»È¤¨¤ë¡£(2 MP)",
419 #else
420                                 sprintf(Dummy, "You can cast a Magic Missile, dam %d (cost 2).",
421 #endif
422
423                                     (3 + ((plev-1) / 5)));
424                                 info[i++] = Dummy;
425                         }
426                         break;
427                 case RACE_DRACONIAN:
428 #ifdef JP
429 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤­¤ë¡£(%d MP)", 2 * plev, plev);
430 #else
431                         sprintf(Dummy, "You can breathe, dam. %d (cost %d).", 2 * plev, plev);
432 #endif
433
434                         info[i++] = Dummy;
435                         break;
436                 case RACE_MIND_FLAYER:
437                         if (plev > 14)
438 #ifdef JP
439 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÀº¿À¹¶·â¤ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(12 MP)", plev);
440 #else
441                                 sprintf(Dummy, "You can mind blast your enemies, dam %d (cost 12).", plev);
442 #endif
443
444                         info[i++] = Dummy;
445                         break;
446                 case RACE_IMP:
447                         if (plev > 29)
448                         {
449 #ifdef JP
450 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò»È¤¨¤ë¡£(15 MP)", plev);
451 #else
452                                 sprintf(Dummy, "You can cast a Fire Ball, dam. %d (cost 15).", plev);
453 #endif
454
455                                 info[i++] = Dummy;
456                         }
457                         else if (plev > 8)
458                         {
459 #ifdef JP
460 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò»È¤¨¤ë¡£(15 MP)", plev);
461 #else
462                                 sprintf(Dummy, "You can cast a Fire Bolt, dam. %d (cost 15).", plev);
463 #endif
464
465                                 info[i++] = Dummy;
466                         }
467                         break;
468                 case RACE_GOLEM:
469                         if (plev > 19)
470 #ifdef JP
471 info[i++] = "¤¢¤Ê¤¿¤Ï d20+30 ¥¿¡¼¥ó¤Î´ÖÈ©¤òÀФËÊѲ½¤µ¤»¤é¤ì¤ë¡£(15 MP)";
472 #else
473                                 info[i++] = "You can turn your skin to stone, dur d20+30 (cost 15).";
474 #endif
475
476                         break;
477                 case RACE_ZOMBIE:
478                 case RACE_SKELETON:
479                         if (plev > 29)
480 #ifdef JP
481 info[i++] = "¤¢¤Ê¤¿¤Ï¼º¤Ã¤¿À¸Ì¿ÎϤò²óÉü¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(30 MP)";
482 #else
483                                 info[i++] = "You can restore lost life forces (cost 30).";
484 #endif
485
486                         break;
487                 case RACE_VAMPIRE:
488                         if (plev > 1)
489                         {
490 #ifdef JP
491 sprintf(Dummy, "¤¢¤Ê¤¿¤ÏŨ¤«¤é %d-%d HP ¤ÎÀ¸Ì¿ÎϤòµÛ¼ý¤Ç¤­¤ë¡£(%d MP)",
492 #else
493                                 sprintf(Dummy, "You can steal life from a foe, dam. %d-%d (cost %d).",
494 #endif
495
496                                     plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
497                                 info[i++] = Dummy;
498                         }
499                         break;
500                 case RACE_SPECTRE:
501                         if (plev > 3)
502                         {
503 #ifdef JP
504 info[i++] = "¤¢¤Ê¤¿¤Ïµã¤­¶«¤ó¤ÇŨ¤ò¶²Éݤµ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(3 MP)";
505 #else
506                                 info[i++] = "You can wail to terrify your enemies (cost 3).";
507 #endif
508
509                         }
510                         break;
511                 case RACE_SPRITE:
512                         if (plev > 11)
513                         {
514 #ifdef JP
515 info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤ò̲¤é¤»¤ëËâË¡¤ÎÊ´¤òÅꤲ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(12 MP)";
516 #else
517                                 info[i++] = "You can throw magical dust which induces sleep (cost 12).";
518 #endif
519
520                         }
521                         break;
522                 case RACE_DEMON:
523 #ifdef JP
524 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÃϹö¤«²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤­¤ë¡£(%d MP)", 3 * plev, 10+plev/3);
525 #else
526                         sprintf(Dummy, "You can breathe nether, dam. %d (cost %d).", 3 * plev, 10+plev/3);
527 #endif
528
529                         info[i++] = Dummy;
530                         break;
531                 case RACE_KUTAR:
532                         if (plev > 19)
533 #ifdef JP
534 info[i++] = "¤¢¤Ê¤¿¤Ï d20+30 ¥¿¡¼¥ó¤Î´Ö²£¤Ë¿­¤Ó¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(15 MP)";
535 #else
536                                 info[i++] = "You can expand horizontally, dur d20+30 (cost 15).";
537 #endif
538
539                         break;
540                 case RACE_ANDROID:
541                         if (plev < 10)
542 #ifdef JP
543 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥ì¥¤¥¬¥ó¤ò·â¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£(7 MP)", (plev + 1) / 2);
544 #else
545                                 sprintf(Dummy, "You can fire a ray gun with damage %d (cost 7).", (plev+1)/2);
546 #endif
547                         else if (plev < 25)
548 #ifdef JP
549 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ö¥é¥¹¥¿¡¼¤ò·â¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£(13 MP)", plev);
550 #else
551                                 sprintf(Dummy, "You can fire a blaster with damage %d (cost 13).", plev);
552 #endif
553                         else if (plev < 35)
554 #ifdef JP
555 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ð¥º¡¼¥«¤ò·â¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£(26 MP)", plev * 2);
556 #else
557                                 sprintf(Dummy, "You can fire a bazooka with damage %d (cost 26).", plev * 2);
558 #endif
559                         else if (plev < 45)
560 #ifdef JP
561 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ó¡¼¥à¥­¥ã¥Î¥ó¤ò·â¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£(40 MP)", plev * 2);
562 #else
563                                 sprintf(Dummy, "You can fire a beam cannon with damage %d (cost 40).", plev * 2);
564 #endif
565                         else
566 #ifdef JP
567 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥í¥±¥Ã¥È¤ò·â¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£(60 MP)", plev * 5);
568 #else
569                                 sprintf(Dummy, "You can fire a rocket with damage %d (cost 60).", plev * 5);
570 #endif
571
572                         info[i++] = Dummy;
573                         break;
574                 default:
575                         break;
576         }
577         }
578
579         switch(p_ptr->pclass)
580         {
581                 case CLASS_WARRIOR:
582                         if (plev > 39)
583                         {
584 #ifdef JP
585 info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤ÊÊý¸þ¤ËÂФ·¤Æ¿ô²ó¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(75 MP)";
586 #else
587                                 info[i++] = "You can attack some random directions at a time (cost 75).";
588 #endif
589                         }
590                         break;
591                 case CLASS_HIGH_MAGE:
592                         if (p_ptr->realm1 == REALM_HEX) break;
593                 case CLASS_MAGE:
594                 case CLASS_SORCERER:
595                         if (plev > 24)
596                         {
597 #ifdef JP
598 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤ÎËâÎϤòµÛ¼ý¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(1 MP)";
599 #else
600                                 info[i++] = "You can absorb charges from an item (cost 1).";
601 #endif
602                         }
603                         break;
604                 case CLASS_PRIEST:
605                         if (is_good_realm(p_ptr->realm1))
606                         {
607                                 if (plev > 34)
608                                 {
609 #ifdef JP
610 info[i++] = "¤¢¤Ê¤¿¤ÏÉð´ï¤ò½ËÊ¡¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(70 MP)";
611 #else
612                                         info[i++] = "You can bless a weapon (cost 70).";
613 #endif
614                                 }
615                         }
616                         else
617                         {
618                                 if (plev > 41)
619                                 {
620 #ifdef JP
621 info[i++] = "¤¢¤Ê¤¿¤Ï¼þ¤ê¤Î¤¹¤Ù¤Æ¤Î¥â¥ó¥¹¥¿¡¼¤ò¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(40 MP)";
622 #else
623                                         info[i++] = "You can damages all monsters in sight (cost 40).";
624 #endif
625                                 }
626                         }
627                         break;
628                 case CLASS_ROGUE:
629                         if (plev > 7)
630                         {
631 #ifdef JP
632 info[i++] = "¤¢¤Ê¤¿¤Ï¹¶·â¤·¤Æ¨ºÂ¤Ëƨ¤²¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(12 MP)";
633 #else
634                                 info[i++] = "You can hit a monster and teleport at a time (cost 12).";
635 #endif
636                         }
637                         break;
638                 case CLASS_RANGER:
639                         if (plev > 14)
640                         {
641 #ifdef JP
642 info[i++] = "¤¢¤Ê¤¿¤Ï²øʪ¤òÄ´ºº¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(20 MP)";
643 #else
644                                 info[i++] = "You can prove monsters (cost 20).";
645 #endif
646                         }
647                         break;
648                 case CLASS_PALADIN:
649                         if (is_good_realm(p_ptr->realm1))
650                         {
651                                 if (plev > 29)
652                                 {
653 #ifdef JP
654 info[i++] = "¤¢¤Ê¤¿¤ÏÀ»¤Ê¤ëÁä¤òÊü¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£(30 MP)";
655 #else
656                                         info[i++] = "You can fires a holy spear (cost 30).";
657 #endif
658                                 }
659                         }
660                         else
661                         {
662                                 if (plev > 29)
663                                 {
664 #ifdef JP
665 info[i++] = "¤¢¤Ê¤¿¤ÏÀ¸Ì¿ÎϤò¸º¾¯¤µ¤»¤ëÁä¤òÊü¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£(30 MP)";
666 #else
667                                         info[i++] = "You can fires a spear which drains vitality (cost 30).";
668 #endif
669                                 }
670                         }
671                         break;
672                 case CLASS_WARRIOR_MAGE:
673                         if (plev > 24)
674                         {
675 #ifdef JP
676 info[i++] = "¤¢¤Ê¤¿¤Ï£È£Ð¤ò£Í£Ð¤ËÊÑ´¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(0 MP)";
677 #else
678                                 info[i++] = "You can convert HP to SP (cost 0).";
679 #endif
680 #ifdef JP
681 info[i++] = "¤¢¤Ê¤¿¤Ï£Í£Ð¤ò£È£Ð¤ËÊÑ´¹¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(0 MP)";
682 #else
683                                 info[i++] = "You can convert SP to HP (cost 0).";
684 #endif
685                         }
686                         break;
687                 case CLASS_CHAOS_WARRIOR:
688                         if (plev > 39)
689                         {
690 #ifdef JP
691 info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Ë²øʪ¤òÏǤ魯¸÷¤òȯÀ¸¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(50 MP)";
692 #else
693                                 info[i++] = "You can radiate light which confuses nearby monsters (cost 50).";
694 #endif
695                         }
696                         break;
697                 case CLASS_MONK:
698                         if (plev > 24)
699                         {
700 #ifdef JP
701 info[i++] = "¤¢¤Ê¤¿¤Ï¹½¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(0 MP)";
702 #else
703                                 info[i++] = "You can assume a posture of special form (cost 0).";
704 #endif
705                         }
706                         if (plev > 29)
707                         {
708 #ifdef JP
709 info[i++] = "¤¢¤Ê¤¿¤ÏÄ̾ï¤Î2Çܤι¶·â¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤ë¡£(30 MP)";
710 #else
711                                 info[i++] = "You can perform double attacks in a time (cost 30).";
712 #endif
713                         }
714                         break;
715                 case CLASS_MINDCRAFTER:
716                 case CLASS_FORCETRAINER:
717                         if (plev > 14)
718                         {
719 #ifdef JP
720 info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¤ò½¸Ã椷¤Æ£Í£Ð¤ò²óÉü¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(0 MP)";
721 #else
722                                 info[i++] = "You can concentrate to regenerate your mana (cost 0).";
723 #endif
724                         }
725                         break;
726                 case CLASS_TOURIST:
727 #ifdef JP
728 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ì¿¿¤ò»£±Æ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(0 MP)";
729 #else
730                                 info[i++] = "You can take a photograph (cost 0).";
731 #endif
732                         if (plev > 24)
733                         {
734 #ifdef JP
735 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤ò´°Á´¤Ë´ÕÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(20 MP)";
736 #else
737                                 info[i++] = "You can *identify* items (cost 20).";
738 #endif
739                         }
740                         break;
741                 case CLASS_IMITATOR:
742                         if (plev > 29)
743                         {
744 #ifdef JP
745 info[i++] = "¤¢¤Ê¤¿¤Ï²øʪ¤ÎÆü칶·â¤ò¥À¥á¡¼¥¸2ÇܤǤޤͤ뤳¤È¤¬¤Ç¤­¤ë¡£(100 MP)";
746 #else
747                                 info[i++] = "You can imitate monster's special attacks with double damage (cost 100).";
748 #endif
749                         }
750                         break;
751                 case CLASS_BEASTMASTER:
752 #ifdef JP
753 info[i++] = "¤¢¤Ê¤¿¤Ï1ÂΤÎÀ¸Ì¿¤Î¤¢¤ë¥â¥ó¥¹¥¿¡¼¤ò»ÙÇÛ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(¥ì¥Ù¥ë/4 MP)";
754 #else
755                         info[i++] = "You can dominate a monster (cost level/4).";
756 #endif
757                         if (plev > 29)
758                         {
759 #ifdef JP
760 info[i++] = "¤¢¤Ê¤¿¤Ï»ë³¦Æâ¤ÎÀ¸Ì¿¤Î¤¢¤ë¥â¥ó¥¹¥¿¡¼¤ò»ÙÇÛ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£((¥ì¥Ù¥ë+20)/2 MP)";
761 #else
762                                 info[i++] = "You can dominate living monsters in sight (cost (level+20)/4).";
763 #endif
764                         }
765                         break;
766                 case CLASS_MAGIC_EATER:
767 #ifdef JP
768 info[i++] = "¤¢¤Ê¤¿¤Ï¾ó/ËâË¡ËÀ/¥í¥Ã¥É¤ÎËâÎϤò¼«Ê¬¤Î¤â¤Î¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
769 #else
770                         info[i++] = "You can absorb a staff, wand or rod itself.";
771 #endif
772                         break;
773                 case CLASS_RED_MAGE:
774                         if (plev > 47)
775                         {
776 #ifdef JP
777 info[i++] = "¤¢¤Ê¤¿¤Ï1¥¿¡¼¥ó¤Ë2²óËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(20 MP)";
778 #else
779                                 info[i++] = "You can cast two spells in one time (cost 20).";
780 #endif
781                         }
782                         break;
783                 case CLASS_SAMURAI:
784                         {
785 #ifdef JP
786 info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¤ò½¸Ã椷¤Æµ¤¹ç¤¤¤òί¤á¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
787 #else
788                                 info[i++] = "You can concentrate to regenerate your mana.";
789 #endif
790                         }
791                         if (plev > 24)
792                         {
793 #ifdef JP
794 info[i++] = "¤¢¤Ê¤¿¤ÏÆüì¤Ê·¿¤Ç¹½¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
795 #else
796                                 info[i++] = "You can assume a posture of special form.";
797 #endif
798                         }
799                         break;
800                 case CLASS_BLUE_MAGE:
801 #ifdef JP
802 info[i++] = "¤¢¤Ê¤¿¤ÏÁê¼ê¤Ë»È¤ï¤ì¤¿ËâË¡¤ò³Ø¤Ö¤³¤È¤¬¤Ç¤­¤ë¡£";
803 #else
804                         info[i++] = "You can study spells which your enemy casts on you.";
805 #endif
806                         break;
807                 case CLASS_CAVALRY:
808                         if (plev > 9)
809                         {
810 #ifdef JP
811 info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤Ë¾è¤Ã¤Æ̵ÍýÌðÍý¥Ú¥Ã¥È¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
812 #else
813                                 info[i++] = "You can ride on a hostile monster forcibly to turn it into pet.";
814 #endif
815                         }
816                         break;
817                 case CLASS_BERSERKER:
818                         if (plev > 9)
819                         {
820 #ifdef JP
821 info[i++] = "¤¢¤Ê¤¿¤Ï³¹¤È¥À¥ó¥¸¥ç¥ó¤Î´Ö¤ò¹Ô¤­Í褹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
822 #else
823                         info[i++] = "You can travel between town and the depths.";
824 #endif
825                         }
826                         break;
827                 case CLASS_MIRROR_MASTER:
828 #ifdef JP
829 info[i++] = "¤¢¤Ê¤¿¤Ï¶À¤òºî¤ê½Ð¤¹¤³¤È¤¬¤Ç¤­¤ë¡£(2 MP)";
830 #else
831                                 info[i++] = "You can create a Mirror (cost 2).";
832 #endif
833 #ifdef JP
834 info[i++] = "¤¢¤Ê¤¿¤Ï¶À¤ò³ä¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(0 MP)";
835 #else
836                                 info[i++] = "You can break distant Mirrors (cost 0).";
837 #endif
838                         break;
839                 case CLASS_NINJA:
840                         if (plev > 19)
841                         {
842 #ifdef JP
843 info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÁ᤯°ÜÆ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
844 #else
845                                 info[i++] = "You can walk extremery fast.";
846 #endif
847                         }
848                         break;
849         }
850
851         if (p_ptr->muta1)
852         {
853                 if (p_ptr->muta1 & MUT1_SPIT_ACID)
854                 {
855 #ifdef JP
856 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤ò¿á¤­¤«¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX1)";
857 #else
858                         info[i++] = "You can spit acid (dam lvl).";
859 #endif
860
861                 }
862                 if (p_ptr->muta1 & MUT1_BR_FIRE)
863                 {
864 #ifdef JP
865 info[i++] = "¤¢¤Ê¤¿¤Ï±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤­¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
866 #else
867                         info[i++] = "You can breathe fire (dam lvl * 2).";
868 #endif
869
870                 }
871                 if (p_ptr->muta1 & MUT1_HYPN_GAZE)
872                 {
873 #ifdef JP
874 info[i++] = "¤¢¤Ê¤¿¤ÎâˤߤϺÅ̲¸ú²Ì¤ò¤â¤Ä¡£";
875 #else
876                         info[i++] = "Your gaze is hypnotic.";
877 #endif
878
879                 }
880                 if (p_ptr->muta1 & MUT1_TELEKINES)
881                 {
882 #ifdef JP
883 info[i++] = "¤¢¤Ê¤¿¤ÏÇ°Æ°ÎϤò¤â¤Ã¤Æ¤¤¤ë¡£";
884 #else
885                         info[i++] = "You are telekinetic.";
886 #endif
887
888                 }
889                 if (p_ptr->muta1 & MUT1_VTELEPORT)
890                 {
891 #ifdef JP
892 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¥Æ¥ì¥Ý¡¼¥È¤Ç¤­¤ë¡£";
893 #else
894                         info[i++] = "You can teleport at will.";
895 #endif
896
897                 }
898                 if (p_ptr->muta1 & MUT1_MIND_BLST)
899                 {
900 #ifdef JP
901 info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¹¶·â¤ò¹Ô¤¨¤ë¡£(¥À¥á¡¼¥¸ 3¡Á12d3)";
902 #else
903                         info[i++] = "You can Mind Blast your enemies (3 to 12d3 dam).";
904 #endif
905
906                 }
907                 if (p_ptr->muta1 & MUT1_RADIATION)
908                 {
909 #ifdef JP
910 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¶¯¤¤Êü¼ÍÀþ¤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
911 #else
912                         info[i++] = "You can emit hard radiation at will (dam lvl * 2).";
913 #endif
914
915                 }
916                 if (p_ptr->muta1 & MUT1_VAMPIRISM)
917                 {
918 #ifdef JP
919 info[i++] = "¤¢¤Ê¤¿¤ÏµÛ·ìµ´¤Î¤è¤¦¤ËŨ¤«¤éÀ¸Ì¿ÎϤòµÛ¼ý¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
920 #else
921                         info[i++] = "You can drain life from a foe like a vampire (dam lvl * 2).";
922 #endif
923
924                 }
925                 if (p_ptr->muta1 & MUT1_SMELL_MET)
926                 {
927 #ifdef JP
928 info[i++] = "¤¢¤Ê¤¿¤Ï¶á¤¯¤Ë¤¢¤ëµ®¶â°¤ò¤«¤®Ê¬¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
929 #else
930                         info[i++] = "You can smell nearby precious metal.";
931 #endif
932
933                 }
934                 if (p_ptr->muta1 & MUT1_SMELL_MON)
935                 {
936 #ifdef JP
937 info[i++] = "¤¢¤Ê¤¿¤Ï¶á¤¯¤Î¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò¤«¤®Ê¬¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
938 #else
939                         info[i++] = "You can smell nearby monsters.";
940 #endif
941
942                 }
943                 if (p_ptr->muta1 & MUT1_BLINK)
944                 {
945 #ifdef JP
946 info[i++] = "¤¢¤Ê¤¿¤Ïû¤¤µ÷Î¥¤ò¥Æ¥ì¥Ý¡¼¥È¤Ç¤­¤ë¡£";
947 #else
948                         info[i++] = "You can teleport yourself short distances.";
949 #endif
950
951                 }
952                 if (p_ptr->muta1 & MUT1_EAT_ROCK)
953                 {
954 #ifdef JP
955 info[i++] = "¤¢¤Ê¤¿¤Ï¹Å¤¤´ä¤ò¿©¤Ù¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
956 #else
957                         info[i++] = "You can consume solid rock.";
958 #endif
959
960                 }
961                 if (p_ptr->muta1 & MUT1_SWAP_POS)
962                 {
963 #ifdef JP
964 info[i++] = "¤¢¤Ê¤¿¤Ï¾¤Î¼Ô¤È¾ì½ê¤òÆþ¤ìÂؤï¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
965 #else
966                         info[i++] = "You can switch locations with another being.";
967 #endif
968
969                 }
970                 if (p_ptr->muta1 & MUT1_SHRIEK)
971                 {
972 #ifdef JP
973 info[i++] = "¤¢¤Ê¤¿¤Ï¿È¤ÎÌÓ¤â¤è¤À¤Ä¶«¤ÓÀ¼¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
974 #else
975                         info[i++] = "You can emit a horrible shriek (dam 2 * lvl).";
976 #endif
977
978                 }
979                 if (p_ptr->muta1 & MUT1_ILLUMINE)
980                 {
981 #ifdef JP
982 info[i++] = "¤¢¤Ê¤¿¤ÏÌÀ¤ë¤¤¸÷¤òÊü¤Ä¤³¤È¤¬¤Ç¤­¤ë¡£";
983 #else
984                         info[i++] = "You can emit bright light.";
985 #endif
986
987                 }
988                 if (p_ptr->muta1 & MUT1_DET_CURSE)
989                 {
990 #ifdef JP
991 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°­¤ÊËâË¡¤Î´í¸±¤ò´¶¤¸¤È¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
992 #else
993                         info[i++] = "You can feel the danger of evil magic.";
994 #endif
995
996                 }
997                 if (p_ptr->muta1 & MUT1_BERSERK)
998                 {
999 #ifdef JP
1000 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¶¸ÍðÀïÆ®¾õÂ֤ˤʤ뤳¤È¤¬¤Ç¤­¤ë¡£";
1001 #else
1002                         info[i++] = "You can drive yourself into a berserk frenzy.";
1003 #endif
1004
1005                 }
1006                 if (p_ptr->muta1 & MUT1_POLYMORPH)
1007                 {
1008 #ifdef JP
1009 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»Ö¤ÇÊѲ½¤Ç¤­¤ë¡£";
1010 #else
1011                         info[i++] = "You can polymorph yourself at will.";
1012 #endif
1013
1014                 }
1015                 if (p_ptr->muta1 & MUT1_MIDAS_TCH)
1016                 {
1017 #ifdef JP
1018 info[i++] = "¤¢¤Ê¤¿¤ÏÄ̾異¥¤¥Æ¥à¤ò¶â¤ËÊѤ¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
1019 #else
1020                         info[i++] = "You can turn ordinary items to gold.";
1021 #endif
1022
1023                 }
1024                 if (p_ptr->muta1 & MUT1_GROW_MOLD)
1025                 {
1026 #ifdef JP
1027 info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Ë¥­¥Î¥³¤òÀ¸¤ä¤¹¤³¤È¤¬¤Ç¤­¤ë¡£";
1028 #else
1029                         info[i++] = "You can cause mold to grow near you.";
1030 #endif
1031
1032                 }
1033                 if (p_ptr->muta1 & MUT1_RESIST)
1034                 {
1035 #ifdef JP
1036 info[i++] = "¤¢¤Ê¤¿¤Ï¸µÁǤι¶·â¤ËÂФ·¤Æ¿È¤ò¹Å¤¯¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
1037 #else
1038                         info[i++] = "You can harden yourself to the ravages of the elements.";
1039 #endif
1040
1041                 }
1042                 if (p_ptr->muta1 & MUT1_EARTHQUAKE)
1043                 {
1044 #ifdef JP
1045 info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Î¥À¥ó¥¸¥ç¥ó¤òÊø²õ¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
1046 #else
1047                         info[i++] = "You can bring down the dungeon around your ears.";
1048 #endif
1049
1050                 }
1051                 if (p_ptr->muta1 & MUT1_EAT_MAGIC)
1052                 {
1053 #ifdef JP
1054 info[i++] = "¤¢¤Ê¤¿¤ÏËâË¡¤Î¥¨¥Í¥ë¥®¡¼¤ò¼«Ê¬¤Îʪ¤È¤·¤Æ»ÈÍѤǤ­¤ë¡£";
1055 #else
1056                         info[i++] = "You can consume magic energy for your own use.";
1057 #endif
1058
1059                 }
1060                 if (p_ptr->muta1 & MUT1_WEIGH_MAG)
1061                 {
1062 #ifdef JP
1063 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Ë±Æ¶Á¤òÍ¿¤¨¤ëËâË¡¤ÎÎϤò´¶¤¸¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
1064 #else
1065                         info[i++] = "You can feel the strength of the magics affecting you.";
1066 #endif
1067
1068                 }
1069                 if (p_ptr->muta1 & MUT1_STERILITY)
1070                 {
1071 #ifdef JP
1072 info[i++] = "¤¢¤Ê¤¿¤Ï½¸ÃÄŪÀ¸¿£ÉÔǽ¤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤­¤ë¡£";
1073 #else
1074                         info[i++] = "You can cause mass impotence.";
1075 #endif
1076
1077                 }
1078                 if (p_ptr->muta1 & MUT1_PANIC_HIT)
1079                 {
1080 #ifdef JP
1081 info[i++] = "¤¢¤Ê¤¿¤Ï¹¶·â¤·¤¿¸å¿È¤ò¼é¤ë¤¿¤áƨ¤²¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
1082 #else
1083                         info[i++] = "You can run for your life after hitting something.";
1084 #endif
1085
1086                 }
1087                 if (p_ptr->muta1 & MUT1_DAZZLE)
1088                 {
1089 #ifdef JP
1090 info[i++] = "¤¢¤Ê¤¿¤Ïº®Íð¤ÈÌÕÌܤò°ú¤­µ¯¤³¤¹Êü¼Íǽ¤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ ";
1091 #else
1092                         info[i++] = "You can emit confusing, blinding radiation.";
1093 #endif
1094
1095                 }
1096                 if (p_ptr->muta1 & MUT1_LASER_EYE)
1097                 {
1098 #ifdef JP
1099 info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ«¤é¥ì¡¼¥¶¡¼¸÷Àþ¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
1100 #else
1101                         info[i++] = "Your eyes can fire laser beams (dam 2 * lvl).";
1102 #endif
1103
1104                 }
1105                 if (p_ptr->muta1 & MUT1_RECALL)
1106                 {
1107 #ifdef JP
1108 info[i++] = "¤¢¤Ê¤¿¤Ï³¹¤È¥À¥ó¥¸¥ç¥ó¤Î´Ö¤ò¹Ô¤­Í褹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
1109 #else
1110                         info[i++] = "You can travel between town and the depths.";
1111 #endif
1112
1113                 }
1114                 if (p_ptr->muta1 & MUT1_BANISH)
1115                 {
1116 #ifdef JP
1117 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°­¤Ê¥â¥ó¥¹¥¿¡¼¤òÃϹö¤ËÍî¤È¤¹¤³¤È¤¬¤Ç¤­¤ë¡£";
1118 #else
1119                         info[i++] = "You can send evil creatures directly to Hell.";
1120 #endif
1121
1122                 }
1123                 if (p_ptr->muta1 & MUT1_COLD_TOUCH)
1124                 {
1125 #ifdef JP
1126 info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤ò¿¨¤Ã¤ÆÅà¤é¤»¤ë¤³¤È¤¬¤Ç¤­¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX3)";
1127 #else
1128                         info[i++] = "You can freeze things with a touch (dam 3 * lvl).";
1129 #endif
1130
1131                 }
1132                 if (p_ptr->muta1 & MUT1_LAUNCHER)
1133                 {
1134 #ifdef JP
1135 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤òÎ϶¯¤¯Åꤲ¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
1136 #else
1137                         info[i++] = "You can hurl objects with great force.";
1138 #endif
1139
1140                 }
1141         }
1142
1143         if (p_ptr->muta2)
1144         {
1145                 if (p_ptr->muta2 & MUT2_BERS_RAGE)
1146                 {
1147 #ifdef JP
1148 info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Àï»Î²½¤Îȯºî¤òµ¯¤³¤¹¡£";
1149 #else
1150                         info[i++] = "You are subject to berserker fits.";
1151 #endif
1152
1153                 }
1154                 if (p_ptr->muta2 & MUT2_COWARDICE)
1155                 {
1156 #ifdef JP
1157 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹²²É¤ˤʤ롣";
1158 #else
1159                         info[i++] = "You are subject to cowardice.";
1160 #endif
1161
1162                 }
1163                 if (p_ptr->muta2 & MUT2_RTELEPORT)
1164                 {
1165 #ifdef JP
1166 info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤Ë¥Æ¥ì¥Ý¡¼¥È¤¹¤ë¡£";
1167 #else
1168                         info[i++] = "You are teleporting randomly.";
1169 #endif
1170
1171                 }
1172                 if (p_ptr->muta2 & MUT2_ALCOHOL)
1173                 {
1174 #ifdef JP
1175 info[i++] = "¤¢¤Ê¤¿¤ÎÂΤϥ¢¥ë¥³¡¼¥ë¤òʬÈ礹¤ë¡£";
1176 #else
1177                         info[i++] = "Your body produces alcohol.";
1178 #endif
1179
1180                 }
1181                 if (p_ptr->muta2 & MUT2_HALLU)
1182                 {
1183 #ifdef JP
1184 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò°ú¤­µ¯¤³¤¹Àº¿ÀºøÍð¤Ë¿¯¤µ¤ì¤Æ¤¤¤ë¡£";
1185 #else
1186                         info[i++] = "You have a hallucinatory insanity.";
1187 #endif
1188
1189                 }
1190                 if (p_ptr->muta2 & MUT2_FLATULENT)
1191                 {
1192 #ifdef JP
1193 info[i++] = "¤¢¤Ê¤¿¤ÏÀ©¸æ¤Ç¤­¤Ê¤¤¶¯Îõ¤ÊÕû¤ò¤³¤¯¡£";
1194 #else
1195                         info[i++] = "You are subject to uncontrollable flatulence.";
1196 #endif
1197
1198                 }
1199                 if (p_ptr->muta2 & MUT2_PROD_MANA)
1200                 {
1201 #ifdef JP
1202 info[i++] = "¤¢¤Ê¤¿¤ÏÀ©¸æÉÔǽ¤ÊËâË¡¤Î¥¨¥Í¥ë¥®¡¼¤òȯ¤·¤Æ¤¤¤ë¡£";
1203 #else
1204                         info[i++] = "You are producing magical energy uncontrollably.";
1205 #endif
1206
1207                 }
1208                 if (p_ptr->muta2 & MUT2_ATT_DEMON)
1209                 {
1210 #ifdef JP
1211 info[i++] = "¤¢¤Ê¤¿¤Ï¥Ç¡¼¥â¥ó¤ò°ú¤­¤Ä¤±¤ë¡£";
1212 #else
1213                         info[i++] = "You attract demons.";
1214 #endif
1215
1216                 }
1217                 if (p_ptr->muta2 & MUT2_SCOR_TAIL)
1218                 {
1219 #ifdef JP
1220 info[i++] = "¤¢¤Ê¤¿¤Ï¥µ¥½¥ê¤Î¿¬Èø¤¬À¸¤¨¤Æ¤¤¤ë¡£(ÆÇ¡¢¥À¥á¡¼¥¸ 3d7)";
1221 #else
1222                         info[i++] = "You have a scorpion tail (poison, 3d7).";
1223 #endif
1224
1225                 }
1226                 if (p_ptr->muta2 & MUT2_HORNS)
1227                 {
1228 #ifdef JP
1229 info[i++] = "¤¢¤Ê¤¿¤Ï³Ñ¤¬À¸¤¨¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d6)";
1230 #else
1231                         info[i++] = "You have horns (dam. 2d6).";
1232 #endif
1233
1234                 }
1235                 if (p_ptr->muta2 & MUT2_BEAK)
1236                 {
1237 #ifdef JP
1238 info[i++] = "¤¢¤Ê¤¿¤Ï¥¯¥Á¥Ð¥·¤¬À¸¤¨¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d4)";
1239 #else
1240                         info[i++] = "You have a beak (dam. 2d4).";
1241 #endif
1242
1243                 }
1244                 if (p_ptr->muta2 & MUT2_SPEED_FLUX)
1245                 {
1246 #ifdef JP
1247 info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤ËÁ᤯ư¤¤¤¿¤êÃÙ¤¯Æ°¤¤¤¿¤ê¤¹¤ë¡£";
1248 #else
1249                         info[i++] = "You move faster or slower randomly.";
1250 #endif
1251
1252                 }
1253                 if (p_ptr->muta2 & MUT2_BANISH_ALL)
1254                 {
1255 #ifdef JP
1256 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹¶á¤¯¤Î¥â¥ó¥¹¥¿¡¼¤ò¾ÃÌǤµ¤»¤ë¡£";
1257 #else
1258                         info[i++] = "You sometimes cause nearby creatures to vanish.";
1259 #endif
1260
1261                 }
1262                 if (p_ptr->muta2 & MUT2_EAT_LIGHT)
1263                 {
1264 #ifdef JP
1265 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹¼þ°Ï¤Î¸÷¤òµÛ¼ý¤·¤Æ±ÉÍܤˤ¹¤ë¡£";
1266 #else
1267                         info[i++] = "You sometimes feed off of the light around you.";
1268 #endif
1269
1270                 }
1271                 if (p_ptr->muta2 & MUT2_TRUNK)
1272                 {
1273 #ifdef JP
1274 info[i++] = "¤¢¤Ê¤¿¤Ï¾Ý¤Î¤è¤¦¤ÊÉ¡¤ò»ý¤Ã¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 1d4)";
1275 #else
1276                         info[i++] = "You have an elephantine trunk (dam 1d4).";
1277 #endif
1278
1279                 }
1280                 if (p_ptr->muta2 & MUT2_ATT_ANIMAL)
1281                 {
1282 #ifdef JP
1283 info[i++] = "¤¢¤Ê¤¿¤Ïưʪ¤ò°ú¤­¤Ä¤±¤ë¡£";
1284 #else
1285                         info[i++] = "You attract animals.";
1286 #endif
1287
1288                 }
1289                 if (p_ptr->muta2 & MUT2_TENTACLES)
1290                 {
1291 #ifdef JP
1292 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°­¤Ê¿¨¼ê¤ò»ý¤Ã¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d5)";
1293 #else
1294                         info[i++] = "You have evil looking tentacles (dam 2d5).";
1295 #endif
1296
1297                 }
1298                 if (p_ptr->muta2 & MUT2_RAW_CHAOS)
1299                 {
1300 #ifdef JP
1301 info[i++] = "¤¢¤Ê¤¿¤Ï¤·¤Ð¤·¤Ð½ã¥«¥ª¥¹¤ËÊñ¤Þ¤ì¤ë¡£";
1302 #else
1303                         info[i++] = "You occasionally are surrounded with raw chaos.";
1304 #endif
1305
1306                 }
1307                 if (p_ptr->muta2 & MUT2_NORMALITY)
1308                 {
1309 #ifdef JP
1310 info[i++] = "¤¢¤Ê¤¿¤ÏÊÑ°Û¤·¤Æ¤¤¤¿¤¬¡¢²óÉü¤·¤Æ¤­¤Æ¤¤¤ë¡£";
1311 #else
1312                         info[i++] = "You may be mutated, but you're recovering.";
1313 #endif
1314
1315                 }
1316                 if (p_ptr->muta2 & MUT2_WRAITH)
1317                 {
1318 #ifdef JP
1319 info[i++] = "¤¢¤Ê¤¿¤ÎÆùÂΤÏÍ©Â⽤·¤¿¤ê¼ÂÂ⽤·¤¿¤ê¤¹¤ë¡£";
1320 #else
1321                         info[i++] = "You fade in and out of physical reality.";
1322 #endif
1323
1324                 }
1325                 if (p_ptr->muta2 & MUT2_POLY_WOUND)
1326                 {
1327 #ifdef JP
1328 info[i++] = "¤¢¤Ê¤¿¤Î·ò¹¯¤Ï¥«¥ª¥¹¤ÎÎϤ˱ƶÁ¤ò¼õ¤±¤ë¡£";
1329 #else
1330                         info[i++] = "Your health is subject to chaotic forces.";
1331 #endif
1332
1333                 }
1334                 if (p_ptr->muta2 & MUT2_WASTING)
1335                 {
1336 #ifdef JP
1337 info[i++] = "¤¢¤Ê¤¿¤Ï¿ê¼å¤¹¤ë¶²¤í¤·¤¤Éµ¤¤Ë¤«¤«¤Ã¤Æ¤¤¤ë¡£";
1338 #else
1339                         info[i++] = "You have a horrible wasting disease.";
1340 #endif
1341
1342                 }
1343                 if (p_ptr->muta2 & MUT2_ATT_DRAGON)
1344                 {
1345 #ifdef JP
1346 info[i++] = "¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤ò°ú¤­¤Ä¤±¤ë¡£";
1347 #else
1348                         info[i++] = "You attract dragons.";
1349 #endif
1350
1351                 }
1352                 if (p_ptr->muta2 & MUT2_WEIRD_MIND)
1353                 {
1354 #ifdef JP
1355 info[i++] = "¤¢¤Ê¤¿¤ÎÀº¿À¤Ï¥é¥ó¥À¥à¤Ë³ÈÂ礷¤¿¤ê½Ì¾®¤·¤¿¤ê¤·¤Æ¤¤¤ë¡£";
1356 #else
1357                         info[i++] = "Your mind randomly expands and contracts.";
1358 #endif
1359
1360                 }
1361                 if (p_ptr->muta2 & MUT2_NAUSEA)
1362                 {
1363 #ifdef JP
1364 info[i++] = "¤¢¤Ê¤¿¤Î°ß¤ÏÈó¾ï¤ËÍî¤ÁÃ夭¤¬¤Ê¤¤¡£";
1365 #else
1366                         info[i++] = "You have a seriously upset stomach.";
1367 #endif
1368
1369                 }
1370                 if (p_ptr->muta2 & MUT2_CHAOS_GIFT)
1371                 {
1372 #ifdef JP
1373 info[i++] = "¤¢¤Ê¤¿¤Ï¥«¥ª¥¹¤Î¼é¸î°­Ë⤫¤éË«Èþ¤ò¤¦¤±¤È¤ë¡£";
1374 #else
1375                         info[i++] = "Chaos deities give you gifts.";
1376 #endif
1377
1378                 }
1379                 if (p_ptr->muta2 & MUT2_WALK_SHAD)
1380                 {
1381 #ifdef JP
1382 info[i++] = "¤¢¤Ê¤¿¤Ï¤·¤Ð¤·¤Ð¾¤Î¡Ö±Æ¡×¤Ë̤¤¹þ¤à¡£";
1383 #else
1384                         info[i++] = "You occasionally stumble into other shadows.";
1385 #endif
1386
1387                 }
1388                 if (p_ptr->muta2 & MUT2_WARNING)
1389                 {
1390 #ifdef JP
1391 info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤Ë´Ø¤¹¤ë·Ù¹ð¤ò´¶¤¸¤ë¡£";
1392 #else
1393                         info[i++] = "You receive warnings about your foes.";
1394 #endif
1395
1396                 }
1397                 if (p_ptr->muta2 & MUT2_INVULN)
1398                 {
1399 #ifdef JP
1400 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹É餱ÃΤ餺¤Êµ¤Ê¬¤Ë¤Ê¤ë¡£";
1401 #else
1402                         info[i++] = "You occasionally feel invincible.";
1403 #endif
1404
1405                 }
1406                 if (p_ptr->muta2 & MUT2_SP_TO_HP)
1407                 {
1408 #ifdef JP
1409 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹·ì¤¬¶ÚÆù¤Ë¤É¤Ã¤Èή¤ì¤ë¡£";
1410 #else
1411                         info[i++] = "Your blood sometimes rushes to your muscles.";
1412 #endif
1413
1414                 }
1415                 if (p_ptr->muta2 & MUT2_HP_TO_SP)
1416                 {
1417 #ifdef JP
1418 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹Æ¬¤Ë·ì¤¬¤É¤Ã¤Èή¤ì¤ë¡£";
1419 #else
1420                         info[i++] = "Your blood sometimes rushes to your head.";
1421 #endif
1422
1423                 }
1424                 if (p_ptr->muta2 & MUT2_DISARM)
1425                 {
1426 #ifdef JP
1427 info[i++] = "¤¢¤Ê¤¿¤Ï¤è¤¯¤Ä¤Þ¤Å¤¤¤Æʪ¤òÍî¤È¤¹¡£";
1428 #else
1429                         info[i++] = "You occasionally stumble and drop things.";
1430 #endif
1431
1432                 }
1433         }
1434
1435         if (p_ptr->muta3)
1436         {
1437                 if (p_ptr->muta3 & MUT3_HYPER_STR)
1438                 {
1439 #ifdef JP
1440 info[i++] = "¤¢¤Ê¤¿¤ÏĶ¿ÍŪ¤Ë¶¯¤¤¡£(ÏÓÎÏ+4)";
1441 #else
1442                         info[i++] = "You are superhumanly strong (+4 STR).";
1443 #endif
1444
1445                 }
1446                 if (p_ptr->muta3 & MUT3_PUNY)
1447                 {
1448 #ifdef JP
1449 info[i++] = "¤¢¤Ê¤¿¤Ïµõ¼å¤À¡£(ÏÓÎÏ-4)";
1450 #else
1451                         info[i++] = "You are puny (-4 STR).";
1452 #endif
1453
1454                 }
1455                 if (p_ptr->muta3 & MUT3_HYPER_INT)
1456                 {
1457 #ifdef JP
1458 info[i++] = "¤¢¤Ê¤¿¤ÎǾ¤ÏÀ¸ÂÎ¥³¥ó¥Ô¥å¡¼¥¿¤À¡£(ÃÎǽ¡õ¸­¤µ+4)";
1459 #else
1460                         info[i++] = "Your brain is a living computer (+4 INT/WIS).";
1461 #endif
1462
1463                 }
1464                 if (p_ptr->muta3 & MUT3_MORONIC)
1465                 {
1466 #ifdef JP
1467 info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿ÀÇö¼å¤À¡£(ÃÎǽ¡õ¸­¤µ-4)";
1468 #else
1469                         info[i++] = "You are moronic (-4 INT/WIS).";
1470 #endif
1471
1472                 }
1473                 if (p_ptr->muta3 & MUT3_RESILIENT)
1474                 {
1475 #ifdef JP
1476 info[i++] = "¤¢¤Ê¤¿¤ÏÈó¾ï¤Ë¥¿¥Õ¤À¡£(Âѵ×+4)";
1477 #else
1478                         info[i++] = "You are very resilient (+4 CON).";
1479 #endif
1480
1481                 }
1482                 if (p_ptr->muta3 & MUT3_XTRA_FAT)
1483                 {
1484 #ifdef JP
1485 info[i++] = "¤¢¤Ê¤¿¤Ï¶Ëü¤ËÂÀ¤Ã¤Æ¤¤¤ë¡£(Âѵ×+2,¥¹¥Ô¡¼¥É-2)";
1486 #else
1487                         info[i++] = "You are extremely fat (+2 CON, -2 speed).";
1488 #endif
1489
1490                 }
1491                 if (p_ptr->muta3 & MUT3_ALBINO)
1492                 {
1493 #ifdef JP
1494 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥ë¥Ó¥Î¤À¡£(Âѵ×-4)";
1495 #else
1496                         info[i++] = "You are albino (-4 CON).";
1497 #endif
1498
1499                 }
1500                 if (p_ptr->muta3 & MUT3_FLESH_ROT)
1501                 {
1502 #ifdef JP
1503 info[i++] = "¤¢¤Ê¤¿¤ÎÆùÂΤÏÉåÇÔ¤·¤Æ¤¤¤ë¡£(Âѵ×-2,Ì¥ÎÏ-1)";
1504 #else
1505                         info[i++] = "Your flesh is rotting (-2 CON, -1 CHR).";
1506 #endif
1507
1508                 }
1509                 if (p_ptr->muta3 & MUT3_SILLY_VOI)
1510                 {
1511 #ifdef JP
1512 info[i++] = "¤¢¤Ê¤¿¤ÎÀ¼¤Ï´ÖÈ´¤±¤Ê¥­¡¼¥­¡¼À¼¤À¡£(Ì¥ÎÏ-4)";
1513 #else
1514                         info[i++] = "Your voice is a silly squeak (-4 CHR).";
1515 #endif
1516
1517                 }
1518                 if (p_ptr->muta3 & MUT3_BLANK_FAC)
1519                 {
1520 #ifdef JP
1521 info[i++] = "¤¢¤Ê¤¿¤Ï¤Î¤Ã¤Ú¤é¤Ü¤¦¤À¡£(Ì¥ÎÏ-1)";
1522 #else
1523                         info[i++] = "Your face is featureless (-1 CHR).";
1524 #endif
1525
1526                 }
1527                 if (p_ptr->muta3 & MUT3_ILL_NORM)
1528                 {
1529 #ifdef JP
1530 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸±Æ¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
1531 #else
1532                         info[i++] = "Your appearance is masked with illusion.";
1533 #endif
1534
1535                 }
1536                 if (p_ptr->muta3 & MUT3_XTRA_EYES)
1537                 {
1538 #ifdef JP
1539 info[i++] = "¤¢¤Ê¤¿¤Ï;ʬ¤ËÆó¤Ä¤ÎÌܤò»ý¤Ã¤Æ¤¤¤ë¡£(õº÷+15)";
1540 #else
1541                         info[i++] = "You have an extra pair of eyes (+15 search).";
1542 #endif
1543
1544                 }
1545                 if (p_ptr->muta3 & MUT3_MAGIC_RES)
1546                 {
1547 #ifdef JP
1548 info[i++] = "¤¢¤Ê¤¿¤ÏËâË¡¤Ø¤ÎÂÑÀ­¤ò¤â¤Ã¤Æ¤¤¤ë¡£";
1549 #else
1550                         info[i++] = "You are resistant to magic.";
1551 #endif
1552
1553                 }
1554                 if (p_ptr->muta3 & MUT3_XTRA_NOIS)
1555                 {
1556 #ifdef JP
1557 info[i++] = "¤¢¤Ê¤¿¤ÏÊѤʲ»¤òȯ¤·¤Æ¤¤¤ë¡£(±£Ì©-3)";
1558 #else
1559                         info[i++] = "You make a lot of strange noise (-3 stealth).";
1560 #endif
1561
1562                 }
1563                 if (p_ptr->muta3 & MUT3_INFRAVIS)
1564                 {
1565 #ifdef JP
1566 info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÀ²¤é¤·¤¤ÀÖ³°Àþ»ëÎϤò»ý¤Ã¤Æ¤¤¤ë¡£(+3)";
1567 #else
1568                         info[i++] = "You have remarkable infravision (+3).";
1569 #endif
1570
1571                 }
1572                 if (p_ptr->muta3 & MUT3_XTRA_LEGS)
1573                 {
1574 #ifdef JP
1575 info[i++] = "¤¢¤Ê¤¿¤Ï;ʬ¤ËÆóËܤέ¤¬À¸¤¨¤Æ¤¤¤ë¡£(²Ã®+3)";
1576 #else
1577                         info[i++] = "You have an extra pair of legs (+3 speed).";
1578 #endif
1579
1580                 }
1581                 if (p_ptr->muta3 & MUT3_SHORT_LEG)
1582                 {
1583 #ifdef JP
1584 info[i++] = "¤¢¤Ê¤¿¤Î­¤Ïû¤¤Æ͵¯¤À¡£(²Ã®-3)";
1585 #else
1586                         info[i++] = "Your legs are short stubs (-3 speed).";
1587 #endif
1588
1589                 }
1590                 if (p_ptr->muta3 & MUT3_ELEC_TOUC)
1591                 {
1592 #ifdef JP
1593 info[i++] = "¤¢¤Ê¤¿¤Î·ì´É¤Ë¤ÏÅÅή¤¬Î®¤ì¤Æ¤¤¤ë¡£";
1594 #else
1595                         info[i++] = "Electricity is running through your veins.";
1596 #endif
1597
1598                 }
1599                 if (p_ptr->muta3 & MUT3_FIRE_BODY)
1600                 {
1601 #ifdef JP
1602 info[i++] = "¤¢¤Ê¤¿¤ÎÂΤϱê¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
1603 #else
1604                         info[i++] = "Your body is enveloped in flames.";
1605 #endif
1606                 }
1607                 if (p_ptr->muta3 & MUT3_WART_SKIN)
1608                 {
1609 #ifdef JP
1610 info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤Ï¥¤¥Ü¤ËÈï¤ï¤ì¤Æ¤¤¤ë¡£(Ì¥ÎÏ-2, AC+5)";
1611 #else
1612                         info[i++] = "Your skin is covered with warts (-2 CHR, +5 AC).";
1613 #endif
1614
1615                 }
1616                 if (p_ptr->muta3 & MUT3_SCALES)
1617                 {
1618 #ifdef JP
1619 info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤ÏÎڤˤʤäƤ¤¤ë¡£(Ì¥ÎÏ-1, AC+10)";
1620 #else
1621                         info[i++] = "Your skin has turned into scales (-1 CHR, +10 AC).";
1622 #endif
1623
1624                 }
1625                 if (p_ptr->muta3 & MUT3_IRON_SKIN)
1626                 {
1627 #ifdef JP
1628 info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤ÏÅ´¤Ç¤Ç¤­¤Æ¤¤¤ë¡£(´ïÍÑ-1, AC+25)";
1629 #else
1630                         info[i++] = "Your skin is made of steel (-1 DEX, +25 AC).";
1631 #endif
1632
1633                 }
1634                 if (p_ptr->muta3 & MUT3_WINGS)
1635                 {
1636 #ifdef JP
1637 info[i++] = "¤¢¤Ê¤¿¤Ï±©¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
1638 #else
1639                         info[i++] = "You have wings.";
1640 #endif
1641
1642                 }
1643                 if (p_ptr->muta3 & MUT3_FEARLESS)
1644                 {
1645                         /* Unnecessary */
1646                 }
1647                 if (p_ptr->muta3 & MUT3_REGEN)
1648                 {
1649                         /* Unnecessary */
1650                 }
1651                 if (p_ptr->muta3 & MUT3_ESP)
1652                 {
1653                         /* Unnecessary */
1654                 }
1655                 if (p_ptr->muta3 & MUT3_LIMBER)
1656                 {
1657 #ifdef JP
1658 info[i++] = "¤¢¤Ê¤¿¤ÎÂΤÏÈó¾ï¤Ë¤·¤Ê¤ä¤«¤À¡£(´ïÍÑ+3)";
1659 #else
1660                         info[i++] = "Your body is very limber (+3 DEX).";
1661 #endif
1662
1663                 }
1664                 if (p_ptr->muta3 & MUT3_ARTHRITIS)
1665                 {
1666 #ifdef JP
1667 info[i++] = "¤¢¤Ê¤¿¤Ï¤¤¤Ä¤â´ØÀá¤ËÄˤߤò´¶¤¸¤Æ¤¤¤ë¡£(´ïÍÑ-3)";
1668 #else
1669                         info[i++] = "Your joints ache constantly (-3 DEX).";
1670 #endif
1671
1672                 }
1673                 if (p_ptr->muta3 & MUT3_VULN_ELEM)
1674                 {
1675 #ifdef JP
1676 info[i++] = "¤¢¤Ê¤¿¤Ï¸µÁǤι¶·â¤Ë¼å¤¤¡£";
1677 #else
1678                         info[i++] = "You are susceptible to damage from the elements.";
1679 #endif
1680
1681                 }
1682                 if (p_ptr->muta3 & MUT3_MOTION)
1683                 {
1684 #ifdef JP
1685 info[i++] = "¤¢¤Ê¤¿¤ÎÆ°ºî¤ÏÀµ³Î¤ÇÎ϶¯¤¤¡£(±£Ì©+1)";
1686 #else
1687                         info[i++] = "Your movements are precise and forceful (+1 STL).";
1688 #endif
1689
1690                 }
1691                 if (p_ptr->muta3 & MUT3_GOOD_LUCK)
1692                 {
1693 #ifdef JP
1694 info[i++] = "¤¢¤Ê¤¿¤ÏÇò¤¤¥ª¡¼¥é¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
1695 #else
1696                         info[i++] = "There is a white aura surrounding you.";
1697 #endif
1698                 }
1699                 if (p_ptr->muta3 & MUT3_BAD_LUCK)
1700                 {
1701 #ifdef JP
1702 info[i++] = "¤¢¤Ê¤¿¤Ï¹õ¤¤¥ª¡¼¥é¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
1703 #else
1704                         info[i++] = "There is a black aura surrounding you.";
1705 #endif
1706                 }
1707         }
1708
1709         if (p_ptr->blind)
1710         {
1711 #ifdef JP
1712 info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤¡£";
1713 #else
1714                 info[i++] = "You cannot see.";
1715 #endif
1716
1717         }
1718         if (p_ptr->confused)
1719         {
1720 #ifdef JP
1721 info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë¡£";
1722 #else
1723                 info[i++] = "You are confused.";
1724 #endif
1725
1726         }
1727         if (p_ptr->afraid)
1728         {
1729 #ifdef JP
1730 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
1731 #else
1732                 info[i++] = "You are terrified.";
1733 #endif
1734
1735         }
1736         if (p_ptr->cut)
1737         {
1738 #ifdef JP
1739 info[i++] = "¤¢¤Ê¤¿¤Ï½Ð·ì¤·¤Æ¤¤¤ë¡£";
1740 #else
1741                 info[i++] = "You are bleeding.";
1742 #endif
1743
1744         }
1745         if (p_ptr->stun)
1746         {
1747 #ifdef JP
1748 info[i++] = "¤¢¤Ê¤¿¤Ï¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¤ë¡£";
1749 #else
1750                 info[i++] = "You are stunned.";
1751 #endif
1752
1753         }
1754         if (p_ptr->poisoned)
1755         {
1756 #ifdef JP
1757 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
1758 #else
1759                 info[i++] = "You are poisoned.";
1760 #endif
1761
1762         }
1763         if (p_ptr->image)
1764         {
1765 #ifdef JP
1766 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë¡£";
1767 #else
1768                 info[i++] = "You are hallucinating.";
1769 #endif
1770
1771         }
1772         if (p_ptr->cursed & TRC_TY_CURSE)
1773         {
1774                 info[i++] = _("¤¢¤Ê¤¿¤Ï¼Ù°­¤Ê±åÇ°¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£", "You carry an ancient foul curse.");
1775         }
1776         if (p_ptr->cursed & TRC_AGGRAVATE)
1777         {
1778                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤Æ¤¤¤ë¡£", "You aggravate monsters.");
1779         }
1780         if (p_ptr->cursed & TRC_DRAIN_EXP)
1781         {
1782                 info[i++] = _("¤¢¤Ê¤¿¤Ï·Ð¸³ÃͤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£", "You are drained.");
1783         }
1784         if (p_ptr->cursed & TRC_SLOW_REGEN)
1785         {
1786                 info[i++] = _("¤¢¤Ê¤¿¤Î²óÉüÎϤÏÈó¾ï¤ËÃÙ¤¤¡£", "You regenerate slowly.");
1787         }
1788         if (p_ptr->cursed & TRC_ADD_L_CURSE)
1789         {
1790                 info[i++] = _("¤¢¤Ê¤¿¤Î¼å¤¤¼ö¤¤¤ÏÁý¤¨¤ë¡£","Your weak curses multiply."); /* »ÃÄêŪ -- henkma */
1791         }
1792         if (p_ptr->cursed & TRC_ADD_H_CURSE)
1793         {
1794                 info[i++] = _("¤¢¤Ê¤¿¤Î¶¯¤¤¼ö¤¤¤ÏÁý¤¨¤ë¡£","Your heavy curses multiply."); /* »ÃÄêŪ -- henkma */
1795         }
1796         if (p_ptr->cursed & TRC_CALL_ANIMAL)
1797         {
1798                 info[i++] = _("¤¢¤Ê¤¿¤Ïưʪ¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£", "You attract animals.");
1799         }
1800         if (p_ptr->cursed & TRC_CALL_DEMON)
1801         {
1802                 info[i++] = _("¤¢¤Ê¤¿¤Ï°­Ëâ¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£", "You attract demons.");
1803         }
1804         if (p_ptr->cursed & TRC_CALL_DRAGON)
1805         {
1806                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£", "You attract dragons.");
1807         }
1808         if (p_ptr->cursed & TRC_COWARDICE)
1809         {
1810                 info[i++] = _("¤¢¤Ê¤¿¤Ï»þ¡¹²²É¤ˤʤ롣", "You are subject to cowardice.");
1811         }
1812         if (p_ptr->cursed & TRC_TELEPORT)
1813         {
1814                 info[i++] = _("¤¢¤Ê¤¿¤Î°ÌÃ֤ϤҤ¸¤ç¤¦¤ËÉÔ°ÂÄê¤À¡£", "Your position is very uncertain.");
1815         }
1816         if (p_ptr->cursed & TRC_LOW_MELEE)
1817         {
1818                 info[i++] = _("¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£", "Your weapon causes you to miss blows.");
1819         }
1820         if (p_ptr->cursed & TRC_LOW_AC)
1821         {
1822                 info[i++] = _("¤¢¤Ê¤¿¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£", "You are subject to be hit.");
1823         }
1824         if (p_ptr->cursed & TRC_LOW_MAGIC)
1825         {
1826                 info[i++] = _("¤¢¤Ê¤¿¤ÏËâË¡¤ò¼ºÇÔ¤·¤ä¤¹¤¤¡£", "You are subject to fail spellcasting.");
1827         }
1828         if (p_ptr->cursed & TRC_FAST_DIGEST)
1829         {
1830                 info[i++] = _("¤¢¤Ê¤¿¤Ï¤¹¤°¤ªÊ¢¤¬¤Ø¤ë¡£", "You have a good appetite.");
1831         }
1832         if (p_ptr->cursed & TRC_DRAIN_HP)
1833         {
1834                 info[i++] = _("¤¢¤Ê¤¿¤ÏÂÎÎϤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£", "You are drained.");
1835         }
1836         if (p_ptr->cursed & TRC_DRAIN_MANA)
1837         {
1838                 info[i++] = _("¤¢¤Ê¤¿¤ÏËâÎϤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£", "You brain is drained.");
1839         }
1840         if (IS_BLESSED())
1841         {
1842                 info[i++] = _("¤¢¤Ê¤¿¤Ï¹â·é¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£", "You feel rightous.");
1843         }
1844         if (IS_HERO())
1845         {
1846                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À¡£", "You feel heroic.");
1847         }
1848         if (p_ptr->shero)
1849         {
1850                 info[i++] = _("¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À¡£", "You are in a battle rage.");
1851         }
1852         if (p_ptr->protevil)
1853         {
1854                 info[i++] = _("¤¢¤Ê¤¿¤Ï¼Ù°­¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¡£", "You are protected from evil.");
1855         }
1856         if (p_ptr->shield)
1857         {
1858                 info[i++] = _("¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë¡£", "You are protected by a mystic shield.");
1859         }
1860         if (IS_INVULN())
1861         {
1862                 info[i++] = _("¤¢¤Ê¤¿¤Ï¸½ºß½ý¤Ä¤«¤Ê¤¤¡£", "You are temporarily invulnerable.");
1863         }
1864         if (p_ptr->wraith_form)
1865         {
1866                 info[i++] = _("¤¢¤Ê¤¿¤Ï°ì»þŪ¤ËÍ©Â⽤·¤Æ¤¤¤ë¡£", "You are temporarily incorporeal.");
1867         }
1868         if (p_ptr->special_attack & ATTACK_CONFUSE)
1869         {
1870                 info[i++] = _("¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£", "Your hands are glowing dull red.");
1871         }
1872         if (p_ptr->special_attack & ATTACK_FIRE)
1873         {
1874                 info[i++] = _("¤¢¤Ê¤¿¤Î¼ê¤Ï²Ð±ê¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£", "You can strike the enemy with flame.");
1875         }
1876         if (p_ptr->special_attack & ATTACK_COLD)
1877         {
1878                 info[i++] = _("¤¢¤Ê¤¿¤Î¼ê¤ÏÎ䵤¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£", "You can strike the enemy with cold.");
1879         }
1880         if (p_ptr->special_attack & ATTACK_ACID)
1881         {
1882                 info[i++] = _("¤¢¤Ê¤¿¤Î¼ê¤Ï»À¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£", "You can strike the enemy with acid.");
1883         }
1884         if (p_ptr->special_attack & ATTACK_ELEC)
1885         {
1886                 info[i++] = _("¤¢¤Ê¤¿¤Î¼ê¤ÏÅÅ·â¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£", "You can strike the enemy with electoric shock.");
1887         }
1888         if (p_ptr->special_attack & ATTACK_POIS)
1889         {
1890                 info[i++] = _("¤¢¤Ê¤¿¤Î¼ê¤ÏÆǤËʤ¤ï¤ì¤Æ¤¤¤ë¡£", "You can strike the enemy with poison.");
1891         }
1892         switch (p_ptr->action)
1893         {
1894                 case ACTION_SEARCH:
1895                         info[i++] = _("¤¢¤Ê¤¿¤Ï¤Ò¤¸¤ç¤¦¤ËÃí°Õ¿¼¤¯¼þ°Ï¤ò¸«ÅϤ·¤Æ¤¤¤ë¡£", "You are looking around very carefully.");
1896                         break;
1897         }
1898         if (p_ptr->new_spells)
1899         {
1900                 info[i++] = _("¤¢¤Ê¤¿¤Ï¼öʸ¤äµ§¤ê¤ò³Ø¤Ö¤³¤È¤¬¤Ç¤­¤ë¡£", "You can learn some spells/prayers.");
1901         }
1902         if (p_ptr->word_recall)
1903         {
1904                 info[i++] = _("¤¢¤Ê¤¿¤Ï¤¹¤°¤Ëµ¢´Ô¤¹¤ë¤À¤í¤¦¡£", "You will soon be recalled.");
1905         }
1906         if (p_ptr->alter_reality)
1907         {
1908                 info[i++] = _("¤¢¤Ê¤¿¤Ï¤¹¤°¤Ë¤³¤ÎÀ¤³¦¤òÎ¥¤ì¤ë¤À¤í¤¦¡£", "You will soon be altered.");
1909         }
1910         if (p_ptr->see_infra)
1911         {
1912                 info[i++] = _("¤¢¤Ê¤¿¤ÎÆ·¤ÏÀÖ³°Àþ¤ËÉÒ´¶¤Ç¤¢¤ë¡£", "Your eyes are sensitive to infrared light.");
1913         }
1914         if (p_ptr->see_inv)
1915         {
1916                 info[i++] = _("¤¢¤Ê¤¿¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤¬¤Ç¤­¤ë¡£", "You can see invisible creatures.");
1917         }
1918         if (p_ptr->levitation)
1919         {
1920                 info[i++] = _("¤¢¤Ê¤¿¤ÏÈô¤Ö¤³¤È¤¬¤Ç¤­¤ë¡£", "You can fly.");
1921         }
1922         if (p_ptr->free_act)
1923         {
1924                 info[i++] = _("¤¢¤Ê¤¿¤ÏËãáãÃΤ餺¤Î¸ú²Ì¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You have free action.");
1925         }
1926         if (p_ptr->regenerate)
1927         {
1928                 info[i++] = _("¤¢¤Ê¤¿¤ÏÁÇÁ᤯ÂÎÎϤò²óÉü¤¹¤ë¡£", "You regenerate quickly.");
1929         }
1930         if (p_ptr->slow_digest)
1931         {
1932                 info[i++] = _("¤¢¤Ê¤¿¤Ï¿©Íߤ¬¾¯¤Ê¤¤¡£", "Your appetite is small.");
1933         }
1934         if (p_ptr->telepathy)
1935         {
1936                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You have ESP.");
1937         }
1938         if (p_ptr->esp_animal)
1939         {
1940                 info[i++] = _("¤¢¤Ê¤¿¤Ï¼«Á³³¦¤ÎÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense natural creatures.");
1941         }
1942         if (p_ptr->esp_undead)
1943         {
1944                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥¢¥ó¥Ç¥Ã¥É¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense undead.");
1945         }
1946         if (p_ptr->esp_demon)
1947         {
1948                 info[i++] = _("¤¢¤Ê¤¿¤Ï°­Ëâ¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense demons.");
1949         }
1950         if (p_ptr->esp_orc)
1951         {
1952                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥ª¡¼¥¯¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense orcs.");
1953         }
1954         if (p_ptr->esp_troll)
1955         {
1956                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥È¥í¥ë¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense trolls.");
1957         }
1958         if (p_ptr->esp_giant)
1959         {
1960                 info[i++] = _("¤¢¤Ê¤¿¤Ïµð¿Í¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense giants.");
1961         }
1962         if (p_ptr->esp_dragon)
1963         {
1964                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense dragons.");
1965         }
1966         if (p_ptr->esp_human)
1967         {
1968                 info[i++] = _("¤¢¤Ê¤¿¤Ï¿Í´Ö¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense humans.");
1969         }
1970         if (p_ptr->esp_evil)
1971         {
1972                 info[i++] = _("¤¢¤Ê¤¿¤Ï¼Ù°­¤ÊÀ¸¤­Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense evil creatures.");
1973         }
1974         if (p_ptr->esp_good)
1975         {
1976                 info[i++] = _("¤¢¤Ê¤¿¤ÏÁ±ÎɤÊÀ¸¤­Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense good creatures.");
1977         }
1978         if (p_ptr->esp_nonliving)
1979         {
1980                 info[i++] = _("¤¢¤Ê¤¿¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤθºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense non-living creatures.");
1981         }
1982         if (p_ptr->esp_unique)
1983         {
1984                 info[i++] = _("¤¢¤Ê¤¿¤ÏÆÃÊ̤ʶ¯Å¨¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£", "You sense unique monsters.");
1985         }
1986         if (p_ptr->hold_life)
1987         {
1988                 info[i++] = _("¤¢¤Ê¤¿¤Ï¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¤·¤Ã¤«¤ê¤È°Ý»ý¤¹¤ë¡£", "You have a firm hold on your life force.");
1989         }
1990         if (p_ptr->reflect)
1991         {
1992                 info[i++] = _("¤¢¤Ê¤¿¤ÏÌð¤Î¼öʸ¤òÈ¿¼Í¤¹¤ë¡£", "You reflect bolt spells.");
1993         }
1994         if (p_ptr->sh_fire)
1995         {
1996                 info[i++] = _("¤¢¤Ê¤¿¤Ï±ê¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£", "You are surrounded with a fiery aura.");
1997         }
1998         if (p_ptr->sh_elec)
1999         {
2000                 info[i++] = _("¤¢¤Ê¤¿¤ÏÅŵ¤¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£", "You are surrounded with electricity.");
2001         }
2002         if (p_ptr->sh_cold)
2003         {
2004                 info[i++] = _("¤¢¤Ê¤¿¤ÏÎ䵤¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£", "You are surrounded with an aura of coldness.");
2005         }
2006         if (p_ptr->tim_sh_holy)
2007         {
2008                 info[i++] = _("¤¢¤Ê¤¿¤ÏÀ»¤Ê¤ë¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£", "You are surrounded with a holy aura.");
2009         }
2010         if (p_ptr->tim_sh_touki)
2011         {
2012                 info[i++] = _("¤¢¤Ê¤¿¤ÏÆ®µ¤¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£", "You are surrounded with a energy aura.");
2013         }
2014         if (p_ptr->anti_magic)
2015         {
2016                 info[i++] = _("¤¢¤Ê¤¿¤ÏÈ¿ËâË¡¥·¡¼¥ë¥É¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£", "You are surrounded by an anti-magic shell.");
2017         }
2018         if (p_ptr->anti_tele)
2019         {
2020                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥Æ¥ì¥Ý¡¼¥È¤Ç¤­¤Ê¤¤¡£", "You cannot teleport.");
2021         }
2022         if (p_ptr->lite)
2023         {
2024                 info[i++] = _("¤¢¤Ê¤¿¤Î¿ÈÂΤϸ÷¤Ã¤Æ¤¤¤ë¡£", "You are carrying a permanent light.");
2025         }
2026         if (p_ptr->warning)
2027         {
2028                 info[i++] = _("¤¢¤Ê¤¿¤Ï¹ÔÆ°¤ÎÁ°¤Ë´í¸±¤ò»¡ÃΤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£", "You will be warned before dangerous actions.");
2029         }
2030         if (p_ptr->dec_mana)
2031         {
2032                 info[i++] = _("¤¢¤Ê¤¿¤Ï¾¯¤Ê¤¤¾ÃÈñËâÎϤÇËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£", "You can cast spells with fewer mana points.");
2033         }
2034         if (p_ptr->easy_spell)
2035         {
2036                 info[i++] = _("¤¢¤Ê¤¿¤ÏÄ㤤¼ºÇÔΨ¤ÇËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£", "Fail rate of your magic is decreased.");
2037         }
2038         if (p_ptr->heavy_spell)
2039         {
2040                 info[i++] = _("¤¢¤Ê¤¿¤Ï¹â¤¤¼ºÇÔΨ¤ÇËâË¡¤ò¾§¤¨¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤¡£", "Fail rate of your magic is increased.");
2041         }
2042         if (p_ptr->mighty_throw)
2043         {
2044                 info[i++] = _("¤¢¤Ê¤¿¤Ï¶¯¤¯Êª¤òÅꤲ¤ë¡£", "You can throw objects powerfully.");
2045         }
2046
2047         if (p_ptr->immune_acid)
2048         {
2049                 info[i++] = _("¤¢¤Ê¤¿¤Ï»À¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are completely immune to acid.");
2050         }
2051         else if (p_ptr->resist_acid && IS_OPPOSE_ACID())
2052         {
2053                 info[i++] = _("¤¢¤Ê¤¿¤Ï»À¤Ø¤Î¶¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You resist acid exceptionally well.");
2054         }
2055         else if (p_ptr->resist_acid || IS_OPPOSE_ACID())
2056         {
2057                 info[i++] = _("¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to acid.");
2058         }
2059
2060         if (p_ptr->immune_elec)
2061         {
2062                 info[i++] = _("¤¢¤Ê¤¿¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are completely immune to lightning.");
2063         }
2064         else if (p_ptr->resist_elec && IS_OPPOSE_ELEC())
2065         {
2066                 info[i++] = _("¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤Î¶¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You resist lightning exceptionally well.");
2067         }
2068         else if (p_ptr->resist_elec || IS_OPPOSE_ELEC())
2069         {
2070                 info[i++] = _("¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to lightning.");
2071         }
2072
2073         if (prace_is_(RACE_ANDROID) && !p_ptr->immune_elec)
2074         {
2075                 info[i++] = _("¤¢¤Ê¤¿¤ÏÅÅ·â¤Ë¼å¤¤¡£", "You are susceptible to damage from lightning.");
2076         }
2077
2078         if (p_ptr->immune_fire)
2079         {
2080                 info[i++] = _("¤¢¤Ê¤¿¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are completely immune to fire.");
2081         }
2082         else if (p_ptr->resist_fire && IS_OPPOSE_FIRE())
2083         {
2084                 info[i++] = _("¤¢¤Ê¤¿¤Ï²Ð¤Ø¤Î¶¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You resist fire exceptionally well.");
2085         }
2086         else if (p_ptr->resist_fire || IS_OPPOSE_FIRE())
2087         {
2088                 info[i++] = _("¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to fire.");
2089         }
2090
2091         if (prace_is_(RACE_ENT) && !p_ptr->immune_fire)
2092         {
2093                 info[i++] = _("¤¢¤Ê¤¿¤Ï²Ð¤Ë¼å¤¤¡£", "You are susceptible to damage from fire.");
2094         }
2095
2096         if (p_ptr->immune_cold)
2097         {
2098                 info[i++] = _("¤¢¤Ê¤¿¤ÏÎ䵤¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are completely immune to cold.");
2099         }
2100         else if (p_ptr->resist_cold && IS_OPPOSE_COLD())
2101         {
2102                 info[i++] = _("¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤Î¶¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You resist cold exceptionally well.");
2103         }
2104         else if (p_ptr->resist_cold || IS_OPPOSE_COLD())
2105         {
2106                 info[i++] = _("¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to cold.");
2107         }
2108
2109         if (p_ptr->resist_pois && IS_OPPOSE_POIS())
2110         {
2111                 info[i++] = _("¤¢¤Ê¤¿¤ÏÆǤؤζ¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You resist poison exceptionally well.");
2112         }
2113         else if (p_ptr->resist_pois || IS_OPPOSE_POIS())
2114         {
2115                 info[i++] = _("¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to poison.");
2116         }
2117
2118         if (p_ptr->resist_lite)
2119         {
2120                 info[i++] = _("¤¢¤Ê¤¿¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to bright light.");
2121         }
2122
2123         if (prace_is_(RACE_VAMPIRE) || prace_is_(RACE_S_FAIRY) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
2124         {
2125                 info[i++] = _("¤¢¤Ê¤¿¤ÏÁ®¸÷¤Ë¼å¤¤¡£", "You are susceptible to damage from bright light.");
2126         }
2127
2128         if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
2129         {
2130                 info[i++] = _("¤¢¤Ê¤¿¤Ï°Å¹õ¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are completely immune to darkness.");
2131         }
2132
2133         else if (p_ptr->resist_dark)
2134         {
2135                 info[i++] = _("¤¢¤Ê¤¿¤Ï°Å¹õ¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to darkness.");
2136         }
2137         if (p_ptr->resist_conf)
2138         {
2139                 info[i++] = _("¤¢¤Ê¤¿¤Ïº®Íð¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to confusion.");
2140         }
2141         if (p_ptr->resist_sound)
2142         {
2143                 info[i++] = _("¤¢¤Ê¤¿¤Ï²»ÇȤξ׷â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to sonic attacks.");
2144         }
2145         if (p_ptr->resist_disen)
2146         {
2147                 info[i++] = _("¤¢¤Ê¤¿¤ÏÎô²½¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to disenchantment.");
2148         }
2149         if (p_ptr->resist_chaos)
2150         {
2151                 info[i++] = _("¤¢¤Ê¤¿¤Ï¥«¥ª¥¹¤ÎÎϤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to chaos.");
2152         }
2153         if (p_ptr->resist_shard)
2154         {
2155                 info[i++] = _("¤¢¤Ê¤¿¤ÏÇËÊҤι¶·â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to blasts of shards.");
2156         }
2157         if (p_ptr->resist_nexus)
2158         {
2159                 info[i++] = _("¤¢¤Ê¤¿¤Ï°ø²Ìº®Íð¤Î¹¶·â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to nexus attacks.");
2160         }
2161
2162         if (prace_is_(RACE_SPECTRE))
2163         {
2164                 info[i++] = _("¤¢¤Ê¤¿¤ÏÃϹö¤ÎÎϤòµÛ¼ý¤Ç¤­¤ë¡£", "You can drain nether forces.");
2165         }
2166         else if (p_ptr->resist_neth)
2167         {
2168                 info[i++] = _("¤¢¤Ê¤¿¤ÏÃϹö¤ÎÎϤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to nether forces.");
2169         }
2170         if (p_ptr->resist_fear)
2171         {
2172                 info[i++] = _("¤¢¤Ê¤¿¤ÏÁ´¤¯¶²Éݤò´¶¤¸¤Ê¤¤¡£", "You are completely fearless.");
2173         }
2174         if (p_ptr->resist_blind)
2175         {
2176                 info[i++] = _("¤¢¤Ê¤¿¤ÎÌܤÏÌÕÌܤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "Your eyes are resistant to blindness.");
2177         }
2178         if (p_ptr->resist_time)
2179         {
2180                 info[i++] = _("¤¢¤Ê¤¿¤Ï»þ´ÖµÕž¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£", "You are resistant to time.");
2181         }
2182
2183         if (p_ptr->sustain_str)
2184         {
2185 #ifdef JP
2186 info[i++] = "¤¢¤Ê¤¿¤ÎÏÓÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2187 #else
2188                 info[i++] = "Your strength is sustained.";
2189 #endif
2190
2191         }
2192         if (p_ptr->sustain_int)
2193         {
2194 #ifdef JP
2195 info[i++] = "¤¢¤Ê¤¿¤ÎÃÎǽ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2196 #else
2197                 info[i++] = "Your intelligence is sustained.";
2198 #endif
2199
2200         }
2201         if (p_ptr->sustain_wis)
2202         {
2203 #ifdef JP
2204 info[i++] = "¤¢¤Ê¤¿¤Î¸­¤µ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2205 #else
2206                 info[i++] = "Your wisdom is sustained.";
2207 #endif
2208
2209         }
2210         if (p_ptr->sustain_con)
2211         {
2212 #ifdef JP
2213 info[i++] = "¤¢¤Ê¤¿¤ÎÂѵ×ÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2214 #else
2215                 info[i++] = "Your constitution is sustained.";
2216 #endif
2217
2218         }
2219         if (p_ptr->sustain_dex)
2220         {
2221 #ifdef JP
2222 info[i++] = "¤¢¤Ê¤¿¤Î´ïÍѤµ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2223 #else
2224                 info[i++] = "Your dexterity is sustained.";
2225 #endif
2226
2227         }
2228         if (p_ptr->sustain_chr)
2229         {
2230 #ifdef JP
2231 info[i++] = "¤¢¤Ê¤¿¤ÎÌ¥ÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2232 #else
2233                 info[i++] = "Your charisma is sustained.";
2234 #endif
2235
2236         }
2237
2238         if (have_flag(flgs, TR_STR))
2239         {
2240 #ifdef JP
2241 info[i++] = "¤¢¤Ê¤¿¤ÎÏÓÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2242 #else
2243                 info[i++] = "Your strength is affected by your equipment.";
2244 #endif
2245
2246         }
2247         if (have_flag(flgs, TR_INT))
2248         {
2249 #ifdef JP
2250 info[i++] = "¤¢¤Ê¤¿¤ÎÃÎǽ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2251 #else
2252                 info[i++] = "Your intelligence is affected by your equipment.";
2253 #endif
2254
2255         }
2256         if (have_flag(flgs, TR_WIS))
2257         {
2258 #ifdef JP
2259 info[i++] = "¤¢¤Ê¤¿¤Î¸­¤µ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2260 #else
2261                 info[i++] = "Your wisdom is affected by your equipment.";
2262 #endif
2263
2264         }
2265         if (have_flag(flgs, TR_DEX))
2266         {
2267 #ifdef JP
2268 info[i++] = "¤¢¤Ê¤¿¤Î´ïÍѤµ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2269 #else
2270                 info[i++] = "Your dexterity is affected by your equipment.";
2271 #endif
2272
2273         }
2274         if (have_flag(flgs, TR_CON))
2275         {
2276 #ifdef JP
2277 info[i++] = "¤¢¤Ê¤¿¤ÎÂѵ×ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2278 #else
2279                 info[i++] = "Your constitution is affected by your equipment.";
2280 #endif
2281
2282         }
2283         if (have_flag(flgs, TR_CHR))
2284         {
2285 #ifdef JP
2286 info[i++] = "¤¢¤Ê¤¿¤ÎÌ¥ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2287 #else
2288                 info[i++] = "Your charisma is affected by your equipment.";
2289 #endif
2290
2291         }
2292
2293         if (have_flag(flgs, TR_STEALTH))
2294         {
2295 #ifdef JP
2296 info[i++] = "¤¢¤Ê¤¿¤Î±£Ì©¹ÔưǽÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2297 #else
2298                 info[i++] = "Your stealth is affected by your equipment.";
2299 #endif
2300
2301         }
2302         if (have_flag(flgs, TR_SEARCH))
2303         {
2304 #ifdef JP
2305 info[i++] = "¤¢¤Ê¤¿¤Îõº÷ǽÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2306 #else
2307                 info[i++] = "Your searching ability is affected by your equipment.";
2308 #endif
2309
2310         }
2311         if (have_flag(flgs, TR_INFRA))
2312         {
2313 #ifdef JP
2314 info[i++] = "¤¢¤Ê¤¿¤ÎÀÖ³°Àþ»ëÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2315 #else
2316                 info[i++] = "Your infravision is affected by your equipment.";
2317 #endif
2318
2319         }
2320         if (have_flag(flgs, TR_TUNNEL))
2321         {
2322 #ifdef JP
2323 info[i++] = "¤¢¤Ê¤¿¤ÎºÎ·¡Ç½ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2324 #else
2325                 info[i++] = "Your digging ability is affected by your equipment.";
2326 #endif
2327
2328         }
2329         if (have_flag(flgs, TR_SPEED))
2330         {
2331 #ifdef JP
2332 info[i++] = "¤¢¤Ê¤¿¤Î¥¹¥Ô¡¼¥É¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2333 #else
2334                 info[i++] = "Your speed is affected by your equipment.";
2335 #endif
2336
2337         }
2338         if (have_flag(flgs, TR_BLOWS))
2339         {
2340 #ifdef JP
2341 info[i++] = "¤¢¤Ê¤¿¤Î¹¶·â®ÅÙ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2342 #else
2343                 info[i++] = "Your attack speed is affected by your equipment.";
2344 #endif
2345
2346         }
2347
2348
2349         /* Access the current weapon */
2350         o_ptr = &inventory[INVEN_RARM];
2351
2352         /* Analyze the weapon */
2353         if (o_ptr->k_idx)
2354         {
2355                 /* Indicate Blessing */
2356                 if (have_flag(flgs, TR_BLESSED))
2357                 {
2358 #ifdef JP
2359 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿À¤Î½ËÊ¡¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2360 #else
2361                         info[i++] = "Your weapon has been blessed by the gods.";
2362 #endif
2363
2364                 }
2365
2366                 if (have_flag(flgs, TR_CHAOTIC))
2367                 {
2368 #ifdef JP
2369 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥í¥°¥ë¥¹¤Îħ¤Î°À­¤ò¤â¤Ä¡£";
2370 #else
2371                         info[i++] = "Your weapon is branded with the Sign of Logrus.";
2372 #endif
2373
2374                 }
2375
2376                 /* Hack */
2377                 if (have_flag(flgs, TR_IMPACT))
2378                 {
2379 #ifdef JP
2380 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÂÇ·â¤ÇÃϿ̤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
2381 #else
2382                         info[i++] = "The impact of your weapon can cause earthquakes.";
2383 #endif
2384
2385                 }
2386
2387                 if (have_flag(flgs, TR_VORPAL))
2388                 {
2389 #ifdef JP
2390 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÈó¾ï¤Ë±Ô¤¤¡£";
2391 #else
2392                         info[i++] = "Your weapon is very sharp.";
2393 #endif
2394
2395                 }
2396
2397                 if (have_flag(flgs, TR_VAMPIRIC))
2398                 {
2399 #ifdef JP
2400 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤«¤éÀ¸Ì¿ÎϤòµÛ¼ý¤¹¤ë¡£";
2401 #else
2402                         info[i++] = "Your weapon drains life from your foes.";
2403 #endif
2404
2405                 }
2406
2407                 /* Special "Attack Bonuses" */
2408                 if (have_flag(flgs, TR_BRAND_ACID))
2409                 {
2410 #ifdef JP
2411 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÍϤ«¤¹¡£";
2412 #else
2413                         info[i++] = "Your weapon melts your foes.";
2414 #endif
2415
2416                 }
2417                 if (have_flag(flgs, TR_BRAND_ELEC))
2418                 {
2419 #ifdef JP
2420 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤ò´¶ÅŤµ¤»¤ë¡£";
2421 #else
2422                         info[i++] = "Your weapon shocks your foes.";
2423 #endif
2424
2425                 }
2426                 if (have_flag(flgs, TR_BRAND_FIRE))
2427                 {
2428 #ifdef JP
2429 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òdz¤ä¤¹¡£";
2430 #else
2431                         info[i++] = "Your weapon burns your foes.";
2432 #endif
2433
2434                 }
2435                 if (have_flag(flgs, TR_BRAND_COLD))
2436                 {
2437 #ifdef JP
2438 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÅà¤é¤»¤ë¡£";
2439 #else
2440                         info[i++] = "Your weapon freezes your foes.";
2441 #endif
2442
2443                 }
2444                 if (have_flag(flgs, TR_BRAND_POIS))
2445                 {
2446 #ifdef JP
2447 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÆǤǿ¯¤¹¡£";
2448 #else
2449                         info[i++] = "Your weapon poisons your foes.";
2450 #endif
2451
2452                 }
2453
2454                 /* Special "slay" flags */
2455                 if (have_flag(flgs, TR_KILL_ANIMAL))
2456                 {
2457 #ifdef JP
2458 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ïưʪ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2459 #else
2460                         info[i++] = "Your weapon is a great bane of animals.";
2461 #endif
2462
2463                 }
2464                 else if (have_flag(flgs, TR_SLAY_ANIMAL))
2465                 {
2466 #ifdef JP
2467 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ïưʪ¤ËÂФ·¤Æ¶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2468 #else
2469                         info[i++] = "Your weapon strikes at animals with extra force.";
2470 #endif
2471
2472                 }
2473                 if (have_flag(flgs, TR_KILL_EVIL))
2474                 {
2475 #ifdef JP
2476 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¼Ù°­¤Ê¤ë¸ºß¤ÎŷŨ¤Ç¤¢¤ë¡£";
2477 #else
2478                         info[i++] = "Your weapon is a great bane of evil.";
2479 #endif
2480
2481                 }
2482                 else if (have_flag(flgs, TR_SLAY_EVIL))
2483                 {
2484 #ifdef JP
2485 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¼Ù°­¤Ê¤ë¸ºß¤ËÂФ·¤Æ¶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2486 #else
2487                         info[i++] = "Your weapon strikes at evil with extra force.";
2488 #endif
2489
2490                 }
2491                 if (have_flag(flgs, TR_KILL_HUMAN))
2492                 {
2493 #ifdef JP
2494 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿Í´Ö¤ÎŷŨ¤Ç¤¢¤ë¡£";
2495 #else
2496                         info[i++] = "Your weapon is a great bane of humans.";
2497 #endif
2498
2499                 }
2500                 else if (have_flag(flgs, TR_SLAY_HUMAN))
2501                 {
2502 #ifdef JP
2503 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2504 #else
2505                         info[i++] = "Your weapon is especially deadly against humans.";
2506 #endif
2507
2508                 }
2509                 if (have_flag(flgs, TR_KILL_UNDEAD))
2510                 {
2511 #ifdef JP
2512 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¢¥ó¥Ç¥Ã¥É¤ÎŷŨ¤Ç¤¢¤ë¡£";
2513 #else
2514                         info[i++] = "Your weapon is a great bane of undead.";
2515 #endif
2516
2517                 }
2518                 else if (have_flag(flgs, TR_SLAY_UNDEAD))
2519                 {
2520 #ifdef JP
2521 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤Æ¿ÀÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2522 #else
2523                         info[i++] = "Your weapon strikes at undead with holy wrath.";
2524 #endif
2525
2526                 }
2527                 if (have_flag(flgs, TR_KILL_DEMON))
2528                 {
2529 #ifdef JP
2530 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥Ç¡¼¥â¥ó¤ÎŷŨ¤Ç¤¢¤ë¡£";
2531 #else
2532                         info[i++] = "Your weapon is a great bane of demons.";
2533 #endif
2534
2535                 }
2536                 else if (have_flag(flgs, TR_SLAY_DEMON))
2537                 {
2538 #ifdef JP
2539 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤Æ¿ÀÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2540 #else
2541                         info[i++] = "Your weapon strikes at demons with holy wrath.";
2542 #endif
2543
2544                 }
2545                 if (have_flag(flgs, TR_KILL_ORC))
2546                 {
2547 #ifdef JP
2548 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥ª¡¼¥¯¤ÎŷŨ¤Ç¤¢¤ë¡£";
2549 #else
2550                         info[i++] = "Your weapon is a great bane of orcs.";
2551 #endif
2552
2553                 }
2554                 else if (have_flag(flgs, TR_SLAY_ORC))
2555                 {
2556 #ifdef JP
2557 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2558 #else
2559                         info[i++] = "Your weapon is especially deadly against orcs.";
2560 #endif
2561
2562                 }
2563                 if (have_flag(flgs, TR_KILL_TROLL))
2564                 {
2565 #ifdef JP
2566 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥È¥í¥ë¤ÎŷŨ¤Ç¤¢¤ë¡£";
2567 #else
2568                         info[i++] = "Your weapon is a great bane of trolls.";
2569 #endif
2570
2571                 }
2572                 else if (have_flag(flgs, TR_SLAY_TROLL))
2573                 {
2574 #ifdef JP
2575 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2576 #else
2577                         info[i++] = "Your weapon is especially deadly against trolls.";
2578 #endif
2579
2580                 }
2581                 if (have_flag(flgs, TR_KILL_GIANT))
2582                 {
2583 #ifdef JP
2584 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ÎŷŨ¤Ç¤¢¤ë¡£";
2585 #else
2586                         info[i++] = "Your weapon is a great bane of giants.";
2587 #endif
2588
2589                 }
2590                 else if (have_flag(flgs, TR_SLAY_GIANT))
2591                 {
2592 #ifdef JP
2593 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2594 #else
2595                         info[i++] = "Your weapon is especially deadly against giants.";
2596 #endif
2597
2598                 }
2599                 /* Special "kill" flags */
2600                 if (have_flag(flgs, TR_KILL_DRAGON))
2601                 {
2602 #ifdef JP
2603 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥É¥é¥´¥ó¤ÎŷŨ¤Ç¤¢¤ë¡£";
2604 #else
2605                         info[i++] = "Your weapon is a great bane of dragons.";
2606 #endif
2607
2608                 }
2609                 else if (have_flag(flgs, TR_SLAY_DRAGON))
2610                 {
2611 #ifdef JP
2612 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2613 #else
2614                         info[i++] = "Your weapon is especially deadly against dragons.";
2615 #endif
2616
2617                 }
2618
2619                 if (have_flag(flgs, TR_FORCE_WEAPON))
2620                 {
2621 #ifdef JP
2622 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏMP¤ò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2623 #else
2624                         info[i++] = "Your weapon causes greate damages using your MP.";
2625 #endif
2626
2627                 }
2628                 if (have_flag(flgs, TR_THROW))
2629                 {
2630 #ifdef JP
2631 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÅꤲ¤ä¤¹¤¤¡£";
2632 #else
2633                         info[i++] = "Your weapon can be thrown well.";
2634 #endif
2635                 }
2636         }
2637
2638
2639         /* Save the screen */
2640         screen_save();
2641
2642         /* Erase the screen */
2643         for (k = 1; k < 24; k++) prt("", k, 13);
2644
2645         /* Label the information */
2646 #ifdef JP
2647 prt("        ¤¢¤Ê¤¿¤Î¾õÂÖ:", 1, 15);
2648 #else
2649         prt("     Your Attributes:", 1, 15);
2650 #endif
2651
2652
2653         /* We will print on top of the map (column 13) */
2654         for (k = 2, j = 0; j < i; j++)
2655         {
2656                 /* Show the info */
2657                 prt(info[j], k++, 15);
2658
2659                 /* Every 20 entries (lines 2 to 21), start over */
2660                 if ((k == 22) && (j+1 < i))
2661                 {
2662 #ifdef JP
2663 prt("-- Â³¤¯ --", k, 15);
2664 #else
2665                         prt("-- more --", k, 15);
2666 #endif
2667
2668                         inkey();
2669                         for (; k > 2; k--) prt("", k, 15);
2670                 }
2671         }
2672
2673         /* Pause */
2674 #ifdef JP
2675 prt("[²¿¤«¥­¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 13);
2676 #else
2677         prt("[Press any key to continue]", k, 13);
2678 #endif
2679
2680         inkey();
2681
2682         /* Restore the screen */
2683         screen_load();
2684 }
2685
2686
2687 static int report_magics_aux(int dur)
2688 {
2689         if (dur <= 5)
2690         {
2691                 return 0;
2692         }
2693         else if (dur <= 10)
2694         {
2695                 return 1;
2696         }
2697         else if (dur <= 20)
2698         {
2699                 return 2;
2700         }
2701         else if (dur <= 50)
2702         {
2703                 return 3;
2704         }
2705         else if (dur <= 100)
2706         {
2707                 return 4;
2708         }
2709         else if (dur <= 200)
2710         {
2711                 return 5;
2712         }
2713         else
2714         {
2715                 return 6;
2716         }
2717 }
2718
2719 static cptr report_magic_durations[] =
2720 {
2721 #ifdef JP
2722 "¤´¤¯Ã»¤¤´Ö",
2723 "¾¯¤·¤Î´Ö",
2724 "¤·¤Ð¤é¤¯¤Î´Ö",
2725 "¿¾¯Ä¹¤¤´Ö",
2726 "Ť¤´Ö",
2727 "Èó¾ï¤ËŤ¤´Ö",
2728 "¿®¤¸Æñ¤¤¤Û¤ÉŤ¤´Ö",
2729 "¥â¥ó¥¹¥¿¡¼¤ò¹¶·â¤¹¤ë¤Þ¤Ç"
2730 #else
2731         "for a short time",
2732         "for a little while",
2733         "for a while",
2734         "for a long while",
2735         "for a long time",
2736         "for a very long time",
2737         "for an incredibly long time",
2738         "until you hit a monster"
2739 #endif
2740
2741 };
2742
2743
2744 /*
2745  * Report all currently active magical effects.
2746  */
2747 void report_magics(void)
2748 {
2749         int     i = 0, j, k;
2750         char    Dummy[80];
2751         cptr    info[128];
2752         int     info2[128];
2753
2754
2755         if (p_ptr->blind)
2756         {
2757                 info2[i]  = report_magics_aux(p_ptr->blind);
2758 #ifdef JP
2759 info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤";
2760 #else
2761                 info[i++] = "You cannot see";
2762 #endif
2763
2764         }
2765         if (p_ptr->confused)
2766         {
2767                 info2[i]  = report_magics_aux(p_ptr->confused);
2768 #ifdef JP
2769 info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë";
2770 #else
2771                 info[i++] = "You are confused";
2772 #endif
2773
2774         }
2775         if (p_ptr->afraid)
2776         {
2777                 info2[i]  = report_magics_aux(p_ptr->afraid);
2778 #ifdef JP
2779 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë";
2780 #else
2781                 info[i++] = "You are terrified";
2782 #endif
2783
2784         }
2785         if (p_ptr->poisoned)
2786         {
2787                 info2[i]  = report_magics_aux(p_ptr->poisoned);
2788 #ifdef JP
2789 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë";
2790 #else
2791                 info[i++] = "You are poisoned";
2792 #endif
2793
2794         }
2795         if (p_ptr->image)
2796         {
2797                 info2[i]  = report_magics_aux(p_ptr->image);
2798 #ifdef JP
2799 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë";
2800 #else
2801                 info[i++] = "You are hallucinating";
2802 #endif
2803
2804         }
2805         if (p_ptr->blessed)
2806         {
2807                 info2[i]  = report_magics_aux(p_ptr->blessed);
2808 #ifdef JP
2809 info[i++] = "¤¢¤Ê¤¿¤Ï¹â·é¤µ¤ò´¶¤¸¤Æ¤¤¤ë";
2810 #else
2811                 info[i++] = "You feel rightous";
2812 #endif
2813
2814         }
2815         if (p_ptr->hero)
2816         {
2817                 info2[i]  = report_magics_aux(p_ptr->hero);
2818 #ifdef JP
2819 info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À";
2820 #else
2821                 info[i++] = "You feel heroic";
2822 #endif
2823
2824         }
2825         if (p_ptr->shero)
2826         {
2827                 info2[i]  = report_magics_aux(p_ptr->shero);
2828 #ifdef JP
2829 info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À";
2830 #else
2831                 info[i++] = "You are in a battle rage";
2832 #endif
2833
2834         }
2835         if (p_ptr->protevil)
2836         {
2837                 info2[i]  = report_magics_aux(p_ptr->protevil);
2838 #ifdef JP
2839 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°­¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë";
2840 #else
2841                 info[i++] = "You are protected from evil";
2842 #endif
2843
2844         }
2845         if (p_ptr->shield)
2846         {
2847                 info2[i]  = report_magics_aux(p_ptr->shield);
2848 #ifdef JP
2849 info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë";
2850 #else
2851                 info[i++] = "You are protected by a mystic shield";
2852 #endif
2853
2854         }
2855         if (p_ptr->invuln)
2856         {
2857                 info2[i]  = report_magics_aux(p_ptr->invuln);
2858 #ifdef JP
2859 info[i++] = "¤¢¤Ê¤¿¤Ï̵Ũ¤À";
2860 #else
2861                 info[i++] = "You are invulnerable";
2862 #endif
2863
2864         }
2865         if (p_ptr->wraith_form)
2866         {
2867                 info2[i]  = report_magics_aux(p_ptr->wraith_form);
2868 #ifdef JP
2869 info[i++] = "¤¢¤Ê¤¿¤ÏÍ©Â⽤·¤Æ¤¤¤ë";
2870 #else
2871                 info[i++] = "You are incorporeal";
2872 #endif
2873
2874         }
2875         if (p_ptr->special_attack & ATTACK_CONFUSE)
2876         {
2877                 info2[i]  = 7;
2878 #ifdef JP
2879 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë";
2880 #else
2881                 info[i++] = "Your hands are glowing dull red.";
2882 #endif
2883
2884         }
2885         if (p_ptr->word_recall)
2886         {
2887                 info2[i]  = report_magics_aux(p_ptr->word_recall);
2888 #ifdef JP
2889                 info[i++] = "¤³¤Î¸åµ¢´Ô¤Î¾Û¤¬È¯Æ°¤¹¤ë";
2890 #else
2891                 info[i++] = "You are waiting to be recalled";
2892 #endif
2893
2894         }
2895         if (p_ptr->alter_reality)
2896         {
2897                 info2[i]  = report_magics_aux(p_ptr->alter_reality);
2898 #ifdef JP
2899                 info[i++] = "¤³¤Î¸å¸½¼ÂÊÑÍƤ¬È¯Æ°¤¹¤ë";
2900 #else
2901                 info[i++] = "You waiting to be altered";
2902 #endif
2903
2904         }
2905         if (p_ptr->oppose_acid)
2906         {
2907                 info2[i]  = report_magics_aux(p_ptr->oppose_acid);
2908 #ifdef JP
2909 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë";
2910 #else
2911                 info[i++] = "You are resistant to acid";
2912 #endif
2913
2914         }
2915         if (p_ptr->oppose_elec)
2916         {
2917                 info2[i]  = report_magics_aux(p_ptr->oppose_elec);
2918 #ifdef JP
2919 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë";
2920 #else
2921                 info[i++] = "You are resistant to lightning";
2922 #endif
2923
2924         }
2925         if (p_ptr->oppose_fire)
2926         {
2927                 info2[i]  = report_magics_aux(p_ptr->oppose_fire);
2928 #ifdef JP
2929 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë";
2930 #else
2931                 info[i++] = "You are resistant to fire";
2932 #endif
2933
2934         }
2935         if (p_ptr->oppose_cold)
2936         {
2937                 info2[i]  = report_magics_aux(p_ptr->oppose_cold);
2938 #ifdef JP
2939 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë";
2940 #else
2941                 info[i++] = "You are resistant to cold";
2942 #endif
2943
2944         }
2945         if (p_ptr->oppose_pois)
2946         {
2947                 info2[i]  = report_magics_aux(p_ptr->oppose_pois);
2948 #ifdef JP
2949 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë";
2950 #else
2951                 info[i++] = "You are resistant to poison";
2952 #endif
2953
2954         }
2955
2956         /* Save the screen */
2957         screen_save();
2958
2959         /* Erase the screen */
2960         for (k = 1; k < 24; k++) prt("", k, 13);
2961
2962         /* Label the information */
2963 #ifdef JP
2964 prt("    ¸½ºß¤«¤«¤Ã¤Æ¤¤¤ëËâË¡     :", 1, 15);
2965 #else
2966         prt("     Your Current Magic:", 1, 15);
2967 #endif
2968
2969
2970         /* We will print on top of the map (column 13) */
2971         for (k = 2, j = 0; j < i; j++)
2972         {
2973                 /* Show the info */
2974 #ifdef JP
2975                 sprintf(Dummy, "%-28s : ´ü´Ö - %s ", info[j],
2976 #else
2977                 sprintf(Dummy, "%s %s.", info[j],
2978 #endif
2979
2980                         report_magic_durations[info2[j]]);
2981                 prt(Dummy, k++, 15);
2982
2983                 /* Every 20 entries (lines 2 to 21), start over */
2984                 if ((k == 22) && (j + 1 < i))
2985                 {
2986 #ifdef JP
2987 prt("-- Â³¤¯ --", k, 15);
2988 #else
2989                         prt("-- more --", k, 15);
2990 #endif
2991
2992                         inkey();
2993                         for (; k > 2; k--) prt("", k, 15);
2994                 }
2995         }
2996
2997         /* Pause */
2998 #ifdef JP
2999 prt("[²¿¤«¥­¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 13);
3000 #else
3001         prt("[Press any key to continue]", k, 13);
3002 #endif
3003
3004         inkey();
3005
3006         /* Restore the screen */
3007         screen_load();
3008 }
3009
3010
3011 static bool detect_feat_flag(int range, int flag, bool known)
3012 {
3013         int       x, y;
3014         bool      detect = FALSE;
3015         cave_type *c_ptr;
3016
3017         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3018
3019         /* Scan the current panel */
3020         for (y = 1; y < cur_hgt - 1; y++)
3021         {
3022                 for (x = 1; x <= cur_wid - 1; x++)
3023                 {
3024                         int dist = distance(py, px, y, x);
3025                         if (dist > range) continue;
3026
3027                         /* Access the grid */
3028                         c_ptr = &cave[y][x];
3029
3030                         /* Hack -- Safe */
3031                         if (flag == FF_TRAP)
3032                         {
3033                                 /* Mark as detected */
3034                                 if (dist <= range && known)
3035                                 {
3036                                         if (dist <= range - 1) c_ptr->info |= (CAVE_IN_DETECT);
3037
3038                                         c_ptr->info &= ~(CAVE_UNSAFE);
3039
3040                                         /* Redraw */
3041                                         lite_spot(y, x);
3042                                 }
3043                         }
3044
3045                         /* Detect flags */
3046                         if (cave_have_flag_grid(c_ptr, flag))
3047                         {
3048                                 /* Detect secrets */
3049                                 disclose_grid(y, x);
3050
3051                                 /* Hack -- Memorize */
3052                                 c_ptr->info |= (CAVE_MARK);
3053
3054                                 /* Redraw */
3055                                 lite_spot(y, x);
3056
3057                                 /* Obvious */
3058                                 detect = TRUE;
3059                         }
3060                 }
3061         }
3062
3063         /* Result */
3064         return detect;
3065 }
3066
3067
3068 /*
3069  * Detect all traps on current panel
3070  */
3071 bool detect_traps(int range, bool known)
3072 {
3073         bool detect = detect_feat_flag(range, FF_TRAP, known);
3074
3075         if (known) p_ptr->dtrap = TRUE;
3076
3077         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
3078
3079         /* Describe */
3080         if (detect)
3081         {
3082 #ifdef JP
3083                 msg_print("¥È¥é¥Ã¥×¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3084 #else
3085                 msg_print("You sense the presence of traps!");
3086 #endif
3087         }
3088
3089         /* Result */
3090         return detect;
3091 }
3092
3093
3094 /*
3095  * Detect all doors on current panel
3096  */
3097 bool detect_doors(int range)
3098 {
3099         bool detect = detect_feat_flag(range, FF_DOOR, TRUE);
3100
3101         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
3102
3103         /* Describe */
3104         if (detect)
3105         {
3106 #ifdef JP
3107                 msg_print("¥É¥¢¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3108 #else
3109                 msg_print("You sense the presence of doors!");
3110 #endif
3111         }
3112
3113         /* Result */
3114         return detect;
3115 }
3116
3117
3118 /*
3119  * Detect all stairs on current panel
3120  */
3121 bool detect_stairs(int range)
3122 {
3123         bool detect = detect_feat_flag(range, FF_STAIRS, TRUE);
3124
3125         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
3126
3127         /* Describe */
3128         if (detect)
3129         {
3130 #ifdef JP
3131                 msg_print("³¬Ãʤθºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3132 #else
3133                 msg_print("You sense the presence of stairs!");
3134 #endif
3135         }
3136
3137         /* Result */
3138         return detect;
3139 }
3140
3141
3142 /*
3143  * Detect any treasure on the current panel
3144  */
3145 bool detect_treasure(int range)
3146 {
3147         bool detect = detect_feat_flag(range, FF_HAS_GOLD, TRUE);
3148
3149         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
3150
3151         /* Describe */
3152         if (detect)
3153         {
3154 #ifdef JP
3155                 msg_print("Ë䢤µ¤ì¤¿ºâÊõ¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3156 #else
3157                 msg_print("You sense the presence of buried treasure!");
3158 #endif
3159         }
3160
3161         /* Result */
3162         return detect;
3163 }
3164
3165
3166 /*
3167  * Detect all "gold" objects on the current panel
3168  */
3169 bool detect_objects_gold(int range)
3170 {
3171         int i, y, x;
3172         int range2 = range;
3173
3174         bool detect = FALSE;
3175
3176         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
3177
3178         /* Scan objects */
3179         for (i = 1; i < o_max; i++)
3180         {
3181                 object_type *o_ptr = &o_list[i];
3182
3183                 /* Skip dead objects */
3184                 if (!o_ptr->k_idx) continue;
3185
3186                 /* Skip held objects */
3187                 if (o_ptr->held_m_idx) continue;
3188
3189                 /* Location */
3190                 y = o_ptr->iy;
3191                 x = o_ptr->ix;
3192
3193                 /* Only detect nearby objects */
3194                 if (distance(py, px, y, x) > range2) continue;
3195
3196                 /* Detect "gold" objects */
3197                 if (o_ptr->tval == TV_GOLD)
3198                 {
3199                         /* Hack -- memorize it */
3200                         o_ptr->marked |= OM_FOUND;
3201
3202                         /* Redraw */
3203                         lite_spot(y, x);
3204
3205                         /* Detect */
3206                         detect = TRUE;
3207                 }
3208         }
3209
3210         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
3211
3212         /* Describe */
3213         if (detect)
3214         {
3215 #ifdef JP
3216 msg_print("ºâÊõ¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3217 #else
3218                 msg_print("You sense the presence of treasure!");
3219 #endif
3220
3221         }
3222
3223         if (detect_monsters_string(range, "$"))
3224         {
3225                 detect = TRUE;
3226         }
3227
3228         /* Result */
3229         return (detect);
3230 }
3231
3232
3233 /*
3234  * Detect all "normal" objects on the current panel
3235  */
3236 bool detect_objects_normal(int range)
3237 {
3238         int i, y, x;
3239         int range2 = range;
3240
3241         bool detect = FALSE;
3242
3243         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
3244
3245         /* Scan objects */
3246         for (i = 1; i < o_max; i++)
3247         {
3248                 object_type *o_ptr = &o_list[i];
3249
3250                 /* Skip dead objects */
3251                 if (!o_ptr->k_idx) continue;
3252
3253                 /* Skip held objects */
3254                 if (o_ptr->held_m_idx) continue;
3255
3256                 /* Location */
3257                 y = o_ptr->iy;
3258                 x = o_ptr->ix;
3259
3260                 /* Only detect nearby objects */
3261                 if (distance(py, px, y, x) > range2) continue;
3262
3263                 /* Detect "real" objects */
3264                 if (o_ptr->tval != TV_GOLD)
3265                 {
3266                         /* Hack -- memorize it */
3267                         o_ptr->marked |= OM_FOUND;
3268
3269                         /* Redraw */
3270                         lite_spot(y, x);
3271
3272                         /* Detect */
3273                         detect = TRUE;
3274                 }
3275         }
3276
3277         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
3278
3279         /* Describe */
3280         if (detect)
3281         {
3282 #ifdef JP
3283 msg_print("¥¢¥¤¥Æ¥à¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3284 #else
3285                 msg_print("You sense the presence of objects!");
3286 #endif
3287
3288         }
3289
3290         if (detect_monsters_string(range, "!=?|/`"))
3291         {
3292                 detect = TRUE;
3293         }
3294
3295         /* Result */
3296         return (detect);
3297 }
3298
3299
3300 /*
3301  * Detect all "magic" objects on the current panel.
3302  *
3303  * This will light up all spaces with "magic" items, including artifacts,
3304  * ego-items, potions, scrolls, books, rods, wands, staves, amulets, rings,
3305  * and "enchanted" items of the "good" variety.
3306  *
3307  * It can probably be argued that this function is now too powerful.
3308  */
3309 bool detect_objects_magic(int range)
3310 {
3311         int i, y, x, tv;
3312
3313         bool detect = FALSE;
3314
3315         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3316
3317         /* Scan all objects */
3318         for (i = 1; i < o_max; i++)
3319         {
3320                 object_type *o_ptr = &o_list[i];
3321
3322                 /* Skip dead objects */
3323                 if (!o_ptr->k_idx) continue;
3324
3325                 /* Skip held objects */
3326                 if (o_ptr->held_m_idx) continue;
3327
3328                 /* Location */
3329                 y = o_ptr->iy;
3330                 x = o_ptr->ix;
3331
3332                 /* Only detect nearby objects */
3333                 if (distance(py, px, y, x) > range) continue;
3334
3335                 /* Examine the tval */
3336                 tv = o_ptr->tval;
3337
3338                 /* Artifacts, misc magic items, or enchanted wearables */
3339                 if (object_is_artifact(o_ptr) ||
3340                         object_is_ego(o_ptr) ||
3341                     (tv == TV_WHISTLE) ||
3342                     (tv == TV_AMULET) ||
3343                         (tv == TV_RING) ||
3344                     (tv == TV_STAFF) ||
3345                         (tv == TV_WAND) ||
3346                         (tv == TV_ROD) ||
3347                     (tv == TV_SCROLL) ||
3348                         (tv == TV_POTION) ||
3349                     (tv == TV_LIFE_BOOK) ||
3350                         (tv == TV_SORCERY_BOOK) ||
3351                     (tv == TV_NATURE_BOOK) ||
3352                         (tv == TV_CHAOS_BOOK) ||
3353                     (tv == TV_DEATH_BOOK) ||
3354                     (tv == TV_TRUMP_BOOK) ||
3355                         (tv == TV_ARCANE_BOOK) ||
3356                         (tv == TV_CRAFT_BOOK) ||
3357                         (tv == TV_DAEMON_BOOK) ||
3358                         (tv == TV_CRUSADE_BOOK) ||
3359                         (tv == TV_MUSIC_BOOK) ||
3360                         (tv == TV_HISSATSU_BOOK) ||
3361                         (tv == TV_HEX_BOOK) ||
3362                     ((o_ptr->to_a > 0) || (o_ptr->to_h + o_ptr->to_d > 0)))
3363                 {
3364                         /* Memorize the item */
3365                         o_ptr->marked |= OM_FOUND;
3366
3367                         /* Redraw */
3368                         lite_spot(y, x);
3369
3370                         /* Detect */
3371                         detect = TRUE;
3372                 }
3373         }
3374
3375         /* Describe */
3376         if (detect)
3377         {
3378 #ifdef JP
3379 msg_print("ËâË¡¤Î¥¢¥¤¥Æ¥à¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3380 #else
3381                 msg_print("You sense the presence of magic objects!");
3382 #endif
3383
3384         }
3385
3386         /* Return result */
3387         return (detect);
3388 }
3389
3390
3391 /*
3392  * Detect all "normal" monsters on the current panel
3393  */
3394 bool detect_monsters_normal(int range)
3395 {
3396         int i, y, x;
3397
3398         bool flag = FALSE;
3399
3400         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3401
3402         /* Scan monsters */
3403         for (i = 1; i < m_max; i++)
3404         {
3405                 monster_type *m_ptr = &m_list[i];
3406                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3407
3408                 /* Skip dead monsters */
3409                 if (!m_ptr->r_idx) continue;
3410
3411                 /* Location */
3412                 y = m_ptr->fy;
3413                 x = m_ptr->fx;
3414
3415                 /* Only detect nearby monsters */
3416                 if (distance(py, px, y, x) > range) continue;
3417
3418                 /* Detect all non-invisible monsters */
3419                 if (!(r_ptr->flags2 & RF2_INVISIBLE) || p_ptr->see_inv)
3420                 {
3421                         /* Repair visibility later */
3422                         repair_monsters = TRUE;
3423
3424                         /* Hack -- Detect monster */
3425                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3426
3427                         /* Update the monster */
3428                         update_mon(i, FALSE);
3429
3430                         /* Detect */
3431                         flag = TRUE;
3432                 }
3433         }
3434
3435         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
3436
3437         /* Describe */
3438         if (flag)
3439         {
3440                 /* Describe result */
3441 #ifdef JP
3442 msg_print("¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3443 #else
3444                 msg_print("You sense the presence of monsters!");
3445 #endif
3446
3447         }
3448
3449         /* Result */
3450         return (flag);
3451 }
3452
3453
3454 /*
3455  * Detect all "invisible" monsters around the player
3456  */
3457 bool detect_monsters_invis(int range)
3458 {
3459         int i, y, x;
3460         bool flag = FALSE;
3461
3462         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3463
3464         /* Scan monsters */
3465         for (i = 1; i < m_max; i++)
3466         {
3467                 monster_type *m_ptr = &m_list[i];
3468                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3469
3470                 /* Skip dead monsters */
3471                 if (!m_ptr->r_idx) continue;
3472
3473                 /* Location */
3474                 y = m_ptr->fy;
3475                 x = m_ptr->fx;
3476
3477                 /* Only detect nearby monsters */
3478                 if (distance(py, px, y, x) > range) continue;
3479
3480                 /* Detect invisible monsters */
3481                 if (r_ptr->flags2 & RF2_INVISIBLE)
3482                 {
3483                         /* Update monster recall window */
3484                         if (p_ptr->monster_race_idx == m_ptr->r_idx)
3485                         {
3486                                 /* Window stuff */
3487                                 p_ptr->window |= (PW_MONSTER);
3488                         }
3489
3490                         /* Repair visibility later */
3491                         repair_monsters = TRUE;
3492
3493                         /* Hack -- Detect monster */
3494                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3495
3496                         /* Update the monster */
3497                         update_mon(i, FALSE);
3498
3499                         /* Detect */
3500                         flag = TRUE;
3501                 }
3502         }
3503
3504         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
3505
3506         /* Describe */
3507         if (flag)
3508         {
3509                 /* Describe result */
3510 #ifdef JP
3511 msg_print("Æ©ÌÀ¤ÊÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3512 #else
3513                 msg_print("You sense the presence of invisible creatures!");
3514 #endif
3515
3516         }
3517
3518         /* Result */
3519         return (flag);
3520 }
3521
3522
3523
3524 /*
3525  * Detect all "evil" monsters on current panel
3526  */
3527 bool detect_monsters_evil(int range)
3528 {
3529         int i, y, x;
3530         bool flag = FALSE;
3531
3532         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3533
3534         /* Scan monsters */
3535         for (i = 1; i < m_max; i++)
3536         {
3537                 monster_type *m_ptr = &m_list[i];
3538                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3539
3540                 /* Skip dead monsters */
3541                 if (!m_ptr->r_idx) continue;
3542
3543                 /* Location */
3544                 y = m_ptr->fy;
3545                 x = m_ptr->fx;
3546
3547                 /* Only detect nearby monsters */
3548                 if (distance(py, px, y, x) > range) continue;
3549
3550                 /* Detect evil monsters */
3551                 if (r_ptr->flags3 & RF3_EVIL)
3552                 {
3553                         if (is_original_ap(m_ptr))
3554                         {
3555                                 /* Take note that they are evil */
3556                                 r_ptr->r_flags3 |= (RF3_EVIL);
3557
3558                                 /* Update monster recall window */
3559                                 if (p_ptr->monster_race_idx == m_ptr->r_idx)
3560                                 {
3561                                         /* Window stuff */
3562                                         p_ptr->window |= (PW_MONSTER);
3563                                 }
3564                         }
3565
3566                         /* Repair visibility later */
3567                         repair_monsters = TRUE;
3568
3569                         /* Hack -- Detect monster */
3570                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3571
3572                         /* Update the monster */
3573                         update_mon(i, FALSE);
3574
3575                         /* Detect */
3576                         flag = TRUE;
3577                 }
3578         }
3579
3580         /* Describe */
3581         if (flag)
3582         {
3583                 /* Describe result */
3584 #ifdef JP
3585 msg_print("¼Ù°­¤Ê¤ëÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3586 #else
3587                 msg_print("You sense the presence of evil creatures!");
3588 #endif
3589
3590         }
3591
3592         /* Result */
3593         return (flag);
3594 }
3595
3596
3597
3598
3599 /*
3600  * Detect all "nonliving", "undead" or "demonic" monsters on current panel
3601  */
3602 bool detect_monsters_nonliving(int range)
3603 {
3604         int     i, y, x;
3605         bool    flag = FALSE;
3606
3607         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3608
3609         /* Scan monsters */
3610         for (i = 1; i < m_max; i++)
3611         {
3612                 monster_type *m_ptr = &m_list[i];
3613                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3614
3615                 /* Skip dead monsters */
3616                 if (!m_ptr->r_idx) continue;
3617
3618                 /* Location */
3619                 y = m_ptr->fy;
3620                 x = m_ptr->fx;
3621
3622                 /* Only detect nearby monsters */
3623                 if (distance(py, px, y, x) > range) continue;
3624
3625                 /* Detect non-living monsters */
3626                 if (!monster_living(r_ptr))
3627                 {
3628                         /* Update monster recall window */
3629                         if (p_ptr->monster_race_idx == m_ptr->r_idx)
3630                         {
3631                                 /* Window stuff */
3632                                 p_ptr->window |= (PW_MONSTER);
3633                         }
3634
3635                         /* Repair visibility later */
3636                         repair_monsters = TRUE;
3637
3638                         /* Hack -- Detect monster */
3639                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3640
3641                         /* Update the monster */
3642                         update_mon(i, FALSE);
3643
3644                         /* Detect */
3645                         flag = TRUE;
3646                 }
3647         }
3648
3649         /* Describe */
3650         if (flag)
3651         {
3652                 /* Describe result */
3653 #ifdef JP
3654 msg_print("¼«Á³¤Ç¤Ê¤¤¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤¿¡ª");
3655 #else
3656                 msg_print("You sense the presence of unnatural beings!");
3657 #endif
3658
3659         }
3660
3661         /* Result */
3662         return (flag);
3663 }
3664
3665
3666 /*
3667  * Detect all monsters it has mind on current panel
3668  */
3669 bool detect_monsters_mind(int range)
3670 {
3671         int     i, y, x;
3672         bool    flag = FALSE;
3673
3674         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3675
3676         /* Scan monsters */
3677         for (i = 1; i < m_max; i++)
3678         {
3679                 monster_type *m_ptr = &m_list[i];
3680                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3681
3682                 /* Skip dead monsters */
3683                 if (!m_ptr->r_idx) continue;
3684
3685                 /* Location */
3686                 y = m_ptr->fy;
3687                 x = m_ptr->fx;
3688
3689                 /* Only detect nearby monsters */
3690                 if (distance(py, px, y, x) > range) continue;
3691
3692                 /* Detect non-living monsters */
3693                 if (!(r_ptr->flags2 & RF2_EMPTY_MIND))
3694                 {
3695                         /* Update monster recall window */
3696                         if (p_ptr->monster_race_idx == m_ptr->r_idx)
3697                         {
3698                                 /* Window stuff */
3699                                 p_ptr->window |= (PW_MONSTER);
3700                         }
3701
3702                         /* Repair visibility later */
3703                         repair_monsters = TRUE;
3704
3705                         /* Hack -- Detect monster */
3706                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3707
3708                         /* Update the monster */
3709                         update_mon(i, FALSE);
3710
3711                         /* Detect */
3712                         flag = TRUE;
3713                 }
3714         }
3715
3716         /* Describe */
3717         if (flag)
3718         {
3719                 /* Describe result */
3720 #ifdef JP
3721 msg_print("»¦µ¤¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3722 #else
3723                 msg_print("You sense the presence of someone's mind!");
3724 #endif
3725
3726         }
3727
3728         /* Result */
3729         return (flag);
3730 }
3731
3732
3733 /*
3734  * Detect all (string) monsters on current panel
3735  */
3736 bool detect_monsters_string(int range, cptr Match)
3737 {
3738         int i, y, x;
3739         bool flag = FALSE;
3740
3741         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3742
3743         /* Scan monsters */
3744         for (i = 1; i < m_max; i++)
3745         {
3746                 monster_type *m_ptr = &m_list[i];
3747                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3748
3749                 /* Skip dead monsters */
3750                 if (!m_ptr->r_idx) continue;
3751
3752                 /* Location */
3753                 y = m_ptr->fy;
3754                 x = m_ptr->fx;
3755
3756                 /* Only detect nearby monsters */
3757                 if (distance(py, px, y, x) > range) continue;
3758
3759                 /* Detect monsters with the same symbol */
3760                 if (my_strchr(Match, r_ptr->d_char))
3761                 {
3762                         /* Update monster recall window */
3763                         if (p_ptr->monster_race_idx == m_ptr->r_idx)
3764                         {
3765                                 /* Window stuff */
3766                                 p_ptr->window |= (PW_MONSTER);
3767                         }
3768
3769                         /* Repair visibility later */
3770                         repair_monsters = TRUE;
3771
3772                         /* Hack -- Detect monster */
3773                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3774
3775                         /* Update the monster */
3776                         update_mon(i, FALSE);
3777
3778                         /* Detect */
3779                         flag = TRUE;
3780                 }
3781         }
3782
3783         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
3784
3785         /* Describe */
3786         if (flag)
3787         {
3788                 /* Describe result */
3789 #ifdef JP
3790 msg_print("¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3791 #else
3792                 msg_print("You sense the presence of monsters!");
3793 #endif
3794
3795         }
3796
3797         /* Result */
3798         return (flag);
3799 }
3800
3801
3802 /*
3803  * A "generic" detect monsters routine, tagged to flags3
3804  */
3805 bool detect_monsters_xxx(int range, u32b match_flag)
3806 {
3807         int  i, y, x;
3808         bool flag = FALSE;
3809 #ifdef JP
3810 cptr desc_monsters = "ÊѤʥâ¥ó¥¹¥¿¡¼";
3811 #else
3812         cptr desc_monsters = "weird monsters";
3813 #endif
3814
3815         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3816
3817         /* Scan monsters */
3818         for (i = 1; i < m_max; i++)
3819         {
3820                 monster_type *m_ptr = &m_list[i];
3821                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3822
3823                 /* Skip dead monsters */
3824                 if (!m_ptr->r_idx) continue;
3825
3826                 /* Location */
3827                 y = m_ptr->fy;
3828                 x = m_ptr->fx;
3829
3830                 /* Only detect nearby monsters */
3831                 if (distance(py, px, y, x) > range) continue;
3832
3833                 /* Detect evil monsters */
3834                 if (r_ptr->flags3 & (match_flag))
3835                 {
3836                         if (is_original_ap(m_ptr))
3837                         {
3838                                 /* Take note that they are something */
3839                                 r_ptr->r_flags3 |= (match_flag);
3840
3841                                 /* Update monster recall window */
3842                                 if (p_ptr->monster_race_idx == m_ptr->r_idx)
3843                                 {
3844                                         /* Window stuff */
3845                                         p_ptr->window |= (PW_MONSTER);
3846                                 }
3847                         }
3848
3849                         /* Repair visibility later */
3850                         repair_monsters = TRUE;
3851
3852                         /* Hack -- Detect monster */
3853                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3854
3855                         /* Update the monster */
3856                         update_mon(i, FALSE);
3857
3858                         /* Detect */
3859                         flag = TRUE;
3860                 }
3861         }
3862
3863         /* Describe */
3864         if (flag)
3865         {
3866                 switch (match_flag)
3867                 {
3868                         case RF3_DEMON:
3869 #ifdef JP
3870 desc_monsters = "¥Ç¡¼¥â¥ó";
3871 #else
3872                                 desc_monsters = "demons";
3873 #endif
3874
3875                                 break;
3876                         case RF3_UNDEAD:
3877 #ifdef JP
3878 desc_monsters = "¥¢¥ó¥Ç¥Ã¥É";
3879 #else
3880                                 desc_monsters = "the undead";
3881 #endif
3882
3883                                 break;
3884                 }
3885
3886                 /* Describe result */
3887 #ifdef JP
3888 msg_format("%s¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª", desc_monsters);
3889 #else
3890                 msg_format("You sense the presence of %s!", desc_monsters);
3891 #endif
3892
3893                 msg_print(NULL);
3894         }
3895
3896         /* Result */
3897         return (flag);
3898 }
3899
3900
3901 /*
3902  * Detect everything
3903  */
3904 bool detect_all(int range)
3905 {
3906         bool detect = FALSE;
3907
3908         /* Detect everything */
3909         if (detect_traps(range, TRUE)) detect = TRUE;
3910         if (detect_doors(range)) detect = TRUE;
3911         if (detect_stairs(range)) detect = TRUE;
3912
3913         /* There are too many hidden treasure.  So... */
3914         /* if (detect_treasure(range)) detect = TRUE; */
3915
3916         if (detect_objects_gold(range)) detect = TRUE;
3917         if (detect_objects_normal(range)) detect = TRUE;
3918         if (detect_monsters_invis(range)) detect = TRUE;
3919         if (detect_monsters_normal(range)) detect = TRUE;
3920
3921         /* Result */
3922         return (detect);
3923 }
3924
3925
3926 /*
3927  * Apply a "project()" directly to all viewable monsters
3928  *
3929  * Note that affected monsters are NOT auto-tracked by this usage.
3930  *
3931  * To avoid misbehavior when monster deaths have side-effects,
3932  * this is done in two passes. -- JDL
3933  */
3934 bool project_hack(int typ, int dam)
3935 {
3936         int     i, x, y;
3937         int     flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
3938         bool    obvious = FALSE;
3939
3940
3941         /* Mark all (nearby) monsters */
3942         for (i = 1; i < m_max; i++)
3943         {
3944                 monster_type *m_ptr = &m_list[i];
3945
3946                 /* Paranoia -- Skip dead monsters */
3947                 if (!m_ptr->r_idx) continue;
3948
3949                 /* Location */
3950                 y = m_ptr->fy;
3951                 x = m_ptr->fx;
3952
3953                 /* Require line of sight */
3954                 if (!player_has_los_bold(y, x) || !projectable(py, px, y, x)) continue;
3955
3956                 /* Mark the monster */
3957                 m_ptr->mflag |= (MFLAG_TEMP);
3958         }
3959
3960         /* Affect all marked monsters */
3961         for (i = 1; i < m_max; i++)
3962         {
3963                 monster_type *m_ptr = &m_list[i];
3964
3965                 /* Skip unmarked monsters */
3966                 if (!(m_ptr->mflag & (MFLAG_TEMP))) continue;
3967
3968                 /* Remove mark */
3969                 m_ptr->mflag &= ~(MFLAG_TEMP);
3970
3971                 /* Location */
3972                 y = m_ptr->fy;
3973                 x = m_ptr->fx;
3974
3975                 /* Jump directly to the target monster */
3976                 if (project(0, 0, y, x, dam, typ, flg, -1)) obvious = TRUE;
3977         }
3978
3979         /* Result */
3980         return (obvious);
3981 }
3982
3983
3984 /*
3985  * Speed monsters
3986  */
3987 bool speed_monsters(void)
3988 {
3989         return (project_hack(GF_OLD_SPEED, p_ptr->lev));
3990 }
3991
3992 /*
3993  * Slow monsters
3994  */
3995 bool slow_monsters(int power)
3996 {
3997         return (project_hack(GF_OLD_SLOW, power));
3998 }
3999
4000 /*
4001  * Sleep monsters
4002  */
4003 bool sleep_monsters(int power)
4004 {
4005         return (project_hack(GF_OLD_SLEEP, power));
4006 }
4007
4008
4009 /*
4010  * Banish evil monsters
4011  */
4012 bool banish_evil(int dist)
4013 {
4014         return (project_hack(GF_AWAY_EVIL, dist));
4015 }
4016
4017
4018 /*
4019  * Turn undead
4020  */
4021 bool turn_undead(void)
4022 {
4023         bool tester = (project_hack(GF_TURN_UNDEAD, p_ptr->lev));
4024         if (tester)
4025                 chg_virtue(V_UNLIFE, -1);
4026         return tester;
4027 }
4028
4029
4030 /*
4031  * Dispel undead monsters
4032  */
4033 bool dispel_undead(int dam)
4034 {
4035         bool tester = (project_hack(GF_DISP_UNDEAD, dam));
4036         if (tester)
4037                 chg_virtue(V_UNLIFE, -2);
4038         return tester;
4039 }
4040
4041 /*
4042  * Dispel evil monsters
4043  */
4044 bool dispel_evil(int dam)
4045 {
4046         return (project_hack(GF_DISP_EVIL, dam));
4047 }
4048
4049 /*
4050  * Dispel good monsters
4051  */
4052 bool dispel_good(int dam)
4053 {
4054         return (project_hack(GF_DISP_GOOD, dam));
4055 }
4056
4057 /*
4058  * Dispel all monsters
4059  */
4060 bool dispel_monsters(int dam)
4061 {
4062         return (project_hack(GF_DISP_ALL, dam));
4063 }
4064
4065 /*
4066  * Dispel 'living' monsters
4067  */
4068 bool dispel_living(int dam)
4069 {
4070         return (project_hack(GF_DISP_LIVING, dam));
4071 }
4072
4073 /*
4074  * Dispel demons
4075  */
4076 bool dispel_demons(int dam)
4077 {
4078         return (project_hack(GF_DISP_DEMON, dam));
4079 }
4080
4081
4082 /*
4083  * Crusade
4084  */
4085 bool crusade(void)
4086 {
4087         return (project_hack(GF_CRUSADE, p_ptr->lev*4));
4088 }
4089
4090
4091 /*
4092  * Wake up all monsters, and speed up "los" monsters.
4093  */
4094 void aggravate_monsters(int who)
4095 {
4096         int     i;
4097         bool    sleep = FALSE;
4098         bool    speed = FALSE;
4099
4100
4101         /* Aggravate everyone nearby */
4102         for (i = 1; i < m_max; i++)
4103         {
4104                 monster_type    *m_ptr = &m_list[i];
4105 /*              monster_race    *r_ptr = &r_info[m_ptr->r_idx]; */
4106
4107                 /* Paranoia -- Skip dead monsters */
4108                 if (!m_ptr->r_idx) continue;
4109
4110                 /* Skip aggravating monster (or player) */
4111                 if (i == who) continue;
4112
4113                 /* Wake up nearby sleeping monsters */
4114                 if (m_ptr->cdis < MAX_SIGHT * 2)
4115                 {
4116                         /* Wake up */
4117                         if (MON_CSLEEP(m_ptr))
4118                         {
4119                                 (void)set_monster_csleep(i, 0);
4120                                 sleep = TRUE;
4121                         }
4122                         if (!is_pet(m_ptr)) m_ptr->mflag2 |= MFLAG2_NOPET;
4123                 }
4124
4125                 /* Speed up monsters in line of sight */
4126                 if (player_has_los_bold(m_ptr->fy, m_ptr->fx))
4127                 {
4128                         if (!is_pet(m_ptr))
4129                         {
4130                                 (void)set_monster_fast(i, MON_FAST(m_ptr) + 100);
4131                                 speed = TRUE;
4132                         }
4133                 }
4134         }
4135
4136         /* Messages */
4137 #ifdef JP
4138         if (speed) msg_print("ÉÕ¶á¤Ç²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤Ê´¶¤¸¤ò¼õ¤±¤¿¡ª");
4139         else if (sleep) msg_print("²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤ÊÁû¡¹¤·¤¤²»¤¬±ó¤¯¤Ëʹ¤³¤¨¤¿¡ª");
4140 #else
4141         if (speed) msg_print("You feel a sudden stirring nearby!");
4142         else if (sleep) msg_print("You hear a sudden stirring in the distance!");
4143 #endif
4144         if (p_ptr->riding) p_ptr->update |= PU_BONUS;
4145 }
4146
4147
4148 /*
4149  * Delete a non-unique/non-quest monster
4150  */
4151 bool genocide_aux(int m_idx, int power, bool player_cast, int dam_side, cptr spell_name)
4152 {
4153         int          msec = delay_factor * delay_factor * delay_factor;
4154         monster_type *m_ptr = &m_list[m_idx];
4155         monster_race *r_ptr = &r_info[m_ptr->r_idx];
4156         bool         resist = FALSE;
4157
4158         if (is_pet(m_ptr) && !player_cast) return FALSE;
4159
4160         /* Hack -- Skip Unique Monsters or Quest Monsters */
4161         if (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) resist = TRUE;
4162
4163         else if (r_ptr->flags7 & RF7_UNIQUE2) resist = TRUE;
4164
4165         else if (m_idx == p_ptr->riding) resist = TRUE;
4166
4167         else if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle) resist = TRUE;
4168
4169         else if (player_cast && (r_ptr->level > randint0(power))) resist = TRUE;
4170
4171         else if (player_cast && (m_ptr->mflag2 & MFLAG2_NOGENO)) resist = TRUE;
4172
4173         /* Delete the monster */
4174         else
4175         {
4176                 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
4177                 {
4178                         char m_name[80];
4179
4180                         monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
4181                         do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_GENOCIDE, m_name);
4182                 }
4183
4184                 delete_monster_idx(m_idx);
4185         }
4186
4187         if (resist && player_cast)
4188         {
4189                 bool see_m = is_seen(m_ptr);
4190                 char m_name[80];
4191
4192                 monster_desc(m_name, m_ptr, 0);
4193                 if (see_m)
4194                 {
4195 #ifdef JP
4196                         msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
4197 #else
4198                         msg_format("%^s is unaffected.", m_name);
4199 #endif
4200                 }
4201                 if (MON_CSLEEP(m_ptr))
4202                 {
4203                         (void)set_monster_csleep(m_idx, 0);
4204                         if (m_ptr->ml)
4205                         {
4206 #ifdef JP
4207                                 msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
4208 #else
4209                                 msg_format("%^s wakes up.", m_name);
4210 #endif
4211                         }
4212                 }
4213                 if (is_friendly(m_ptr) && !is_pet(m_ptr))
4214                 {
4215                         if (see_m)
4216                         {
4217 #ifdef JP
4218                                 msg_format("%s¤ÏÅܤä¿¡ª", m_name);
4219 #else
4220                                 msg_format("%^s gets angry!", m_name);
4221 #endif
4222                         }
4223                         set_hostile(m_ptr);
4224                 }
4225                 if (one_in_(13)) m_ptr->mflag2 |= MFLAG2_NOGENO;
4226         }
4227
4228         if (player_cast)
4229         {
4230                 /* Take damage */
4231 #ifdef JP
4232                 take_hit(DAMAGE_GENO, randint1(dam_side), format("%^s¤Î¼öʸ¤ò¾§¤¨¤¿ÈèÏ«", spell_name), -1);
4233 #else
4234                 take_hit(DAMAGE_GENO, randint1(dam_side), format("the strain of casting %^s", spell_name), -1);
4235 #endif
4236         }
4237
4238         /* Visual feedback */
4239         move_cursor_relative(py, px);
4240
4241         /* Redraw */
4242         p_ptr->redraw |= (PR_HP);
4243
4244         /* Window stuff */
4245         p_ptr->window |= (PW_PLAYER);
4246
4247         /* Handle */
4248         handle_stuff();
4249
4250         /* Fresh */
4251         Term_fresh();
4252
4253         /* Delay */
4254         Term_xtra(TERM_XTRA_DELAY, msec);
4255
4256         return !resist;
4257 }
4258
4259
4260 /*
4261  * Delete all non-unique/non-quest monsters of a given "type" from the level
4262  */
4263 bool symbol_genocide(int power, bool player_cast)
4264 {
4265         int  i;
4266         char typ;
4267         bool result = FALSE;
4268
4269         /* Prevent genocide in quest levels */
4270         if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
4271         {
4272                 return (FALSE);
4273         }
4274
4275         /* Mega-Hack -- Get a monster symbol */
4276 #ifdef JP
4277         while (!get_com("¤É¤Î¼ïÎà(ʸ»ú)¤Î¥â¥ó¥¹¥¿¡¼¤òËõ»¦¤·¤Þ¤¹¤«: ", &typ, FALSE)) ;
4278 #else
4279         while (!get_com("Choose a monster race (by symbol) to genocide: ", &typ, FALSE)) ;
4280 #endif
4281
4282         /* Delete the monsters of that "type" */
4283         for (i = 1; i < m_max; i++)
4284         {
4285                 monster_type *m_ptr = &m_list[i];
4286                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4287
4288                 /* Paranoia -- Skip dead monsters */
4289                 if (!m_ptr->r_idx) continue;
4290
4291                 /* Skip "wrong" monsters */
4292                 if (r_ptr->d_char != typ) continue;
4293
4294                 /* Take note */
4295 #ifdef JP
4296                 result |= genocide_aux(i, power, player_cast, 4, "Ëõ»¦");
4297 #else
4298                 result |= genocide_aux(i, power, player_cast, 4, "Genocide");
4299 #endif
4300         }
4301
4302         if (result)
4303         {
4304                 chg_virtue(V_VITALITY, -2);
4305                 chg_virtue(V_CHANCE, -1);
4306         }
4307
4308         return result;
4309 }
4310
4311
4312 /*
4313  * Delete all nearby (non-unique) monsters
4314  */
4315 bool mass_genocide(int power, bool player_cast)
4316 {
4317         int  i;
4318         bool result = FALSE;
4319
4320         /* Prevent mass genocide in quest levels */
4321         if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
4322         {
4323                 return (FALSE);
4324         }
4325
4326         /* Delete the (nearby) monsters */
4327         for (i = 1; i < m_max; i++)
4328         {
4329                 monster_type *m_ptr = &m_list[i];
4330
4331                 /* Paranoia -- Skip dead monsters */
4332                 if (!m_ptr->r_idx) continue;
4333
4334                 /* Skip distant monsters */
4335                 if (m_ptr->cdis > MAX_SIGHT) continue;
4336
4337                 /* Note effect */
4338 #ifdef JP
4339                 result |= genocide_aux(i, power, player_cast, 3, "¼þÊÕËõ»¦");
4340 #else
4341                 result |= genocide_aux(i, power, player_cast, 3, "Mass Genocide");
4342 #endif
4343         }
4344
4345         if (result)
4346         {
4347                 chg_virtue(V_VITALITY, -2);
4348                 chg_virtue(V_CHANCE, -1);
4349         }
4350
4351         return result;
4352 }
4353
4354
4355
4356 /*
4357  * Delete all nearby (non-unique) undead
4358  */
4359 bool mass_genocide_undead(int power, bool player_cast)
4360 {
4361         int  i;
4362         bool result = FALSE;
4363
4364         /* Prevent mass genocide in quest levels */
4365         if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
4366         {
4367                 return (FALSE);
4368         }
4369
4370         /* Delete the (nearby) monsters */
4371         for (i = 1; i < m_max; i++)
4372         {
4373                 monster_type *m_ptr = &m_list[i];
4374                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4375
4376                 /* Paranoia -- Skip dead monsters */
4377                 if (!m_ptr->r_idx) continue;
4378
4379                 if (!(r_ptr->flags3 & RF3_UNDEAD)) continue;
4380
4381                 /* Skip distant monsters */
4382                 if (m_ptr->cdis > MAX_SIGHT) continue;
4383
4384                 /* Note effect */
4385 #ifdef JP
4386                 result |= genocide_aux(i, power, player_cast, 3, "¥¢¥ó¥Ç¥Ã¥É¾ÃÌÇ");
4387 #else
4388                 result |= genocide_aux(i, power, player_cast, 3, "Annihilate Undead");
4389 #endif
4390         }
4391
4392         if (result)
4393         {
4394                 chg_virtue(V_UNLIFE, -2);
4395                 chg_virtue(V_CHANCE, -1);
4396         }
4397
4398         return result;
4399 }
4400
4401
4402
4403 /*
4404  * Probe nearby monsters
4405  */
4406 bool probing(void)
4407 {
4408         int     i, speed;
4409         int cu, cv;
4410         bool    probe = FALSE;
4411         char buf[256];
4412         cptr align;
4413
4414         cu = Term->scr->cu;
4415         cv = Term->scr->cv;
4416         Term->scr->cu = 0;
4417         Term->scr->cv = 1;
4418
4419         /* Probe all (nearby) monsters */
4420         for (i = 1; i < m_max; i++)
4421         {
4422                 monster_type *m_ptr = &m_list[i];
4423                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4424
4425                 /* Paranoia -- Skip dead monsters */
4426                 if (!m_ptr->r_idx) continue;
4427
4428                 /* Require line of sight */
4429                 if (!player_has_los_bold(m_ptr->fy, m_ptr->fx)) continue;
4430
4431                 /* Probe visible monsters */
4432                 if (m_ptr->ml)
4433                 {
4434                         char m_name[80];
4435
4436                         /* Start the message */
4437                         if (!probe)
4438                         {
4439 #ifdef JP
4440                                 msg_print("Ä´ººÃæ...");
4441 #else
4442                                 msg_print("Probing...");
4443 #endif
4444                         }
4445
4446                         msg_print(NULL);
4447
4448                         if (!is_original_ap(m_ptr))
4449                         {
4450                                 if (m_ptr->mflag2 & MFLAG2_KAGE)
4451                                         m_ptr->mflag2 &= ~(MFLAG2_KAGE);
4452
4453                                 m_ptr->ap_r_idx = m_ptr->r_idx;
4454                                 lite_spot(m_ptr->fy, m_ptr->fx);
4455                         }
4456                         /* Get "the monster" or "something" */
4457                         monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_INDEF_HIDDEN);
4458
4459                         speed = m_ptr->mspeed - 110;
4460                         if (MON_FAST(m_ptr)) speed += 10;
4461                         if (MON_SLOW(m_ptr)) speed -= 10;
4462
4463                         /* Get the monster's alignment */
4464 #ifdef JP
4465                         if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "Á±°­";
4466                         else if (r_ptr->flags3 & RF3_EVIL) align = "¼Ù°­";
4467                         else if (r_ptr->flags3 & RF3_GOOD) align = "Á±ÎÉ";
4468                         else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "ÃæΩ(Á±°­)";
4469                         else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "ÃæΩ(¼Ù°­)";
4470                         else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "ÃæΩ(Á±ÎÉ)";
4471                         else align = "ÃæΩ";
4472 #else
4473                         if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "good&evil";
4474                         else if (r_ptr->flags3 & RF3_EVIL) align = "evil";
4475                         else if (r_ptr->flags3 & RF3_GOOD) align = "good";
4476                         else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "neutral(good&evil)";
4477                         else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "neutral(evil)";
4478                         else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "neutral(good)";
4479                         else align = "neutral";
4480 #endif
4481
4482                         /* Describe the monster */
4483 #ifdef JP
4484 sprintf(buf,"%s ... Â°À­:%s HP:%d/%d AC:%d Â®ÅÙ:%s%d ·Ð¸³:", m_name, align, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
4485 #else
4486 sprintf(buf, "%s ... align:%s HP:%d/%d AC:%d speed:%s%d exp:", m_name, align, m_ptr->hp, m_ptr->maxhp, r_ptr->ac, (speed > 0) ? "+" : "", speed);
4487 #endif
4488                         if (r_ptr->next_r_idx)
4489                         {
4490                                 strcat(buf, format("%d/%d ", m_ptr->exp, r_ptr->next_exp));
4491                         }
4492                         else
4493                         {
4494                                 strcat(buf, "xxx ");
4495                         }
4496
4497 #ifdef JP
4498                         if (MON_CSLEEP(m_ptr)) strcat(buf,"¿ç̲ ");
4499                         if (MON_STUNNED(m_ptr)) strcat(buf,"ۯ۰ ");
4500                         if (MON_MONFEAR(m_ptr)) strcat(buf,"¶²ÉÝ ");
4501                         if (MON_CONFUSED(m_ptr)) strcat(buf,"º®Íð ");
4502                         if (MON_INVULNER(m_ptr)) strcat(buf,"̵Ũ ");
4503 #else
4504                         if (MON_CSLEEP(m_ptr)) strcat(buf,"sleeping ");
4505                         if (MON_STUNNED(m_ptr)) strcat(buf,"stunned ");
4506                         if (MON_MONFEAR(m_ptr)) strcat(buf,"scared ");
4507                         if (MON_CONFUSED(m_ptr)) strcat(buf,"confused ");
4508                         if (MON_INVULNER(m_ptr)) strcat(buf,"invulnerable ");
4509 #endif
4510                         buf[strlen(buf)-1] = '\0';
4511                         prt(buf,0,0);
4512
4513                         /* HACK : Add the line to message buffer */
4514                         message_add(buf);
4515                         p_ptr->window |= (PW_MESSAGE);
4516                         window_stuff();
4517
4518                         if (m_ptr->ml) move_cursor_relative(m_ptr->fy, m_ptr->fx);
4519                         inkey();
4520
4521                         Term_erase(0, 0, 255);
4522
4523                         /* Learn everything about this monster */
4524                         if (lore_do_probe(m_ptr->r_idx))
4525                         {
4526                                 char buf[80];
4527
4528                                 /* Get base name of monster */
4529                                 strcpy(buf, (r_name + r_ptr->name));
4530
4531 #ifdef JP
4532                                 /* Note that we learnt some new flags  -Mogami- */
4533                                 msg_format("%s¤Ë¤Ä¤¤¤Æ¤µ¤é¤Ë¾Ü¤·¤¯¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", buf);
4534 #else
4535                                 /* Pluralize it */
4536                                 plural_aux(buf);
4537
4538                                 /* Note that we learnt some new flags  -Mogami- */
4539                                 msg_format("You now know more about %s.", buf);
4540 #endif
4541                                 /* Clear -more- prompt */
4542                                 msg_print(NULL);
4543                         }
4544
4545                         /* Probe worked */
4546                         probe = TRUE;
4547                 }
4548         }
4549
4550         Term->scr->cu = cu;
4551         Term->scr->cv = cv;
4552         Term_fresh();
4553
4554         /* Done */
4555         if (probe)
4556         {
4557                 chg_virtue(V_KNOWLEDGE, 1);
4558
4559 #ifdef JP
4560 msg_print("¤³¤ì¤ÇÁ´Éô¤Ç¤¹¡£");
4561 #else
4562                 msg_print("That's all.");
4563 #endif
4564
4565         }
4566
4567         /* Result */
4568         return (probe);
4569 }
4570
4571
4572
4573 /*
4574  * The spell of destruction
4575  *
4576  * This spell "deletes" monsters (instead of "killing" them).
4577  *
4578  * Later we may use one function for both "destruction" and
4579  * "earthquake" by using the "full" to select "destruction".
4580  */
4581 bool destroy_area(int y1, int x1, int r, bool in_generate)
4582 {
4583         int       y, x, k, t;
4584         cave_type *c_ptr;
4585         bool      flag = FALSE;
4586
4587         /* Prevent destruction of quest levels and town */
4588         if ((p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) || !dun_level)
4589         {
4590                 return (FALSE);
4591         }
4592
4593         /* Lose monster light */
4594         if (!in_generate) clear_mon_lite();
4595
4596         /* Big area of affect */
4597         for (y = (y1 - r); y <= (y1 + r); y++)
4598         {
4599                 for (x = (x1 - r); x <= (x1 + r); x++)
4600                 {
4601                         /* Skip illegal grids */
4602                         if (!in_bounds(y, x)) continue;
4603
4604                         /* Extract the distance */
4605                         k = distance(y1, x1, y, x);
4606
4607                         /* Stay in the circle of death */
4608                         if (k > r) continue;
4609
4610                         /* Access the grid */
4611                         c_ptr = &cave[y][x];
4612
4613                         /* Lose room and vault */
4614                         c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
4615
4616                         /* Lose light and knowledge */
4617                         c_ptr->info &= ~(CAVE_MARK | CAVE_GLOW | CAVE_KNOWN);
4618
4619                         if (!in_generate) /* Normal */
4620                         {
4621                                 /* Lose unsafety */
4622                                 c_ptr->info &= ~(CAVE_UNSAFE);
4623
4624                                 /* Hack -- Notice player affect */
4625                                 if (player_bold(y, x))
4626                                 {
4627                                         /* Hurt the player later */
4628                                         flag = TRUE;
4629
4630                                         /* Do not hurt this grid */
4631                                         continue;
4632                                 }
4633                         }
4634
4635                         /* Hack -- Skip the epicenter */
4636                         if ((y == y1) && (x == x1)) continue;
4637
4638                         if (c_ptr->m_idx)
4639                         {
4640                                 monster_type *m_ptr = &m_list[c_ptr->m_idx];
4641                                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4642
4643                                 if (in_generate) /* In generation */
4644                                 {
4645                                         /* Delete the monster (if any) */
4646                                         delete_monster(y, x);
4647                                 }
4648                                 else if (r_ptr->flags1 & RF1_QUESTOR)
4649                                 {
4650                                         /* Heal the monster */
4651                                         m_ptr->hp = m_ptr->maxhp;
4652
4653                                         /* Try to teleport away quest monsters */
4654                                         if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TELEPORT_DEC_VALOUR)) continue;
4655                                 }
4656                                 else
4657                                 {
4658                                         if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
4659                                         {
4660                                                 char m_name[80];
4661
4662                                                 monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
4663                                                 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_DESTROY, m_name);
4664                                         }
4665
4666                                         /* Delete the monster (if any) */
4667                                         delete_monster(y, x);
4668                                 }
4669                         }
4670
4671                         /* During generation, destroyed artifacts are "preserved" */
4672                         if (preserve_mode || in_generate)
4673                         {
4674                                 s16b this_o_idx, next_o_idx = 0;
4675
4676                                 /* Scan all objects in the grid */
4677                                 for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
4678                                 {
4679                                         object_type *o_ptr;
4680
4681                                         /* Acquire object */
4682                                         o_ptr = &o_list[this_o_idx];
4683
4684                                         /* Acquire next object */
4685                                         next_o_idx = o_ptr->next_o_idx;
4686
4687                                         /* Hack -- Preserve unknown artifacts */
4688                                         if (object_is_fixed_artifact(o_ptr) && (!object_is_known(o_ptr) || in_generate))
4689                                         {
4690                                                 /* Mega-Hack -- Preserve the artifact */
4691                                                 a_info[o_ptr->name1].cur_num = 0;
4692
4693                                                 if (in_generate && cheat_peek)
4694                                                 {
4695                                                         char o_name[MAX_NLEN];
4696                                                         object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
4697 #ifdef JP
4698                                                         msg_format("ÅÁÀâ¤Î¥¢¥¤¥Æ¥à (%s) ¤ÏÀ¸À®Ãæ¤Ë*Ç˲õ*¤µ¤ì¤¿¡£", o_name);
4699 #else
4700                                                         msg_format("Artifact (%s) was *destroyed* during generation.", o_name);
4701 #endif
4702                                                 }
4703                                         }
4704                                         else if (in_generate && cheat_peek && o_ptr->art_name)
4705                                         {
4706 #ifdef JP
4707                                                 msg_print("¥é¥ó¥À¥à¡¦¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î1¤Ä¤ÏÀ¸À®Ãæ¤Ë*Ç˲õ*¤µ¤ì¤¿¡£");
4708 #else
4709                                                 msg_print("One of the random artifacts was *destroyed* during generation.");
4710 #endif
4711                                         }
4712                                 }
4713                         }
4714
4715                         /* Delete objects */
4716                         delete_object(y, x);
4717
4718                         /* Destroy "non-permanent" grids */
4719                         if (!cave_perma_grid(c_ptr))
4720                         {
4721                                 /* Wall (or floor) type */
4722                                 t = randint0(200);
4723
4724                                 if (!in_generate) /* Normal */
4725                                 {
4726                                         if (t < 20)
4727                                         {
4728                                                 /* Create granite wall */
4729                                                 cave_set_feat(y, x, feat_granite);
4730                                         }
4731                                         else if (t < 70)
4732                                         {
4733                                                 /* Create quartz vein */
4734                                                 cave_set_feat(y, x, feat_quartz_vein);
4735                                         }
4736                                         else if (t < 100)
4737                                         {
4738                                                 /* Create magma vein */
4739                                                 cave_set_feat(y, x, feat_magma_vein);
4740                                         }
4741                                         else
4742                                         {
4743                                                 /* Create floor */
4744                                                 cave_set_feat(y, x, floor_type[randint0(100)]);
4745                                         }
4746                                 }
4747                                 else /* In generation */
4748                                 {
4749                                         if (t < 20)
4750                                         {
4751                                                 /* Create granite wall */
4752                                                 place_extra_grid(c_ptr);
4753                                         }
4754                                         else if (t < 70)
4755                                         {
4756                                                 /* Create quartz vein */
4757                                                 c_ptr->feat = feat_quartz_vein;
4758                                         }
4759                                         else if (t < 100)
4760                                         {
4761                                                 /* Create magma vein */
4762                                                 c_ptr->feat = feat_magma_vein;
4763                                         }
4764                                         else
4765                                         {
4766                                                 /* Create floor */
4767                                                 place_floor_grid(c_ptr);
4768                                         }
4769
4770                                         /* Clear garbage of hidden trap or door */
4771                                         c_ptr->mimic = 0;
4772                                 }
4773                         }
4774                 }
4775         }
4776
4777         if (!in_generate)
4778         {
4779                 /* Process "re-glowing" */
4780                 for (y = (y1 - r); y <= (y1 + r); y++)
4781                 {
4782                         for (x = (x1 - r); x <= (x1 + r); x++)
4783                         {
4784                                 /* Skip illegal grids */
4785                                 if (!in_bounds(y, x)) continue;
4786
4787                                 /* Extract the distance */
4788                                 k = distance(y1, x1, y, x);
4789
4790                                 /* Stay in the circle of death */
4791                                 if (k > r) continue;
4792
4793                                 /* Access the grid */
4794                                 c_ptr = &cave[y][x];
4795
4796                                 if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
4797                                 else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
4798                                 {
4799                                         int i, yy, xx;
4800                                         cave_type *cc_ptr;
4801
4802                                         for (i = 0; i < 9; i++)
4803                                         {
4804                                                 yy = y + ddy_ddd[i];
4805                                                 xx = x + ddx_ddd[i];
4806                                                 if (!in_bounds2(yy, xx)) continue;
4807                                                 cc_ptr = &cave[yy][xx];
4808                                                 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
4809                                                 {
4810                                                         c_ptr->info |= CAVE_GLOW;
4811                                                         break;
4812                                                 }
4813                                         }
4814                                 }
4815                         }
4816                 }
4817
4818                 /* Hack -- Affect player */
4819                 if (flag)
4820                 {
4821                         /* Message */
4822 #ifdef JP
4823                         msg_print("dz¤¨¤ë¤è¤¦¤ÊÁ®¸÷¤¬È¯À¸¤·¤¿¡ª");
4824 #else
4825                         msg_print("There is a searing blast of light!");
4826 #endif
4827
4828                         /* Blind the player */
4829                         if (!p_ptr->resist_blind && !p_ptr->resist_lite)
4830                         {
4831                                 /* Become blind */
4832                                 (void)set_blind(p_ptr->blind + 10 + randint1(10));
4833                         }
4834                 }
4835
4836                 forget_flow();
4837
4838                 /* Mega-Hack -- Forget the view and lite */
4839                 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
4840
4841                 /* Update stuff */
4842                 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
4843
4844                 /* Redraw map */
4845                 p_ptr->redraw |= (PR_MAP);
4846
4847                 /* Window stuff */
4848                 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
4849
4850                 if (p_ptr->special_defense & NINJA_S_STEALTH)
4851                 {
4852                         if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
4853                 }
4854         }
4855
4856         /* Success */
4857         return (TRUE);
4858 }
4859
4860
4861 /*
4862  * Induce an "earthquake" of the given radius at the given location.
4863  *
4864  * This will turn some walls into floors and some floors into walls.
4865  *
4866  * The player will take damage and "jump" into a safe grid if possible,
4867  * otherwise, he will "tunnel" through the rubble instantaneously.
4868  *
4869  * Monsters will take damage, and "jump" into a safe grid if possible,
4870  * otherwise they will be "buried" in the rubble, disappearing from
4871  * the level in the same way that they do when genocided.
4872  *
4873  * Note that thus the player and monsters (except eaters of walls and
4874  * passers through walls) will never occupy the same grid as a wall.
4875  * Note that as of now (2.7.8) no monster may occupy a "wall" grid, even
4876  * for a single turn, unless that monster can pass_walls or kill_walls.
4877  * This has allowed massive simplification of the "monster" code.
4878  */
4879 bool earthquake_aux(int cy, int cx, int r, int m_idx)
4880 {
4881         int             i, t, y, x, yy, xx, dy, dx;
4882         int             damage = 0;
4883         int             sn = 0, sy = 0, sx = 0;
4884         bool            hurt = FALSE;
4885         cave_type       *c_ptr;
4886         bool            map[32][32];
4887
4888
4889         /* Prevent destruction of quest levels and town */
4890         if ((p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) || !dun_level)
4891         {
4892                 return (FALSE);
4893         }
4894
4895         /* Paranoia -- Enforce maximum range */
4896         if (r > 12) r = 12;
4897
4898         /* Clear the "maximal blast" area */
4899         for (y = 0; y < 32; y++)
4900         {
4901                 for (x = 0; x < 32; x++)
4902                 {
4903                         map[y][x] = FALSE;
4904                 }
4905         }
4906
4907         /* Check around the epicenter */
4908         for (dy = -r; dy <= r; dy++)
4909         {
4910                 for (dx = -r; dx <= r; dx++)
4911                 {
4912                         /* Extract the location */
4913                         yy = cy + dy;
4914                         xx = cx + dx;
4915
4916                         /* Skip illegal grids */
4917                         if (!in_bounds(yy, xx)) continue;
4918
4919                         /* Skip distant grids */
4920                         if (distance(cy, cx, yy, xx) > r) continue;
4921
4922                         /* Access the grid */
4923                         c_ptr = &cave[yy][xx];
4924
4925                         /* Lose room and vault */
4926                         c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY | CAVE_UNSAFE);
4927
4928                         /* Lose light and knowledge */
4929                         c_ptr->info &= ~(CAVE_GLOW | CAVE_MARK | CAVE_KNOWN);
4930
4931                         /* Skip the epicenter */
4932                         if (!dx && !dy) continue;
4933
4934                         /* Skip most grids */
4935                         if (randint0(100) < 85) continue;
4936
4937                         /* Damage this grid */
4938                         map[16+yy-cy][16+xx-cx] = TRUE;
4939
4940                         /* Hack -- Take note of player damage */
4941                         if (player_bold(yy, xx)) hurt = TRUE;
4942                 }
4943         }
4944
4945         /* First, affect the player (if necessary) */
4946         if (hurt && !p_ptr->pass_wall && !p_ptr->kill_wall)
4947         {
4948                 /* Check around the player */
4949                 for (i = 0; i < 8; i++)
4950                 {
4951                         /* Access the location */
4952                         y = py + ddy_ddd[i];
4953                         x = px + ddx_ddd[i];
4954
4955                         /* Skip non-empty grids */
4956                         if (!cave_empty_bold(y, x)) continue;
4957
4958                         /* Important -- Skip "quake" grids */
4959                         if (map[16+y-cy][16+x-cx]) continue;
4960
4961                         if (cave[y][x].m_idx) continue;
4962
4963                         /* Count "safe" grids */
4964                         sn++;
4965
4966                         /* Randomize choice */
4967                         if (randint0(sn) > 0) continue;
4968
4969                         /* Save the safe location */
4970                         sy = y; sx = x;
4971                 }
4972
4973                 /* Random message */
4974                 switch (randint1(3))
4975                 {
4976                         case 1:
4977                         {
4978 #ifdef JP
4979                                 msg_print("¥À¥ó¥¸¥ç¥ó¤ÎÊɤ¬Êø¤ì¤¿¡ª");
4980 #else
4981                                 msg_print("The cave ceiling collapses!");
4982 #endif
4983                                 break;
4984                         }
4985                         case 2:
4986                         {
4987 #ifdef JP
4988                                 msg_print("¥À¥ó¥¸¥ç¥ó¤Î¾²¤¬ÉÔ¼«Á³¤Ë¤Í¤¸¶Ê¤¬¤Ã¤¿¡ª");
4989 #else
4990                                 msg_print("The cave floor twists in an unnatural way!");
4991 #endif
4992                                 break;
4993                         }
4994                         default:
4995                         {
4996 #ifdef JP
4997                                 msg_print("¥À¥ó¥¸¥ç¥ó¤¬Íɤ줿¡ªÊø¤ì¤¿´ä¤¬Æ¬¤Ë¹ß¤Ã¤Æ¤­¤¿¡ª");
4998 #else
4999                                 msg_print("The cave quakes!  You are pummeled with debris!");
5000 #endif
5001                                 break;
5002                         }
5003                 }
5004
5005                 /* Hurt the player a lot */
5006                 if (!sn)
5007                 {
5008                         /* Message and damage */
5009 #ifdef JP
5010                         msg_print("¤¢¤Ê¤¿¤Ï¤Ò¤É¤¤²ø²æ¤òÉé¤Ã¤¿¡ª");
5011 #else
5012                         msg_print("You are severely crushed!");
5013 #endif
5014                         damage = 200;
5015                 }
5016
5017                 /* Destroy the grid, and push the player to safety */
5018                 else
5019                 {
5020                         /* Calculate results */
5021                         switch (randint1(3))
5022                         {
5023                                 case 1:
5024                                 {
5025 #ifdef JP
5026                                         msg_print("¹ß¤êÃí¤°´ä¤ò¤¦¤Þ¤¯Èò¤±¤¿¡ª");
5027 #else
5028                                         msg_print("You nimbly dodge the blast!");
5029 #endif
5030                                         damage = 0;
5031                                         break;
5032                                 }
5033                                 case 2:
5034                                 {
5035 #ifdef JP
5036                                         msg_print("´äÀФ¬¤¢¤Ê¤¿¤Ëľ·â¤·¤¿!");
5037 #else
5038                                         msg_print("You are bashed by rubble!");
5039 #endif
5040                                         damage = damroll(10, 4);
5041                                         (void)set_stun(p_ptr->stun + randint1(50));
5042                                         break;
5043                                 }
5044                                 case 3:
5045                                 {
5046 #ifdef JP
5047                                         msg_print("¤¢¤Ê¤¿¤Ï¾²¤ÈÊɤȤδ֤˶´¤Þ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
5048 #else
5049                                         msg_print("You are crushed between the floor and ceiling!");
5050 #endif
5051                                         damage = damroll(10, 4);
5052                                         (void)set_stun(p_ptr->stun + randint1(50));
5053                                         break;
5054                                 }
5055                         }
5056
5057                         /* Move the player to the safe location */
5058                         (void)move_player_effect(sy, sx, MPE_DONT_PICKUP);
5059                 }
5060
5061                 /* Important -- no wall on player */
5062                 map[16+py-cy][16+px-cx] = FALSE;
5063
5064                 /* Take some damage */
5065                 if (damage)
5066                 {
5067                         cptr killer;
5068
5069                         if (m_idx)
5070                         {
5071                                 char m_name[80];
5072                                 monster_type *m_ptr = &m_list[m_idx];
5073
5074                                 /* Get the monster's real name */
5075                                 monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
5076
5077 #ifdef JP
5078                                 killer = format("%s¤Îµ¯¤³¤·¤¿ÃÏ¿Ì", m_name);
5079 #else
5080                                 killer = format("an earthquake caused by %s", m_name);
5081 #endif
5082                         }
5083                         else
5084                         {
5085 #ifdef JP
5086                                 killer = "ÃÏ¿Ì";
5087 #else
5088                                 killer = "an earthquake";
5089 #endif
5090                         }
5091
5092                         take_hit(DAMAGE_ATTACK, damage, killer, -1);
5093                 }
5094         }
5095
5096         /* Examine the quaked region */
5097         for (dy = -r; dy <= r; dy++)
5098         {
5099                 for (dx = -r; dx <= r; dx++)
5100                 {
5101                         /* Extract the location */
5102                         yy = cy + dy;
5103                         xx = cx + dx;
5104
5105                         /* Skip unaffected grids */
5106                         if (!map[16+yy-cy][16+xx-cx]) continue;
5107
5108                         /* Access the grid */
5109                         c_ptr = &cave[yy][xx];
5110
5111                         if (c_ptr->m_idx == p_ptr->riding) continue;
5112
5113                         /* Process monsters */
5114                         if (c_ptr->m_idx)
5115                         {
5116                                 monster_type *m_ptr = &m_list[c_ptr->m_idx];
5117                                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
5118
5119                                 /* Quest monsters */
5120                                 if (r_ptr->flags1 & RF1_QUESTOR)
5121                                 {
5122                                         /* No wall on quest monsters */
5123                                         map[16+yy-cy][16+xx-cx] = FALSE;
5124
5125                                         continue;
5126                                 }
5127
5128                                 /* Most monsters cannot co-exist with rock */
5129                                 if (!(r_ptr->flags2 & (RF2_KILL_WALL)) &&
5130                                     !(r_ptr->flags2 & (RF2_PASS_WALL)))
5131                                 {
5132                                         char m_name[80];
5133
5134                                         /* Assume not safe */
5135                                         sn = 0;
5136
5137                                         /* Monster can move to escape the wall */
5138                                         if (!(r_ptr->flags1 & (RF1_NEVER_MOVE)))
5139                                         {
5140                                                 /* Look for safety */
5141                                                 for (i = 0; i < 8; i++)
5142                                                 {
5143                                                         /* Access the grid */
5144                                                         y = yy + ddy_ddd[i];
5145                                                         x = xx + ddx_ddd[i];
5146
5147                                                         /* Skip non-empty grids */
5148                                                         if (!cave_empty_bold(y, x)) continue;
5149
5150                                                         /* Hack -- no safety on glyph of warding */
5151                                                         if (is_glyph_grid(&cave[y][x])) continue;
5152                                                         if (is_explosive_rune_grid(&cave[y][x])) continue;
5153
5154                                                         /* ... nor on the Pattern */
5155                                                         if (pattern_tile(y, x)) continue;
5156
5157                                                         /* Important -- Skip "quake" grids */
5158                                                         if (map[16+y-cy][16+x-cx]) continue;
5159
5160                                                         if (cave[y][x].m_idx) continue;
5161                                                         if (player_bold(y, x)) continue;
5162
5163                                                         /* Count "safe" grids */
5164                                                         sn++;
5165
5166                                                         /* Randomize choice */
5167                                                         if (randint0(sn) > 0) continue;
5168
5169                                                         /* Save the safe grid */
5170                                                         sy = y; sx = x;
5171                                                 }
5172                                         }
5173
5174                                         /* Describe the monster */
5175                                         monster_desc(m_name, m_ptr, 0);
5176
5177                                         /* Scream in pain */
5178 #ifdef JP
5179                                         if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s¤Ï¶ìÄˤǵ㤭¤ï¤á¤¤¤¿¡ª", m_name);
5180 #else
5181                                         if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s wails out in pain!", m_name);
5182 #endif
5183
5184                                         /* Take damage from the quake */
5185                                         damage = (sn ? damroll(4, 8) : (m_ptr->hp + 1));
5186
5187                                         /* Monster is certainly awake */
5188                                         (void)set_monster_csleep(c_ptr->m_idx, 0);
5189
5190                                         /* Apply damage directly */
5191                                         m_ptr->hp -= damage;
5192
5193                                         /* Delete (not kill) "dead" monsters */
5194                                         if (m_ptr->hp < 0)
5195                                         {
5196                                                 /* Message */
5197 #ifdef JP
5198                                                 if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s¤Ï´äÀФËËä¤â¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª", m_name);
5199 #else
5200                                                 if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s is embedded in the rock!", m_name);
5201 #endif
5202
5203                                                 if (c_ptr->m_idx)
5204                                                 {
5205                                                         if (record_named_pet && is_pet(&m_list[c_ptr->m_idx]) && m_list[c_ptr->m_idx].nickname)
5206                                                         {
5207                                                                 char m2_name[80];
5208
5209                                                                 monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
5210                                                                 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_EARTHQUAKE, m2_name);
5211                                                         }
5212                                                 }
5213
5214                                                 /* Delete the monster */
5215                                                 delete_monster(yy, xx);
5216
5217                                                 /* No longer safe */
5218                                                 sn = 0;
5219                                         }
5220
5221                                         /* Hack -- Escape from the rock */
5222                                         if (sn)
5223                                         {
5224                                                 int m_idx = cave[yy][xx].m_idx;
5225
5226                                                 /* Update the old location */
5227                                                 cave[yy][xx].m_idx = 0;
5228
5229                                                 /* Update the new location */
5230                                                 cave[sy][sx].m_idx = m_idx;
5231
5232                                                 /* Move the monster */
5233                                                 m_ptr->fy = sy;
5234                                                 m_ptr->fx = sx;
5235
5236                                                 /* Update the monster (new location) */
5237                                                 update_mon(m_idx, TRUE);
5238
5239                                                 /* Redraw the old grid */
5240                                                 lite_spot(yy, xx);
5241
5242                                                 /* Redraw the new grid */
5243                                                 lite_spot(sy, sx);
5244                                         }
5245                                 }
5246                         }
5247                 }
5248         }
5249
5250         /* Lose monster light */
5251         clear_mon_lite();
5252
5253         /* Examine the quaked region */
5254         for (dy = -r; dy <= r; dy++)
5255         {
5256                 for (dx = -r; dx <= r; dx++)
5257                 {
5258                         /* Extract the location */
5259                         yy = cy + dy;
5260                         xx = cx + dx;
5261
5262                         /* Skip unaffected grids */
5263                         if (!map[16+yy-cy][16+xx-cx]) continue;
5264
5265                         /* Access the cave grid */
5266                         c_ptr = &cave[yy][xx];
5267
5268                         /* Paranoia -- never affect player */
5269 /*                      if (player_bold(yy, xx)) continue; */
5270
5271                         /* Destroy location (if valid) */
5272                         if (cave_valid_bold(yy, xx))
5273                         {
5274                                 /* Delete objects */
5275                                 delete_object(yy, xx);
5276
5277                                 /* Wall (or floor) type */
5278                                 t = cave_have_flag_bold(yy, xx, FF_PROJECT) ? randint0(100) : 200;
5279
5280                                 /* Granite */
5281                                 if (t < 20)
5282                                 {
5283                                         /* Create granite wall */
5284                                         cave_set_feat(yy, xx, feat_granite);
5285                                 }
5286
5287                                 /* Quartz */
5288                                 else if (t < 70)
5289                                 {
5290                                         /* Create quartz vein */
5291                                         cave_set_feat(yy, xx, feat_quartz_vein);
5292                                 }
5293
5294                                 /* Magma */
5295                                 else if (t < 100)
5296                                 {
5297                                         /* Create magma vein */
5298                                         cave_set_feat(yy, xx, feat_magma_vein);
5299                                 }
5300
5301                                 /* Floor */
5302                                 else
5303                                 {
5304                                         /* Create floor */
5305                                         cave_set_feat(yy, xx, floor_type[randint0(100)]);
5306                                 }
5307                         }
5308                 }
5309         }
5310
5311
5312         /* Process "re-glowing" */
5313         for (dy = -r; dy <= r; dy++)
5314         {
5315                 for (dx = -r; dx <= r; dx++)
5316                 {
5317                         /* Extract the location */
5318                         yy = cy + dy;
5319                         xx = cx + dx;
5320
5321                         /* Skip illegal grids */
5322                         if (!in_bounds(yy, xx)) continue;
5323
5324                         /* Skip distant grids */
5325                         if (distance(cy, cx, yy, xx) > r) continue;
5326
5327                         /* Access the grid */
5328                         c_ptr = &cave[yy][xx];
5329
5330                         if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
5331                         else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
5332                         {
5333                                 int ii, yyy, xxx;
5334                                 cave_type *cc_ptr;
5335
5336                                 for (ii = 0; ii < 9; ii++)
5337                                 {
5338                                         yyy = yy + ddy_ddd[ii];
5339                                         xxx = xx + ddx_ddd[ii];
5340                                         if (!in_bounds2(yyy, xxx)) continue;
5341                                         cc_ptr = &cave[yyy][xxx];
5342                                         if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
5343                                         {
5344                                                 c_ptr->info |= CAVE_GLOW;
5345                                                 break;
5346                                         }
5347                                 }
5348                         }
5349                 }
5350         }
5351
5352
5353         /* Mega-Hack -- Forget the view and lite */
5354         p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
5355
5356         /* Update stuff */
5357         p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
5358
5359         /* Update the health bar */
5360         p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
5361
5362         /* Redraw map */
5363         p_ptr->redraw |= (PR_MAP);
5364
5365         /* Window stuff */
5366         p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
5367
5368         if (p_ptr->special_defense & NINJA_S_STEALTH)
5369         {
5370                 if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
5371         }
5372
5373         /* Success */
5374         return (TRUE);
5375 }
5376
5377 bool earthquake(int cy, int cx, int r)
5378 {
5379         return earthquake_aux(cy, cx, r, 0);
5380 }
5381
5382
5383 void discharge_minion(void)
5384 {
5385         int i;
5386         bool okay = TRUE;
5387
5388         for (i = 1; i < m_max; i++)
5389         {
5390                 monster_type *m_ptr = &m_list[i];
5391                 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
5392                 if (m_ptr->nickname) okay = FALSE;
5393         }
5394         if (!okay || p_ptr->riding)
5395         {
5396 #ifdef JP
5397                 if (!get_check("ËÜÅö¤ËÁ´¥Ú¥Ã¥È¤òÇúÇˤ·¤Þ¤¹¤«¡©"))
5398 #else
5399                 if (!get_check("You will blast all pets. Are you sure? "))
5400 #endif
5401                         return;
5402         }
5403         for (i = 1; i < m_max; i++)
5404         {
5405                 int dam;
5406                 monster_type *m_ptr = &m_list[i];
5407                 monster_race *r_ptr;
5408
5409                 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
5410                 r_ptr = &r_info[m_ptr->r_idx];
5411
5412                 /* Uniques resist discharging */
5413                 if (r_ptr->flags1 & RF1_UNIQUE)
5414                 {
5415                         char m_name[80];
5416                         monster_desc(m_name, m_ptr, 0x00);
5417 #ifdef JP
5418                         msg_format("%s¤ÏÇúÇˤµ¤ì¤ë¤Î¤ò·ù¤¬¤ê¡¢¾¡¼ê¤Ë¼«Ê¬¤ÎÀ¤³¦¤Ø¤Èµ¢¤Ã¤¿¡£", m_name);
5419 #else
5420                         msg_format("%^s resists to be blasted, and run away.", m_name);
5421 #endif
5422                         delete_monster_idx(i);
5423                         continue;
5424                 }
5425                 dam = m_ptr->maxhp / 2;
5426                 if (dam > 100) dam = (dam-100)/2 + 100;
5427                 if (dam > 400) dam = (dam-400)/2 + 400;
5428                 if (dam > 800) dam = 800;
5429                 project(i, 2+(r_ptr->level/20), m_ptr->fy,
5430                         m_ptr->fx, dam, GF_PLASMA, 
5431                         PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
5432
5433                 if (record_named_pet && m_ptr->nickname)
5434                 {
5435                         char m_name[80];
5436
5437                         monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
5438                         do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_BLAST, m_name);
5439                 }
5440
5441                 delete_monster_idx(i);
5442         }
5443 }
5444
5445
5446 /*
5447  * This routine clears the entire "temp" set.
5448  *
5449  * This routine will Perma-Lite all "temp" grids.
5450  *
5451  * This routine is used (only) by "lite_room()"
5452  *
5453  * Dark grids are illuminated.
5454  *
5455  * Also, process all affected monsters.
5456  *
5457  * SMART monsters always wake up when illuminated
5458  * NORMAL monsters wake up 1/4 the time when illuminated
5459  * STUPID monsters wake up 1/10 the time when illuminated
5460  */
5461 static void cave_temp_room_lite(void)
5462 {
5463         int i;
5464
5465         /* Clear them all */
5466         for (i = 0; i < temp_n; i++)
5467         {
5468                 int y = temp_y[i];
5469                 int x = temp_x[i];
5470
5471                 cave_type *c_ptr = &cave[y][x];
5472
5473                 /* No longer in the array */
5474                 c_ptr->info &= ~(CAVE_TEMP);
5475
5476                 /* Update only non-CAVE_GLOW grids */
5477                 /* if (c_ptr->info & (CAVE_GLOW)) continue; */
5478
5479                 /* Perma-Lite */
5480                 c_ptr->info |= (CAVE_GLOW);
5481
5482                 /* Process affected monsters */
5483                 if (c_ptr->m_idx)
5484                 {
5485                         int chance = 25;
5486
5487                         monster_type    *m_ptr = &m_list[c_ptr->m_idx];
5488
5489                         monster_race    *r_ptr = &r_info[m_ptr->r_idx];
5490
5491                         /* Update the monster */
5492                         update_mon(c_ptr->m_idx, FALSE);
5493
5494                         /* Stupid monsters rarely wake up */
5495                         if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
5496
5497                         /* Smart monsters always wake up */
5498                         if (r_ptr->flags2 & (RF2_SMART)) chance = 100;
5499
5500                         /* Sometimes monsters wake up */
5501                         if (MON_CSLEEP(m_ptr) && (randint0(100) < chance))
5502                         {
5503                                 /* Wake up! */
5504                                 (void)set_monster_csleep(c_ptr->m_idx, 0);
5505
5506                                 /* Notice the "waking up" */
5507                                 if (m_ptr->ml)
5508                                 {
5509                                         char m_name[80];
5510
5511                                         /* Acquire the monster name */
5512                                         monster_desc(m_name, m_ptr, 0);
5513
5514                                         /* Dump a message */
5515 #ifdef JP
5516                                         msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
5517 #else
5518                                         msg_format("%^s wakes up.", m_name);
5519 #endif
5520                                 }
5521                         }
5522                 }
5523
5524                 /* Note */
5525                 note_spot(y, x);
5526
5527                 /* Redraw */
5528                 lite_spot(y, x);
5529
5530                 update_local_illumination(y, x);
5531         }
5532
5533         /* None left */
5534         temp_n = 0;
5535 }
5536
5537
5538
5539 /*
5540  * This routine clears the entire "temp" set.
5541  *
5542  * This routine will "darken" all "temp" grids.
5543  *
5544  * In addition, some of these grids will be "unmarked".
5545  *
5546  * This routine is used (only) by "unlite_room()"
5547  *
5548  * Also, process all affected monsters
5549  */
5550 static void cave_temp_room_unlite(void)
5551 {
5552         int i;
5553
5554         /* Clear them all */
5555         for (i = 0; i < temp_n; i++)
5556         {
5557                 int y = temp_y[i];
5558                 int x = temp_x[i];
5559                 int j;
5560
5561                 cave_type *c_ptr = &cave[y][x];
5562                 bool do_dark = !is_mirror_grid(c_ptr);
5563
5564                 /* No longer in the array */
5565                 c_ptr->info &= ~(CAVE_TEMP);
5566
5567                 /* Darken the grid */
5568                 if (do_dark)
5569                 {
5570                         if (dun_level || !is_daytime())
5571                         {
5572                                 for (j = 0; j < 9; j++)
5573                                 {
5574                                         int by = y + ddy_ddd[j];
5575                                         int bx = x + ddx_ddd[j];
5576
5577                                         if (in_bounds2(by, bx))
5578                                         {
5579                                                 cave_type *cc_ptr = &cave[by][bx];
5580
5581                                                 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
5582                                                 {
5583                                                         do_dark = FALSE;
5584                                                         break;
5585                                                 }
5586                                         }
5587                                 }
5588
5589                                 if (!do_dark) continue;
5590                         }
5591
5592                         c_ptr->info &= ~(CAVE_GLOW);
5593
5594                         /* Hack -- Forget "boring" grids */
5595                         if (!have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_REMEMBER))
5596                         {
5597                                 /* Forget the grid */
5598                                 if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
5599
5600                                 /* Notice */
5601                                 note_spot(y, x);
5602                         }
5603
5604                         /* Process affected monsters */
5605                         if (c_ptr->m_idx)
5606                         {
5607                                 /* Update the monster */
5608                                 update_mon(c_ptr->m_idx, FALSE);
5609                         }
5610
5611                         /* Redraw */
5612                         lite_spot(y, x);
5613
5614                         update_local_illumination(y, x);
5615                 }
5616         }
5617
5618         /* None left */
5619         temp_n = 0;
5620 }
5621
5622
5623 /*
5624  * Determine how much contiguous open space this grid is next to
5625  */
5626 static int next_to_open(int cy, int cx, bool (*pass_bold)(int, int))
5627 {
5628         int i;
5629
5630         int y, x;
5631
5632         int len = 0;
5633         int blen = 0;
5634
5635         for (i = 0; i < 16; i++)
5636         {
5637                 y = cy + ddy_cdd[i % 8];
5638                 x = cx + ddx_cdd[i % 8];
5639
5640                 /* Found a wall, break the length */
5641                 if (!pass_bold(y, x))
5642                 {
5643                         /* Track best length */
5644                         if (len > blen)
5645                         {
5646                                 blen = len;
5647                         }
5648
5649                         len = 0;
5650                 }
5651                 else
5652                 {
5653                         len++;
5654                 }
5655         }
5656
5657         return (MAX(len, blen));
5658 }
5659
5660
5661 static int next_to_walls_adj(int cy, int cx, bool (*pass_bold)(int, int))
5662 {
5663         int i;
5664
5665         int y, x;
5666
5667         int c = 0;
5668
5669         for (i = 0; i < 8; i++)
5670         {
5671                 y = cy + ddy_ddd[i];
5672                 x = cx + ddx_ddd[i];
5673
5674                 if (!pass_bold(y, x)) c++;
5675         }
5676
5677         return c;
5678 }
5679
5680
5681 /*
5682  * Aux function -- see below
5683  */
5684 static void cave_temp_room_aux(int y, int x, bool only_room, bool (*pass_bold)(int, int))
5685 {
5686         cave_type *c_ptr;
5687
5688         /* Get the grid */
5689         c_ptr = &cave[y][x];
5690
5691         /* Avoid infinite recursion */
5692         if (c_ptr->info & (CAVE_TEMP)) return;
5693
5694         /* Do not "leave" the current room */
5695         if (!(c_ptr->info & (CAVE_ROOM)))
5696         {
5697                 if (only_room) return;
5698
5699                 /* Verify */
5700                 if (!in_bounds2(y, x)) return;
5701
5702                 /* Do not exceed the maximum spell range */
5703                 if (distance(py, px, y, x) > MAX_RANGE) return;
5704
5705                 /* Verify this grid */
5706                 /*
5707                  * The reason why it is ==6 instead of >5 is that 8 is impossible
5708                  * due to the check for cave_bold above.
5709                  * 7 lights dead-end corridors (you need to do this for the
5710                  * checkboard interesting rooms, so that the boundary is lit
5711                  * properly.
5712                  * This leaves only a check for 6 bounding walls!
5713                  */
5714                 if (in_bounds(y, x) && pass_bold(y, x) &&
5715                     (next_to_walls_adj(y, x, pass_bold) == 6) && (next_to_open(y, x, pass_bold) <= 1)) return;
5716         }
5717
5718         /* Paranoia -- verify space */
5719         if (temp_n == TEMP_MAX) return;
5720
5721         /* Mark the grid as "seen" */
5722         c_ptr->info |= (CAVE_TEMP);
5723
5724         /* Add it to the "seen" set */
5725         temp_y[temp_n] = y;
5726         temp_x[temp_n] = x;
5727         temp_n++;
5728 }
5729
5730 /*
5731  * Aux function -- see below
5732  */
5733 static bool cave_pass_lite_bold(int y, int x)
5734 {
5735         return cave_los_bold(y, x);
5736 }
5737
5738 /*
5739  * Aux function -- see below
5740  */
5741 static void cave_temp_lite_room_aux(int y, int x)
5742 {
5743         cave_temp_room_aux(y, x, FALSE, cave_pass_lite_bold);
5744 }
5745
5746 /*
5747  * Aux function -- see below
5748  */
5749 static bool cave_pass_dark_bold(int y, int x)
5750 {
5751         return cave_have_flag_bold(y, x, FF_PROJECT);
5752 }
5753
5754 /*
5755  * Aux function -- see below
5756  */
5757 static void cave_temp_unlite_room_aux(int y, int x)
5758 {
5759         cave_temp_room_aux(y, x, TRUE, cave_pass_dark_bold);
5760 }
5761
5762
5763
5764
5765 /*
5766  * Illuminate any room containing the given location.
5767  */
5768 void lite_room(int y1, int x1)
5769 {
5770         int i, x, y;
5771
5772         /* Add the initial grid */
5773         cave_temp_lite_room_aux(y1, x1);
5774
5775         /* While grids are in the queue, add their neighbors */
5776         for (i = 0; i < temp_n; i++)
5777         {
5778                 x = temp_x[i], y = temp_y[i];
5779
5780                 /* Walls get lit, but stop light */
5781                 if (!cave_pass_lite_bold(y, x)) continue;
5782
5783                 /* Spread adjacent */
5784                 cave_temp_lite_room_aux(y + 1, x);
5785                 cave_temp_lite_room_aux(y - 1, x);
5786                 cave_temp_lite_room_aux(y, x + 1);
5787                 cave_temp_lite_room_aux(y, x - 1);
5788
5789                 /* Spread diagonal */
5790                 cave_temp_lite_room_aux(y + 1, x + 1);
5791                 cave_temp_lite_room_aux(y - 1, x - 1);
5792                 cave_temp_lite_room_aux(y - 1, x + 1);
5793                 cave_temp_lite_room_aux(y + 1, x - 1);
5794         }
5795
5796         /* Now, lite them all up at once */
5797         cave_temp_room_lite();
5798
5799         if (p_ptr->special_defense & NINJA_S_STEALTH)
5800         {
5801                 if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
5802         }
5803 }
5804
5805
5806 /*
5807  * Darken all rooms containing the given location
5808  */
5809 void unlite_room(int y1, int x1)
5810 {
5811         int i, x, y;
5812
5813         /* Add the initial grid */
5814         cave_temp_unlite_room_aux(y1, x1);
5815
5816         /* Spread, breadth first */
5817         for (i = 0; i < temp_n; i++)
5818         {
5819                 x = temp_x[i], y = temp_y[i];
5820
5821                 /* Walls get dark, but stop darkness */
5822                 if (!cave_pass_dark_bold(y, x)) continue;
5823
5824                 /* Spread adjacent */
5825                 cave_temp_unlite_room_aux(y + 1, x);
5826                 cave_temp_unlite_room_aux(y - 1, x);
5827                 cave_temp_unlite_room_aux(y, x + 1);
5828                 cave_temp_unlite_room_aux(y, x - 1);
5829
5830                 /* Spread diagonal */
5831                 cave_temp_unlite_room_aux(y + 1, x + 1);
5832                 cave_temp_unlite_room_aux(y - 1, x - 1);
5833                 cave_temp_unlite_room_aux(y - 1, x + 1);
5834                 cave_temp_unlite_room_aux(y + 1, x - 1);
5835         }
5836
5837         /* Now, darken them all at once */
5838         cave_temp_room_unlite();
5839 }
5840
5841
5842
5843 /*
5844  * Hack -- call light around the player
5845  * Affect all monsters in the projection radius
5846  */
5847 bool lite_area(int dam, int rad)
5848 {
5849         int flg = PROJECT_GRID | PROJECT_KILL;
5850
5851         if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
5852         {
5853 #ifdef JP
5854                 msg_print("¥À¥ó¥¸¥ç¥ó¤¬¸÷¤òµÛ¼ý¤·¤¿¡£");
5855 #else
5856                 msg_print("The darkness of this dungeon absorb your light.");
5857 #endif
5858                 return FALSE;
5859         }
5860
5861         /* Hack -- Message */
5862         if (!p_ptr->blind)
5863         {
5864 #ifdef JP
5865 msg_print("Çò¤¤¸÷¤¬ÊÕ¤ê¤òʤ¤Ã¤¿¡£");
5866 #else
5867                 msg_print("You are surrounded by a white light.");
5868 #endif
5869
5870         }
5871
5872         /* Hook into the "project()" function */
5873         (void)project(0, rad, py, px, dam, GF_LITE_WEAK, flg, -1);
5874
5875         /* Lite up the room */
5876         lite_room(py, px);
5877
5878         /* Assume seen */
5879         return (TRUE);
5880 }
5881
5882
5883 /*
5884  * Hack -- call darkness around the player
5885  * Affect all monsters in the projection radius
5886  */
5887 bool unlite_area(int dam, int rad)
5888 {
5889         int flg = PROJECT_GRID | PROJECT_KILL;
5890
5891         /* Hack -- Message */
5892         if (!p_ptr->blind)
5893         {
5894 #ifdef JP
5895 msg_print("°Å°Ç¤¬ÊÕ¤ê¤òʤ¤Ã¤¿¡£");
5896 #else
5897                 msg_print("Darkness surrounds you.");
5898 #endif
5899
5900         }
5901
5902         /* Hook into the "project()" function */
5903         (void)project(0, rad, py, px, dam, GF_DARK_WEAK, flg, -1);
5904
5905         /* Lite up the room */
5906         unlite_room(py, px);
5907
5908         /* Assume seen */
5909         return (TRUE);
5910 }
5911
5912
5913
5914 /*
5915  * Cast a ball spell
5916  * Stop if we hit a monster, act as a "ball"
5917  * Allow "target" mode to pass over monsters
5918  * Affect grids, objects, and monsters
5919  */
5920 bool fire_ball(int typ, int dir, int dam, int rad)
5921 {
5922         int tx, ty;
5923
5924         int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
5925
5926         if (typ == GF_CONTROL_LIVING) flg|= PROJECT_HIDE;
5927         /* Use the given direction */
5928         tx = px + 99 * ddx[dir];
5929         ty = py + 99 * ddy[dir];
5930
5931         /* Hack -- Use an actual "target" */
5932         if ((dir == 5) && target_okay())
5933         {
5934                 flg &= ~(PROJECT_STOP);
5935                 tx = target_col;
5936                 ty = target_row;
5937         }
5938
5939         /* Analyze the "dir" and the "target".  Hurt items on floor. */
5940         return (project(0, rad, ty, tx, dam, typ, flg, -1));
5941 }
5942
5943
5944 /*
5945  * Cast a ball spell
5946  * Stop if we hit a monster, act as a "ball"
5947  * Allow "target" mode to pass over monsters
5948  * Affect grids, objects, and monsters
5949  */
5950 bool fire_rocket(int typ, int dir, int dam, int rad)
5951 {
5952         int tx, ty;
5953
5954         int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
5955
5956         /* Use the given direction */
5957         tx = px + 99 * ddx[dir];
5958         ty = py + 99 * ddy[dir];
5959
5960         /* Hack -- Use an actual "target" */
5961         if ((dir == 5) && target_okay())
5962         {
5963                 tx = target_col;
5964                 ty = target_row;
5965         }
5966
5967         /* Analyze the "dir" and the "target".  Hurt items on floor. */
5968         return (project(0, rad, ty, tx, dam, typ, flg, -1));
5969 }
5970
5971
5972 /*
5973  * Cast a ball spell
5974  * Stop if we hit a monster, act as a "ball"
5975  * Allow "target" mode to pass over monsters
5976  * Affect grids, objects, and monsters
5977  */
5978 bool fire_ball_hide(int typ, int dir, int dam, int rad)
5979 {
5980         int tx, ty;
5981
5982         int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
5983
5984         /* Use the given direction */
5985         tx = px + 99 * ddx[dir];
5986         ty = py + 99 * ddy[dir];
5987
5988         /* Hack -- Use an actual "target" */
5989         if ((dir == 5) && target_okay())
5990         {
5991                 flg &= ~(PROJECT_STOP);
5992                 tx = target_col;
5993                 ty = target_row;
5994         }
5995
5996         /* Analyze the "dir" and the "target".  Hurt items on floor. */
5997         return (project(0, rad, ty, tx, dam, typ, flg, -1));
5998 }
5999
6000
6001 /*
6002  * Cast a meteor spell, defined as a ball spell cast by an arbitary monster, 
6003  * player, or outside source, that starts out at an arbitrary location, and 
6004  * leaving no trail from the "caster" to the target.  This function is 
6005  * especially useful for bombardments and similar. -LM-
6006  *
6007  * Option to hurt the player.
6008  */
6009 bool fire_meteor(int who, int typ, int y, int x, int dam, int rad)
6010 {
6011         int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6012
6013         /* Analyze the "target" and the caster. */
6014         return (project(who, rad, y, x, dam, typ, flg, -1));
6015 }
6016
6017
6018 bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev)
6019 {
6020         int ly, lx, ld;
6021         int ty, tx, y, x;
6022         int i;
6023
6024         int flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
6025
6026         /* Assume okay */
6027         bool result = TRUE;
6028
6029         /* Use the given direction */
6030         if (dir != 5)
6031         {
6032                 ly = ty = py + 20 * ddy[dir];
6033                 lx = tx = px + 20 * ddx[dir];
6034         }
6035
6036         /* Use an actual "target" */
6037         else /* if (dir == 5) */
6038         {
6039                 tx = target_col;
6040                 ty = target_row;
6041
6042                 lx = 20 * (tx - px) + px;
6043                 ly = 20 * (ty - py) + py;
6044         }
6045
6046         ld = distance(py, px, ly, lx);
6047
6048         /* Blast */
6049         for (i = 0; i < num; i++)
6050         {
6051                 while (1)
6052                 {
6053                         /* Get targets for some bolts */
6054                         y = rand_spread(ly, ld * dev / 20);
6055                         x = rand_spread(lx, ld * dev / 20);
6056
6057                         if (distance(ly, lx, y, x) <= ld * dev / 20) break;
6058                 }
6059
6060                 /* Analyze the "dir" and the "target". */
6061                 if (!project(0, 0, y, x, damroll(dd, ds), typ, flg, -1))
6062                 {
6063                         result = FALSE;
6064                 }
6065         }
6066
6067         return (result);
6068 }
6069
6070
6071 /*
6072  * Switch position with a monster.
6073  */
6074 bool teleport_swap(int dir)
6075 {
6076         int tx, ty;
6077         cave_type * c_ptr;
6078         monster_type * m_ptr;
6079         monster_race * r_ptr;
6080
6081         if ((dir == 5) && target_okay())
6082         {
6083                 tx = target_col;
6084                 ty = target_row;
6085         }
6086         else
6087         {
6088                 tx = px + ddx[dir];
6089                 ty = py + ddy[dir];
6090         }
6091         c_ptr = &cave[ty][tx];
6092
6093         if (p_ptr->anti_tele)
6094         {
6095 #ifdef JP
6096 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
6097 #else
6098                 msg_print("A mysterious force prevents you from teleporting!");
6099 #endif
6100
6101                 return FALSE;
6102         }
6103
6104         if (!c_ptr->m_idx || (c_ptr->m_idx == p_ptr->riding))
6105         {
6106 #ifdef JP
6107 msg_print("¤½¤ì¤È¤Ï¾ì½ê¤ò¸ò´¹¤Ç¤­¤Þ¤»¤ó¡£");
6108 #else
6109                 msg_print("You can't trade places with that!");
6110 #endif
6111
6112
6113                 /* Failure */
6114                 return FALSE;
6115         }
6116
6117         if ((c_ptr->info & CAVE_ICKY) || (distance(ty, tx, py, px) > p_ptr->lev * 3 / 2 + 10))
6118         {
6119 #ifdef JP
6120 msg_print("¼ºÇÔ¤·¤¿¡£");
6121 #else
6122                 msg_print("Failed to swap.");
6123 #endif
6124
6125
6126                 /* Failure */
6127                 return FALSE;
6128         }
6129
6130         m_ptr = &m_list[c_ptr->m_idx];
6131         r_ptr = &r_info[m_ptr->r_idx];
6132
6133         (void)set_monster_csleep(c_ptr->m_idx, 0);
6134
6135         if (r_ptr->flagsr & RFR_RES_TELE)
6136         {
6137 #ifdef JP
6138                 msg_print("¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤵¤ì¤¿¡ª");
6139 #else
6140                 msg_print("Your teleportation is blocked!");
6141 #endif
6142
6143                 if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
6144
6145                 /* Failure */
6146                 return FALSE;
6147         }
6148
6149         sound(SOUND_TELEPORT);
6150
6151         /* Swap the player and monster */
6152         (void)move_player_effect(ty, tx, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
6153
6154         /* Success */
6155         return TRUE;
6156 }
6157
6158
6159 /*
6160  * Hack -- apply a "projection()" in a direction (or at the target)
6161  */
6162 bool project_hook(int typ, int dir, int dam, int flg)
6163 {
6164         int tx, ty;
6165
6166         /* Pass through the target if needed */
6167         flg |= (PROJECT_THRU);
6168
6169         /* Use the given direction */
6170         tx = px + ddx[dir];
6171         ty = py + ddy[dir];
6172
6173         /* Hack -- Use an actual "target" */
6174         if ((dir == 5) && target_okay())
6175         {
6176                 tx = target_col;
6177                 ty = target_row;
6178         }
6179
6180         /* Analyze the "dir" and the "target", do NOT explode */
6181         return (project(0, 0, ty, tx, dam, typ, flg, -1));
6182 }
6183
6184
6185 /*
6186  * Cast a bolt spell.
6187  * Stop if we hit a monster, as a "bolt".
6188  * Affect monsters and grids (not objects).
6189  */
6190 bool fire_bolt(int typ, int dir, int dam)
6191 {
6192         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
6193         if (typ != GF_ARROW) flg |= PROJECT_REFLECTABLE;
6194         return (project_hook(typ, dir, dam, flg));
6195 }
6196
6197
6198 /*
6199  * Cast a beam spell.
6200  * Pass through monsters, as a "beam".
6201  * Affect monsters, grids and objects.
6202  */
6203 bool fire_beam(int typ, int dir, int dam)
6204 {
6205         int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
6206         return (project_hook(typ, dir, dam, flg));
6207 }
6208
6209
6210 /*
6211  * Cast a bolt spell, or rarely, a beam spell
6212  */
6213 bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
6214 {
6215         if (randint0(100) < prob)
6216         {
6217                 return (fire_beam(typ, dir, dam));
6218         }
6219         else
6220         {
6221                 return (fire_bolt(typ, dir, dam));
6222         }
6223 }
6224
6225
6226 /*
6227  * Some of the old functions
6228  */
6229 bool lite_line(int dir, int dam)
6230 {
6231         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
6232         return (project_hook(GF_LITE_WEAK, dir, dam, flg));
6233 }
6234
6235
6236 bool drain_life(int dir, int dam)
6237 {
6238         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6239         return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
6240 }
6241
6242
6243 bool wall_to_mud(int dir, int dam)
6244 {
6245         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6246         return (project_hook(GF_KILL_WALL, dir, dam, flg));
6247 }
6248
6249
6250 bool wizard_lock(int dir)
6251 {
6252         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6253         return (project_hook(GF_JAM_DOOR, dir, 20 + randint1(30), flg));
6254 }
6255
6256
6257 bool destroy_door(int dir)
6258 {
6259         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
6260         return (project_hook(GF_KILL_DOOR, dir, 0, flg));
6261 }
6262
6263
6264 bool disarm_trap(int dir)
6265 {
6266         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
6267         return (project_hook(GF_KILL_TRAP, dir, 0, flg));
6268 }
6269
6270
6271 bool heal_monster(int dir, int dam)
6272 {
6273         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6274         return (project_hook(GF_OLD_HEAL, dir, dam, flg));
6275 }
6276
6277
6278 bool speed_monster(int dir, int power)
6279 {
6280         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6281         return (project_hook(GF_OLD_SPEED, dir, power, flg));
6282 }
6283
6284
6285 bool slow_monster(int dir, int power)
6286 {
6287         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6288         return (project_hook(GF_OLD_SLOW, dir, power, flg));
6289 }
6290
6291
6292 bool sleep_monster(int dir, int power)
6293 {
6294         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6295         return (project_hook(GF_OLD_SLEEP, dir, power, flg));
6296 }
6297
6298
6299 bool stasis_monster(int dir)
6300 {
6301         return (fire_ball_hide(GF_STASIS, dir, p_ptr->lev*2, 0));
6302 }
6303
6304
6305 bool stasis_evil(int dir)
6306 {
6307         return (fire_ball_hide(GF_STASIS_EVIL, dir, p_ptr->lev*2, 0));
6308 }
6309
6310
6311 bool confuse_monster(int dir, int plev)
6312 {
6313         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6314         return (project_hook(GF_OLD_CONF, dir, plev, flg));
6315 }
6316
6317
6318 bool stun_monster(int dir, int plev)
6319 {
6320         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6321         return (project_hook(GF_STUN, dir, plev, flg));
6322 }
6323
6324
6325 bool poly_monster(int dir, int power)
6326 {
6327         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6328         bool tester = (project_hook(GF_OLD_POLY, dir, power, flg));
6329         if (tester)
6330                 chg_virtue(V_CHANCE, 1);
6331         return(tester);
6332 }
6333
6334
6335 bool clone_monster(int dir)
6336 {
6337         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6338         return (project_hook(GF_OLD_CLONE, dir, 0, flg));
6339 }
6340
6341
6342 bool fear_monster(int dir, int plev)
6343 {
6344         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6345         return (project_hook(GF_TURN_ALL, dir, plev, flg));
6346 }
6347
6348
6349 bool death_ray(int dir, int plev)
6350 {
6351         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6352         return (project_hook(GF_DEATH_RAY, dir, plev * 200, flg));
6353 }
6354
6355
6356 bool teleport_monster(int dir, int distance)
6357 {
6358         int flg = PROJECT_BEAM | PROJECT_KILL;
6359         return (project_hook(GF_AWAY_ALL, dir, distance, flg));
6360 }
6361
6362 /*
6363  * Hooks -- affect adjacent grids (radius 1 ball attack)
6364  */
6365 bool door_creation(void)
6366 {
6367         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6368         return (project(0, 1, py, px, 0, GF_MAKE_DOOR, flg, -1));
6369 }
6370
6371
6372 bool trap_creation(int y, int x)
6373 {
6374         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6375         return (project(0, 1, y, x, 0, GF_MAKE_TRAP, flg, -1));
6376 }
6377
6378
6379 bool tree_creation(void)
6380 {
6381         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6382         return (project(0, 1, py, px, 0, GF_MAKE_TREE, flg, -1));
6383 }
6384
6385
6386 bool glyph_creation(void)
6387 {
6388         int flg = PROJECT_GRID | PROJECT_ITEM;
6389         return (project(0, 1, py, px, 0, GF_MAKE_GLYPH, flg, -1));
6390 }
6391
6392
6393 bool wall_stone(void)
6394 {
6395         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6396
6397         bool dummy = (project(0, 1, py, px, 0, GF_STONE_WALL, flg, -1));
6398
6399         /* Update stuff */
6400         p_ptr->update |= (PU_FLOW);
6401
6402         /* Redraw map */
6403         p_ptr->redraw |= (PR_MAP);
6404
6405         return dummy;
6406 }
6407
6408
6409 bool destroy_doors_touch(void)
6410 {
6411         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6412         return (project(0, 1, py, px, 0, GF_KILL_DOOR, flg, -1));
6413 }
6414
6415 bool disarm_traps_touch(void)
6416 {
6417         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6418         return (project(0, 1, py, px, 0, GF_KILL_TRAP, flg, -1));
6419 }
6420
6421 bool sleep_monsters_touch(void)
6422 {
6423         int flg = PROJECT_KILL | PROJECT_HIDE;
6424         return (project(0, 1, py, px, p_ptr->lev, GF_OLD_SLEEP, flg, -1));
6425 }
6426
6427
6428 bool animate_dead(int who, int y, int x)
6429 {
6430         int flg = PROJECT_ITEM | PROJECT_HIDE;
6431         return (project(who, 5, y, x, 0, GF_ANIM_DEAD, flg, -1));
6432 }
6433
6434
6435 void call_chaos(void)
6436 {
6437         int Chaos_type, dummy, dir;
6438         int plev = p_ptr->lev;
6439         bool line_chaos = FALSE;
6440
6441         int hurt_types[31] =
6442         {
6443                 GF_ELEC,      GF_POIS,    GF_ACID,    GF_COLD,
6444                 GF_FIRE,      GF_MISSILE, GF_ARROW,   GF_PLASMA,
6445                 GF_HOLY_FIRE, GF_WATER,   GF_LITE,    GF_DARK,
6446                 GF_FORCE,     GF_INERTIA, GF_MANA,    GF_METEOR,
6447                 GF_ICE,       GF_CHAOS,   GF_NETHER,  GF_DISENCHANT,
6448                 GF_SHARDS,    GF_SOUND,   GF_NEXUS,   GF_CONFUSION,
6449                 GF_TIME,      GF_GRAVITY, GF_ROCKET,  GF_NUKE,
6450                 GF_HELL_FIRE, GF_DISINTEGRATE, GF_PSY_SPEAR
6451         };
6452
6453         Chaos_type = hurt_types[randint0(31)];
6454         if (one_in_(4)) line_chaos = TRUE;
6455
6456         if (one_in_(6))
6457         {
6458                 for (dummy = 1; dummy < 10; dummy++)
6459                 {
6460                         if (dummy - 5)
6461                         {
6462                                 if (line_chaos)
6463                                         fire_beam(Chaos_type, dummy, 150);
6464                                 else
6465                                         fire_ball(Chaos_type, dummy, 150, 2);
6466                         }
6467                 }
6468         }
6469         else if (one_in_(3))
6470         {
6471                 fire_ball(Chaos_type, 0, 500, 8);
6472         }
6473         else
6474         {
6475                 if (!get_aim_dir(&dir)) return;
6476                 if (line_chaos)
6477                         fire_beam(Chaos_type, dir, 250);
6478                 else
6479                         fire_ball(Chaos_type, dir, 250, 3 + (plev / 35));
6480         }
6481 }
6482
6483
6484 /*
6485  * Activate the evil Topi Ylinen curse
6486  * rr9: Stop the nasty things when a Cyberdemon is summoned
6487  * or the player gets paralyzed.
6488  */
6489 bool activate_ty_curse(bool stop_ty, int *count)
6490 {
6491         int     i = 0;
6492
6493         int flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
6494
6495         do
6496         {
6497                 switch (randint1(34))
6498                 {
6499                 case 28: case 29:
6500                         if (!(*count))
6501                         {
6502 #ifdef JP
6503 msg_print("ÃÏÌ̤¬Íɤ줿...");
6504 #else
6505                                 msg_print("The ground trembles...");
6506 #endif
6507
6508                                 earthquake(py, px, 5 + randint0(10));
6509                                 if (!one_in_(6)) break;
6510                         }
6511                 case 30: case 31:
6512                         if (!(*count))
6513                         {
6514                                 int dam = damroll(10, 10);
6515 #ifdef JP
6516 msg_print("½ã¿è¤ÊËâÎϤμ¡¸µ¤Ø¤ÎÈ⤬³«¤¤¤¿¡ª");
6517 #else
6518                                 msg_print("A portal opens to a plane of raw mana!");
6519 #endif
6520
6521                                 project(0, 8, py, px, dam, GF_MANA, flg, -1);
6522 #ifdef JP
6523                                 take_hit(DAMAGE_NOESCAPE, dam, "½ã¿è¤ÊËâÎϤβòÊü", -1);
6524 #else
6525                                 take_hit(DAMAGE_NOESCAPE, dam, "released pure mana", -1);
6526 #endif
6527                                 if (!one_in_(6)) break;
6528                         }
6529                 case 32: case 33:
6530                         if (!(*count))
6531                         {
6532 #ifdef JP
6533 msg_print("¼þ°Ï¤Î¶õ´Ö¤¬ÏĤó¤À¡ª");
6534 #else
6535                                 msg_print("Space warps about you!");
6536 #endif
6537
6538                                 teleport_player(damroll(10, 10), TELEPORT_PASSIVE);
6539                                 if (randint0(13)) (*count) += activate_hi_summon(py, px, FALSE);
6540                                 if (!one_in_(6)) break;
6541                         }
6542                 case 34:
6543 #ifdef JP
6544 msg_print("¥¨¥Í¥ë¥®¡¼¤Î¤¦¤Í¤ê¤ò´¶¤¸¤¿¡ª");
6545 #else
6546                         msg_print("You feel a surge of energy!");
6547 #endif
6548
6549                         wall_breaker();
6550                         if (!randint0(7))
6551                         {
6552                                 project(0, 7, py, px, 50, GF_KILL_WALL, flg, -1);
6553 #ifdef JP
6554                                 take_hit(DAMAGE_NOESCAPE, 50, "¥¨¥Í¥ë¥®¡¼¤Î¤¦¤Í¤ê", -1);
6555 #else
6556                                 take_hit(DAMAGE_NOESCAPE, 50, "surge of energy", -1);
6557 #endif
6558                         }
6559                         if (!one_in_(6)) break;
6560                 case 1: case 2: case 3: case 16: case 17:
6561                         aggravate_monsters(0);
6562                         if (!one_in_(6)) break;
6563                 case 4: case 5: case 6:
6564                         (*count) += activate_hi_summon(py, px, FALSE);
6565                         if (!one_in_(6)) break;
6566                 case 7: case 8: case 9: case 18:
6567                         (*count) += summon_specific(0, py, px, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
6568                         if (!one_in_(6)) break;
6569                 case 10: case 11: case 12:
6570 #ifdef JP
6571 msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
6572 #else
6573                         msg_print("You feel your life draining away...");
6574 #endif
6575
6576                         lose_exp(p_ptr->exp / 16);
6577                         if (!one_in_(6)) break;
6578                 case 13: case 14: case 15: case 19: case 20:
6579                         if (stop_ty || (p_ptr->free_act && (randint1(125) < p_ptr->skill_sav)) || (p_ptr->pclass == CLASS_BERSERKER))
6580                         {
6581                                 /* Do nothing */ ;
6582                         }
6583                         else
6584                         {
6585 #ifdef JP
6586 msg_print("ĦÁü¤Ë¤Ê¤Ã¤¿µ¤Ê¬¤À¡ª");
6587 #else
6588                                 msg_print("You feel like a statue!");
6589 #endif
6590
6591                                 if (p_ptr->free_act)
6592                                         set_paralyzed(p_ptr->paralyzed + randint1(3));
6593                                 else
6594                                         set_paralyzed(p_ptr->paralyzed + randint1(13));
6595                                 stop_ty = TRUE;
6596                         }
6597                         if (!one_in_(6)) break;
6598                 case 21: case 22: case 23:
6599                         (void)do_dec_stat(randint0(6));
6600                         if (!one_in_(6)) break;
6601                 case 24:
6602 #ifdef JP
6603 msg_print("¤Û¤¨¡©»ä¤Ïï¡©¤³¤³¤Ç²¿¤·¤Æ¤ë¡©");
6604 #else
6605                         msg_print("Huh? Who am I? What am I doing here?");
6606 #endif
6607
6608                         lose_all_info();
6609                         if (!one_in_(6)) break;
6610                 case 25:
6611                         /*
6612                          * Only summon Cyberdemons deep in the dungeon.
6613                          */
6614                         if ((dun_level > 65) && !stop_ty)
6615                         {
6616                                 (*count) += summon_cyber(-1, py, px);
6617                                 stop_ty = TRUE;
6618                                 break;
6619                         }
6620                         if (!one_in_(6)) break;
6621                 default:
6622                         while (i < 6)
6623                         {
6624                                 do
6625                                 {
6626                                         (void)do_dec_stat(i);
6627                                 }
6628                                 while (one_in_(2));
6629
6630                                 i++;
6631                         }
6632                 }
6633         }
6634         while (one_in_(3) && !stop_ty);
6635
6636         return stop_ty;
6637 }
6638
6639
6640 int activate_hi_summon(int y, int x, bool can_pet)
6641 {
6642         int i;
6643         int count = 0;
6644         int summon_lev;
6645         u32b mode = PM_ALLOW_GROUP;
6646         bool pet = FALSE;
6647
6648         if (can_pet)
6649         {
6650                 if (one_in_(4))
6651                 {
6652                         mode |= PM_FORCE_FRIENDLY;
6653                 }
6654                 else
6655                 {
6656                         mode |= PM_FORCE_PET;
6657                         pet = TRUE;
6658                 }
6659         }
6660
6661         if (!pet) mode |= PM_NO_PET;
6662
6663         summon_lev = (pet ? p_ptr->lev * 2 / 3 + randint1(p_ptr->lev / 2) : dun_level);
6664
6665         for (i = 0; i < (randint1(7) + (dun_level / 40)); i++)
6666         {
6667                 switch (randint1(25) + (dun_level / 20))
6668                 {
6669                         case 1: case 2:
6670                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode);
6671                                 break;
6672                         case 3: case 4:
6673                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode);
6674                                 break;
6675                         case 5: case 6:
6676                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode);
6677                                 break;
6678                         case 7: case 8:
6679                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode);
6680                                 break;
6681                         case 9: case 10:
6682                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode);
6683                                 break;
6684                         case 11: case 12:
6685                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode);
6686                                 break;
6687                         case 13: case 14:
6688                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode);
6689                                 break;
6690                         case 15: case 16:
6691                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode);
6692                                 break;
6693                         case 17:
6694                                 if (can_pet) break;
6695                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
6696                                 break;
6697                         case 18: case 19:
6698                                 if (can_pet) break;
6699                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE));
6700                                 break;
6701                         case 20: case 21:
6702                                 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
6703                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode);
6704                                 break;
6705                         case 22: case 23:
6706                                 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
6707                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode);
6708                                 break;
6709                         case 24:
6710                                 count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode);
6711                                 break;
6712                         default:
6713                                 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
6714                                 count += summon_specific((pet ? -1 : 0), y, x,pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode);
6715                 }
6716         }
6717
6718         return count;
6719 }
6720
6721
6722 /* ToDo: check */
6723 int summon_cyber(int who, int y, int x)
6724 {
6725         int i;
6726         int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint1(2));
6727         int count = 0;
6728         u32b mode = PM_ALLOW_GROUP;
6729
6730         /* Summoned by a monster */
6731         if (who > 0)
6732         {
6733                 monster_type *m_ptr = &m_list[who];
6734                 if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
6735         }
6736
6737         if (max_cyber > 4) max_cyber = 4;
6738
6739         for (i = 0; i < max_cyber; i++)
6740         {
6741                 count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode);
6742         }
6743
6744         return count;
6745 }
6746
6747
6748 void wall_breaker(void)
6749 {
6750         int i;
6751         int y, x;
6752         int attempts = 1000;
6753
6754         if (randint1(80 + p_ptr->lev) < 70)
6755         {
6756                 while (attempts--)
6757                 {
6758                         scatter(&y, &x, py, px, 4, 0);
6759
6760                         if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
6761
6762                         if (!player_bold(y, x)) break;
6763                 }
6764
6765                 project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
6766                                   (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
6767         }
6768         else if (randint1(100) > 30)
6769         {
6770                 earthquake(py, px, 1);
6771         }
6772         else
6773         {
6774                 int num = damroll(5, 3);
6775
6776                 for (i = 0; i < num; i++)
6777                 {
6778                         while (1)
6779                         {
6780                                 scatter(&y, &x, py, px, 10, 0);
6781
6782                                 if (!player_bold(y, x)) break;
6783                         }
6784
6785                         project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
6786                                           (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
6787                 }
6788         }
6789 }
6790
6791
6792 /*
6793  * Confuse monsters
6794  */
6795 bool confuse_monsters(int dam)
6796 {
6797         return (project_hack(GF_OLD_CONF, dam));
6798 }
6799
6800
6801 /*
6802  * Charm monsters
6803  */
6804 bool charm_monsters(int dam)
6805 {
6806         return (project_hack(GF_CHARM, dam));
6807 }
6808
6809
6810 /*
6811  * Charm animals
6812  */
6813 bool charm_animals(int dam)
6814 {
6815         return (project_hack(GF_CONTROL_ANIMAL, dam));
6816 }
6817
6818
6819 /*
6820  * Stun monsters
6821  */
6822 bool stun_monsters(int dam)
6823 {
6824         return (project_hack(GF_STUN, dam));
6825 }
6826
6827
6828 /*
6829  * Stasis monsters
6830  */
6831 bool stasis_monsters(int dam)
6832 {
6833         return (project_hack(GF_STASIS, dam));
6834 }
6835
6836
6837 /*
6838  * Mindblast monsters
6839  */
6840 bool mindblast_monsters(int dam)
6841 {
6842         return (project_hack(GF_PSI, dam));
6843 }
6844
6845
6846 /*
6847  * Banish all monsters
6848  */
6849 bool banish_monsters(int dist)
6850 {
6851         return (project_hack(GF_AWAY_ALL, dist));
6852 }
6853
6854
6855 /*
6856  * Turn evil
6857  */
6858 bool turn_evil(int dam)
6859 {
6860         return (project_hack(GF_TURN_EVIL, dam));
6861 }
6862
6863
6864 /*
6865  * Turn everyone
6866  */
6867 bool turn_monsters(int dam)
6868 {
6869         return (project_hack(GF_TURN_ALL, dam));
6870 }
6871
6872
6873 /*
6874  * Death-ray all monsters (note: OBSCENELY powerful)
6875  */
6876 bool deathray_monsters(void)
6877 {
6878         return (project_hack(GF_DEATH_RAY, p_ptr->lev * 200));
6879 }
6880
6881
6882 bool charm_monster(int dir, int plev)
6883 {
6884         int flg = PROJECT_STOP | PROJECT_KILL;
6885         return (project_hook(GF_CHARM, dir, plev, flg));
6886 }
6887
6888
6889 bool control_one_undead(int dir, int plev)
6890 {
6891         int flg = PROJECT_STOP | PROJECT_KILL;
6892         return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
6893 }
6894
6895
6896 bool control_one_demon(int dir, int plev)
6897 {
6898         int flg = PROJECT_STOP | PROJECT_KILL;
6899         return (project_hook(GF_CONTROL_DEMON, dir, plev, flg));
6900 }
6901
6902
6903 bool charm_animal(int dir, int plev)
6904 {
6905         int flg = PROJECT_STOP | PROJECT_KILL;
6906         return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
6907 }
6908
6909
6910 bool charm_living(int dir, int plev)
6911 {
6912         int flg = PROJECT_STOP | PROJECT_KILL;
6913         return (project_hook(GF_CONTROL_LIVING, dir, plev, flg));
6914 }
6915
6916
6917 bool kawarimi(bool success)
6918 {
6919         object_type forge;
6920         object_type *q_ptr = &forge;
6921         int y, x;
6922
6923         if (p_ptr->is_dead) return FALSE;
6924         if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return FALSE;
6925         if (randint0(200) < p_ptr->stun) return FALSE;
6926
6927         if (!success && one_in_(3))
6928         {
6929 #ifdef JP
6930                 msg_print("¼ºÇÔ¡ªÆ¨¤²¤é¤ì¤Ê¤«¤Ã¤¿¡£");
6931 #else
6932                 msg_print("Failed! You couldn't run away.");
6933 #endif
6934                 p_ptr->special_defense &= ~(NINJA_KAWARIMI);
6935                 p_ptr->redraw |= (PR_STATUS);
6936                 return FALSE;
6937         }
6938
6939         y = py;
6940         x = px;
6941
6942         teleport_player(10 + randint1(90), 0L);
6943
6944         object_wipe(q_ptr);
6945
6946         object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
6947
6948         q_ptr->pval = MON_NINJA;
6949
6950         /* Drop it in the dungeon */
6951         (void)drop_near(q_ptr, -1, y, x);
6952
6953 #ifdef JP
6954         if (success) msg_print("¹¶·â¤ò¼õ¤±¤ëÁ°¤ËÁÇÁ᤯¿È¤ò¤Ò¤ë¤¬¤¨¤·¤¿¡£");
6955         else msg_print("¼ºÇÔ¡ª¹¶·â¤ò¼õ¤±¤Æ¤·¤Þ¤Ã¤¿¡£");
6956 #else
6957         if (success) msg_print("You have turned around just before the attack hit you.");
6958         else msg_print("Failed! You are hit by the attack.");
6959 #endif
6960
6961         p_ptr->special_defense &= ~(NINJA_KAWARIMI);
6962         p_ptr->redraw |= (PR_STATUS);
6963
6964         /* Teleported */
6965         return TRUE;
6966 }
6967
6968
6969 /*
6970  * "Rush Attack" routine for Samurai or Ninja
6971  * Return value is for checking "done"
6972  */
6973 bool rush_attack(bool *mdeath)
6974 {
6975         int dir;
6976         int tx, ty;
6977         int tm_idx = 0;
6978         u16b path_g[32];
6979         int path_n, i;
6980         bool tmp_mdeath = FALSE;
6981         bool moved = FALSE;
6982
6983         if (mdeath) *mdeath = FALSE;
6984
6985         project_length = 5;
6986         if (!get_aim_dir(&dir)) return FALSE;
6987
6988         /* Use the given direction */
6989         tx = px + project_length * ddx[dir];
6990         ty = py + project_length * ddy[dir];
6991
6992         /* Hack -- Use an actual "target" */
6993         if ((dir == 5) && target_okay())
6994         {
6995                 tx = target_col;
6996                 ty = target_row;
6997         }
6998
6999         if (in_bounds(ty, tx)) tm_idx = cave[ty][tx].m_idx;
7000
7001         path_n = project_path(path_g, project_length, py, px, ty, tx, PROJECT_STOP | PROJECT_KILL);
7002         project_length = 0;
7003
7004         /* No need to move */
7005         if (!path_n) return TRUE;
7006
7007         /* Use ty and tx as to-move point */
7008         ty = py;
7009         tx = px;
7010
7011         /* Project along the path */
7012         for (i = 0; i < path_n; i++)
7013         {
7014                 monster_type *m_ptr;
7015
7016                 int ny = GRID_Y(path_g[i]);
7017                 int nx = GRID_X(path_g[i]);
7018
7019                 if (cave_empty_bold(ny, nx) && player_can_enter(cave[ny][nx].feat, 0))
7020                 {
7021                         ty = ny;
7022                         tx = nx;
7023
7024                         /* Go to next grid */
7025                         continue;
7026                 }
7027
7028                 if (!cave[ny][nx].m_idx)
7029                 {
7030                         if (tm_idx)
7031                         {
7032 #ifdef JP
7033                                 msg_print("¼ºÇÔ¡ª");
7034 #else
7035                                 msg_print("Failed!");
7036 #endif
7037                         }
7038                         else
7039                         {
7040 #ifdef JP
7041                                 msg_print("¤³¤³¤Ë¤ÏÆþ¿È¤Ç¤ÏÆþ¤ì¤Ê¤¤¡£");
7042 #else
7043                                 msg_print("You can't move to that place.");
7044 #endif
7045                         }
7046
7047                         /* Exit loop */
7048                         break;
7049                 }
7050
7051                 /* Move player before updating the monster */
7052                 if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
7053
7054                 /* Update the monster */
7055                 update_mon(cave[ny][nx].m_idx, TRUE);
7056
7057                 /* Found a monster */
7058                 m_ptr = &m_list[cave[ny][nx].m_idx];
7059
7060                 if (tm_idx != cave[ny][nx].m_idx)
7061                 {
7062 #ifdef JP
7063                         msg_format("%s%s¤¬Î©¤Á¤Õ¤µ¤¬¤Ã¤Æ¤¤¤ë¡ª", tm_idx ? "Ê̤Î" : "",
7064                                    m_ptr->ml ? "¥â¥ó¥¹¥¿¡¼" : "²¿¤«");
7065 #else
7066                         msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
7067 #endif
7068                 }
7069                 else if (!player_bold(ty, tx))
7070                 {
7071                         /* Hold the monster name */
7072                         char m_name[80];
7073
7074                         /* Get the monster name (BEFORE polymorphing) */
7075                         monster_desc(m_name, m_ptr, 0);
7076 #ifdef JP
7077                         msg_format("ÁÇÁ᤯%s¤Î²û¤ËÆþ¤ê¹þ¤ó¤À¡ª", m_name);
7078 #else
7079                         msg_format("You quickly jump in and attack %s!", m_name);
7080 #endif
7081                 }
7082
7083                 if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
7084                 moved = TRUE;
7085                 tmp_mdeath = py_attack(ny, nx, HISSATSU_NYUSIN);
7086
7087                 break;
7088         }
7089
7090         if (!moved && !player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
7091
7092         if (mdeath) *mdeath = tmp_mdeath;
7093         return TRUE;
7094 }
7095
7096
7097 /*
7098  * Remove all mirrors in this floor
7099  */
7100 void remove_all_mirrors(bool explode)
7101 {
7102         int x, y;
7103
7104         for (x = 0; x < cur_wid; x++)
7105         {
7106                 for (y = 0; y < cur_hgt; y++)
7107                 {
7108                         if (is_mirror_grid(&cave[y][x]))
7109                         {
7110                                 remove_mirror(y, x);
7111                                 if (explode)
7112                                         project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS,
7113                                                 (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
7114                         }
7115                 }
7116         }
7117 }