OSDN Git Service

add type casting for fprintf
[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 #ifdef JP
1775 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°­¤Ê±åÇ°¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
1776 #else
1777                 info[i++] = "You carry an ancient foul curse.";
1778 #endif
1779
1780         }
1781         if (p_ptr->cursed & TRC_AGGRAVATE)
1782         {
1783 #ifdef JP
1784 info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤Æ¤¤¤ë¡£";
1785 #else
1786                 info[i++] = "You aggravate monsters.";
1787 #endif
1788
1789         }
1790         if (p_ptr->cursed & TRC_DRAIN_EXP)
1791         {
1792 #ifdef JP
1793 info[i++] = "¤¢¤Ê¤¿¤Ï·Ð¸³ÃͤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£";
1794 #else
1795                 info[i++] = "You are drained.";
1796 #endif
1797
1798         }
1799         if (p_ptr->cursed & TRC_SLOW_REGEN)
1800         {
1801 #ifdef JP
1802 info[i++] = "¤¢¤Ê¤¿¤Î²óÉüÎϤÏÈó¾ï¤ËÃÙ¤¤¡£";
1803 #else
1804                 info[i++] = "You regenerate slowly.";
1805 #endif
1806
1807         }
1808         if (p_ptr->cursed & TRC_ADD_L_CURSE)
1809         {
1810 #ifdef JP
1811 info[i++] = "¤¢¤Ê¤¿¤Î¼å¤¤¼ö¤¤¤ÏÁý¤¨¤ë¡£"; /* »ÃÄêŪ -- henkma */
1812 #else
1813                 info[i++] = "Your weak curses multiply.";
1814 #endif
1815
1816         }
1817         if (p_ptr->cursed & TRC_ADD_H_CURSE)
1818         {
1819 #ifdef JP
1820 info[i++] = "¤¢¤Ê¤¿¤Î¶¯¤¤¼ö¤¤¤ÏÁý¤¨¤ë¡£"; /* »ÃÄêŪ -- henkma */
1821 #else
1822                 info[i++] = "Your heavy curses multiply.";
1823 #endif
1824
1825         }
1826         if (p_ptr->cursed & TRC_CALL_ANIMAL)
1827         {
1828 #ifdef JP
1829 info[i++] = "¤¢¤Ê¤¿¤Ïưʪ¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£";
1830 #else
1831                 info[i++] = "You attract animals.";
1832 #endif
1833
1834         }
1835         if (p_ptr->cursed & TRC_CALL_DEMON)
1836         {
1837 #ifdef JP
1838 info[i++] = "¤¢¤Ê¤¿¤Ï°­Ëâ¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£";
1839 #else
1840                 info[i++] = "You attract demons.";
1841 #endif
1842
1843         }
1844         if (p_ptr->cursed & TRC_CALL_DRAGON)
1845         {
1846 #ifdef JP
1847 info[i++] = "¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤ËÁÀ¤ï¤ì¤Æ¤¤¤ë¡£";
1848 #else
1849                 info[i++] = "You attract dragons.";
1850 #endif
1851
1852         }
1853         if (p_ptr->cursed & TRC_COWARDICE)
1854         {
1855 #ifdef JP
1856 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹²²É¤ˤʤ롣";
1857 #else
1858                 info[i++] = "You are subject to cowardice.";
1859 #endif
1860
1861         }
1862         if (p_ptr->cursed & TRC_TELEPORT)
1863         {
1864 #ifdef JP
1865 info[i++] = "¤¢¤Ê¤¿¤Î°ÌÃ֤ϤҤ¸¤ç¤¦¤ËÉÔ°ÂÄê¤À¡£";
1866 #else
1867                 info[i++] = "Your position is very uncertain.";
1868 #endif
1869
1870         }
1871         if (p_ptr->cursed & TRC_LOW_MELEE)
1872         {
1873 #ifdef JP
1874 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¹¶·â¤ò³°¤·¤ä¤¹¤¤¡£";
1875 #else
1876                 info[i++] = "Your weapon causes you to miss blows.";
1877 #endif
1878
1879         }
1880         if (p_ptr->cursed & TRC_LOW_AC)
1881         {
1882 #ifdef JP
1883 info[i++] = "¤¢¤Ê¤¿¤Ï¹¶·â¤ò¼õ¤±¤ä¤¹¤¤¡£";
1884 #else
1885                 info[i++] = "You are subject to be hit.";
1886 #endif
1887
1888         }
1889         if (p_ptr->cursed & TRC_LOW_MAGIC)
1890         {
1891 #ifdef JP
1892 info[i++] = "¤¢¤Ê¤¿¤ÏËâË¡¤ò¼ºÇÔ¤·¤ä¤¹¤¤¡£";
1893 #else
1894                 info[i++] = "You are subject to fail spellcasting.";
1895 #endif
1896
1897         }
1898         if (p_ptr->cursed & TRC_FAST_DIGEST)
1899         {
1900 #ifdef JP
1901 info[i++] = "¤¢¤Ê¤¿¤Ï¤¹¤°¤ªÊ¢¤¬¤Ø¤ë¡£";
1902 #else
1903                 info[i++] = "You have a good appetite.";
1904 #endif
1905
1906         }
1907         if (p_ptr->cursed & TRC_DRAIN_HP)
1908         {
1909 #ifdef JP
1910 info[i++] = "¤¢¤Ê¤¿¤ÏÂÎÎϤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£";
1911 #else
1912                 info[i++] = "You are drained.";
1913 #endif
1914
1915         }
1916         if (p_ptr->cursed & TRC_DRAIN_MANA)
1917         {
1918 #ifdef JP
1919 info[i++] = "¤¢¤Ê¤¿¤ÏËâÎϤòµÛ¤ï¤ì¤Æ¤¤¤ë¡£";
1920 #else
1921                 info[i++] = "You brain is drained.";
1922 #endif
1923
1924         }
1925         if (IS_BLESSED())
1926         {
1927 #ifdef JP
1928 info[i++] = "¤¢¤Ê¤¿¤Ï¸øÀµ¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
1929 #else
1930                 info[i++] = "You feel rightous.";
1931 #endif
1932
1933         }
1934         if (IS_HERO())
1935         {
1936 #ifdef JP
1937 info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À¡£";
1938 #else
1939                 info[i++] = "You feel heroic.";
1940 #endif
1941
1942         }
1943         if (p_ptr->shero)
1944         {
1945 #ifdef JP
1946 info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À¡£";
1947 #else
1948                 info[i++] = "You are in a battle rage.";
1949 #endif
1950
1951         }
1952         if (p_ptr->protevil)
1953         {
1954 #ifdef JP
1955 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°­¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¡£";
1956 #else
1957                 info[i++] = "You are protected from evil.";
1958 #endif
1959
1960         }
1961         if (p_ptr->shield)
1962         {
1963 #ifdef JP
1964 info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë¡£";
1965 #else
1966                 info[i++] = "You are protected by a mystic shield.";
1967 #endif
1968
1969         }
1970         if (IS_INVULN())
1971         {
1972 #ifdef JP
1973 info[i++] = "¤¢¤Ê¤¿¤Ï¸½ºß½ý¤Ä¤«¤Ê¤¤¡£";
1974 #else
1975                 info[i++] = "You are temporarily invulnerable.";
1976 #endif
1977
1978         }
1979         if (p_ptr->wraith_form)
1980         {
1981 #ifdef JP
1982 info[i++] = "¤¢¤Ê¤¿¤Ï°ì»þŪ¤ËÍ©Â⽤·¤Æ¤¤¤ë¡£";
1983 #else
1984                 info[i++] = "You are temporarily incorporeal.";
1985 #endif
1986
1987         }
1988         if (p_ptr->special_attack & ATTACK_CONFUSE)
1989         {
1990 #ifdef JP
1991 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
1992 #else
1993                 info[i++] = "Your hands are glowing dull red.";
1994 #endif
1995
1996         }
1997         if (p_ptr->special_attack & ATTACK_FIRE)
1998         {
1999 #ifdef JP
2000 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤Ï²Ð±ê¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
2001 #else
2002                 info[i++] = "You can strike the enemy with flame.";
2003 #endif
2004
2005         }
2006         if (p_ptr->special_attack & ATTACK_COLD)
2007         {
2008 #ifdef JP
2009 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÎ䵤¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
2010 #else
2011                 info[i++] = "You can strike the enemy with cold.";
2012 #endif
2013
2014         }
2015         if (p_ptr->special_attack & ATTACK_ACID)
2016         {
2017 #ifdef JP
2018 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤Ï»À¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
2019 #else
2020                 info[i++] = "You can strike the enemy with acid.";
2021 #endif
2022
2023         }
2024         if (p_ptr->special_attack & ATTACK_ELEC)
2025         {
2026 #ifdef JP
2027 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÅÅ·â¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
2028 #else
2029                 info[i++] = "You can strike the enemy with electoric shock.";
2030 #endif
2031
2032         }
2033         if (p_ptr->special_attack & ATTACK_POIS)
2034         {
2035 #ifdef JP
2036 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÆǤËʤ¤ï¤ì¤Æ¤¤¤ë¡£";
2037 #else
2038                 info[i++] = "You can strike the enemy with poison.";
2039 #endif
2040
2041         }
2042         switch (p_ptr->action)
2043         {
2044                 case ACTION_SEARCH:
2045 #ifdef JP
2046 info[i++] = "¤¢¤Ê¤¿¤Ï¤Ò¤¸¤ç¤¦¤ËÃí°Õ¿¼¤¯¼þ°Ï¤ò¸«ÅϤ·¤Æ¤¤¤ë¡£";
2047 #else
2048                         info[i++] = "You are looking around very carefully.";
2049 #endif
2050                         break;
2051         }
2052         if (p_ptr->new_spells)
2053         {
2054 #ifdef JP
2055 info[i++] = "¤¢¤Ê¤¿¤Ï¼öʸ¤äµ§¤ê¤ò³Ø¤Ö¤³¤È¤¬¤Ç¤­¤ë¡£";
2056 #else
2057                 info[i++] = "You can learn some spells/prayers.";
2058 #endif
2059
2060         }
2061         if (p_ptr->word_recall)
2062         {
2063 #ifdef JP
2064 info[i++] = "¤¢¤Ê¤¿¤Ï¤¹¤°¤Ëµ¢´Ô¤¹¤ë¤À¤í¤¦¡£";
2065 #else
2066                 info[i++] = "You will soon be recalled.";
2067 #endif
2068
2069         }
2070         if (p_ptr->alter_reality)
2071         {
2072 #ifdef JP
2073                 info[i++] = "¤¢¤Ê¤¿¤Ï¤¹¤°¤Ë¤³¤ÎÀ¤³¦¤òÎ¥¤ì¤ë¤À¤í¤¦¡£";
2074 #else
2075                 info[i++] = "You will soon be altered.";
2076 #endif
2077
2078         }
2079         if (p_ptr->see_infra)
2080         {
2081 #ifdef JP
2082 info[i++] = "¤¢¤Ê¤¿¤ÎÆ·¤ÏÀÖ³°Àþ¤ËÉÒ´¶¤Ç¤¢¤ë¡£";
2083 #else
2084                 info[i++] = "Your eyes are sensitive to infrared light.";
2085 #endif
2086
2087         }
2088         if (p_ptr->see_inv)
2089         {
2090 #ifdef JP
2091 info[i++] = "¤¢¤Ê¤¿¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
2092 #else
2093                 info[i++] = "You can see invisible creatures.";
2094 #endif
2095
2096         }
2097         if (p_ptr->levitation)
2098         {
2099 #ifdef JP
2100 info[i++] = "¤¢¤Ê¤¿¤ÏÈô¤Ö¤³¤È¤¬¤Ç¤­¤ë¡£";
2101 #else
2102                 info[i++] = "You can fly.";
2103 #endif
2104
2105         }
2106         if (p_ptr->free_act)
2107         {
2108 #ifdef JP
2109 info[i++] = "¤¢¤Ê¤¿¤ÏËãáãÃΤ餺¤Î¸ú²Ì¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2110 #else
2111                 info[i++] = "You have free action.";
2112 #endif
2113
2114         }
2115         if (p_ptr->regenerate)
2116         {
2117 #ifdef JP
2118 info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÁ᤯ÂÎÎϤò²óÉü¤¹¤ë¡£";
2119 #else
2120                 info[i++] = "You regenerate quickly.";
2121 #endif
2122
2123         }
2124         if (p_ptr->slow_digest)
2125         {
2126 #ifdef JP
2127 info[i++] = "¤¢¤Ê¤¿¤Ï¿©Íߤ¬¾¯¤Ê¤¤¡£";
2128 #else
2129                 info[i++] = "Your appetite is small.";
2130 #endif
2131
2132         }
2133         if (p_ptr->telepathy)
2134         {
2135 #ifdef JP
2136 info[i++] = "¤¢¤Ê¤¿¤Ï¥Æ¥ì¥Ñ¥·¡¼Ç½ÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2137 #else
2138                 info[i++] = "You have ESP.";
2139 #endif
2140
2141         }
2142         if (p_ptr->esp_animal)
2143         {
2144 #ifdef JP
2145 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Á³³¦¤ÎÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2146 #else
2147                 info[i++] = "You sense natural creatures.";
2148 #endif
2149
2150         }
2151         if (p_ptr->esp_undead)
2152         {
2153 #ifdef JP
2154 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥ó¥Ç¥Ã¥É¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2155 #else
2156                 info[i++] = "You sense undead.";
2157 #endif
2158
2159         }
2160         if (p_ptr->esp_demon)
2161         {
2162 #ifdef JP
2163 info[i++] = "¤¢¤Ê¤¿¤Ï°­Ëâ¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2164 #else
2165                 info[i++] = "You sense demons.";
2166 #endif
2167
2168         }
2169         if (p_ptr->esp_orc)
2170         {
2171 #ifdef JP
2172 info[i++] = "¤¢¤Ê¤¿¤Ï¥ª¡¼¥¯¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2173 #else
2174                 info[i++] = "You sense orcs.";
2175 #endif
2176
2177         }
2178         if (p_ptr->esp_troll)
2179         {
2180 #ifdef JP
2181 info[i++] = "¤¢¤Ê¤¿¤Ï¥È¥í¥ë¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2182 #else
2183                 info[i++] = "You sense trolls.";
2184 #endif
2185
2186         }
2187         if (p_ptr->esp_giant)
2188         {
2189 #ifdef JP
2190 info[i++] = "¤¢¤Ê¤¿¤Ïµð¿Í¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2191 #else
2192                 info[i++] = "You sense giants.";
2193 #endif
2194
2195         }
2196         if (p_ptr->esp_dragon)
2197         {
2198 #ifdef JP
2199 info[i++] = "¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2200 #else
2201                 info[i++] = "You sense dragons.";
2202 #endif
2203
2204         }
2205         if (p_ptr->esp_human)
2206         {
2207 #ifdef JP
2208 info[i++] = "¤¢¤Ê¤¿¤Ï¿Í´Ö¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2209 #else
2210                 info[i++] = "You sense humans.";
2211 #endif
2212
2213         }
2214         if (p_ptr->esp_evil)
2215         {
2216 #ifdef JP
2217 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°­¤ÊÀ¸¤­Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2218 #else
2219                 info[i++] = "You sense evil creatures.";
2220 #endif
2221
2222         }
2223         if (p_ptr->esp_good)
2224         {
2225 #ifdef JP
2226 info[i++] = "¤¢¤Ê¤¿¤ÏÁ±ÎɤÊÀ¸¤­Êª¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2227 #else
2228                 info[i++] = "You sense good creatures.";
2229 #endif
2230
2231         }
2232         if (p_ptr->esp_nonliving)
2233         {
2234 #ifdef JP
2235 info[i++] = "¤¢¤Ê¤¿¤Ï³èÆ°¤¹¤ë̵À¸ÊªÂΤθºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2236 #else
2237                 info[i++] = "You sense non-living creatures.";
2238 #endif
2239
2240         }
2241         if (p_ptr->esp_unique)
2242         {
2243 #ifdef JP
2244 info[i++] = "¤¢¤Ê¤¿¤ÏÆÃÊ̤ʶ¯Å¨¤Î¸ºß¤ò´¶¤¸¤ëǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2245 #else
2246                 info[i++] = "You sense unique monsters.";
2247 #endif
2248
2249         }
2250         if (p_ptr->hold_life)
2251         {
2252 #ifdef JP
2253 info[i++] = "¤¢¤Ê¤¿¤Ï¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¤·¤Ã¤«¤ê¤È°Ý»ý¤¹¤ë¡£";
2254 #else
2255                 info[i++] = "You have a firm hold on your life force.";
2256 #endif
2257
2258         }
2259         if (p_ptr->reflect)
2260         {
2261 #ifdef JP
2262 info[i++] = "¤¢¤Ê¤¿¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2263 #else
2264                 info[i++] = "You reflect arrows and bolts.";
2265 #endif
2266
2267         }
2268         if (p_ptr->sh_fire)
2269         {
2270 #ifdef JP
2271 info[i++] = "¤¢¤Ê¤¿¤Ï±ê¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2272 #else
2273                 info[i++] = "You are surrounded with a fiery aura.";
2274 #endif
2275
2276         }
2277         if (p_ptr->sh_elec)
2278         {
2279 #ifdef JP
2280 info[i++] = "¤¢¤Ê¤¿¤ÏÅŵ¤¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2281 #else
2282                 info[i++] = "You are surrounded with electricity.";
2283 #endif
2284
2285         }
2286         if (p_ptr->sh_cold)
2287         {
2288 #ifdef JP
2289 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2290 #else
2291                 info[i++] = "You are surrounded with an aura of coldness.";
2292 #endif
2293
2294         }
2295         if (p_ptr->tim_sh_holy)
2296         {
2297 #ifdef JP
2298 info[i++] = "¤¢¤Ê¤¿¤ÏÀ»¤Ê¤ë¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2299 #else
2300                 info[i++] = "You are surrounded with a holy aura.";
2301 #endif
2302
2303         }
2304         if (p_ptr->tim_sh_touki)
2305         {
2306 #ifdef JP
2307 info[i++] = "¤¢¤Ê¤¿¤ÏÆ®µ¤¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2308 #else
2309                 info[i++] = "You are surrounded with a energy aura.";
2310 #endif
2311
2312         }
2313         if (p_ptr->anti_magic)
2314         {
2315 #ifdef JP
2316 info[i++] = "¤¢¤Ê¤¿¤ÏÈ¿ËâË¡¥·¡¼¥ë¥É¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2317 #else
2318                 info[i++] = "You are surrounded by an anti-magic shell.";
2319 #endif
2320
2321         }
2322         if (p_ptr->anti_tele)
2323         {
2324 #ifdef JP
2325 info[i++] = "¤¢¤Ê¤¿¤Ï¥Æ¥ì¥Ý¡¼¥È¤Ç¤­¤Ê¤¤¡£";
2326 #else
2327                 info[i++] = "You cannot teleport.";
2328 #endif
2329
2330         }
2331         if (p_ptr->lite)
2332         {
2333 #ifdef JP
2334 info[i++] = "¤¢¤Ê¤¿¤Î¿ÈÂΤϸ÷¤Ã¤Æ¤¤¤ë¡£";
2335 #else
2336                 info[i++] = "You are carrying a permanent light.";
2337 #endif
2338
2339         }
2340         if (p_ptr->warning)
2341         {
2342 #ifdef JP
2343 info[i++] = "¤¢¤Ê¤¿¤Ï¹ÔÆ°¤ÎÁ°¤Ë´í¸±¤ò»¡ÃΤ¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
2344 #else
2345                 info[i++] = "You will be warned before dangerous actions.";
2346 #endif
2347
2348         }
2349         if (p_ptr->dec_mana)
2350         {
2351 #ifdef JP
2352 info[i++] = "¤¢¤Ê¤¿¤Ï¾¯¤Ê¤¤¾ÃÈñËâÎϤÇËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
2353 #else
2354                 info[i++] = "You can cast spells with fewer mana points.";
2355 #endif
2356
2357         }
2358         if (p_ptr->easy_spell)
2359         {
2360 #ifdef JP
2361 info[i++] = "¤¢¤Ê¤¿¤ÏÄ㤤¼ºÇÔΨ¤ÇËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
2362 #else
2363                 info[i++] = "Fail rate of your magic is decreased.";
2364 #endif
2365
2366         }
2367         if (p_ptr->heavy_spell)
2368         {
2369 #ifdef JP
2370 info[i++] = "¤¢¤Ê¤¿¤Ï¹â¤¤¼ºÇÔΨ¤ÇËâË¡¤ò¾§¤¨¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤¡£";
2371 #else
2372                 info[i++] = "Fail rate of your magic is increased.";
2373 #endif
2374
2375         }
2376         if (p_ptr->mighty_throw)
2377         {
2378 #ifdef JP
2379 info[i++] = "¤¢¤Ê¤¿¤Ï¶¯¤¯Êª¤òÅꤲ¤ë¡£";
2380 #else
2381                 info[i++] = "You can throw objects powerfully.";
2382 #endif
2383
2384         }
2385
2386         if (p_ptr->immune_acid)
2387         {
2388 #ifdef JP
2389 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2390 #else
2391                 info[i++] = "You are completely immune to acid.";
2392 #endif
2393
2394         }
2395         else if (p_ptr->resist_acid && IS_OPPOSE_ACID())
2396         {
2397 #ifdef JP
2398 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤Î¶¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2399 #else
2400                 info[i++] = "You resist acid exceptionally well.";
2401 #endif
2402
2403         }
2404         else if (p_ptr->resist_acid || IS_OPPOSE_ACID())
2405         {
2406 #ifdef JP
2407 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2408 #else
2409                 info[i++] = "You are resistant to acid.";
2410 #endif
2411
2412         }
2413
2414         if (p_ptr->immune_elec)
2415         {
2416 #ifdef JP
2417 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2418 #else
2419                 info[i++] = "You are completely immune to lightning.";
2420 #endif
2421
2422         }
2423         else if (p_ptr->resist_elec && IS_OPPOSE_ELEC())
2424         {
2425 #ifdef JP
2426 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤Î¶¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2427 #else
2428                 info[i++] = "You resist lightning exceptionally well.";
2429 #endif
2430
2431         }
2432         else if (p_ptr->resist_elec || IS_OPPOSE_ELEC())
2433         {
2434 #ifdef JP
2435 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2436 #else
2437                 info[i++] = "You are resistant to lightning.";
2438 #endif
2439
2440         }
2441
2442         if (prace_is_(RACE_ANDROID) && !p_ptr->immune_elec)
2443         {
2444 #ifdef JP
2445 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ë¼å¤¤¡£";
2446 #else
2447                 info[i++] = "You are susceptible to damage from lightning.";
2448 #endif
2449
2450         }
2451
2452         if (p_ptr->immune_fire)
2453         {
2454 #ifdef JP
2455 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2456 #else
2457                 info[i++] = "You are completely immune to fire.";
2458 #endif
2459
2460         }
2461         else if (p_ptr->resist_fire && IS_OPPOSE_FIRE())
2462         {
2463 #ifdef JP
2464 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤Î¶¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2465 #else
2466                 info[i++] = "You resist fire exceptionally well.";
2467 #endif
2468
2469         }
2470         else if (p_ptr->resist_fire || IS_OPPOSE_FIRE())
2471         {
2472 #ifdef JP
2473 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2474 #else
2475                 info[i++] = "You are resistant to fire.";
2476 #endif
2477
2478         }
2479
2480         if (prace_is_(RACE_ENT) && !p_ptr->immune_fire)
2481         {
2482 #ifdef JP
2483 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ë¼å¤¤¡£";
2484 #else
2485                 info[i++] = "You are susceptible to damage from fire.";
2486 #endif
2487
2488         }
2489
2490         if (p_ptr->immune_cold)
2491         {
2492 #ifdef JP
2493 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2494 #else
2495                 info[i++] = "You are completely immune to cold.";
2496 #endif
2497
2498         }
2499         else if (p_ptr->resist_cold && IS_OPPOSE_COLD())
2500         {
2501 #ifdef JP
2502 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤Î¶¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2503 #else
2504                 info[i++] = "You resist cold exceptionally well.";
2505 #endif
2506
2507         }
2508         else if (p_ptr->resist_cold || IS_OPPOSE_COLD())
2509         {
2510 #ifdef JP
2511 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2512 #else
2513                 info[i++] = "You are resistant to cold.";
2514 #endif
2515
2516         }
2517
2518         if (p_ptr->resist_pois && IS_OPPOSE_POIS())
2519         {
2520 #ifdef JP
2521 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤζ¯ÎϤÊÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2522 #else
2523                 info[i++] = "You resist poison exceptionally well.";
2524 #endif
2525
2526         }
2527         else if (p_ptr->resist_pois || IS_OPPOSE_POIS())
2528         {
2529 #ifdef JP
2530 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2531 #else
2532                 info[i++] = "You are resistant to poison.";
2533 #endif
2534
2535         }
2536
2537         if (p_ptr->resist_lite)
2538         {
2539 #ifdef JP
2540 info[i++] = "¤¢¤Ê¤¿¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2541 #else
2542                 info[i++] = "You are resistant to bright light.";
2543 #endif
2544
2545         }
2546
2547         if (prace_is_(RACE_VAMPIRE) || prace_is_(RACE_S_FAIRY) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
2548         {
2549 #ifdef JP
2550 info[i++] = "¤¢¤Ê¤¿¤ÏÁ®¸÷¤Ë¼å¤¤¡£";
2551 #else
2552                 info[i++] = "You are susceptible to damage from bright light.";
2553 #endif
2554
2555         }
2556
2557         if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
2558         {
2559 #ifdef JP
2560 info[i++] = "¤¢¤Ê¤¿¤Ï°Å¹õ¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2561 #else
2562                 info[i++] = "You are completely immune to darkness.";
2563 #endif
2564         }
2565
2566         else if (p_ptr->resist_dark)
2567         {
2568 #ifdef JP
2569 info[i++] = "¤¢¤Ê¤¿¤Ï°Å¹õ¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2570 #else
2571                 info[i++] = "You are resistant to darkness.";
2572 #endif
2573
2574         }
2575         if (p_ptr->resist_conf)
2576         {
2577 #ifdef JP
2578 info[i++] = "¤¢¤Ê¤¿¤Ïº®Íð¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2579 #else
2580                 info[i++] = "You are resistant to confusion.";
2581 #endif
2582
2583         }
2584         if (p_ptr->resist_sound)
2585         {
2586 #ifdef JP
2587 info[i++] = "¤¢¤Ê¤¿¤Ï²»ÇȤξ׷â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2588 #else
2589                 info[i++] = "You are resistant to sonic attacks.";
2590 #endif
2591
2592         }
2593         if (p_ptr->resist_disen)
2594         {
2595 #ifdef JP
2596 info[i++] = "¤¢¤Ê¤¿¤ÏÎô²½¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2597 #else
2598                 info[i++] = "You are resistant to disenchantment.";
2599 #endif
2600
2601         }
2602         if (p_ptr->resist_chaos)
2603         {
2604 #ifdef JP
2605 info[i++] = "¤¢¤Ê¤¿¤Ï¥«¥ª¥¹¤ÎÎϤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2606 #else
2607                 info[i++] = "You are resistant to chaos.";
2608 #endif
2609
2610         }
2611         if (p_ptr->resist_shard)
2612         {
2613 #ifdef JP
2614 info[i++] = "¤¢¤Ê¤¿¤ÏÇËÊҤι¶·â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2615 #else
2616                 info[i++] = "You are resistant to blasts of shards.";
2617 #endif
2618
2619         }
2620         if (p_ptr->resist_nexus)
2621         {
2622 #ifdef JP
2623 info[i++] = "¤¢¤Ê¤¿¤Ï°ø²Ìº®Íð¤Î¹¶·â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2624 #else
2625                 info[i++] = "You are resistant to nexus attacks.";
2626 #endif
2627
2628         }
2629
2630         if (prace_is_(RACE_SPECTRE))
2631         {
2632 #ifdef JP
2633 info[i++] = "¤¢¤Ê¤¿¤ÏÃϹö¤ÎÎϤòµÛ¼ý¤Ç¤­¤ë¡£";
2634 #else
2635                 info[i++] = "You can drain nether forces.";
2636 #endif
2637
2638         }
2639         else if (p_ptr->resist_neth)
2640         {
2641 #ifdef JP
2642 info[i++] = "¤¢¤Ê¤¿¤ÏÃϹö¤ÎÎϤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2643 #else
2644                 info[i++] = "You are resistant to nether forces.";
2645 #endif
2646
2647         }
2648         if (p_ptr->resist_fear)
2649         {
2650 #ifdef JP
2651 info[i++] = "¤¢¤Ê¤¿¤ÏÁ´¤¯¶²Éݤò´¶¤¸¤Ê¤¤¡£";
2652 #else
2653                 info[i++] = "You are completely fearless.";
2654 #endif
2655
2656         }
2657         if (p_ptr->resist_blind)
2658         {
2659 #ifdef JP
2660 info[i++] = "¤¢¤Ê¤¿¤ÎÌܤÏÌÕÌܤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2661 #else
2662                 info[i++] = "Your eyes are resistant to blindness.";
2663 #endif
2664
2665         }
2666         if (p_ptr->resist_time)
2667         {
2668 #ifdef JP
2669 info[i++] = "¤¢¤Ê¤¿¤Ï»þ´ÖµÕž¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2670 #else
2671                 info[i++] = "You are resistant to time.";
2672 #endif
2673
2674         }
2675
2676         if (p_ptr->sustain_str)
2677         {
2678 #ifdef JP
2679 info[i++] = "¤¢¤Ê¤¿¤ÎÏÓÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2680 #else
2681                 info[i++] = "Your strength is sustained.";
2682 #endif
2683
2684         }
2685         if (p_ptr->sustain_int)
2686         {
2687 #ifdef JP
2688 info[i++] = "¤¢¤Ê¤¿¤ÎÃÎǽ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2689 #else
2690                 info[i++] = "Your intelligence is sustained.";
2691 #endif
2692
2693         }
2694         if (p_ptr->sustain_wis)
2695         {
2696 #ifdef JP
2697 info[i++] = "¤¢¤Ê¤¿¤Î¸­¤µ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2698 #else
2699                 info[i++] = "Your wisdom is sustained.";
2700 #endif
2701
2702         }
2703         if (p_ptr->sustain_con)
2704         {
2705 #ifdef JP
2706 info[i++] = "¤¢¤Ê¤¿¤ÎÂѵ×ÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2707 #else
2708                 info[i++] = "Your constitution is sustained.";
2709 #endif
2710
2711         }
2712         if (p_ptr->sustain_dex)
2713         {
2714 #ifdef JP
2715 info[i++] = "¤¢¤Ê¤¿¤Î´ïÍѤµ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2716 #else
2717                 info[i++] = "Your dexterity is sustained.";
2718 #endif
2719
2720         }
2721         if (p_ptr->sustain_chr)
2722         {
2723 #ifdef JP
2724 info[i++] = "¤¢¤Ê¤¿¤ÎÌ¥ÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2725 #else
2726                 info[i++] = "Your charisma is sustained.";
2727 #endif
2728
2729         }
2730
2731         if (have_flag(flgs, TR_STR))
2732         {
2733 #ifdef JP
2734 info[i++] = "¤¢¤Ê¤¿¤ÎÏÓÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2735 #else
2736                 info[i++] = "Your strength is affected by your equipment.";
2737 #endif
2738
2739         }
2740         if (have_flag(flgs, TR_INT))
2741         {
2742 #ifdef JP
2743 info[i++] = "¤¢¤Ê¤¿¤ÎÃÎǽ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2744 #else
2745                 info[i++] = "Your intelligence is affected by your equipment.";
2746 #endif
2747
2748         }
2749         if (have_flag(flgs, TR_WIS))
2750         {
2751 #ifdef JP
2752 info[i++] = "¤¢¤Ê¤¿¤Î¸­¤µ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2753 #else
2754                 info[i++] = "Your wisdom is affected by your equipment.";
2755 #endif
2756
2757         }
2758         if (have_flag(flgs, TR_DEX))
2759         {
2760 #ifdef JP
2761 info[i++] = "¤¢¤Ê¤¿¤Î´ïÍѤµ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2762 #else
2763                 info[i++] = "Your dexterity is affected by your equipment.";
2764 #endif
2765
2766         }
2767         if (have_flag(flgs, TR_CON))
2768         {
2769 #ifdef JP
2770 info[i++] = "¤¢¤Ê¤¿¤ÎÂѵ×ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2771 #else
2772                 info[i++] = "Your constitution is affected by your equipment.";
2773 #endif
2774
2775         }
2776         if (have_flag(flgs, TR_CHR))
2777         {
2778 #ifdef JP
2779 info[i++] = "¤¢¤Ê¤¿¤ÎÌ¥ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2780 #else
2781                 info[i++] = "Your charisma is affected by your equipment.";
2782 #endif
2783
2784         }
2785
2786         if (have_flag(flgs, TR_STEALTH))
2787         {
2788 #ifdef JP
2789 info[i++] = "¤¢¤Ê¤¿¤Î±£Ì©¹ÔưǽÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2790 #else
2791                 info[i++] = "Your stealth is affected by your equipment.";
2792 #endif
2793
2794         }
2795         if (have_flag(flgs, TR_SEARCH))
2796         {
2797 #ifdef JP
2798 info[i++] = "¤¢¤Ê¤¿¤Îõº÷ǽÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2799 #else
2800                 info[i++] = "Your searching ability is affected by your equipment.";
2801 #endif
2802
2803         }
2804         if (have_flag(flgs, TR_INFRA))
2805         {
2806 #ifdef JP
2807 info[i++] = "¤¢¤Ê¤¿¤ÎÀÖ³°Àþ»ëÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2808 #else
2809                 info[i++] = "Your infravision is affected by your equipment.";
2810 #endif
2811
2812         }
2813         if (have_flag(flgs, TR_TUNNEL))
2814         {
2815 #ifdef JP
2816 info[i++] = "¤¢¤Ê¤¿¤ÎºÎ·¡Ç½ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2817 #else
2818                 info[i++] = "Your digging ability is affected by your equipment.";
2819 #endif
2820
2821         }
2822         if (have_flag(flgs, TR_SPEED))
2823         {
2824 #ifdef JP
2825 info[i++] = "¤¢¤Ê¤¿¤Î¥¹¥Ô¡¼¥É¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2826 #else
2827                 info[i++] = "Your speed is affected by your equipment.";
2828 #endif
2829
2830         }
2831         if (have_flag(flgs, TR_BLOWS))
2832         {
2833 #ifdef JP
2834 info[i++] = "¤¢¤Ê¤¿¤Î¹¶·â®ÅÙ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2835 #else
2836                 info[i++] = "Your attack speed is affected by your equipment.";
2837 #endif
2838
2839         }
2840
2841
2842         /* Access the current weapon */
2843         o_ptr = &inventory[INVEN_RARM];
2844
2845         /* Analyze the weapon */
2846         if (o_ptr->k_idx)
2847         {
2848                 /* Indicate Blessing */
2849                 if (have_flag(flgs, TR_BLESSED))
2850                 {
2851 #ifdef JP
2852 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿À¤Î½ËÊ¡¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2853 #else
2854                         info[i++] = "Your weapon has been blessed by the gods.";
2855 #endif
2856
2857                 }
2858
2859                 if (have_flag(flgs, TR_CHAOTIC))
2860                 {
2861 #ifdef JP
2862 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥í¥°¥ë¥¹¤Îħ¤Î°À­¤ò¤â¤Ä¡£";
2863 #else
2864                         info[i++] = "Your weapon is branded with the Sign of Logrus.";
2865 #endif
2866
2867                 }
2868
2869                 /* Hack */
2870                 if (have_flag(flgs, TR_IMPACT))
2871                 {
2872 #ifdef JP
2873 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÂÇ·â¤ÇÃϿ̤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£";
2874 #else
2875                         info[i++] = "The impact of your weapon can cause earthquakes.";
2876 #endif
2877
2878                 }
2879
2880                 if (have_flag(flgs, TR_VORPAL))
2881                 {
2882 #ifdef JP
2883 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÈó¾ï¤Ë±Ô¤¤¡£";
2884 #else
2885                         info[i++] = "Your weapon is very sharp.";
2886 #endif
2887
2888                 }
2889
2890                 if (have_flag(flgs, TR_VAMPIRIC))
2891                 {
2892 #ifdef JP
2893 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤«¤éÀ¸Ì¿ÎϤòµÛ¼ý¤¹¤ë¡£";
2894 #else
2895                         info[i++] = "Your weapon drains life from your foes.";
2896 #endif
2897
2898                 }
2899
2900                 /* Special "Attack Bonuses" */
2901                 if (have_flag(flgs, TR_BRAND_ACID))
2902                 {
2903 #ifdef JP
2904 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÍϤ«¤¹¡£";
2905 #else
2906                         info[i++] = "Your weapon melts your foes.";
2907 #endif
2908
2909                 }
2910                 if (have_flag(flgs, TR_BRAND_ELEC))
2911                 {
2912 #ifdef JP
2913 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤ò´¶ÅŤµ¤»¤ë¡£";
2914 #else
2915                         info[i++] = "Your weapon shocks your foes.";
2916 #endif
2917
2918                 }
2919                 if (have_flag(flgs, TR_BRAND_FIRE))
2920                 {
2921 #ifdef JP
2922 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òdz¤ä¤¹¡£";
2923 #else
2924                         info[i++] = "Your weapon burns your foes.";
2925 #endif
2926
2927                 }
2928                 if (have_flag(flgs, TR_BRAND_COLD))
2929                 {
2930 #ifdef JP
2931 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÅà¤é¤»¤ë¡£";
2932 #else
2933                         info[i++] = "Your weapon freezes your foes.";
2934 #endif
2935
2936                 }
2937                 if (have_flag(flgs, TR_BRAND_POIS))
2938                 {
2939 #ifdef JP
2940 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÆǤǿ¯¤¹¡£";
2941 #else
2942                         info[i++] = "Your weapon poisons your foes.";
2943 #endif
2944
2945                 }
2946
2947                 /* Special "slay" flags */
2948                 if (have_flag(flgs, TR_KILL_ANIMAL))
2949                 {
2950 #ifdef JP
2951 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ïưʪ¤ÎŷŨ¤Ç¤¢¤ë¡£";
2952 #else
2953                         info[i++] = "Your weapon is a great bane of animals.";
2954 #endif
2955
2956                 }
2957                 else if (have_flag(flgs, TR_SLAY_ANIMAL))
2958                 {
2959 #ifdef JP
2960 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ïưʪ¤ËÂФ·¤Æ¶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2961 #else
2962                         info[i++] = "Your weapon strikes at animals with extra force.";
2963 #endif
2964
2965                 }
2966                 if (have_flag(flgs, TR_KILL_EVIL))
2967                 {
2968 #ifdef JP
2969 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¼Ù°­¤Ê¤ë¸ºß¤ÎŷŨ¤Ç¤¢¤ë¡£";
2970 #else
2971                         info[i++] = "Your weapon is a great bane of evil.";
2972 #endif
2973
2974                 }
2975                 else if (have_flag(flgs, TR_SLAY_EVIL))
2976                 {
2977 #ifdef JP
2978 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¼Ù°­¤Ê¤ë¸ºß¤ËÂФ·¤Æ¶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2979 #else
2980                         info[i++] = "Your weapon strikes at evil with extra force.";
2981 #endif
2982
2983                 }
2984                 if (have_flag(flgs, TR_KILL_HUMAN))
2985                 {
2986 #ifdef JP
2987 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿Í´Ö¤ÎŷŨ¤Ç¤¢¤ë¡£";
2988 #else
2989                         info[i++] = "Your weapon is a great bane of humans.";
2990 #endif
2991
2992                 }
2993                 else if (have_flag(flgs, TR_SLAY_HUMAN))
2994                 {
2995 #ifdef JP
2996 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿Í´Ö¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2997 #else
2998                         info[i++] = "Your weapon is especially deadly against humans.";
2999 #endif
3000
3001                 }
3002                 if (have_flag(flgs, TR_KILL_UNDEAD))
3003                 {
3004 #ifdef JP
3005 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¢¥ó¥Ç¥Ã¥É¤ÎŷŨ¤Ç¤¢¤ë¡£";
3006 #else
3007                         info[i++] = "Your weapon is a great bane of undead.";
3008 #endif
3009
3010                 }
3011                 else if (have_flag(flgs, TR_SLAY_UNDEAD))
3012                 {
3013 #ifdef JP
3014 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤Æ¿ÀÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
3015 #else
3016                         info[i++] = "Your weapon strikes at undead with holy wrath.";
3017 #endif
3018
3019                 }
3020                 if (have_flag(flgs, TR_KILL_DEMON))
3021                 {
3022 #ifdef JP
3023 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥Ç¡¼¥â¥ó¤ÎŷŨ¤Ç¤¢¤ë¡£";
3024 #else
3025                         info[i++] = "Your weapon is a great bane of demons.";
3026 #endif
3027
3028                 }
3029                 else if (have_flag(flgs, TR_SLAY_DEMON))
3030                 {
3031 #ifdef JP
3032 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤Æ¿ÀÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
3033 #else
3034                         info[i++] = "Your weapon strikes at demons with holy wrath.";
3035 #endif
3036
3037                 }
3038                 if (have_flag(flgs, TR_KILL_ORC))
3039                 {
3040 #ifdef JP
3041 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥ª¡¼¥¯¤ÎŷŨ¤Ç¤¢¤ë¡£";
3042 #else
3043                         info[i++] = "Your weapon is a great bane of orcs.";
3044 #endif
3045
3046                 }
3047                 else if (have_flag(flgs, TR_SLAY_ORC))
3048                 {
3049 #ifdef JP
3050 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
3051 #else
3052                         info[i++] = "Your weapon is especially deadly against orcs.";
3053 #endif
3054
3055                 }
3056                 if (have_flag(flgs, TR_KILL_TROLL))
3057                 {
3058 #ifdef JP
3059 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥È¥í¥ë¤ÎŷŨ¤Ç¤¢¤ë¡£";
3060 #else
3061                         info[i++] = "Your weapon is a great bane of trolls.";
3062 #endif
3063
3064                 }
3065                 else if (have_flag(flgs, TR_SLAY_TROLL))
3066                 {
3067 #ifdef JP
3068 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
3069 #else
3070                         info[i++] = "Your weapon is especially deadly against trolls.";
3071 #endif
3072
3073                 }
3074                 if (have_flag(flgs, TR_KILL_GIANT))
3075                 {
3076 #ifdef JP
3077 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ÎŷŨ¤Ç¤¢¤ë¡£";
3078 #else
3079                         info[i++] = "Your weapon is a great bane of giants.";
3080 #endif
3081
3082                 }
3083                 else if (have_flag(flgs, TR_SLAY_GIANT))
3084                 {
3085 #ifdef JP
3086 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
3087 #else
3088                         info[i++] = "Your weapon is especially deadly against giants.";
3089 #endif
3090
3091                 }
3092                 /* Special "kill" flags */
3093                 if (have_flag(flgs, TR_KILL_DRAGON))
3094                 {
3095 #ifdef JP
3096 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥É¥é¥´¥ó¤ÎŷŨ¤Ç¤¢¤ë¡£";
3097 #else
3098                         info[i++] = "Your weapon is a great bane of dragons.";
3099 #endif
3100
3101                 }
3102                 else if (have_flag(flgs, TR_SLAY_DRAGON))
3103                 {
3104 #ifdef JP
3105 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
3106 #else
3107                         info[i++] = "Your weapon is especially deadly against dragons.";
3108 #endif
3109
3110                 }
3111
3112                 if (have_flag(flgs, TR_FORCE_WEAPON))
3113                 {
3114 #ifdef JP
3115 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏMP¤ò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
3116 #else
3117                         info[i++] = "Your weapon causes greate damages using your MP.";
3118 #endif
3119
3120                 }
3121                 if (have_flag(flgs, TR_THROW))
3122                 {
3123 #ifdef JP
3124 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÅꤲ¤ä¤¹¤¤¡£";
3125 #else
3126                         info[i++] = "Your weapon can be thrown well.";
3127 #endif
3128                 }
3129         }
3130
3131
3132         /* Save the screen */
3133         screen_save();
3134
3135         /* Erase the screen */
3136         for (k = 1; k < 24; k++) prt("", k, 13);
3137
3138         /* Label the information */
3139 #ifdef JP
3140 prt("        ¤¢¤Ê¤¿¤Î¾õÂÖ:", 1, 15);
3141 #else
3142         prt("     Your Attributes:", 1, 15);
3143 #endif
3144
3145
3146         /* We will print on top of the map (column 13) */
3147         for (k = 2, j = 0; j < i; j++)
3148         {
3149                 /* Show the info */
3150                 prt(info[j], k++, 15);
3151
3152                 /* Every 20 entries (lines 2 to 21), start over */
3153                 if ((k == 22) && (j+1 < i))
3154                 {
3155 #ifdef JP
3156 prt("-- Â³¤¯ --", k, 15);
3157 #else
3158                         prt("-- more --", k, 15);
3159 #endif
3160
3161                         inkey();
3162                         for (; k > 2; k--) prt("", k, 15);
3163                 }
3164         }
3165
3166         /* Pause */
3167 #ifdef JP
3168 prt("[²¿¤«¥­¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 13);
3169 #else
3170         prt("[Press any key to continue]", k, 13);
3171 #endif
3172
3173         inkey();
3174
3175         /* Restore the screen */
3176         screen_load();
3177 }
3178
3179
3180 static int report_magics_aux(int dur)
3181 {
3182         if (dur <= 5)
3183         {
3184                 return 0;
3185         }
3186         else if (dur <= 10)
3187         {
3188                 return 1;
3189         }
3190         else if (dur <= 20)
3191         {
3192                 return 2;
3193         }
3194         else if (dur <= 50)
3195         {
3196                 return 3;
3197         }
3198         else if (dur <= 100)
3199         {
3200                 return 4;
3201         }
3202         else if (dur <= 200)
3203         {
3204                 return 5;
3205         }
3206         else
3207         {
3208                 return 6;
3209         }
3210 }
3211
3212 static cptr report_magic_durations[] =
3213 {
3214 #ifdef JP
3215 "¤´¤¯Ã»¤¤´Ö",
3216 "¾¯¤·¤Î´Ö",
3217 "¤·¤Ð¤é¤¯¤Î´Ö",
3218 "¿¾¯Ä¹¤¤´Ö",
3219 "Ť¤´Ö",
3220 "Èó¾ï¤ËŤ¤´Ö",
3221 "¿®¤¸Æñ¤¤¤Û¤ÉŤ¤´Ö",
3222 "¥â¥ó¥¹¥¿¡¼¤ò¹¶·â¤¹¤ë¤Þ¤Ç"
3223 #else
3224         "for a short time",
3225         "for a little while",
3226         "for a while",
3227         "for a long while",
3228         "for a long time",
3229         "for a very long time",
3230         "for an incredibly long time",
3231         "until you hit a monster"
3232 #endif
3233
3234 };
3235
3236
3237 /*
3238  * Report all currently active magical effects.
3239  */
3240 void report_magics(void)
3241 {
3242         int     i = 0, j, k;
3243         char    Dummy[80];
3244         cptr    info[128];
3245         int     info2[128];
3246
3247
3248         if (p_ptr->blind)
3249         {
3250                 info2[i]  = report_magics_aux(p_ptr->blind);
3251 #ifdef JP
3252 info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤¡£";
3253 #else
3254                 info[i++] = "You cannot see";
3255 #endif
3256
3257         }
3258         if (p_ptr->confused)
3259         {
3260                 info2[i]  = report_magics_aux(p_ptr->confused);
3261 #ifdef JP
3262 info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë¡£";
3263 #else
3264                 info[i++] = "You are confused";
3265 #endif
3266
3267         }
3268         if (p_ptr->afraid)
3269         {
3270                 info2[i]  = report_magics_aux(p_ptr->afraid);
3271 #ifdef JP
3272 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
3273 #else
3274                 info[i++] = "You are terrified";
3275 #endif
3276
3277         }
3278         if (p_ptr->poisoned)
3279         {
3280                 info2[i]  = report_magics_aux(p_ptr->poisoned);
3281 #ifdef JP
3282 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
3283 #else
3284                 info[i++] = "You are poisoned";
3285 #endif
3286
3287         }
3288         if (p_ptr->image)
3289         {
3290                 info2[i]  = report_magics_aux(p_ptr->image);
3291 #ifdef JP
3292 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë¡£";
3293 #else
3294                 info[i++] = "You are hallucinating";
3295 #endif
3296
3297         }
3298         if (p_ptr->blessed)
3299         {
3300                 info2[i]  = report_magics_aux(p_ptr->blessed);
3301 #ifdef JP
3302 info[i++] = "¤¢¤Ê¤¿¤Ï¸øÀµ¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
3303 #else
3304                 info[i++] = "You feel rightous";
3305 #endif
3306
3307         }
3308         if (p_ptr->hero)
3309         {
3310                 info2[i]  = report_magics_aux(p_ptr->hero);
3311 #ifdef JP
3312 info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À¡£";
3313 #else
3314                 info[i++] = "You feel heroic";
3315 #endif
3316
3317         }
3318         if (p_ptr->shero)
3319         {
3320                 info2[i]  = report_magics_aux(p_ptr->shero);
3321 #ifdef JP
3322 info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À¡£";
3323 #else
3324                 info[i++] = "You are in a battle rage";
3325 #endif
3326
3327         }
3328         if (p_ptr->protevil)
3329         {
3330                 info2[i]  = report_magics_aux(p_ptr->protevil);
3331 #ifdef JP
3332 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°­¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¡£";
3333 #else
3334                 info[i++] = "You are protected from evil";
3335 #endif
3336
3337         }
3338         if (p_ptr->shield)
3339         {
3340                 info2[i]  = report_magics_aux(p_ptr->shield);
3341 #ifdef JP
3342 info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë¡£";
3343 #else
3344                 info[i++] = "You are protected by a mystic shield";
3345 #endif
3346
3347         }
3348         if (p_ptr->invuln)
3349         {
3350                 info2[i]  = report_magics_aux(p_ptr->invuln);
3351 #ifdef JP
3352 info[i++] = "̵Ũ¤Ç¤¤¤é¤ì¤ë¡£";
3353 #else
3354                 info[i++] = "You are invulnerable";
3355 #endif
3356
3357         }
3358         if (p_ptr->wraith_form)
3359         {
3360                 info2[i]  = report_magics_aux(p_ptr->wraith_form);
3361 #ifdef JP
3362 info[i++] = "Í©Âβ½¤Ç¤­¤ë¡£";
3363 #else
3364                 info[i++] = "You are incorporeal";
3365 #endif
3366
3367         }
3368         if (p_ptr->special_attack & ATTACK_CONFUSE)
3369         {
3370                 info2[i]  = 7;
3371 #ifdef JP
3372 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
3373 #else
3374                 info[i++] = "Your hands are glowing dull red.";
3375 #endif
3376
3377         }
3378         if (p_ptr->word_recall)
3379         {
3380                 info2[i]  = report_magics_aux(p_ptr->word_recall);
3381 #ifdef JP
3382                 info[i++] = "¤³¤Î¸åµ¢´Ô¤Î¾Û¤òȯư¤¹¤ë¡£";
3383 #else
3384                 info[i++] = "You are waiting to be recalled";
3385 #endif
3386
3387         }
3388         if (p_ptr->alter_reality)
3389         {
3390                 info2[i]  = report_magics_aux(p_ptr->alter_reality);
3391 #ifdef JP
3392                 info[i++] = "¤³¤Î¸å¸½¼ÂÊÑÍƤ¬È¯Æ°¤¹¤ë¡£";
3393 #else
3394                 info[i++] = "You waiting to be altered";
3395 #endif
3396
3397         }
3398         if (p_ptr->oppose_acid)
3399         {
3400                 info2[i]  = report_magics_aux(p_ptr->oppose_acid);
3401 #ifdef JP
3402 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3403 #else
3404                 info[i++] = "You are resistant to acid";
3405 #endif
3406
3407         }
3408         if (p_ptr->oppose_elec)
3409         {
3410                 info2[i]  = report_magics_aux(p_ptr->oppose_elec);
3411 #ifdef JP
3412 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3413 #else
3414                 info[i++] = "You are resistant to lightning";
3415 #endif
3416
3417         }
3418         if (p_ptr->oppose_fire)
3419         {
3420                 info2[i]  = report_magics_aux(p_ptr->oppose_fire);
3421 #ifdef JP
3422 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3423 #else
3424                 info[i++] = "You are resistant to fire";
3425 #endif
3426
3427         }
3428         if (p_ptr->oppose_cold)
3429         {
3430                 info2[i]  = report_magics_aux(p_ptr->oppose_cold);
3431 #ifdef JP
3432 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3433 #else
3434                 info[i++] = "You are resistant to cold";
3435 #endif
3436
3437         }
3438         if (p_ptr->oppose_pois)
3439         {
3440                 info2[i]  = report_magics_aux(p_ptr->oppose_pois);
3441 #ifdef JP
3442 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ­¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3443 #else
3444                 info[i++] = "You are resistant to poison";
3445 #endif
3446
3447         }
3448
3449         /* Save the screen */
3450         screen_save();
3451
3452         /* Erase the screen */
3453         for (k = 1; k < 24; k++) prt("", k, 13);
3454
3455         /* Label the information */
3456 #ifdef JP
3457 prt("           ËâË¡        :", 1, 15);
3458 #else
3459         prt("     Your Current Magic:", 1, 15);
3460 #endif
3461
3462
3463         /* We will print on top of the map (column 13) */
3464         for (k = 2, j = 0; j < i; j++)
3465         {
3466                 /* Show the info */
3467 #ifdef JP
3468 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï%s%s", info[j],
3469 #else
3470                 sprintf(Dummy, "%s %s.", info[j],
3471 #endif
3472
3473                         report_magic_durations[info2[j]]);
3474                 prt(Dummy, k++, 15);
3475
3476                 /* Every 20 entries (lines 2 to 21), start over */
3477                 if ((k == 22) && (j + 1 < i))
3478                 {
3479 #ifdef JP
3480 prt("-- Â³¤¯ --", k, 15);
3481 #else
3482                         prt("-- more --", k, 15);
3483 #endif
3484
3485                         inkey();
3486                         for (; k > 2; k--) prt("", k, 15);
3487                 }
3488         }
3489
3490         /* Pause */
3491 #ifdef JP
3492 prt("[²¿¤«¥­¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 13);
3493 #else
3494         prt("[Press any key to continue]", k, 13);
3495 #endif
3496
3497         inkey();
3498
3499         /* Restore the screen */
3500         screen_load();
3501 }
3502
3503
3504 static bool detect_feat_flag(int range, int flag, bool known)
3505 {
3506         int       x, y;
3507         bool      detect = FALSE;
3508         cave_type *c_ptr;
3509
3510         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3511
3512         /* Scan the current panel */
3513         for (y = 1; y < cur_hgt - 1; y++)
3514         {
3515                 for (x = 1; x <= cur_wid - 1; x++)
3516                 {
3517                         int dist = distance(py, px, y, x);
3518                         if (dist > range) continue;
3519
3520                         /* Access the grid */
3521                         c_ptr = &cave[y][x];
3522
3523                         /* Hack -- Safe */
3524                         if (flag == FF_TRAP)
3525                         {
3526                                 /* Mark as detected */
3527                                 if (dist <= range && known)
3528                                 {
3529                                         if (dist <= range - 1) c_ptr->info |= (CAVE_IN_DETECT);
3530
3531                                         c_ptr->info &= ~(CAVE_UNSAFE);
3532
3533                                         /* Redraw */
3534                                         lite_spot(y, x);
3535                                 }
3536                         }
3537
3538                         /* Detect flags */
3539                         if (cave_have_flag_grid(c_ptr, flag))
3540                         {
3541                                 /* Detect secrets */
3542                                 disclose_grid(y, x);
3543
3544                                 /* Hack -- Memorize */
3545                                 c_ptr->info |= (CAVE_MARK);
3546
3547                                 /* Redraw */
3548                                 lite_spot(y, x);
3549
3550                                 /* Obvious */
3551                                 detect = TRUE;
3552                         }
3553                 }
3554         }
3555
3556         /* Result */
3557         return detect;
3558 }
3559
3560
3561 /*
3562  * Detect all traps on current panel
3563  */
3564 bool detect_traps(int range, bool known)
3565 {
3566         bool detect = detect_feat_flag(range, FF_TRAP, known);
3567
3568         if (known) p_ptr->dtrap = TRUE;
3569
3570         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
3571
3572         /* Describe */
3573         if (detect)
3574         {
3575 #ifdef JP
3576                 msg_print("¥È¥é¥Ã¥×¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3577 #else
3578                 msg_print("You sense the presence of traps!");
3579 #endif
3580         }
3581
3582         /* Result */
3583         return detect;
3584 }
3585
3586
3587 /*
3588  * Detect all doors on current panel
3589  */
3590 bool detect_doors(int range)
3591 {
3592         bool detect = detect_feat_flag(range, FF_DOOR, TRUE);
3593
3594         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
3595
3596         /* Describe */
3597         if (detect)
3598         {
3599 #ifdef JP
3600                 msg_print("¥É¥¢¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3601 #else
3602                 msg_print("You sense the presence of doors!");
3603 #endif
3604         }
3605
3606         /* Result */
3607         return detect;
3608 }
3609
3610
3611 /*
3612  * Detect all stairs on current panel
3613  */
3614 bool detect_stairs(int range)
3615 {
3616         bool detect = detect_feat_flag(range, FF_STAIRS, TRUE);
3617
3618         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 0) detect = FALSE;
3619
3620         /* Describe */
3621         if (detect)
3622         {
3623 #ifdef JP
3624                 msg_print("³¬Ãʤθºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3625 #else
3626                 msg_print("You sense the presence of stairs!");
3627 #endif
3628         }
3629
3630         /* Result */
3631         return detect;
3632 }
3633
3634
3635 /*
3636  * Detect any treasure on the current panel
3637  */
3638 bool detect_treasure(int range)
3639 {
3640         bool detect = detect_feat_flag(range, FF_HAS_GOLD, TRUE);
3641
3642         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
3643
3644         /* Describe */
3645         if (detect)
3646         {
3647 #ifdef JP
3648                 msg_print("Ë䢤µ¤ì¤¿ºâÊõ¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3649 #else
3650                 msg_print("You sense the presence of buried treasure!");
3651 #endif
3652         }
3653
3654         /* Result */
3655         return detect;
3656 }
3657
3658
3659 /*
3660  * Detect all "gold" objects on the current panel
3661  */
3662 bool detect_objects_gold(int range)
3663 {
3664         int i, y, x;
3665         int range2 = range;
3666
3667         bool detect = FALSE;
3668
3669         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
3670
3671         /* Scan objects */
3672         for (i = 1; i < o_max; i++)
3673         {
3674                 object_type *o_ptr = &o_list[i];
3675
3676                 /* Skip dead objects */
3677                 if (!o_ptr->k_idx) continue;
3678
3679                 /* Skip held objects */
3680                 if (o_ptr->held_m_idx) continue;
3681
3682                 /* Location */
3683                 y = o_ptr->iy;
3684                 x = o_ptr->ix;
3685
3686                 /* Only detect nearby objects */
3687                 if (distance(py, px, y, x) > range2) continue;
3688
3689                 /* Detect "gold" objects */
3690                 if (o_ptr->tval == TV_GOLD)
3691                 {
3692                         /* Hack -- memorize it */
3693                         o_ptr->marked |= OM_FOUND;
3694
3695                         /* Redraw */
3696                         lite_spot(y, x);
3697
3698                         /* Detect */
3699                         detect = TRUE;
3700                 }
3701         }
3702
3703         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
3704
3705         /* Describe */
3706         if (detect)
3707         {
3708 #ifdef JP
3709 msg_print("ºâÊõ¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3710 #else
3711                 msg_print("You sense the presence of treasure!");
3712 #endif
3713
3714         }
3715
3716         if (detect_monsters_string(range, "$"))
3717         {
3718                 detect = TRUE;
3719         }
3720
3721         /* Result */
3722         return (detect);
3723 }
3724
3725
3726 /*
3727  * Detect all "normal" objects on the current panel
3728  */
3729 bool detect_objects_normal(int range)
3730 {
3731         int i, y, x;
3732         int range2 = range;
3733
3734         bool detect = FALSE;
3735
3736         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
3737
3738         /* Scan objects */
3739         for (i = 1; i < o_max; i++)
3740         {
3741                 object_type *o_ptr = &o_list[i];
3742
3743                 /* Skip dead objects */
3744                 if (!o_ptr->k_idx) continue;
3745
3746                 /* Skip held objects */
3747                 if (o_ptr->held_m_idx) continue;
3748
3749                 /* Location */
3750                 y = o_ptr->iy;
3751                 x = o_ptr->ix;
3752
3753                 /* Only detect nearby objects */
3754                 if (distance(py, px, y, x) > range2) continue;
3755
3756                 /* Detect "real" objects */
3757                 if (o_ptr->tval != TV_GOLD)
3758                 {
3759                         /* Hack -- memorize it */
3760                         o_ptr->marked |= OM_FOUND;
3761
3762                         /* Redraw */
3763                         lite_spot(y, x);
3764
3765                         /* Detect */
3766                         detect = TRUE;
3767                 }
3768         }
3769
3770         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 6) detect = FALSE;
3771
3772         /* Describe */
3773         if (detect)
3774         {
3775 #ifdef JP
3776 msg_print("¥¢¥¤¥Æ¥à¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3777 #else
3778                 msg_print("You sense the presence of objects!");
3779 #endif
3780
3781         }
3782
3783         if (detect_monsters_string(range, "!=?|/`"))
3784         {
3785                 detect = TRUE;
3786         }
3787
3788         /* Result */
3789         return (detect);
3790 }
3791
3792
3793 /*
3794  * Detect all "magic" objects on the current panel.
3795  *
3796  * This will light up all spaces with "magic" items, including artifacts,
3797  * ego-items, potions, scrolls, books, rods, wands, staves, amulets, rings,
3798  * and "enchanted" items of the "good" variety.
3799  *
3800  * It can probably be argued that this function is now too powerful.
3801  */
3802 bool detect_objects_magic(int range)
3803 {
3804         int i, y, x, tv;
3805
3806         bool detect = FALSE;
3807
3808         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3809
3810         /* Scan all objects */
3811         for (i = 1; i < o_max; i++)
3812         {
3813                 object_type *o_ptr = &o_list[i];
3814
3815                 /* Skip dead objects */
3816                 if (!o_ptr->k_idx) continue;
3817
3818                 /* Skip held objects */
3819                 if (o_ptr->held_m_idx) continue;
3820
3821                 /* Location */
3822                 y = o_ptr->iy;
3823                 x = o_ptr->ix;
3824
3825                 /* Only detect nearby objects */
3826                 if (distance(py, px, y, x) > range) continue;
3827
3828                 /* Examine the tval */
3829                 tv = o_ptr->tval;
3830
3831                 /* Artifacts, misc magic items, or enchanted wearables */
3832                 if (object_is_artifact(o_ptr) ||
3833                         object_is_ego(o_ptr) ||
3834                     (tv == TV_WHISTLE) ||
3835                     (tv == TV_AMULET) ||
3836                         (tv == TV_RING) ||
3837                     (tv == TV_STAFF) ||
3838                         (tv == TV_WAND) ||
3839                         (tv == TV_ROD) ||
3840                     (tv == TV_SCROLL) ||
3841                         (tv == TV_POTION) ||
3842                     (tv == TV_LIFE_BOOK) ||
3843                         (tv == TV_SORCERY_BOOK) ||
3844                     (tv == TV_NATURE_BOOK) ||
3845                         (tv == TV_CHAOS_BOOK) ||
3846                     (tv == TV_DEATH_BOOK) ||
3847                     (tv == TV_TRUMP_BOOK) ||
3848                         (tv == TV_ARCANE_BOOK) ||
3849                         (tv == TV_CRAFT_BOOK) ||
3850                         (tv == TV_DAEMON_BOOK) ||
3851                         (tv == TV_CRUSADE_BOOK) ||
3852                         (tv == TV_MUSIC_BOOK) ||
3853                         (tv == TV_HISSATSU_BOOK) ||
3854                         (tv == TV_HEX_BOOK) ||
3855                     ((o_ptr->to_a > 0) || (o_ptr->to_h + o_ptr->to_d > 0)))
3856                 {
3857                         /* Memorize the item */
3858                         o_ptr->marked |= OM_FOUND;
3859
3860                         /* Redraw */
3861                         lite_spot(y, x);
3862
3863                         /* Detect */
3864                         detect = TRUE;
3865                 }
3866         }
3867
3868         /* Describe */
3869         if (detect)
3870         {
3871 #ifdef JP
3872 msg_print("ËâË¡¤Î¥¢¥¤¥Æ¥à¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3873 #else
3874                 msg_print("You sense the presence of magic objects!");
3875 #endif
3876
3877         }
3878
3879         /* Return result */
3880         return (detect);
3881 }
3882
3883
3884 /*
3885  * Detect all "normal" monsters on the current panel
3886  */
3887 bool detect_monsters_normal(int range)
3888 {
3889         int i, y, x;
3890
3891         bool flag = FALSE;
3892
3893         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3894
3895         /* Scan monsters */
3896         for (i = 1; i < m_max; i++)
3897         {
3898                 monster_type *m_ptr = &m_list[i];
3899                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3900
3901                 /* Skip dead monsters */
3902                 if (!m_ptr->r_idx) continue;
3903
3904                 /* Location */
3905                 y = m_ptr->fy;
3906                 x = m_ptr->fx;
3907
3908                 /* Only detect nearby monsters */
3909                 if (distance(py, px, y, x) > range) continue;
3910
3911                 /* Detect all non-invisible monsters */
3912                 if (!(r_ptr->flags2 & RF2_INVISIBLE) || p_ptr->see_inv)
3913                 {
3914                         /* Repair visibility later */
3915                         repair_monsters = TRUE;
3916
3917                         /* Hack -- Detect monster */
3918                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3919
3920                         /* Update the monster */
3921                         update_mon(i, FALSE);
3922
3923                         /* Detect */
3924                         flag = TRUE;
3925                 }
3926         }
3927
3928         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
3929
3930         /* Describe */
3931         if (flag)
3932         {
3933                 /* Describe result */
3934 #ifdef JP
3935 msg_print("¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3936 #else
3937                 msg_print("You sense the presence of monsters!");
3938 #endif
3939
3940         }
3941
3942         /* Result */
3943         return (flag);
3944 }
3945
3946
3947 /*
3948  * Detect all "invisible" monsters around the player
3949  */
3950 bool detect_monsters_invis(int range)
3951 {
3952         int i, y, x;
3953         bool flag = FALSE;
3954
3955         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3956
3957         /* Scan monsters */
3958         for (i = 1; i < m_max; i++)
3959         {
3960                 monster_type *m_ptr = &m_list[i];
3961                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3962
3963                 /* Skip dead monsters */
3964                 if (!m_ptr->r_idx) continue;
3965
3966                 /* Location */
3967                 y = m_ptr->fy;
3968                 x = m_ptr->fx;
3969
3970                 /* Only detect nearby monsters */
3971                 if (distance(py, px, y, x) > range) continue;
3972
3973                 /* Detect invisible monsters */
3974                 if (r_ptr->flags2 & RF2_INVISIBLE)
3975                 {
3976                         /* Update monster recall window */
3977                         if (p_ptr->monster_race_idx == m_ptr->r_idx)
3978                         {
3979                                 /* Window stuff */
3980                                 p_ptr->window |= (PW_MONSTER);
3981                         }
3982
3983                         /* Repair visibility later */
3984                         repair_monsters = TRUE;
3985
3986                         /* Hack -- Detect monster */
3987                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
3988
3989                         /* Update the monster */
3990                         update_mon(i, FALSE);
3991
3992                         /* Detect */
3993                         flag = TRUE;
3994                 }
3995         }
3996
3997         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
3998
3999         /* Describe */
4000         if (flag)
4001         {
4002                 /* Describe result */
4003 #ifdef JP
4004 msg_print("Æ©ÌÀ¤ÊÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
4005 #else
4006                 msg_print("You sense the presence of invisible creatures!");
4007 #endif
4008
4009         }
4010
4011         /* Result */
4012         return (flag);
4013 }
4014
4015
4016
4017 /*
4018  * Detect all "evil" monsters on current panel
4019  */
4020 bool detect_monsters_evil(int range)
4021 {
4022         int i, y, x;
4023         bool flag = FALSE;
4024
4025         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
4026
4027         /* Scan monsters */
4028         for (i = 1; i < m_max; i++)
4029         {
4030                 monster_type *m_ptr = &m_list[i];
4031                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4032
4033                 /* Skip dead monsters */
4034                 if (!m_ptr->r_idx) continue;
4035
4036                 /* Location */
4037                 y = m_ptr->fy;
4038                 x = m_ptr->fx;
4039
4040                 /* Only detect nearby monsters */
4041                 if (distance(py, px, y, x) > range) continue;
4042
4043                 /* Detect evil monsters */
4044                 if (r_ptr->flags3 & RF3_EVIL)
4045                 {
4046                         if (is_original_ap(m_ptr))
4047                         {
4048                                 /* Take note that they are evil */
4049                                 r_ptr->r_flags3 |= (RF3_EVIL);
4050
4051                                 /* Update monster recall window */
4052                                 if (p_ptr->monster_race_idx == m_ptr->r_idx)
4053                                 {
4054                                         /* Window stuff */
4055                                         p_ptr->window |= (PW_MONSTER);
4056                                 }
4057                         }
4058
4059                         /* Repair visibility later */
4060                         repair_monsters = TRUE;
4061
4062                         /* Hack -- Detect monster */
4063                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
4064
4065                         /* Update the monster */
4066                         update_mon(i, FALSE);
4067
4068                         /* Detect */
4069                         flag = TRUE;
4070                 }
4071         }
4072
4073         /* Describe */
4074         if (flag)
4075         {
4076                 /* Describe result */
4077 #ifdef JP
4078 msg_print("¼Ù°­¤Ê¤ëÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
4079 #else
4080                 msg_print("You sense the presence of evil creatures!");
4081 #endif
4082
4083         }
4084
4085         /* Result */
4086         return (flag);
4087 }
4088
4089
4090
4091
4092 /*
4093  * Detect all "nonliving", "undead" or "demonic" monsters on current panel
4094  */
4095 bool detect_monsters_nonliving(int range)
4096 {
4097         int     i, y, x;
4098         bool    flag = FALSE;
4099
4100         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
4101
4102         /* Scan monsters */
4103         for (i = 1; i < m_max; i++)
4104         {
4105                 monster_type *m_ptr = &m_list[i];
4106                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4107
4108                 /* Skip dead monsters */
4109                 if (!m_ptr->r_idx) continue;
4110
4111                 /* Location */
4112                 y = m_ptr->fy;
4113                 x = m_ptr->fx;
4114
4115                 /* Only detect nearby monsters */
4116                 if (distance(py, px, y, x) > range) continue;
4117
4118                 /* Detect non-living monsters */
4119                 if (!monster_living(r_ptr))
4120                 {
4121                         /* Update monster recall window */
4122                         if (p_ptr->monster_race_idx == m_ptr->r_idx)
4123                         {
4124                                 /* Window stuff */
4125                                 p_ptr->window |= (PW_MONSTER);
4126                         }
4127
4128                         /* Repair visibility later */
4129                         repair_monsters = TRUE;
4130
4131                         /* Hack -- Detect monster */
4132                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
4133
4134                         /* Update the monster */
4135                         update_mon(i, FALSE);
4136
4137                         /* Detect */
4138                         flag = TRUE;
4139                 }
4140         }
4141
4142         /* Describe */
4143         if (flag)
4144         {
4145                 /* Describe result */
4146 #ifdef JP
4147 msg_print("¼«Á³¤Ç¤Ê¤¤¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤¿¡ª");
4148 #else
4149                 msg_print("You sense the presence of unnatural beings!");
4150 #endif
4151
4152         }
4153
4154         /* Result */
4155         return (flag);
4156 }
4157
4158
4159 /*
4160  * Detect all monsters it has mind on current panel
4161  */
4162 bool detect_monsters_mind(int range)
4163 {
4164         int     i, y, x;
4165         bool    flag = FALSE;
4166
4167         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
4168
4169         /* Scan monsters */
4170         for (i = 1; i < m_max; i++)
4171         {
4172                 monster_type *m_ptr = &m_list[i];
4173                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4174
4175                 /* Skip dead monsters */
4176                 if (!m_ptr->r_idx) continue;
4177
4178                 /* Location */
4179                 y = m_ptr->fy;
4180                 x = m_ptr->fx;
4181
4182                 /* Only detect nearby monsters */
4183                 if (distance(py, px, y, x) > range) continue;
4184
4185                 /* Detect non-living monsters */
4186                 if (!(r_ptr->flags2 & RF2_EMPTY_MIND))
4187                 {
4188                         /* Update monster recall window */
4189                         if (p_ptr->monster_race_idx == m_ptr->r_idx)
4190                         {
4191                                 /* Window stuff */
4192                                 p_ptr->window |= (PW_MONSTER);
4193                         }
4194
4195                         /* Repair visibility later */
4196                         repair_monsters = TRUE;
4197
4198                         /* Hack -- Detect monster */
4199                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
4200
4201                         /* Update the monster */
4202                         update_mon(i, FALSE);
4203
4204                         /* Detect */
4205                         flag = TRUE;
4206                 }
4207         }
4208
4209         /* Describe */
4210         if (flag)
4211         {
4212                 /* Describe result */
4213 #ifdef JP
4214 msg_print("»¦µ¤¤ò´¶¤¸¤È¤Ã¤¿¡ª");
4215 #else
4216                 msg_print("You sense the presence of someone's mind!");
4217 #endif
4218
4219         }
4220
4221         /* Result */
4222         return (flag);
4223 }
4224
4225
4226 /*
4227  * Detect all (string) monsters on current panel
4228  */
4229 bool detect_monsters_string(int range, cptr Match)
4230 {
4231         int i, y, x;
4232         bool flag = FALSE;
4233
4234         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
4235
4236         /* Scan monsters */
4237         for (i = 1; i < m_max; i++)
4238         {
4239                 monster_type *m_ptr = &m_list[i];
4240                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4241
4242                 /* Skip dead monsters */
4243                 if (!m_ptr->r_idx) continue;
4244
4245                 /* Location */
4246                 y = m_ptr->fy;
4247                 x = m_ptr->fx;
4248
4249                 /* Only detect nearby monsters */
4250                 if (distance(py, px, y, x) > range) continue;
4251
4252                 /* Detect monsters with the same symbol */
4253                 if (my_strchr(Match, r_ptr->d_char))
4254                 {
4255                         /* Update monster recall window */
4256                         if (p_ptr->monster_race_idx == m_ptr->r_idx)
4257                         {
4258                                 /* Window stuff */
4259                                 p_ptr->window |= (PW_MONSTER);
4260                         }
4261
4262                         /* Repair visibility later */
4263                         repair_monsters = TRUE;
4264
4265                         /* Hack -- Detect monster */
4266                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
4267
4268                         /* Update the monster */
4269                         update_mon(i, FALSE);
4270
4271                         /* Detect */
4272                         flag = TRUE;
4273                 }
4274         }
4275
4276         if (music_singing(MUSIC_DETECT) && p_ptr->magic_num1[2] > 3) flag = FALSE;
4277
4278         /* Describe */
4279         if (flag)
4280         {
4281                 /* Describe result */
4282 #ifdef JP
4283 msg_print("¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
4284 #else
4285                 msg_print("You sense the presence of monsters!");
4286 #endif
4287
4288         }
4289
4290         /* Result */
4291         return (flag);
4292 }
4293
4294
4295 /*
4296  * A "generic" detect monsters routine, tagged to flags3
4297  */
4298 bool detect_monsters_xxx(int range, u32b match_flag)
4299 {
4300         int  i, y, x;
4301         bool flag = FALSE;
4302 #ifdef JP
4303 cptr desc_monsters = "ÊѤʥâ¥ó¥¹¥¿¡¼";
4304 #else
4305         cptr desc_monsters = "weird monsters";
4306 #endif
4307
4308         if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
4309
4310         /* Scan monsters */
4311         for (i = 1; i < m_max; i++)
4312         {
4313                 monster_type *m_ptr = &m_list[i];
4314                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4315
4316                 /* Skip dead monsters */
4317                 if (!m_ptr->r_idx) continue;
4318
4319                 /* Location */
4320                 y = m_ptr->fy;
4321                 x = m_ptr->fx;
4322
4323                 /* Only detect nearby monsters */
4324                 if (distance(py, px, y, x) > range) continue;
4325
4326                 /* Detect evil monsters */
4327                 if (r_ptr->flags3 & (match_flag))
4328                 {
4329                         if (is_original_ap(m_ptr))
4330                         {
4331                                 /* Take note that they are something */
4332                                 r_ptr->r_flags3 |= (match_flag);
4333
4334                                 /* Update monster recall window */
4335                                 if (p_ptr->monster_race_idx == m_ptr->r_idx)
4336                                 {
4337                                         /* Window stuff */
4338                                         p_ptr->window |= (PW_MONSTER);
4339                                 }
4340                         }
4341
4342                         /* Repair visibility later */
4343                         repair_monsters = TRUE;
4344
4345                         /* Hack -- Detect monster */
4346                         m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
4347
4348                         /* Update the monster */
4349                         update_mon(i, FALSE);
4350
4351                         /* Detect */
4352                         flag = TRUE;
4353                 }
4354         }
4355
4356         /* Describe */
4357         if (flag)
4358         {
4359                 switch (match_flag)
4360                 {
4361                         case RF3_DEMON:
4362 #ifdef JP
4363 desc_monsters = "¥Ç¡¼¥â¥ó";
4364 #else
4365                                 desc_monsters = "demons";
4366 #endif
4367
4368                                 break;
4369                         case RF3_UNDEAD:
4370 #ifdef JP
4371 desc_monsters = "¥¢¥ó¥Ç¥Ã¥É";
4372 #else
4373                                 desc_monsters = "the undead";
4374 #endif
4375
4376                                 break;
4377                 }
4378
4379                 /* Describe result */
4380 #ifdef JP
4381 msg_format("%s¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª", desc_monsters);
4382 #else
4383                 msg_format("You sense the presence of %s!", desc_monsters);
4384 #endif
4385
4386                 msg_print(NULL);
4387         }
4388
4389         /* Result */
4390         return (flag);
4391 }
4392
4393
4394 /*
4395  * Detect everything
4396  */
4397 bool detect_all(int range)
4398 {
4399         bool detect = FALSE;
4400
4401         /* Detect everything */
4402         if (detect_traps(range, TRUE)) detect = TRUE;
4403         if (detect_doors(range)) detect = TRUE;
4404         if (detect_stairs(range)) detect = TRUE;
4405
4406         /* There are too many hidden treasure.  So... */
4407         /* if (detect_treasure(range)) detect = TRUE; */
4408
4409         if (detect_objects_gold(range)) detect = TRUE;
4410         if (detect_objects_normal(range)) detect = TRUE;
4411         if (detect_monsters_invis(range)) detect = TRUE;
4412         if (detect_monsters_normal(range)) detect = TRUE;
4413
4414         /* Result */
4415         return (detect);
4416 }
4417
4418
4419 /*
4420  * Apply a "project()" directly to all viewable monsters
4421  *
4422  * Note that affected monsters are NOT auto-tracked by this usage.
4423  *
4424  * To avoid misbehavior when monster deaths have side-effects,
4425  * this is done in two passes. -- JDL
4426  */
4427 bool project_hack(int typ, int dam)
4428 {
4429         int     i, x, y;
4430         int     flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE;
4431         bool    obvious = FALSE;
4432
4433
4434         /* Mark all (nearby) monsters */
4435         for (i = 1; i < m_max; i++)
4436         {
4437                 monster_type *m_ptr = &m_list[i];
4438
4439                 /* Paranoia -- Skip dead monsters */
4440                 if (!m_ptr->r_idx) continue;
4441
4442                 /* Location */
4443                 y = m_ptr->fy;
4444                 x = m_ptr->fx;
4445
4446                 /* Require line of sight */
4447                 if (!player_has_los_bold(y, x) || !projectable(py, px, y, x)) continue;
4448
4449                 /* Mark the monster */
4450                 m_ptr->mflag |= (MFLAG_TEMP);
4451         }
4452
4453         /* Affect all marked monsters */
4454         for (i = 1; i < m_max; i++)
4455         {
4456                 monster_type *m_ptr = &m_list[i];
4457
4458                 /* Skip unmarked monsters */
4459                 if (!(m_ptr->mflag & (MFLAG_TEMP))) continue;
4460
4461                 /* Remove mark */
4462                 m_ptr->mflag &= ~(MFLAG_TEMP);
4463
4464                 /* Location */
4465                 y = m_ptr->fy;
4466                 x = m_ptr->fx;
4467
4468                 /* Jump directly to the target monster */
4469                 if (project(0, 0, y, x, dam, typ, flg, -1)) obvious = TRUE;
4470         }
4471
4472         /* Result */
4473         return (obvious);
4474 }
4475
4476
4477 /*
4478  * Speed monsters
4479  */
4480 bool speed_monsters(void)
4481 {
4482         return (project_hack(GF_OLD_SPEED, p_ptr->lev));
4483 }
4484
4485 /*
4486  * Slow monsters
4487  */
4488 bool slow_monsters(void)
4489 {
4490         return (project_hack(GF_OLD_SLOW, p_ptr->lev));
4491 }
4492
4493 /*
4494  * Sleep monsters
4495  */
4496 bool sleep_monsters(void)
4497 {
4498         return (project_hack(GF_OLD_SLEEP, p_ptr->lev));
4499 }
4500
4501
4502 /*
4503  * Banish evil monsters
4504  */
4505 bool banish_evil(int dist)
4506 {
4507         return (project_hack(GF_AWAY_EVIL, dist));
4508 }
4509
4510
4511 /*
4512  * Turn undead
4513  */
4514 bool turn_undead(void)
4515 {
4516         bool tester = (project_hack(GF_TURN_UNDEAD, p_ptr->lev));
4517         if (tester)
4518                 chg_virtue(V_UNLIFE, -1);
4519         return tester;
4520 }
4521
4522
4523 /*
4524  * Dispel undead monsters
4525  */
4526 bool dispel_undead(int dam)
4527 {
4528         bool tester = (project_hack(GF_DISP_UNDEAD, dam));
4529         if (tester)
4530                 chg_virtue(V_UNLIFE, -2);
4531         return tester;
4532 }
4533
4534 /*
4535  * Dispel evil monsters
4536  */
4537 bool dispel_evil(int dam)
4538 {
4539         return (project_hack(GF_DISP_EVIL, dam));
4540 }
4541
4542 /*
4543  * Dispel good monsters
4544  */
4545 bool dispel_good(int dam)
4546 {
4547         return (project_hack(GF_DISP_GOOD, dam));
4548 }
4549
4550 /*
4551  * Dispel all monsters
4552  */
4553 bool dispel_monsters(int dam)
4554 {
4555         return (project_hack(GF_DISP_ALL, dam));
4556 }
4557
4558 /*
4559  * Dispel 'living' monsters
4560  */
4561 bool dispel_living(int dam)
4562 {
4563         return (project_hack(GF_DISP_LIVING, dam));
4564 }
4565
4566 /*
4567  * Dispel demons
4568  */
4569 bool dispel_demons(int dam)
4570 {
4571         return (project_hack(GF_DISP_DEMON, dam));
4572 }
4573
4574
4575 /*
4576  * Crusade
4577  */
4578 bool crusade(void)
4579 {
4580         return (project_hack(GF_CRUSADE, p_ptr->lev*4));
4581 }
4582
4583
4584 /*
4585  * Wake up all monsters, and speed up "los" monsters.
4586  */
4587 void aggravate_monsters(int who)
4588 {
4589         int     i;
4590         bool    sleep = FALSE;
4591         bool    speed = FALSE;
4592
4593
4594         /* Aggravate everyone nearby */
4595         for (i = 1; i < m_max; i++)
4596         {
4597                 monster_type    *m_ptr = &m_list[i];
4598 /*              monster_race    *r_ptr = &r_info[m_ptr->r_idx]; */
4599
4600                 /* Paranoia -- Skip dead monsters */
4601                 if (!m_ptr->r_idx) continue;
4602
4603                 /* Skip aggravating monster (or player) */
4604                 if (i == who) continue;
4605
4606                 /* Wake up nearby sleeping monsters */
4607                 if (m_ptr->cdis < MAX_SIGHT * 2)
4608                 {
4609                         /* Wake up */
4610                         if (MON_CSLEEP(m_ptr))
4611                         {
4612                                 (void)set_monster_csleep(i, 0);
4613                                 sleep = TRUE;
4614                         }
4615                         if (!is_pet(m_ptr)) m_ptr->mflag2 |= MFLAG2_NOPET;
4616                 }
4617
4618                 /* Speed up monsters in line of sight */
4619                 if (player_has_los_bold(m_ptr->fy, m_ptr->fx))
4620                 {
4621                         if (!is_pet(m_ptr))
4622                         {
4623                                 (void)set_monster_fast(i, MON_FAST(m_ptr) + 100);
4624                                 speed = TRUE;
4625                         }
4626                 }
4627         }
4628
4629         /* Messages */
4630 #ifdef JP
4631         if (speed) msg_print("ÉÕ¶á¤Ç²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤Ê´¶¤¸¤ò¼õ¤±¤¿¡ª");
4632         else if (sleep) msg_print("²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤ÊÁû¡¹¤·¤¤²»¤¬±ó¤¯¤Ëʹ¤³¤¨¤¿¡ª");
4633 #else
4634         if (speed) msg_print("You feel a sudden stirring nearby!");
4635         else if (sleep) msg_print("You hear a sudden stirring in the distance!");
4636 #endif
4637         if (p_ptr->riding) p_ptr->update |= PU_BONUS;
4638 }
4639
4640
4641 /*
4642  * Delete a non-unique/non-quest monster
4643  */
4644 bool genocide_aux(int m_idx, int power, bool player_cast, int dam_side, cptr spell_name)
4645 {
4646         int          msec = delay_factor * delay_factor * delay_factor;
4647         monster_type *m_ptr = &m_list[m_idx];
4648         monster_race *r_ptr = &r_info[m_ptr->r_idx];
4649         bool         resist = FALSE;
4650
4651         if (is_pet(m_ptr) && !player_cast) return FALSE;
4652
4653         /* Hack -- Skip Unique Monsters or Quest Monsters */
4654         if (r_ptr->flags1 & (RF1_UNIQUE | RF1_QUESTOR)) resist = TRUE;
4655
4656         else if (r_ptr->flags7 & RF7_UNIQUE2) resist = TRUE;
4657
4658         else if (m_idx == p_ptr->riding) resist = TRUE;
4659
4660         else if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle) resist = TRUE;
4661
4662         else if (player_cast && (r_ptr->level > randint0(power))) resist = TRUE;
4663
4664         else if (player_cast && (m_ptr->mflag2 & MFLAG2_NOGENO)) resist = TRUE;
4665
4666         /* Delete the monster */
4667         else
4668         {
4669                 if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
4670                 {
4671                         char m_name[80];
4672
4673                         monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
4674                         do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_GENOCIDE, m_name);
4675                 }
4676
4677                 delete_monster_idx(m_idx);
4678         }
4679
4680         if (resist && player_cast)
4681         {
4682                 bool see_m = is_seen(m_ptr);
4683                 char m_name[80];
4684
4685                 monster_desc(m_name, m_ptr, 0);
4686                 if (see_m)
4687                 {
4688 #ifdef JP
4689                         msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
4690 #else
4691                         msg_format("%^s is unaffected.", m_name);
4692 #endif
4693                 }
4694                 if (MON_CSLEEP(m_ptr))
4695                 {
4696                         (void)set_monster_csleep(m_idx, 0);
4697                         if (m_ptr->ml)
4698                         {
4699 #ifdef JP
4700                                 msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
4701 #else
4702                                 msg_format("%^s wakes up.", m_name);
4703 #endif
4704                         }
4705                 }
4706                 if (is_friendly(m_ptr) && !is_pet(m_ptr))
4707                 {
4708                         if (see_m)
4709                         {
4710 #ifdef JP
4711                                 msg_format("%s¤ÏÅܤä¿¡ª", m_name);
4712 #else
4713                                 msg_format("%^s gets angry!", m_name);
4714 #endif
4715                         }
4716                         set_hostile(m_ptr);
4717                 }
4718                 if (one_in_(13)) m_ptr->mflag2 |= MFLAG2_NOGENO;
4719         }
4720
4721         if (player_cast)
4722         {
4723                 /* Take damage */
4724 #ifdef JP
4725                 take_hit(DAMAGE_GENO, randint1(dam_side), format("%^s¤Î¼öʸ¤ò¾§¤¨¤¿ÈèÏ«", spell_name), -1);
4726 #else
4727                 take_hit(DAMAGE_GENO, randint1(dam_side), format("the strain of casting %^s", spell_name), -1);
4728 #endif
4729         }
4730
4731         /* Visual feedback */
4732         move_cursor_relative(py, px);
4733
4734         /* Redraw */
4735         p_ptr->redraw |= (PR_HP);
4736
4737         /* Window stuff */
4738         p_ptr->window |= (PW_PLAYER);
4739
4740         /* Handle */
4741         handle_stuff();
4742
4743         /* Fresh */
4744         Term_fresh();
4745
4746         /* Delay */
4747         Term_xtra(TERM_XTRA_DELAY, msec);
4748
4749         return !resist;
4750 }
4751
4752
4753 /*
4754  * Delete all non-unique/non-quest monsters of a given "type" from the level
4755  */
4756 bool symbol_genocide(int power, bool player_cast)
4757 {
4758         int  i;
4759         char typ;
4760         bool result = FALSE;
4761
4762         /* Prevent genocide in quest levels */
4763         if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
4764         {
4765                 return (FALSE);
4766         }
4767
4768         /* Mega-Hack -- Get a monster symbol */
4769 #ifdef JP
4770         while (!get_com("¤É¤Î¼ïÎà(ʸ»ú)¤Î¥â¥ó¥¹¥¿¡¼¤òËõ»¦¤·¤Þ¤¹¤«: ", &typ, FALSE)) ;
4771 #else
4772         while (!get_com("Choose a monster race (by symbol) to genocide: ", &typ, FALSE)) ;
4773 #endif
4774
4775         /* Delete the monsters of that "type" */
4776         for (i = 1; i < m_max; i++)
4777         {
4778                 monster_type *m_ptr = &m_list[i];
4779                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4780
4781                 /* Paranoia -- Skip dead monsters */
4782                 if (!m_ptr->r_idx) continue;
4783
4784                 /* Skip "wrong" monsters */
4785                 if (r_ptr->d_char != typ) continue;
4786
4787                 /* Take note */
4788 #ifdef JP
4789                 result |= genocide_aux(i, power, player_cast, 4, "Ëõ»¦");
4790 #else
4791                 result |= genocide_aux(i, power, player_cast, 4, "Genocide");
4792 #endif
4793         }
4794
4795         if (result)
4796         {
4797                 chg_virtue(V_VITALITY, -2);
4798                 chg_virtue(V_CHANCE, -1);
4799         }
4800
4801         return result;
4802 }
4803
4804
4805 /*
4806  * Delete all nearby (non-unique) monsters
4807  */
4808 bool mass_genocide(int power, bool player_cast)
4809 {
4810         int  i;
4811         bool result = FALSE;
4812
4813         /* Prevent mass genocide in quest levels */
4814         if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
4815         {
4816                 return (FALSE);
4817         }
4818
4819         /* Delete the (nearby) monsters */
4820         for (i = 1; i < m_max; i++)
4821         {
4822                 monster_type *m_ptr = &m_list[i];
4823
4824                 /* Paranoia -- Skip dead monsters */
4825                 if (!m_ptr->r_idx) continue;
4826
4827                 /* Skip distant monsters */
4828                 if (m_ptr->cdis > MAX_SIGHT) continue;
4829
4830                 /* Note effect */
4831 #ifdef JP
4832                 result |= genocide_aux(i, power, player_cast, 3, "¼þÊÕËõ»¦");
4833 #else
4834                 result |= genocide_aux(i, power, player_cast, 3, "Mass Genocide");
4835 #endif
4836         }
4837
4838         if (result)
4839         {
4840                 chg_virtue(V_VITALITY, -2);
4841                 chg_virtue(V_CHANCE, -1);
4842         }
4843
4844         return result;
4845 }
4846
4847
4848
4849 /*
4850  * Delete all nearby (non-unique) undead
4851  */
4852 bool mass_genocide_undead(int power, bool player_cast)
4853 {
4854         int  i;
4855         bool result = FALSE;
4856
4857         /* Prevent mass genocide in quest levels */
4858         if ((p_ptr->inside_quest && !random_quest_number(dun_level)) || p_ptr->inside_arena || p_ptr->inside_battle)
4859         {
4860                 return (FALSE);
4861         }
4862
4863         /* Delete the (nearby) monsters */
4864         for (i = 1; i < m_max; i++)
4865         {
4866                 monster_type *m_ptr = &m_list[i];
4867                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4868
4869                 /* Paranoia -- Skip dead monsters */
4870                 if (!m_ptr->r_idx) continue;
4871
4872                 if (!(r_ptr->flags3 & RF3_UNDEAD)) continue;
4873
4874                 /* Skip distant monsters */
4875                 if (m_ptr->cdis > MAX_SIGHT) continue;
4876
4877                 /* Note effect */
4878 #ifdef JP
4879                 result |= genocide_aux(i, power, player_cast, 3, "¥¢¥ó¥Ç¥Ã¥É¾ÃÌÇ");
4880 #else
4881                 result |= genocide_aux(i, power, player_cast, 3, "Annihilate Undead");
4882 #endif
4883         }
4884
4885         if (result)
4886         {
4887                 chg_virtue(V_UNLIFE, -2);
4888                 chg_virtue(V_CHANCE, -1);
4889         }
4890
4891         return result;
4892 }
4893
4894
4895
4896 /*
4897  * Probe nearby monsters
4898  */
4899 bool probing(void)
4900 {
4901         int     i, speed;
4902         int cu, cv;
4903         bool    probe = FALSE;
4904         char buf[256];
4905         cptr align;
4906
4907         cu = Term->scr->cu;
4908         cv = Term->scr->cv;
4909         Term->scr->cu = 0;
4910         Term->scr->cv = 1;
4911
4912         /* Probe all (nearby) monsters */
4913         for (i = 1; i < m_max; i++)
4914         {
4915                 monster_type *m_ptr = &m_list[i];
4916                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4917
4918                 /* Paranoia -- Skip dead monsters */
4919                 if (!m_ptr->r_idx) continue;
4920
4921                 /* Require line of sight */
4922                 if (!player_has_los_bold(m_ptr->fy, m_ptr->fx)) continue;
4923
4924                 /* Probe visible monsters */
4925                 if (m_ptr->ml)
4926                 {
4927                         char m_name[80];
4928
4929                         /* Start the message */
4930                         if (!probe)
4931                         {
4932 #ifdef JP
4933                                 msg_print("Ä´ººÃæ...");
4934 #else
4935                                 msg_print("Probing...");
4936 #endif
4937                         }
4938
4939                         msg_print(NULL);
4940
4941                         if (!is_original_ap(m_ptr))
4942                         {
4943                                 if (m_ptr->mflag2 & MFLAG2_KAGE)
4944                                         m_ptr->mflag2 &= ~(MFLAG2_KAGE);
4945
4946                                 m_ptr->ap_r_idx = m_ptr->r_idx;
4947                                 lite_spot(m_ptr->fy, m_ptr->fx);
4948                         }
4949                         /* Get "the monster" or "something" */
4950                         monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_INDEF_HIDDEN);
4951
4952                         speed = m_ptr->mspeed - 110;
4953                         if (MON_FAST(m_ptr)) speed += 10;
4954                         if (MON_SLOW(m_ptr)) speed -= 10;
4955
4956                         /* Get the monster's alignment */
4957 #ifdef JP
4958                         if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "Á±°­";
4959                         else if (r_ptr->flags3 & RF3_EVIL) align = "¼Ù°­";
4960                         else if (r_ptr->flags3 & RF3_GOOD) align = "Á±ÎÉ";
4961                         else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "ÃæΩ(Á±°­)";
4962                         else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "ÃæΩ(¼Ù°­)";
4963                         else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "ÃæΩ(Á±ÎÉ)";
4964                         else align = "ÃæΩ";
4965 #else
4966                         if ((r_ptr->flags3 & (RF3_EVIL | RF3_GOOD)) == (RF3_EVIL | RF3_GOOD)) align = "good&evil";
4967                         else if (r_ptr->flags3 & RF3_EVIL) align = "evil";
4968                         else if (r_ptr->flags3 & RF3_GOOD) align = "good";
4969                         else if ((m_ptr->sub_align & (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) == (SUB_ALIGN_EVIL | SUB_ALIGN_GOOD)) align = "neutral(good&evil)";
4970                         else if (m_ptr->sub_align & SUB_ALIGN_EVIL) align = "neutral(evil)";
4971                         else if (m_ptr->sub_align & SUB_ALIGN_GOOD) align = "neutral(good)";
4972                         else align = "neutral";
4973 #endif
4974
4975                         /* Describe the monster */
4976 #ifdef JP
4977 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);
4978 #else
4979 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);
4980 #endif
4981                         if (r_ptr->next_r_idx)
4982                         {
4983                                 strcat(buf, format("%d/%d ", m_ptr->exp, r_ptr->next_exp));
4984                         }
4985                         else
4986                         {
4987                                 strcat(buf, "xxx ");
4988                         }
4989
4990 #ifdef JP
4991                         if (MON_CSLEEP(m_ptr)) strcat(buf,"¿ç̲ ");
4992                         if (MON_STUNNED(m_ptr)) strcat(buf,"ۯ۰ ");
4993                         if (MON_MONFEAR(m_ptr)) strcat(buf,"¶²ÉÝ ");
4994                         if (MON_CONFUSED(m_ptr)) strcat(buf,"º®Íð ");
4995                         if (MON_INVULNER(m_ptr)) strcat(buf,"̵Ũ ");
4996 #else
4997                         if (MON_CSLEEP(m_ptr)) strcat(buf,"sleeping ");
4998                         if (MON_STUNNED(m_ptr)) strcat(buf,"stunned ");
4999                         if (MON_MONFEAR(m_ptr)) strcat(buf,"scared ");
5000                         if (MON_CONFUSED(m_ptr)) strcat(buf,"confused ");
5001                         if (MON_INVULNER(m_ptr)) strcat(buf,"invulnerable ");
5002 #endif
5003                         buf[strlen(buf)-1] = '\0';
5004                         prt(buf,0,0);
5005
5006                         /* HACK : Add the line to message buffer */
5007                         message_add(buf);
5008                         p_ptr->window |= (PW_MESSAGE);
5009                         window_stuff();
5010
5011                         if (m_ptr->ml) move_cursor_relative(m_ptr->fy, m_ptr->fx);
5012                         inkey();
5013
5014                         Term_erase(0, 0, 255);
5015
5016                         /* Learn everything about this monster */
5017                         if (lore_do_probe(m_ptr->r_idx))
5018                         {
5019                                 char buf[80];
5020
5021                                 /* Get base name of monster */
5022                                 strcpy(buf, (r_name + r_ptr->name));
5023
5024 #ifdef JP
5025                                 /* Note that we learnt some new flags  -Mogami- */
5026                                 msg_format("%s¤Ë¤Ä¤¤¤Æ¤µ¤é¤Ë¾Ü¤·¤¯¤Ê¤Ã¤¿µ¤¤¬¤¹¤ë¡£", buf);
5027 #else
5028                                 /* Pluralize it */
5029                                 plural_aux(buf);
5030
5031                                 /* Note that we learnt some new flags  -Mogami- */
5032                                 msg_format("You now know more about %s.", buf);
5033 #endif
5034                                 /* Clear -more- prompt */
5035                                 msg_print(NULL);
5036                         }
5037
5038                         /* Probe worked */
5039                         probe = TRUE;
5040                 }
5041         }
5042
5043         Term->scr->cu = cu;
5044         Term->scr->cv = cv;
5045         Term_fresh();
5046
5047         /* Done */
5048         if (probe)
5049         {
5050                 chg_virtue(V_KNOWLEDGE, 1);
5051
5052 #ifdef JP
5053 msg_print("¤³¤ì¤ÇÁ´Éô¤Ç¤¹¡£");
5054 #else
5055                 msg_print("That's all.");
5056 #endif
5057
5058         }
5059
5060         /* Result */
5061         return (probe);
5062 }
5063
5064
5065
5066 /*
5067  * The spell of destruction
5068  *
5069  * This spell "deletes" monsters (instead of "killing" them).
5070  *
5071  * Later we may use one function for both "destruction" and
5072  * "earthquake" by using the "full" to select "destruction".
5073  */
5074 bool destroy_area(int y1, int x1, int r, bool in_generate)
5075 {
5076         int       y, x, k, t;
5077         cave_type *c_ptr;
5078         bool      flag = FALSE;
5079
5080         /* Prevent destruction of quest levels and town */
5081         if ((p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) || !dun_level)
5082         {
5083                 return (FALSE);
5084         }
5085
5086         /* Lose monster light */
5087         if (!in_generate) clear_mon_lite();
5088
5089         /* Big area of affect */
5090         for (y = (y1 - r); y <= (y1 + r); y++)
5091         {
5092                 for (x = (x1 - r); x <= (x1 + r); x++)
5093                 {
5094                         /* Skip illegal grids */
5095                         if (!in_bounds(y, x)) continue;
5096
5097                         /* Extract the distance */
5098                         k = distance(y1, x1, y, x);
5099
5100                         /* Stay in the circle of death */
5101                         if (k > r) continue;
5102
5103                         /* Access the grid */
5104                         c_ptr = &cave[y][x];
5105
5106                         /* Lose room and vault */
5107                         c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY);
5108
5109                         /* Lose light and knowledge */
5110                         c_ptr->info &= ~(CAVE_MARK | CAVE_GLOW);
5111
5112                         if (!in_generate) /* Normal */
5113                         {
5114                                 /* Lose unsafety */
5115                                 c_ptr->info &= ~(CAVE_UNSAFE);
5116
5117                                 /* Hack -- Notice player affect */
5118                                 if (player_bold(y, x))
5119                                 {
5120                                         /* Hurt the player later */
5121                                         flag = TRUE;
5122
5123                                         /* Do not hurt this grid */
5124                                         continue;
5125                                 }
5126                         }
5127
5128                         /* Hack -- Skip the epicenter */
5129                         if ((y == y1) && (x == x1)) continue;
5130
5131                         if (c_ptr->m_idx)
5132                         {
5133                                 monster_type *m_ptr = &m_list[c_ptr->m_idx];
5134                                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
5135
5136                                 if (in_generate) /* In generation */
5137                                 {
5138                                         /* Delete the monster (if any) */
5139                                         delete_monster(y, x);
5140                                 }
5141                                 else if (r_ptr->flags1 & RF1_QUESTOR)
5142                                 {
5143                                         /* Heal the monster */
5144                                         m_ptr->hp = m_ptr->maxhp;
5145
5146                                         /* Try to teleport away quest monsters */
5147                                         if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TELEPORT_DEC_VALOUR)) continue;
5148                                 }
5149                                 else
5150                                 {
5151                                         if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
5152                                         {
5153                                                 char m_name[80];
5154
5155                                                 monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
5156                                                 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_DESTROY, m_name);
5157                                         }
5158
5159                                         /* Delete the monster (if any) */
5160                                         delete_monster(y, x);
5161                                 }
5162                         }
5163
5164                         /* During generation, destroyed artifacts are "preserved" */
5165                         if (preserve_mode || in_generate)
5166                         {
5167                                 s16b this_o_idx, next_o_idx = 0;
5168
5169                                 /* Scan all objects in the grid */
5170                                 for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
5171                                 {
5172                                         object_type *o_ptr;
5173
5174                                         /* Acquire object */
5175                                         o_ptr = &o_list[this_o_idx];
5176
5177                                         /* Acquire next object */
5178                                         next_o_idx = o_ptr->next_o_idx;
5179
5180                                         /* Hack -- Preserve unknown artifacts */
5181                                         if (object_is_fixed_artifact(o_ptr) && (!object_is_known(o_ptr) || in_generate))
5182                                         {
5183                                                 /* Mega-Hack -- Preserve the artifact */
5184                                                 a_info[o_ptr->name1].cur_num = 0;
5185
5186                                                 if (in_generate && cheat_peek)
5187                                                 {
5188                                                         char o_name[MAX_NLEN];
5189                                                         object_desc(o_name, o_ptr, (OD_NAME_ONLY | OD_STORE));
5190 #ifdef JP
5191                                                         msg_format("ÅÁÀâ¤Î¥¢¥¤¥Æ¥à (%s) ¤ÏÀ¸À®Ãæ¤Ë*Ç˲õ*¤µ¤ì¤¿¡£", o_name);
5192 #else
5193                                                         msg_format("Artifact (%s) was *destroyed* during generation.", o_name);
5194 #endif
5195                                                 }
5196                                         }
5197                                         else if (in_generate && cheat_peek && o_ptr->art_name)
5198                                         {
5199 #ifdef JP
5200                                                 msg_print("¥é¥ó¥À¥à¡¦¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤Î1¤Ä¤ÏÀ¸À®Ãæ¤Ë*Ç˲õ*¤µ¤ì¤¿¡£");
5201 #else
5202                                                 msg_print("One of the random artifacts was *destroyed* during generation.");
5203 #endif
5204                                         }
5205                                 }
5206                         }
5207
5208                         /* Delete objects */
5209                         delete_object(y, x);
5210
5211                         /* Destroy "non-permanent" grids */
5212                         if (!cave_perma_grid(c_ptr))
5213                         {
5214                                 /* Wall (or floor) type */
5215                                 t = randint0(200);
5216
5217                                 if (!in_generate) /* Normal */
5218                                 {
5219                                         if (t < 20)
5220                                         {
5221                                                 /* Create granite wall */
5222                                                 cave_set_feat(y, x, feat_granite);
5223                                         }
5224                                         else if (t < 70)
5225                                         {
5226                                                 /* Create quartz vein */
5227                                                 cave_set_feat(y, x, feat_quartz_vein);
5228                                         }
5229                                         else if (t < 100)
5230                                         {
5231                                                 /* Create magma vein */
5232                                                 cave_set_feat(y, x, feat_magma_vein);
5233                                         }
5234                                         else
5235                                         {
5236                                                 /* Create floor */
5237                                                 cave_set_feat(y, x, floor_type[randint0(100)]);
5238                                         }
5239                                 }
5240                                 else /* In generation */
5241                                 {
5242                                         if (t < 20)
5243                                         {
5244                                                 /* Create granite wall */
5245                                                 place_extra_grid(c_ptr);
5246                                         }
5247                                         else if (t < 70)
5248                                         {
5249                                                 /* Create quartz vein */
5250                                                 c_ptr->feat = feat_quartz_vein;
5251                                         }
5252                                         else if (t < 100)
5253                                         {
5254                                                 /* Create magma vein */
5255                                                 c_ptr->feat = feat_magma_vein;
5256                                         }
5257                                         else
5258                                         {
5259                                                 /* Create floor */
5260                                                 place_floor_grid(c_ptr);
5261                                         }
5262
5263                                         /* Clear garbage of hidden trap or door */
5264                                         c_ptr->mimic = 0;
5265                                 }
5266                         }
5267                 }
5268         }
5269
5270         if (!in_generate)
5271         {
5272                 /* Process "re-glowing" */
5273                 for (y = (y1 - r); y <= (y1 + r); y++)
5274                 {
5275                         for (x = (x1 - r); x <= (x1 + r); x++)
5276                         {
5277                                 /* Skip illegal grids */
5278                                 if (!in_bounds(y, x)) continue;
5279
5280                                 /* Extract the distance */
5281                                 k = distance(y1, x1, y, x);
5282
5283                                 /* Stay in the circle of death */
5284                                 if (k > r) continue;
5285
5286                                 /* Access the grid */
5287                                 c_ptr = &cave[y][x];
5288
5289                                 if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
5290                                 else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
5291                                 {
5292                                         int i, yy, xx;
5293                                         cave_type *cc_ptr;
5294
5295                                         for (i = 0; i < 9; i++)
5296                                         {
5297                                                 yy = y + ddy_ddd[i];
5298                                                 xx = x + ddx_ddd[i];
5299                                                 if (!in_bounds2(yy, xx)) continue;
5300                                                 cc_ptr = &cave[yy][xx];
5301                                                 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
5302                                                 {
5303                                                         c_ptr->info |= CAVE_GLOW;
5304                                                         break;
5305                                                 }
5306                                         }
5307                                 }
5308                         }
5309                 }
5310
5311                 /* Hack -- Affect player */
5312                 if (flag)
5313                 {
5314                         /* Message */
5315 #ifdef JP
5316                         msg_print("dz¤¨¤ë¤è¤¦¤ÊÁ®¸÷¤¬È¯À¸¤·¤¿¡ª");
5317 #else
5318                         msg_print("There is a searing blast of light!");
5319 #endif
5320
5321                         /* Blind the player */
5322                         if (!p_ptr->resist_blind && !p_ptr->resist_lite)
5323                         {
5324                                 /* Become blind */
5325                                 (void)set_blind(p_ptr->blind + 10 + randint1(10));
5326                         }
5327                 }
5328
5329                 forget_flow();
5330
5331                 /* Mega-Hack -- Forget the view and lite */
5332                 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
5333
5334                 /* Update stuff */
5335                 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
5336
5337                 /* Redraw map */
5338                 p_ptr->redraw |= (PR_MAP);
5339
5340                 /* Window stuff */
5341                 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
5342
5343                 if (p_ptr->special_defense & NINJA_S_STEALTH)
5344                 {
5345                         if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
5346                 }
5347         }
5348
5349         /* Success */
5350         return (TRUE);
5351 }
5352
5353
5354 /*
5355  * Induce an "earthquake" of the given radius at the given location.
5356  *
5357  * This will turn some walls into floors and some floors into walls.
5358  *
5359  * The player will take damage and "jump" into a safe grid if possible,
5360  * otherwise, he will "tunnel" through the rubble instantaneously.
5361  *
5362  * Monsters will take damage, and "jump" into a safe grid if possible,
5363  * otherwise they will be "buried" in the rubble, disappearing from
5364  * the level in the same way that they do when genocided.
5365  *
5366  * Note that thus the player and monsters (except eaters of walls and
5367  * passers through walls) will never occupy the same grid as a wall.
5368  * Note that as of now (2.7.8) no monster may occupy a "wall" grid, even
5369  * for a single turn, unless that monster can pass_walls or kill_walls.
5370  * This has allowed massive simplification of the "monster" code.
5371  */
5372 bool earthquake_aux(int cy, int cx, int r, int m_idx)
5373 {
5374         int             i, t, y, x, yy, xx, dy, dx;
5375         int             damage = 0;
5376         int             sn = 0, sy = 0, sx = 0;
5377         bool            hurt = FALSE;
5378         cave_type       *c_ptr;
5379         bool            map[32][32];
5380
5381
5382         /* Prevent destruction of quest levels and town */
5383         if ((p_ptr->inside_quest && is_fixed_quest_idx(p_ptr->inside_quest)) || !dun_level)
5384         {
5385                 return (FALSE);
5386         }
5387
5388         /* Paranoia -- Enforce maximum range */
5389         if (r > 12) r = 12;
5390
5391         /* Clear the "maximal blast" area */
5392         for (y = 0; y < 32; y++)
5393         {
5394                 for (x = 0; x < 32; x++)
5395                 {
5396                         map[y][x] = FALSE;
5397                 }
5398         }
5399
5400         /* Check around the epicenter */
5401         for (dy = -r; dy <= r; dy++)
5402         {
5403                 for (dx = -r; dx <= r; dx++)
5404                 {
5405                         /* Extract the location */
5406                         yy = cy + dy;
5407                         xx = cx + dx;
5408
5409                         /* Skip illegal grids */
5410                         if (!in_bounds(yy, xx)) continue;
5411
5412                         /* Skip distant grids */
5413                         if (distance(cy, cx, yy, xx) > r) continue;
5414
5415                         /* Access the grid */
5416                         c_ptr = &cave[yy][xx];
5417
5418                         /* Lose room and vault */
5419                         c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY | CAVE_UNSAFE);
5420
5421                         /* Lose light and knowledge */
5422                         c_ptr->info &= ~(CAVE_GLOW | CAVE_MARK);
5423
5424                         /* Skip the epicenter */
5425                         if (!dx && !dy) continue;
5426
5427                         /* Skip most grids */
5428                         if (randint0(100) < 85) continue;
5429
5430                         /* Damage this grid */
5431                         map[16+yy-cy][16+xx-cx] = TRUE;
5432
5433                         /* Hack -- Take note of player damage */
5434                         if (player_bold(yy, xx)) hurt = TRUE;
5435                 }
5436         }
5437
5438         /* First, affect the player (if necessary) */
5439         if (hurt && !p_ptr->pass_wall && !p_ptr->kill_wall)
5440         {
5441                 /* Check around the player */
5442                 for (i = 0; i < 8; i++)
5443                 {
5444                         /* Access the location */
5445                         y = py + ddy_ddd[i];
5446                         x = px + ddx_ddd[i];
5447
5448                         /* Skip non-empty grids */
5449                         if (!cave_empty_bold(y, x)) continue;
5450
5451                         /* Important -- Skip "quake" grids */
5452                         if (map[16+y-cy][16+x-cx]) continue;
5453
5454                         if (cave[y][x].m_idx) continue;
5455
5456                         /* Count "safe" grids */
5457                         sn++;
5458
5459                         /* Randomize choice */
5460                         if (randint0(sn) > 0) continue;
5461
5462                         /* Save the safe location */
5463                         sy = y; sx = x;
5464                 }
5465
5466                 /* Random message */
5467                 switch (randint1(3))
5468                 {
5469                         case 1:
5470                         {
5471 #ifdef JP
5472                                 msg_print("¥À¥ó¥¸¥ç¥ó¤ÎÊɤ¬Êø¤ì¤¿¡ª");
5473 #else
5474                                 msg_print("The cave ceiling collapses!");
5475 #endif
5476                                 break;
5477                         }
5478                         case 2:
5479                         {
5480 #ifdef JP
5481                                 msg_print("¥À¥ó¥¸¥ç¥ó¤Î¾²¤¬ÉÔ¼«Á³¤Ë¤Í¤¸¶Ê¤¬¤Ã¤¿¡ª");
5482 #else
5483                                 msg_print("The cave floor twists in an unnatural way!");
5484 #endif
5485                                 break;
5486                         }
5487                         default:
5488                         {
5489 #ifdef JP
5490                                 msg_print("¥À¥ó¥¸¥ç¥ó¤¬Íɤ줿¡ªÊø¤ì¤¿´ä¤¬Æ¬¤Ë¹ß¤Ã¤Æ¤­¤¿¡ª");
5491 #else
5492                                 msg_print("The cave quakes!  You are pummeled with debris!");
5493 #endif
5494                                 break;
5495                         }
5496                 }
5497
5498                 /* Hurt the player a lot */
5499                 if (!sn)
5500                 {
5501                         /* Message and damage */
5502 #ifdef JP
5503                         msg_print("¤¢¤Ê¤¿¤Ï¤Ò¤É¤¤²ø²æ¤òÉé¤Ã¤¿¡ª");
5504 #else
5505                         msg_print("You are severely crushed!");
5506 #endif
5507                         damage = 200;
5508                 }
5509
5510                 /* Destroy the grid, and push the player to safety */
5511                 else
5512                 {
5513                         /* Calculate results */
5514                         switch (randint1(3))
5515                         {
5516                                 case 1:
5517                                 {
5518 #ifdef JP
5519                                         msg_print("¹ß¤êÃí¤°´ä¤ò¤¦¤Þ¤¯Èò¤±¤¿¡ª");
5520 #else
5521                                         msg_print("You nimbly dodge the blast!");
5522 #endif
5523                                         damage = 0;
5524                                         break;
5525                                 }
5526                                 case 2:
5527                                 {
5528 #ifdef JP
5529                                         msg_print("´äÀФ¬¤¢¤Ê¤¿¤Ëľ·â¤·¤¿!");
5530 #else
5531                                         msg_print("You are bashed by rubble!");
5532 #endif
5533                                         damage = damroll(10, 4);
5534                                         (void)set_stun(p_ptr->stun + randint1(50));
5535                                         break;
5536                                 }
5537                                 case 3:
5538                                 {
5539 #ifdef JP
5540                                         msg_print("¤¢¤Ê¤¿¤Ï¾²¤ÈÊɤȤδ֤˶´¤Þ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
5541 #else
5542                                         msg_print("You are crushed between the floor and ceiling!");
5543 #endif
5544                                         damage = damroll(10, 4);
5545                                         (void)set_stun(p_ptr->stun + randint1(50));
5546                                         break;
5547                                 }
5548                         }
5549
5550                         /* Move the player to the safe location */
5551                         (void)move_player_effect(sy, sx, MPE_DONT_PICKUP);
5552                 }
5553
5554                 /* Important -- no wall on player */
5555                 map[16+py-cy][16+px-cx] = FALSE;
5556
5557                 /* Take some damage */
5558                 if (damage)
5559                 {
5560                         char *killer;
5561
5562                         if (m_idx)
5563                         {
5564                                 char m_name[80];
5565                                 monster_type *m_ptr = &m_list[m_idx];
5566
5567                                 /* Get the monster's real name */
5568                                 monster_desc(m_name, m_ptr, MD_IGNORE_HALLU | MD_ASSUME_VISIBLE | MD_INDEF_VISIBLE);
5569
5570 #ifdef JP
5571                                 killer = format("%s¤Îµ¯¤³¤·¤¿ÃÏ¿Ì", m_name);
5572 #else
5573                                 killer = format("an earthquake caused by %s", m_name);
5574 #endif
5575                         }
5576                         else
5577                         {
5578 #ifdef JP
5579                                 killer = "ÃÏ¿Ì";
5580 #else
5581                                 killer = "an earthquake";
5582 #endif
5583                         }
5584
5585                         take_hit(DAMAGE_ATTACK, damage, killer, -1);
5586                 }
5587         }
5588
5589         /* Examine the quaked region */
5590         for (dy = -r; dy <= r; dy++)
5591         {
5592                 for (dx = -r; dx <= r; dx++)
5593                 {
5594                         /* Extract the location */
5595                         yy = cy + dy;
5596                         xx = cx + dx;
5597
5598                         /* Skip unaffected grids */
5599                         if (!map[16+yy-cy][16+xx-cx]) continue;
5600
5601                         /* Access the grid */
5602                         c_ptr = &cave[yy][xx];
5603
5604                         if (c_ptr->m_idx == p_ptr->riding) continue;
5605
5606                         /* Process monsters */
5607                         if (c_ptr->m_idx)
5608                         {
5609                                 monster_type *m_ptr = &m_list[c_ptr->m_idx];
5610                                 monster_race *r_ptr = &r_info[m_ptr->r_idx];
5611
5612                                 /* Quest monsters */
5613                                 if (r_ptr->flags1 & RF1_QUESTOR)
5614                                 {
5615                                         /* No wall on quest monsters */
5616                                         map[16+yy-cy][16+xx-cx] = FALSE;
5617
5618                                         continue;
5619                                 }
5620
5621                                 /* Most monsters cannot co-exist with rock */
5622                                 if (!(r_ptr->flags2 & (RF2_KILL_WALL)) &&
5623                                     !(r_ptr->flags2 & (RF2_PASS_WALL)))
5624                                 {
5625                                         char m_name[80];
5626
5627                                         /* Assume not safe */
5628                                         sn = 0;
5629
5630                                         /* Monster can move to escape the wall */
5631                                         if (!(r_ptr->flags1 & (RF1_NEVER_MOVE)))
5632                                         {
5633                                                 /* Look for safety */
5634                                                 for (i = 0; i < 8; i++)
5635                                                 {
5636                                                         /* Access the grid */
5637                                                         y = yy + ddy_ddd[i];
5638                                                         x = xx + ddx_ddd[i];
5639
5640                                                         /* Skip non-empty grids */
5641                                                         if (!cave_empty_bold(y, x)) continue;
5642
5643                                                         /* Hack -- no safety on glyph of warding */
5644                                                         if (is_glyph_grid(&cave[y][x])) continue;
5645                                                         if (is_explosive_rune_grid(&cave[y][x])) continue;
5646
5647                                                         /* ... nor on the Pattern */
5648                                                         if (pattern_tile(y, x)) continue;
5649
5650                                                         /* Important -- Skip "quake" grids */
5651                                                         if (map[16+y-cy][16+x-cx]) continue;
5652
5653                                                         if (cave[y][x].m_idx) continue;
5654                                                         if (player_bold(y, x)) continue;
5655
5656                                                         /* Count "safe" grids */
5657                                                         sn++;
5658
5659                                                         /* Randomize choice */
5660                                                         if (randint0(sn) > 0) continue;
5661
5662                                                         /* Save the safe grid */
5663                                                         sy = y; sx = x;
5664                                                 }
5665                                         }
5666
5667                                         /* Describe the monster */
5668                                         monster_desc(m_name, m_ptr, 0);
5669
5670                                         /* Scream in pain */
5671 #ifdef JP
5672                                         if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s¤Ï¶ìÄˤǵ㤭¤ï¤á¤¤¤¿¡ª", m_name);
5673 #else
5674                                         if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s wails out in pain!", m_name);
5675 #endif
5676
5677                                         /* Take damage from the quake */
5678                                         damage = (sn ? damroll(4, 8) : (m_ptr->hp + 1));
5679
5680                                         /* Monster is certainly awake */
5681                                         (void)set_monster_csleep(c_ptr->m_idx, 0);
5682
5683                                         /* Apply damage directly */
5684                                         m_ptr->hp -= damage;
5685
5686                                         /* Delete (not kill) "dead" monsters */
5687                                         if (m_ptr->hp < 0)
5688                                         {
5689                                                 /* Message */
5690 #ifdef JP
5691                                                 if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s¤Ï´äÀФËËä¤â¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª", m_name);
5692 #else
5693                                                 if (!ignore_unview || is_seen(m_ptr)) msg_format("%^s is embedded in the rock!", m_name);
5694 #endif
5695
5696                                                 if (c_ptr->m_idx)
5697                                                 {
5698                                                         if (record_named_pet && is_pet(&m_list[c_ptr->m_idx]) && m_list[c_ptr->m_idx].nickname)
5699                                                         {
5700                                                                 char m2_name[80];
5701
5702                                                                 monster_desc(m2_name, m_ptr, MD_INDEF_VISIBLE);
5703                                                                 do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_EARTHQUAKE, m2_name);
5704                                                         }
5705                                                 }
5706
5707                                                 /* Delete the monster */
5708                                                 delete_monster(yy, xx);
5709
5710                                                 /* No longer safe */
5711                                                 sn = 0;
5712                                         }
5713
5714                                         /* Hack -- Escape from the rock */
5715                                         if (sn)
5716                                         {
5717                                                 int m_idx = cave[yy][xx].m_idx;
5718
5719                                                 /* Update the old location */
5720                                                 cave[yy][xx].m_idx = 0;
5721
5722                                                 /* Update the new location */
5723                                                 cave[sy][sx].m_idx = m_idx;
5724
5725                                                 /* Move the monster */
5726                                                 m_ptr->fy = sy;
5727                                                 m_ptr->fx = sx;
5728
5729                                                 /* Update the monster (new location) */
5730                                                 update_mon(m_idx, TRUE);
5731
5732                                                 /* Redraw the old grid */
5733                                                 lite_spot(yy, xx);
5734
5735                                                 /* Redraw the new grid */
5736                                                 lite_spot(sy, sx);
5737                                         }
5738                                 }
5739                         }
5740                 }
5741         }
5742
5743         /* Lose monster light */
5744         clear_mon_lite();
5745
5746         /* Examine the quaked region */
5747         for (dy = -r; dy <= r; dy++)
5748         {
5749                 for (dx = -r; dx <= r; dx++)
5750                 {
5751                         /* Extract the location */
5752                         yy = cy + dy;
5753                         xx = cx + dx;
5754
5755                         /* Skip unaffected grids */
5756                         if (!map[16+yy-cy][16+xx-cx]) continue;
5757
5758                         /* Access the cave grid */
5759                         c_ptr = &cave[yy][xx];
5760
5761                         /* Paranoia -- never affect player */
5762 /*                      if (player_bold(yy, xx)) continue; */
5763
5764                         /* Destroy location (if valid) */
5765                         if (cave_valid_bold(yy, xx))
5766                         {
5767                                 /* Delete objects */
5768                                 delete_object(yy, xx);
5769
5770                                 /* Wall (or floor) type */
5771                                 t = cave_have_flag_bold(yy, xx, FF_PROJECT) ? randint0(100) : 200;
5772
5773                                 /* Granite */
5774                                 if (t < 20)
5775                                 {
5776                                         /* Create granite wall */
5777                                         cave_set_feat(yy, xx, feat_granite);
5778                                 }
5779
5780                                 /* Quartz */
5781                                 else if (t < 70)
5782                                 {
5783                                         /* Create quartz vein */
5784                                         cave_set_feat(yy, xx, feat_quartz_vein);
5785                                 }
5786
5787                                 /* Magma */
5788                                 else if (t < 100)
5789                                 {
5790                                         /* Create magma vein */
5791                                         cave_set_feat(yy, xx, feat_magma_vein);
5792                                 }
5793
5794                                 /* Floor */
5795                                 else
5796                                 {
5797                                         /* Create floor */
5798                                         cave_set_feat(yy, xx, floor_type[randint0(100)]);
5799                                 }
5800                         }
5801                 }
5802         }
5803
5804
5805         /* Process "re-glowing" */
5806         for (dy = -r; dy <= r; dy++)
5807         {
5808                 for (dx = -r; dx <= r; dx++)
5809                 {
5810                         /* Extract the location */
5811                         yy = cy + dy;
5812                         xx = cx + dx;
5813
5814                         /* Skip illegal grids */
5815                         if (!in_bounds(yy, xx)) continue;
5816
5817                         /* Skip distant grids */
5818                         if (distance(cy, cx, yy, xx) > r) continue;
5819
5820                         /* Access the grid */
5821                         c_ptr = &cave[yy][xx];
5822
5823                         if (is_mirror_grid(c_ptr)) c_ptr->info |= CAVE_GLOW;
5824                         else if (!(d_info[dungeon_type].flags1 & DF1_DARKNESS))
5825                         {
5826                                 int ii, yyy, xxx;
5827                                 cave_type *cc_ptr;
5828
5829                                 for (ii = 0; ii < 9; ii++)
5830                                 {
5831                                         yyy = yy + ddy_ddd[ii];
5832                                         xxx = xx + ddx_ddd[ii];
5833                                         if (!in_bounds2(yyy, xxx)) continue;
5834                                         cc_ptr = &cave[yyy][xxx];
5835                                         if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
5836                                         {
5837                                                 c_ptr->info |= CAVE_GLOW;
5838                                                 break;
5839                                         }
5840                                 }
5841                         }
5842                 }
5843         }
5844
5845
5846         /* Mega-Hack -- Forget the view and lite */
5847         p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
5848
5849         /* Update stuff */
5850         p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
5851
5852         /* Update the health bar */
5853         p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
5854
5855         /* Redraw map */
5856         p_ptr->redraw |= (PR_MAP);
5857
5858         /* Window stuff */
5859         p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
5860
5861         if (p_ptr->special_defense & NINJA_S_STEALTH)
5862         {
5863                 if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
5864         }
5865
5866         /* Success */
5867         return (TRUE);
5868 }
5869
5870 bool earthquake(int cy, int cx, int r)
5871 {
5872         return earthquake_aux(cy, cx, r, 0);
5873 }
5874
5875
5876 void discharge_minion(void)
5877 {
5878         int i;
5879         bool okay = TRUE;
5880
5881         for (i = 1; i < m_max; i++)
5882         {
5883                 monster_type *m_ptr = &m_list[i];
5884                 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
5885                 if (m_ptr->nickname) okay = FALSE;
5886         }
5887         if (!okay || p_ptr->riding)
5888         {
5889 #ifdef JP
5890                 if (!get_check("ËÜÅö¤ËÁ´¥Ú¥Ã¥È¤òÇúÇˤ·¤Þ¤¹¤«¡©"))
5891 #else
5892                 if (!get_check("You will blast all pets. Are you sure? "))
5893 #endif
5894                         return;
5895         }
5896         for (i = 1; i < m_max; i++)
5897         {
5898                 int dam;
5899                 monster_type *m_ptr = &m_list[i];
5900                 monster_race *r_ptr;
5901
5902                 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
5903                 r_ptr = &r_info[m_ptr->r_idx];
5904
5905                 /* Uniques resist discharging */
5906                 if (r_ptr->flags1 & RF1_UNIQUE)
5907                 {
5908                         char m_name[80];
5909                         monster_desc(m_name, m_ptr, 0x00);
5910 #ifdef JP
5911                         msg_format("%s¤ÏÇúÇˤµ¤ì¤ë¤Î¤ò·ù¤¬¤ê¡¢¾¡¼ê¤Ë¼«Ê¬¤ÎÀ¤³¦¤Ø¤Èµ¢¤Ã¤¿¡£", m_name);
5912 #else
5913                         msg_format("%^s resists to be blasted, and run away.", m_name);
5914 #endif
5915                         delete_monster_idx(i);
5916                         continue;
5917                 }
5918                 dam = m_ptr->maxhp / 2;
5919                 if (dam > 100) dam = (dam-100)/2 + 100;
5920                 if (dam > 400) dam = (dam-400)/2 + 400;
5921                 if (dam > 800) dam = 800;
5922                 project(i, 2+(r_ptr->level/20), m_ptr->fy,
5923                         m_ptr->fx, dam, GF_PLASMA, 
5924                         PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL, -1);
5925
5926                 if (record_named_pet && m_ptr->nickname)
5927                 {
5928                         char m_name[80];
5929
5930                         monster_desc(m_name, m_ptr, MD_INDEF_VISIBLE);
5931                         do_cmd_write_nikki(NIKKI_NAMED_PET, RECORD_NAMED_PET_BLAST, m_name);
5932                 }
5933
5934                 delete_monster_idx(i);
5935         }
5936 }
5937
5938
5939 /*
5940  * This routine clears the entire "temp" set.
5941  *
5942  * This routine will Perma-Lite all "temp" grids.
5943  *
5944  * This routine is used (only) by "lite_room()"
5945  *
5946  * Dark grids are illuminated.
5947  *
5948  * Also, process all affected monsters.
5949  *
5950  * SMART monsters always wake up when illuminated
5951  * NORMAL monsters wake up 1/4 the time when illuminated
5952  * STUPID monsters wake up 1/10 the time when illuminated
5953  */
5954 static void cave_temp_room_lite(void)
5955 {
5956         int i;
5957
5958         /* Clear them all */
5959         for (i = 0; i < temp_n; i++)
5960         {
5961                 int y = temp_y[i];
5962                 int x = temp_x[i];
5963
5964                 cave_type *c_ptr = &cave[y][x];
5965
5966                 /* No longer in the array */
5967                 c_ptr->info &= ~(CAVE_TEMP);
5968
5969                 /* Update only non-CAVE_GLOW grids */
5970                 /* if (c_ptr->info & (CAVE_GLOW)) continue; */
5971
5972                 /* Perma-Lite */
5973                 c_ptr->info |= (CAVE_GLOW);
5974
5975                 /* Process affected monsters */
5976                 if (c_ptr->m_idx)
5977                 {
5978                         int chance = 25;
5979
5980                         monster_type    *m_ptr = &m_list[c_ptr->m_idx];
5981
5982                         monster_race    *r_ptr = &r_info[m_ptr->r_idx];
5983
5984                         /* Update the monster */
5985                         update_mon(c_ptr->m_idx, FALSE);
5986
5987                         /* Stupid monsters rarely wake up */
5988                         if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
5989
5990                         /* Smart monsters always wake up */
5991                         if (r_ptr->flags2 & (RF2_SMART)) chance = 100;
5992
5993                         /* Sometimes monsters wake up */
5994                         if (MON_CSLEEP(m_ptr) && (randint0(100) < chance))
5995                         {
5996                                 /* Wake up! */
5997                                 (void)set_monster_csleep(c_ptr->m_idx, 0);
5998
5999                                 /* Notice the "waking up" */
6000                                 if (m_ptr->ml)
6001                                 {
6002                                         char m_name[80];
6003
6004                                         /* Acquire the monster name */
6005                                         monster_desc(m_name, m_ptr, 0);
6006
6007                                         /* Dump a message */
6008 #ifdef JP
6009                                         msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
6010 #else
6011                                         msg_format("%^s wakes up.", m_name);
6012 #endif
6013                                 }
6014                         }
6015                 }
6016
6017                 /* Note */
6018                 note_spot(y, x);
6019
6020                 /* Redraw */
6021                 lite_spot(y, x);
6022
6023                 update_local_illumination(y, x);
6024         }
6025
6026         /* None left */
6027         temp_n = 0;
6028 }
6029
6030
6031
6032 /*
6033  * This routine clears the entire "temp" set.
6034  *
6035  * This routine will "darken" all "temp" grids.
6036  *
6037  * In addition, some of these grids will be "unmarked".
6038  *
6039  * This routine is used (only) by "unlite_room()"
6040  *
6041  * Also, process all affected monsters
6042  */
6043 static void cave_temp_room_unlite(void)
6044 {
6045         int i;
6046
6047         /* Clear them all */
6048         for (i = 0; i < temp_n; i++)
6049         {
6050                 int y = temp_y[i];
6051                 int x = temp_x[i];
6052                 int j;
6053
6054                 cave_type *c_ptr = &cave[y][x];
6055                 bool do_dark = !is_mirror_grid(c_ptr);
6056
6057                 /* No longer in the array */
6058                 c_ptr->info &= ~(CAVE_TEMP);
6059
6060                 /* Darken the grid */
6061                 if (do_dark)
6062                 {
6063                         if (dun_level || !is_daytime())
6064                         {
6065                                 for (j = 0; j < 9; j++)
6066                                 {
6067                                         int by = y + ddy_ddd[j];
6068                                         int bx = x + ddx_ddd[j];
6069
6070                                         if (in_bounds2(by, bx))
6071                                         {
6072                                                 cave_type *cc_ptr = &cave[by][bx];
6073
6074                                                 if (have_flag(f_info[get_feat_mimic(cc_ptr)].flags, FF_GLOW))
6075                                                 {
6076                                                         do_dark = FALSE;
6077                                                         break;
6078                                                 }
6079                                         }
6080                                 }
6081
6082                                 if (!do_dark) continue;
6083                         }
6084
6085                         c_ptr->info &= ~(CAVE_GLOW);
6086
6087                         /* Hack -- Forget "boring" grids */
6088                         if (!have_flag(f_info[get_feat_mimic(c_ptr)].flags, FF_REMEMBER))
6089                         {
6090                                 /* Forget the grid */
6091                                 if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);
6092
6093                                 /* Notice */
6094                                 note_spot(y, x);
6095                         }
6096
6097                         /* Process affected monsters */
6098                         if (c_ptr->m_idx)
6099                         {
6100                                 /* Update the monster */
6101                                 update_mon(c_ptr->m_idx, FALSE);
6102                         }
6103
6104                         /* Redraw */
6105                         lite_spot(y, x);
6106
6107                         update_local_illumination(y, x);
6108                 }
6109         }
6110
6111         /* None left */
6112         temp_n = 0;
6113 }
6114
6115
6116 /*
6117  * Determine how much contiguous open space this grid is next to
6118  */
6119 static int next_to_open(int cy, int cx, bool (*pass_bold)(int, int))
6120 {
6121         int i;
6122
6123         int y, x;
6124
6125         int len = 0;
6126         int blen = 0;
6127
6128         for (i = 0; i < 16; i++)
6129         {
6130                 y = cy + ddy_cdd[i % 8];
6131                 x = cx + ddx_cdd[i % 8];
6132
6133                 /* Found a wall, break the length */
6134                 if (!pass_bold(y, x))
6135                 {
6136                         /* Track best length */
6137                         if (len > blen)
6138                         {
6139                                 blen = len;
6140                         }
6141
6142                         len = 0;
6143                 }
6144                 else
6145                 {
6146                         len++;
6147                 }
6148         }
6149
6150         return (MAX(len, blen));
6151 }
6152
6153
6154 static int next_to_walls_adj(int cy, int cx, bool (*pass_bold)(int, int))
6155 {
6156         int i;
6157
6158         int y, x;
6159
6160         int c = 0;
6161
6162         for (i = 0; i < 8; i++)
6163         {
6164                 y = cy + ddy_ddd[i];
6165                 x = cx + ddx_ddd[i];
6166
6167                 if (!pass_bold(y, x)) c++;
6168         }
6169
6170         return c;
6171 }
6172
6173
6174 /*
6175  * Aux function -- see below
6176  */
6177 static void cave_temp_room_aux(int y, int x, bool only_room, bool (*pass_bold)(int, int))
6178 {
6179         cave_type *c_ptr;
6180
6181         /* Get the grid */
6182         c_ptr = &cave[y][x];
6183
6184         /* Avoid infinite recursion */
6185         if (c_ptr->info & (CAVE_TEMP)) return;
6186
6187         /* Do not "leave" the current room */
6188         if (!(c_ptr->info & (CAVE_ROOM)))
6189         {
6190                 if (only_room) return;
6191
6192                 /* Verify */
6193                 if (!in_bounds2(y, x)) return;
6194
6195                 /* Do not exceed the maximum spell range */
6196                 if (distance(py, px, y, x) > MAX_RANGE) return;
6197
6198                 /* Verify this grid */
6199                 /*
6200                  * The reason why it is ==6 instead of >5 is that 8 is impossible
6201                  * due to the check for cave_bold above.
6202                  * 7 lights dead-end corridors (you need to do this for the
6203                  * checkboard interesting rooms, so that the boundary is lit
6204                  * properly.
6205                  * This leaves only a check for 6 bounding walls!
6206                  */
6207                 if (in_bounds(y, x) && pass_bold(y, x) &&
6208                     (next_to_walls_adj(y, x, pass_bold) == 6) && (next_to_open(y, x, pass_bold) <= 1)) return;
6209         }
6210
6211         /* Paranoia -- verify space */
6212         if (temp_n == TEMP_MAX) return;
6213
6214         /* Mark the grid as "seen" */
6215         c_ptr->info |= (CAVE_TEMP);
6216
6217         /* Add it to the "seen" set */
6218         temp_y[temp_n] = y;
6219         temp_x[temp_n] = x;
6220         temp_n++;
6221 }
6222
6223 /*
6224  * Aux function -- see below
6225  */
6226 static bool cave_pass_lite_bold(int y, int x)
6227 {
6228         return cave_los_bold(y, x);
6229 }
6230
6231 /*
6232  * Aux function -- see below
6233  */
6234 static void cave_temp_lite_room_aux(int y, int x)
6235 {
6236         cave_temp_room_aux(y, x, FALSE, cave_pass_lite_bold);
6237 }
6238
6239 /*
6240  * Aux function -- see below
6241  */
6242 static bool cave_pass_dark_bold(int y, int x)
6243 {
6244         return cave_have_flag_bold(y, x, FF_PROJECT);
6245 }
6246
6247 /*
6248  * Aux function -- see below
6249  */
6250 static void cave_temp_unlite_room_aux(int y, int x)
6251 {
6252         cave_temp_room_aux(y, x, TRUE, cave_pass_dark_bold);
6253 }
6254
6255
6256
6257
6258 /*
6259  * Illuminate any room containing the given location.
6260  */
6261 void lite_room(int y1, int x1)
6262 {
6263         int i, x, y;
6264
6265         /* Add the initial grid */
6266         cave_temp_lite_room_aux(y1, x1);
6267
6268         /* While grids are in the queue, add their neighbors */
6269         for (i = 0; i < temp_n; i++)
6270         {
6271                 x = temp_x[i], y = temp_y[i];
6272
6273                 /* Walls get lit, but stop light */
6274                 if (!cave_pass_lite_bold(y, x)) continue;
6275
6276                 /* Spread adjacent */
6277                 cave_temp_lite_room_aux(y + 1, x);
6278                 cave_temp_lite_room_aux(y - 1, x);
6279                 cave_temp_lite_room_aux(y, x + 1);
6280                 cave_temp_lite_room_aux(y, x - 1);
6281
6282                 /* Spread diagonal */
6283                 cave_temp_lite_room_aux(y + 1, x + 1);
6284                 cave_temp_lite_room_aux(y - 1, x - 1);
6285                 cave_temp_lite_room_aux(y - 1, x + 1);
6286                 cave_temp_lite_room_aux(y + 1, x - 1);
6287         }
6288
6289         /* Now, lite them all up at once */
6290         cave_temp_room_lite();
6291
6292         if (p_ptr->special_defense & NINJA_S_STEALTH)
6293         {
6294                 if (cave[py][px].info & CAVE_GLOW) set_superstealth(FALSE);
6295         }
6296 }
6297
6298
6299 /*
6300  * Darken all rooms containing the given location
6301  */
6302 void unlite_room(int y1, int x1)
6303 {
6304         int i, x, y;
6305
6306         /* Add the initial grid */
6307         cave_temp_unlite_room_aux(y1, x1);
6308
6309         /* Spread, breadth first */
6310         for (i = 0; i < temp_n; i++)
6311         {
6312                 x = temp_x[i], y = temp_y[i];
6313
6314                 /* Walls get dark, but stop darkness */
6315                 if (!cave_pass_dark_bold(y, x)) continue;
6316
6317                 /* Spread adjacent */
6318                 cave_temp_unlite_room_aux(y + 1, x);
6319                 cave_temp_unlite_room_aux(y - 1, x);
6320                 cave_temp_unlite_room_aux(y, x + 1);
6321                 cave_temp_unlite_room_aux(y, x - 1);
6322
6323                 /* Spread diagonal */
6324                 cave_temp_unlite_room_aux(y + 1, x + 1);
6325                 cave_temp_unlite_room_aux(y - 1, x - 1);
6326                 cave_temp_unlite_room_aux(y - 1, x + 1);
6327                 cave_temp_unlite_room_aux(y + 1, x - 1);
6328         }
6329
6330         /* Now, darken them all at once */
6331         cave_temp_room_unlite();
6332 }
6333
6334
6335
6336 /*
6337  * Hack -- call light around the player
6338  * Affect all monsters in the projection radius
6339  */
6340 bool lite_area(int dam, int rad)
6341 {
6342         int flg = PROJECT_GRID | PROJECT_KILL;
6343
6344         if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
6345         {
6346 #ifdef JP
6347                 msg_print("¥À¥ó¥¸¥ç¥ó¤¬¸÷¤òµÛ¼ý¤·¤¿¡£");
6348 #else
6349                 msg_print("The darkness of this dungeon absorb your light.");
6350 #endif
6351                 return FALSE;
6352         }
6353
6354         /* Hack -- Message */
6355         if (!p_ptr->blind)
6356         {
6357 #ifdef JP
6358 msg_print("Çò¤¤¸÷¤¬ÊÕ¤ê¤òʤ¤Ã¤¿¡£");
6359 #else
6360                 msg_print("You are surrounded by a white light.");
6361 #endif
6362
6363         }
6364
6365         /* Hook into the "project()" function */
6366         (void)project(0, rad, py, px, dam, GF_LITE_WEAK, flg, -1);
6367
6368         /* Lite up the room */
6369         lite_room(py, px);
6370
6371         /* Assume seen */
6372         return (TRUE);
6373 }
6374
6375
6376 /*
6377  * Hack -- call darkness around the player
6378  * Affect all monsters in the projection radius
6379  */
6380 bool unlite_area(int dam, int rad)
6381 {
6382         int flg = PROJECT_GRID | PROJECT_KILL;
6383
6384         /* Hack -- Message */
6385         if (!p_ptr->blind)
6386         {
6387 #ifdef JP
6388 msg_print("°Å°Ç¤¬ÊÕ¤ê¤òʤ¤Ã¤¿¡£");
6389 #else
6390                 msg_print("Darkness surrounds you.");
6391 #endif
6392
6393         }
6394
6395         /* Hook into the "project()" function */
6396         (void)project(0, rad, py, px, dam, GF_DARK_WEAK, flg, -1);
6397
6398         /* Lite up the room */
6399         unlite_room(py, px);
6400
6401         /* Assume seen */
6402         return (TRUE);
6403 }
6404
6405
6406
6407 /*
6408  * Cast a ball spell
6409  * Stop if we hit a monster, act as a "ball"
6410  * Allow "target" mode to pass over monsters
6411  * Affect grids, objects, and monsters
6412  */
6413 bool fire_ball(int typ, int dir, int dam, int rad)
6414 {
6415         int tx, ty;
6416
6417         int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6418
6419         if (typ == GF_CONTROL_LIVING) flg|= PROJECT_HIDE;
6420         /* Use the given direction */
6421         tx = px + 99 * ddx[dir];
6422         ty = py + 99 * ddy[dir];
6423
6424         /* Hack -- Use an actual "target" */
6425         if ((dir == 5) && target_okay())
6426         {
6427                 flg &= ~(PROJECT_STOP);
6428                 tx = target_col;
6429                 ty = target_row;
6430         }
6431
6432         /* Analyze the "dir" and the "target".  Hurt items on floor. */
6433         return (project(0, rad, ty, tx, dam, typ, flg, -1));
6434 }
6435
6436
6437 /*
6438  * Cast a ball spell
6439  * Stop if we hit a monster, act as a "ball"
6440  * Allow "target" mode to pass over monsters
6441  * Affect grids, objects, and monsters
6442  */
6443 bool fire_rocket(int typ, int dir, int dam, int rad)
6444 {
6445         int tx, ty;
6446
6447         int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6448
6449         /* Use the given direction */
6450         tx = px + 99 * ddx[dir];
6451         ty = py + 99 * ddy[dir];
6452
6453         /* Hack -- Use an actual "target" */
6454         if ((dir == 5) && target_okay())
6455         {
6456                 tx = target_col;
6457                 ty = target_row;
6458         }
6459
6460         /* Analyze the "dir" and the "target".  Hurt items on floor. */
6461         return (project(0, rad, ty, tx, dam, typ, flg, -1));
6462 }
6463
6464
6465 /*
6466  * Cast a ball spell
6467  * Stop if we hit a monster, act as a "ball"
6468  * Allow "target" mode to pass over monsters
6469  * Affect grids, objects, and monsters
6470  */
6471 bool fire_ball_hide(int typ, int dir, int dam, int rad)
6472 {
6473         int tx, ty;
6474
6475         int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_HIDE;
6476
6477         /* Use the given direction */
6478         tx = px + 99 * ddx[dir];
6479         ty = py + 99 * ddy[dir];
6480
6481         /* Hack -- Use an actual "target" */
6482         if ((dir == 5) && target_okay())
6483         {
6484                 flg &= ~(PROJECT_STOP);
6485                 tx = target_col;
6486                 ty = target_row;
6487         }
6488
6489         /* Analyze the "dir" and the "target".  Hurt items on floor. */
6490         return (project(0, rad, ty, tx, dam, typ, flg, -1));
6491 }
6492
6493
6494 /*
6495  * Cast a meteor spell, defined as a ball spell cast by an arbitary monster, 
6496  * player, or outside source, that starts out at an arbitrary location, and 
6497  * leaving no trail from the "caster" to the target.  This function is 
6498  * especially useful for bombardments and similar. -LM-
6499  *
6500  * Option to hurt the player.
6501  */
6502 bool fire_meteor(int who, int typ, int y, int x, int dam, int rad)
6503 {
6504         int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6505
6506         /* Analyze the "target" and the caster. */
6507         return (project(who, rad, y, x, dam, typ, flg, -1));
6508 }
6509
6510
6511 bool fire_blast(int typ, int dir, int dd, int ds, int num, int dev)
6512 {
6513         int ly, lx, ld;
6514         int ty, tx, y, x;
6515         int i;
6516
6517         int flg = PROJECT_FAST | PROJECT_THRU | PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
6518
6519         /* Assume okay */
6520         bool result = TRUE;
6521
6522         /* Use the given direction */
6523         if (dir != 5)
6524         {
6525                 ly = ty = py + 20 * ddy[dir];
6526                 lx = tx = px + 20 * ddx[dir];
6527         }
6528
6529         /* Use an actual "target" */
6530         else /* if (dir == 5) */
6531         {
6532                 tx = target_col;
6533                 ty = target_row;
6534
6535                 lx = 20 * (tx - px) + px;
6536                 ly = 20 * (ty - py) + py;
6537         }
6538
6539         ld = distance(py, px, ly, lx);
6540
6541         /* Blast */
6542         for (i = 0; i < num; i++)
6543         {
6544                 while (1)
6545                 {
6546                         /* Get targets for some bolts */
6547                         y = rand_spread(ly, ld * dev / 20);
6548                         x = rand_spread(lx, ld * dev / 20);
6549
6550                         if (distance(ly, lx, y, x) <= ld * dev / 20) break;
6551                 }
6552
6553                 /* Analyze the "dir" and the "target". */
6554                 if (!project(0, 0, y, x, damroll(dd, ds), typ, flg, -1))
6555                 {
6556                         result = FALSE;
6557                 }
6558         }
6559
6560         return (result);
6561 }
6562
6563
6564 /*
6565  * Switch position with a monster.
6566  */
6567 bool teleport_swap(int dir)
6568 {
6569         int tx, ty;
6570         cave_type * c_ptr;
6571         monster_type * m_ptr;
6572         monster_race * r_ptr;
6573
6574         if ((dir == 5) && target_okay())
6575         {
6576                 tx = target_col;
6577                 ty = target_row;
6578         }
6579         else
6580         {
6581                 tx = px + ddx[dir];
6582                 ty = py + ddy[dir];
6583         }
6584         c_ptr = &cave[ty][tx];
6585
6586         if (p_ptr->anti_tele)
6587         {
6588 #ifdef JP
6589 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
6590 #else
6591                 msg_print("A mysterious force prevents you from teleporting!");
6592 #endif
6593
6594                 return FALSE;
6595         }
6596
6597         if (!c_ptr->m_idx || (c_ptr->m_idx == p_ptr->riding))
6598         {
6599 #ifdef JP
6600 msg_print("¤½¤ì¤È¤Ï¾ì½ê¤ò¸ò´¹¤Ç¤­¤Þ¤»¤ó¡£");
6601 #else
6602                 msg_print("You can't trade places with that!");
6603 #endif
6604
6605
6606                 /* Failure */
6607                 return FALSE;
6608         }
6609
6610         if ((c_ptr->info & CAVE_ICKY) || (distance(ty, tx, py, px) > p_ptr->lev * 3 / 2 + 10))
6611         {
6612 #ifdef JP
6613 msg_print("¼ºÇÔ¤·¤¿¡£");
6614 #else
6615                 msg_print("Failed to swap.");
6616 #endif
6617
6618
6619                 /* Failure */
6620                 return FALSE;
6621         }
6622
6623         m_ptr = &m_list[c_ptr->m_idx];
6624         r_ptr = &r_info[m_ptr->r_idx];
6625
6626         (void)set_monster_csleep(c_ptr->m_idx, 0);
6627
6628         if (r_ptr->flagsr & RFR_RES_TELE)
6629         {
6630 #ifdef JP
6631                 msg_print("¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤵¤ì¤¿¡ª");
6632 #else
6633                 msg_print("Your teleportation is blocked!");
6634 #endif
6635
6636                 if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
6637
6638                 /* Failure */
6639                 return FALSE;
6640         }
6641
6642         sound(SOUND_TELEPORT);
6643
6644         /* Swap the player and monster */
6645         (void)move_player_effect(ty, tx, MPE_FORGET_FLOW | MPE_HANDLE_STUFF | MPE_DONT_PICKUP);
6646
6647         /* Success */
6648         return TRUE;
6649 }
6650
6651
6652 /*
6653  * Hack -- apply a "projection()" in a direction (or at the target)
6654  */
6655 bool project_hook(int typ, int dir, int dam, int flg)
6656 {
6657         int tx, ty;
6658
6659         /* Pass through the target if needed */
6660         flg |= (PROJECT_THRU);
6661
6662         /* Use the given direction */
6663         tx = px + ddx[dir];
6664         ty = py + ddy[dir];
6665
6666         /* Hack -- Use an actual "target" */
6667         if ((dir == 5) && target_okay())
6668         {
6669                 tx = target_col;
6670                 ty = target_row;
6671         }
6672
6673         /* Analyze the "dir" and the "target", do NOT explode */
6674         return (project(0, 0, ty, tx, dam, typ, flg, -1));
6675 }
6676
6677
6678 /*
6679  * Cast a bolt spell.
6680  * Stop if we hit a monster, as a "bolt".
6681  * Affect monsters and grids (not objects).
6682  */
6683 bool fire_bolt(int typ, int dir, int dam)
6684 {
6685         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE | PROJECT_GRID;
6686         return (project_hook(typ, dir, dam, flg));
6687 }
6688
6689
6690 /*
6691  * Cast a beam spell.
6692  * Pass through monsters, as a "beam".
6693  * Affect monsters, grids and objects.
6694  */
6695 bool fire_beam(int typ, int dir, int dam)
6696 {
6697         int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
6698         return (project_hook(typ, dir, dam, flg));
6699 }
6700
6701
6702 /*
6703  * Cast a bolt spell, or rarely, a beam spell
6704  */
6705 bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
6706 {
6707         if (randint0(100) < prob)
6708         {
6709                 return (fire_beam(typ, dir, dam));
6710         }
6711         else
6712         {
6713                 return (fire_bolt(typ, dir, dam));
6714         }
6715 }
6716
6717
6718 /*
6719  * Some of the old functions
6720  */
6721 bool lite_line(int dir)
6722 {
6723         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
6724         return (project_hook(GF_LITE_WEAK, dir, damroll(6, 8), flg));
6725 }
6726
6727
6728 bool drain_life(int dir, int dam)
6729 {
6730         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6731         return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
6732 }
6733
6734
6735 bool wall_to_mud(int dir)
6736 {
6737         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6738         return (project_hook(GF_KILL_WALL, dir, 20 + randint1(30), flg));
6739 }
6740
6741
6742 bool wizard_lock(int dir)
6743 {
6744         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6745         return (project_hook(GF_JAM_DOOR, dir, 20 + randint1(30), flg));
6746 }
6747
6748
6749 bool destroy_door(int dir)
6750 {
6751         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
6752         return (project_hook(GF_KILL_DOOR, dir, 0, flg));
6753 }
6754
6755
6756 bool disarm_trap(int dir)
6757 {
6758         int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
6759         return (project_hook(GF_KILL_TRAP, dir, 0, flg));
6760 }
6761
6762
6763 bool heal_monster(int dir, int dam)
6764 {
6765         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6766         return (project_hook(GF_OLD_HEAL, dir, dam, flg));
6767 }
6768
6769
6770 bool speed_monster(int dir)
6771 {
6772         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6773         return (project_hook(GF_OLD_SPEED, dir, p_ptr->lev, flg));
6774 }
6775
6776
6777 bool slow_monster(int dir)
6778 {
6779         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6780         return (project_hook(GF_OLD_SLOW, dir, p_ptr->lev, flg));
6781 }
6782
6783
6784 bool sleep_monster(int dir)
6785 {
6786         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6787         return (project_hook(GF_OLD_SLEEP, dir, p_ptr->lev, flg));
6788 }
6789
6790
6791 bool stasis_monster(int dir)
6792 {
6793         return (fire_ball_hide(GF_STASIS, dir, p_ptr->lev*2, 0));
6794 }
6795
6796
6797 bool stasis_evil(int dir)
6798 {
6799         return (fire_ball_hide(GF_STASIS_EVIL, dir, p_ptr->lev*2, 0));
6800 }
6801
6802
6803 bool confuse_monster(int dir, int plev)
6804 {
6805         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6806         return (project_hook(GF_OLD_CONF, dir, plev, flg));
6807 }
6808
6809
6810 bool stun_monster(int dir, int plev)
6811 {
6812         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6813         return (project_hook(GF_STUN, dir, plev, flg));
6814 }
6815
6816
6817 bool poly_monster(int dir)
6818 {
6819         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6820         bool tester = (project_hook(GF_OLD_POLY, dir, p_ptr->lev, flg));
6821         if (tester)
6822                 chg_virtue(V_CHANCE, 1);
6823         return(tester);
6824 }
6825
6826
6827 bool clone_monster(int dir)
6828 {
6829         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6830         return (project_hook(GF_OLD_CLONE, dir, 0, flg));
6831 }
6832
6833
6834 bool fear_monster(int dir, int plev)
6835 {
6836         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6837         return (project_hook(GF_TURN_ALL, dir, plev, flg));
6838 }
6839
6840
6841 bool death_ray(int dir, int plev)
6842 {
6843         int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_REFLECTABLE;
6844         return (project_hook(GF_DEATH_RAY, dir, plev * 200, flg));
6845 }
6846
6847
6848 bool teleport_monster(int dir)
6849 {
6850         int flg = PROJECT_BEAM | PROJECT_KILL;
6851         return (project_hook(GF_AWAY_ALL, dir, MAX_SIGHT * 5, flg));
6852 }
6853
6854 /*
6855  * Hooks -- affect adjacent grids (radius 1 ball attack)
6856  */
6857 bool door_creation(void)
6858 {
6859         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6860         return (project(0, 1, py, px, 0, GF_MAKE_DOOR, flg, -1));
6861 }
6862
6863
6864 bool trap_creation(int y, int x)
6865 {
6866         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6867         return (project(0, 1, y, x, 0, GF_MAKE_TRAP, flg, -1));
6868 }
6869
6870
6871 bool tree_creation(void)
6872 {
6873         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6874         return (project(0, 1, py, px, 0, GF_MAKE_TREE, flg, -1));
6875 }
6876
6877
6878 bool glyph_creation(void)
6879 {
6880         int flg = PROJECT_GRID | PROJECT_ITEM;
6881         return (project(0, 1, py, px, 0, GF_MAKE_GLYPH, flg, -1));
6882 }
6883
6884
6885 bool wall_stone(void)
6886 {
6887         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6888
6889         bool dummy = (project(0, 1, py, px, 0, GF_STONE_WALL, flg, -1));
6890
6891         /* Update stuff */
6892         p_ptr->update |= (PU_FLOW);
6893
6894         /* Redraw map */
6895         p_ptr->redraw |= (PR_MAP);
6896
6897         return dummy;
6898 }
6899
6900
6901 bool destroy_doors_touch(void)
6902 {
6903         int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6904         return (project(0, 1, py, px, 0, GF_KILL_DOOR, flg, -1));
6905 }
6906
6907
6908 bool sleep_monsters_touch(void)
6909 {
6910         int flg = PROJECT_KILL | PROJECT_HIDE;
6911         return (project(0, 1, py, px, p_ptr->lev, GF_OLD_SLEEP, flg, -1));
6912 }
6913
6914
6915 bool animate_dead(int who, int y, int x)
6916 {
6917         int flg = PROJECT_ITEM | PROJECT_HIDE;
6918         return (project(who, 5, y, x, 0, GF_ANIM_DEAD, flg, -1));
6919 }
6920
6921
6922 void call_chaos(void)
6923 {
6924         int Chaos_type, dummy, dir;
6925         int plev = p_ptr->lev;
6926         bool line_chaos = FALSE;
6927
6928         int hurt_types[31] =
6929         {
6930                 GF_ELEC,      GF_POIS,    GF_ACID,    GF_COLD,
6931                 GF_FIRE,      GF_MISSILE, GF_ARROW,   GF_PLASMA,
6932                 GF_HOLY_FIRE, GF_WATER,   GF_LITE,    GF_DARK,
6933                 GF_FORCE,     GF_INERTIA, GF_MANA,    GF_METEOR,
6934                 GF_ICE,       GF_CHAOS,   GF_NETHER,  GF_DISENCHANT,
6935                 GF_SHARDS,    GF_SOUND,   GF_NEXUS,   GF_CONFUSION,
6936                 GF_TIME,      GF_GRAVITY, GF_ROCKET,  GF_NUKE,
6937                 GF_HELL_FIRE, GF_DISINTEGRATE, GF_PSY_SPEAR
6938         };
6939
6940         Chaos_type = hurt_types[randint0(31)];
6941         if (one_in_(4)) line_chaos = TRUE;
6942
6943         if (one_in_(6))
6944         {
6945                 for (dummy = 1; dummy < 10; dummy++)
6946                 {
6947                         if (dummy - 5)
6948                         {
6949                                 if (line_chaos)
6950                                         fire_beam(Chaos_type, dummy, 150);
6951                                 else
6952                                         fire_ball(Chaos_type, dummy, 150, 2);
6953                         }
6954                 }
6955         }
6956         else if (one_in_(3))
6957         {
6958                 fire_ball(Chaos_type, 0, 500, 8);
6959         }
6960         else
6961         {
6962                 if (!get_aim_dir(&dir)) return;
6963                 if (line_chaos)
6964                         fire_beam(Chaos_type, dir, 250);
6965                 else
6966                         fire_ball(Chaos_type, dir, 250, 3 + (plev / 35));
6967         }
6968 }
6969
6970
6971 /*
6972  * Activate the evil Topi Ylinen curse
6973  * rr9: Stop the nasty things when a Cyberdemon is summoned
6974  * or the player gets paralyzed.
6975  */
6976 bool activate_ty_curse(bool stop_ty, int *count)
6977 {
6978         int     i = 0;
6979
6980         int flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
6981
6982         do
6983         {
6984                 switch (randint1(34))
6985                 {
6986                 case 28: case 29:
6987                         if (!(*count))
6988                         {
6989 #ifdef JP
6990 msg_print("ÃÏÌ̤¬Íɤ줿...");
6991 #else
6992                                 msg_print("The ground trembles...");
6993 #endif
6994
6995                                 earthquake(py, px, 5 + randint0(10));
6996                                 if (!one_in_(6)) break;
6997                         }
6998                 case 30: case 31:
6999                         if (!(*count))
7000                         {
7001                                 int dam = damroll(10, 10);
7002 #ifdef JP
7003 msg_print("½ã¿è¤ÊËâÎϤμ¡¸µ¤Ø¤ÎÈ⤬³«¤¤¤¿¡ª");
7004 #else
7005                                 msg_print("A portal opens to a plane of raw mana!");
7006 #endif
7007
7008                                 project(0, 8, py, px, dam, GF_MANA, flg, -1);
7009 #ifdef JP
7010                                 take_hit(DAMAGE_NOESCAPE, dam, "½ã¿è¤ÊËâÎϤβòÊü", -1);
7011 #else
7012                                 take_hit(DAMAGE_NOESCAPE, dam, "released pure mana", -1);
7013 #endif
7014                                 if (!one_in_(6)) break;
7015                         }
7016                 case 32: case 33:
7017                         if (!(*count))
7018                         {
7019 #ifdef JP
7020 msg_print("¼þ°Ï¤Î¶õ´Ö¤¬ÏĤó¤À¡ª");
7021 #else
7022                                 msg_print("Space warps about you!");
7023 #endif
7024
7025                                 teleport_player(damroll(10, 10), TELEPORT_PASSIVE);
7026                                 if (randint0(13)) (*count) += activate_hi_summon(py, px, FALSE);
7027                                 if (!one_in_(6)) break;
7028                         }
7029                 case 34:
7030 #ifdef JP
7031 msg_print("¥¨¥Í¥ë¥®¡¼¤Î¤¦¤Í¤ê¤ò´¶¤¸¤¿¡ª");
7032 #else
7033                         msg_print("You feel a surge of energy!");
7034 #endif
7035
7036                         wall_breaker();
7037                         if (!randint0(7))
7038                         {
7039                                 project(0, 7, py, px, 50, GF_KILL_WALL, flg, -1);
7040 #ifdef JP
7041                                 take_hit(DAMAGE_NOESCAPE, 50, "¥¨¥Í¥ë¥®¡¼¤Î¤¦¤Í¤ê", -1);
7042 #else
7043                                 take_hit(DAMAGE_NOESCAPE, 50, "surge of energy", -1);
7044 #endif
7045                         }
7046                         if (!one_in_(6)) break;
7047                 case 1: case 2: case 3: case 16: case 17:
7048                         aggravate_monsters(0);
7049                         if (!one_in_(6)) break;
7050                 case 4: case 5: case 6:
7051                         (*count) += activate_hi_summon(py, px, FALSE);
7052                         if (!one_in_(6)) break;
7053                 case 7: case 8: case 9: case 18:
7054                         (*count) += summon_specific(0, py, px, dun_level, 0, (PM_ALLOW_GROUP | PM_ALLOW_UNIQUE | PM_NO_PET));
7055                         if (!one_in_(6)) break;
7056                 case 10: case 11: case 12:
7057 #ifdef JP
7058 msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
7059 #else
7060                         msg_print("You feel your life draining away...");
7061 #endif
7062
7063                         lose_exp(p_ptr->exp / 16);
7064                         if (!one_in_(6)) break;
7065                 case 13: case 14: case 15: case 19: case 20:
7066                         if (stop_ty || (p_ptr->free_act && (randint1(125) < p_ptr->skill_sav)) || (p_ptr->pclass == CLASS_BERSERKER))
7067                         {
7068                                 /* Do nothing */ ;
7069                         }
7070                         else
7071                         {
7072 #ifdef JP
7073 msg_print("ĦÁü¤Ë¤Ê¤Ã¤¿µ¤Ê¬¤À¡ª");
7074 #else
7075                                 msg_print("You feel like a statue!");
7076 #endif
7077
7078                                 if (p_ptr->free_act)
7079                                         set_paralyzed(p_ptr->paralyzed + randint1(3));
7080                                 else
7081                                         set_paralyzed(p_ptr->paralyzed + randint1(13));
7082                                 stop_ty = TRUE;
7083                         }
7084                         if (!one_in_(6)) break;
7085                 case 21: case 22: case 23:
7086                         (void)do_dec_stat(randint0(6));
7087                         if (!one_in_(6)) break;
7088                 case 24:
7089 #ifdef JP
7090 msg_print("¤Û¤¨¡©»ä¤Ïï¡©¤³¤³¤Ç²¿¤·¤Æ¤ë¡©");
7091 #else
7092                         msg_print("Huh? Who am I? What am I doing here?");
7093 #endif
7094
7095                         lose_all_info();
7096                         if (!one_in_(6)) break;
7097                 case 25:
7098                         /*
7099                          * Only summon Cyberdemons deep in the dungeon.
7100                          */
7101                         if ((dun_level > 65) && !stop_ty)
7102                         {
7103                                 (*count) += summon_cyber(-1, py, px);
7104                                 stop_ty = TRUE;
7105                                 break;
7106                         }
7107                         if (!one_in_(6)) break;
7108                 default:
7109                         while (i < 6)
7110                         {
7111                                 do
7112                                 {
7113                                         (void)do_dec_stat(i);
7114                                 }
7115                                 while (one_in_(2));
7116
7117                                 i++;
7118                         }
7119                 }
7120         }
7121         while (one_in_(3) && !stop_ty);
7122
7123         return stop_ty;
7124 }
7125
7126
7127 int activate_hi_summon(int y, int x, bool can_pet)
7128 {
7129         int i;
7130         int count = 0;
7131         int summon_lev;
7132         u32b mode = PM_ALLOW_GROUP;
7133         bool pet = FALSE;
7134
7135         if (can_pet)
7136         {
7137                 if (one_in_(4))
7138                 {
7139                         mode |= PM_FORCE_FRIENDLY;
7140                 }
7141                 else
7142                 {
7143                         mode |= PM_FORCE_PET;
7144                         pet = TRUE;
7145                 }
7146         }
7147
7148         if (!pet) mode |= PM_NO_PET;
7149
7150         summon_lev = (pet ? p_ptr->lev * 2 / 3 + randint1(p_ptr->lev / 2) : dun_level);
7151
7152         for (i = 0; i < (randint1(7) + (dun_level / 40)); i++)
7153         {
7154                 switch (randint1(25) + (dun_level / 20))
7155                 {
7156                         case 1: case 2:
7157                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, mode);
7158                                 break;
7159                         case 3: case 4:
7160                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, mode);
7161                                 break;
7162                         case 5: case 6:
7163                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, mode);
7164                                 break;
7165                         case 7: case 8:
7166                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, mode);
7167                                 break;
7168                         case 9: case 10:
7169                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, mode);
7170                                 break;
7171                         case 11: case 12:
7172                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, mode);
7173                                 break;
7174                         case 13: case 14:
7175                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, mode);
7176                                 break;
7177                         case 15: case 16:
7178                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, mode);
7179                                 break;
7180                         case 17:
7181                                 if (can_pet) break;
7182                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
7183                                 break;
7184                         case 18: case 19:
7185                                 if (can_pet) break;
7186                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE));
7187                                 break;
7188                         case 20: case 21:
7189                                 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
7190                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, mode);
7191                                 break;
7192                         case 22: case 23:
7193                                 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
7194                                 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, mode);
7195                                 break;
7196                         case 24:
7197                                 count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, mode);
7198                                 break;
7199                         default:
7200                                 if (!can_pet) mode |= PM_ALLOW_UNIQUE;
7201                                 count += summon_specific((pet ? -1 : 0), y, x,pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, mode);
7202                 }
7203         }
7204
7205         return count;
7206 }
7207
7208
7209 /* ToDo: check */
7210 int summon_cyber(int who, int y, int x)
7211 {
7212         int i;
7213         int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint1(2));
7214         int count = 0;
7215         u32b mode = PM_ALLOW_GROUP;
7216
7217         /* Summoned by a monster */
7218         if (who > 0)
7219         {
7220                 monster_type *m_ptr = &m_list[who];
7221                 if (is_pet(m_ptr)) mode |= PM_FORCE_PET;
7222         }
7223
7224         if (max_cyber > 4) max_cyber = 4;
7225
7226         for (i = 0; i < max_cyber; i++)
7227         {
7228                 count += summon_specific(who, y, x, 100, SUMMON_CYBER, mode);
7229         }
7230
7231         return count;
7232 }
7233
7234
7235 void wall_breaker(void)
7236 {
7237         int i;
7238         int y, x;
7239         int attempts = 1000;
7240
7241         if (randint1(80 + p_ptr->lev) < 70)
7242         {
7243                 while (attempts--)
7244                 {
7245                         scatter(&y, &x, py, px, 4, 0);
7246
7247                         if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
7248
7249                         if (!player_bold(y, x)) break;
7250                 }
7251
7252                 project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
7253                                   (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
7254         }
7255         else if (randint1(100) > 30)
7256         {
7257                 earthquake(py, px, 1);
7258         }
7259         else
7260         {
7261                 int num = damroll(5, 3);
7262
7263                 for (i = 0; i < num; i++)
7264                 {
7265                         while (1)
7266                         {
7267                                 scatter(&y, &x, py, px, 10, 0);
7268
7269                                 if (!player_bold(y, x)) break;
7270                         }
7271
7272                         project(0, 0, y, x, 20 + randint1(30), GF_KILL_WALL,
7273                                           (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
7274                 }
7275         }
7276 }
7277
7278
7279 /*
7280  * Confuse monsters
7281  */
7282 bool confuse_monsters(int dam)
7283 {
7284         return (project_hack(GF_OLD_CONF, dam));
7285 }
7286
7287
7288 /*
7289  * Charm monsters
7290  */
7291 bool charm_monsters(int dam)
7292 {
7293         return (project_hack(GF_CHARM, dam));
7294 }
7295
7296
7297 /*
7298  * Charm animals
7299  */
7300 bool charm_animals(int dam)
7301 {
7302         return (project_hack(GF_CONTROL_ANIMAL, dam));
7303 }
7304
7305
7306 /*
7307  * Stun monsters
7308  */
7309 bool stun_monsters(int dam)
7310 {
7311         return (project_hack(GF_STUN, dam));
7312 }
7313
7314
7315 /*
7316  * Stasis monsters
7317  */
7318 bool stasis_monsters(int dam)
7319 {
7320         return (project_hack(GF_STASIS, dam));
7321 }
7322
7323
7324 /*
7325  * Mindblast monsters
7326  */
7327 bool mindblast_monsters(int dam)
7328 {
7329         return (project_hack(GF_PSI, dam));
7330 }
7331
7332
7333 /*
7334  * Banish all monsters
7335  */
7336 bool banish_monsters(int dist)
7337 {
7338         return (project_hack(GF_AWAY_ALL, dist));
7339 }
7340
7341
7342 /*
7343  * Turn evil
7344  */
7345 bool turn_evil(int dam)
7346 {
7347         return (project_hack(GF_TURN_EVIL, dam));
7348 }
7349
7350
7351 /*
7352  * Turn everyone
7353  */
7354 bool turn_monsters(int dam)
7355 {
7356         return (project_hack(GF_TURN_ALL, dam));
7357 }
7358
7359
7360 /*
7361  * Death-ray all monsters (note: OBSCENELY powerful)
7362  */
7363 bool deathray_monsters(void)
7364 {
7365         return (project_hack(GF_DEATH_RAY, p_ptr->lev * 200));
7366 }
7367
7368
7369 bool charm_monster(int dir, int plev)
7370 {
7371         int flg = PROJECT_STOP | PROJECT_KILL;
7372         return (project_hook(GF_CHARM, dir, plev, flg));
7373 }
7374
7375
7376 bool control_one_undead(int dir, int plev)
7377 {
7378         int flg = PROJECT_STOP | PROJECT_KILL;
7379         return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
7380 }
7381
7382
7383 bool control_one_demon(int dir, int plev)
7384 {
7385         int flg = PROJECT_STOP | PROJECT_KILL;
7386         return (project_hook(GF_CONTROL_DEMON, dir, plev, flg));
7387 }
7388
7389
7390 bool charm_animal(int dir, int plev)
7391 {
7392         int flg = PROJECT_STOP | PROJECT_KILL;
7393         return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
7394 }
7395
7396
7397 bool charm_living(int dir, int plev)
7398 {
7399         int flg = PROJECT_STOP | PROJECT_KILL;
7400         return (project_hook(GF_CONTROL_LIVING, dir, plev, flg));
7401 }
7402
7403
7404 bool kawarimi(bool success)
7405 {
7406         object_type forge;
7407         object_type *q_ptr = &forge;
7408         int y, x;
7409
7410         if (p_ptr->is_dead) return FALSE;
7411         if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return FALSE;
7412         if (randint0(200) < p_ptr->stun) return FALSE;
7413
7414         if (!success && one_in_(3))
7415         {
7416 #ifdef JP
7417                 msg_print("¼ºÇÔ¡ªÆ¨¤²¤é¤ì¤Ê¤«¤Ã¤¿¡£");
7418 #else
7419                 msg_print("Failed! You couldn't run away.");
7420 #endif
7421                 p_ptr->special_defense &= ~(NINJA_KAWARIMI);
7422                 p_ptr->redraw |= (PR_STATUS);
7423                 return FALSE;
7424         }
7425
7426         y = py;
7427         x = px;
7428
7429         teleport_player(10 + randint1(90), 0L);
7430
7431         object_wipe(q_ptr);
7432
7433         object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
7434
7435         q_ptr->pval = MON_NINJA;
7436
7437         /* Drop it in the dungeon */
7438         (void)drop_near(q_ptr, -1, y, x);
7439
7440 #ifdef JP
7441         if (success) msg_print("¹¶·â¤ò¼õ¤±¤ëÁ°¤ËÁÇÁ᤯¿È¤ò¤Ò¤ë¤¬¤¨¤·¤¿¡£");
7442         else msg_print("¼ºÇÔ¡ª¹¶·â¤ò¼õ¤±¤Æ¤·¤Þ¤Ã¤¿¡£");
7443 #else
7444         if (success) msg_print("You have turned around just before the attack hit you.");
7445         else msg_print("Failed! You are hit by the attack.");
7446 #endif
7447
7448         p_ptr->special_defense &= ~(NINJA_KAWARIMI);
7449         p_ptr->redraw |= (PR_STATUS);
7450
7451         /* Teleported */
7452         return TRUE;
7453 }
7454
7455
7456 /*
7457  * "Rush Attack" routine for Samurai or Ninja
7458  * Return value is for checking "done"
7459  */
7460 bool rush_attack(bool *mdeath)
7461 {
7462         int dir;
7463         int tx, ty;
7464         int tm_idx = 0;
7465         u16b path_g[32];
7466         int path_n, i;
7467         bool tmp_mdeath = FALSE;
7468         bool moved = FALSE;
7469
7470         if (mdeath) *mdeath = FALSE;
7471
7472         project_length = 5;
7473         if (!get_aim_dir(&dir)) return FALSE;
7474
7475         /* Use the given direction */
7476         tx = px + project_length * ddx[dir];
7477         ty = py + project_length * ddy[dir];
7478
7479         /* Hack -- Use an actual "target" */
7480         if ((dir == 5) && target_okay())
7481         {
7482                 tx = target_col;
7483                 ty = target_row;
7484         }
7485
7486         if (in_bounds(ty, tx)) tm_idx = cave[ty][tx].m_idx;
7487
7488         path_n = project_path(path_g, project_length, py, px, ty, tx, PROJECT_STOP | PROJECT_KILL);
7489         project_length = 0;
7490
7491         /* No need to move */
7492         if (!path_n) return TRUE;
7493
7494         /* Use ty and tx as to-move point */
7495         ty = py;
7496         tx = px;
7497
7498         /* Project along the path */
7499         for (i = 0; i < path_n; i++)
7500         {
7501                 monster_type *m_ptr;
7502
7503                 int ny = GRID_Y(path_g[i]);
7504                 int nx = GRID_X(path_g[i]);
7505
7506                 if (cave_empty_bold(ny, nx) && player_can_enter(cave[ny][nx].feat, 0))
7507                 {
7508                         ty = ny;
7509                         tx = nx;
7510
7511                         /* Go to next grid */
7512                         continue;
7513                 }
7514
7515                 if (!cave[ny][nx].m_idx)
7516                 {
7517                         if (tm_idx)
7518                         {
7519 #ifdef JP
7520                                 msg_print("¼ºÇÔ¡ª");
7521 #else
7522                                 msg_print("Failed!");
7523 #endif
7524                         }
7525                         else
7526                         {
7527 #ifdef JP
7528                                 msg_print("¤³¤³¤Ë¤ÏÆþ¿È¤Ç¤ÏÆþ¤ì¤Ê¤¤¡£");
7529 #else
7530                                 msg_print("You can't move to that place.");
7531 #endif
7532                         }
7533
7534                         /* Exit loop */
7535                         break;
7536                 }
7537
7538                 /* Move player before updating the monster */
7539                 if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
7540
7541                 /* Update the monster */
7542                 update_mon(cave[ny][nx].m_idx, TRUE);
7543
7544                 /* Found a monster */
7545                 m_ptr = &m_list[cave[ny][nx].m_idx];
7546
7547                 if (tm_idx != cave[ny][nx].m_idx)
7548                 {
7549 #ifdef JP
7550                         msg_format("%s%s¤¬Î©¤Á¤Õ¤µ¤¬¤Ã¤Æ¤¤¤ë¡ª", tm_idx ? "Ê̤Î" : "",
7551                                    m_ptr->ml ? "¥â¥ó¥¹¥¿¡¼" : "²¿¤«");
7552 #else
7553                         msg_format("There is %s in the way!", m_ptr->ml ? (tm_idx ? "another monster" : "a monster") : "someone");
7554 #endif
7555                 }
7556                 else if (!player_bold(ty, tx))
7557                 {
7558                         /* Hold the monster name */
7559                         char m_name[80];
7560
7561                         /* Get the monster name (BEFORE polymorphing) */
7562                         monster_desc(m_name, m_ptr, 0);
7563 #ifdef JP
7564                         msg_format("ÁÇÁ᤯%s¤Î²û¤ËÆþ¤ê¹þ¤ó¤À¡ª", m_name);
7565 #else
7566                         msg_format("You quickly jump in and attack %s!", m_name);
7567 #endif
7568                 }
7569
7570                 if (!player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
7571                 moved = TRUE;
7572                 tmp_mdeath = py_attack(ny, nx, HISSATSU_NYUSIN);
7573
7574                 break;
7575         }
7576
7577         if (!moved && !player_bold(ty, tx)) teleport_player_to(ty, tx, TELEPORT_NONMAGICAL);
7578
7579         if (mdeath) *mdeath = tmp_mdeath;
7580         return TRUE;
7581 }
7582
7583
7584 /*
7585  * Remove all mirrors in this floor
7586  */
7587 void remove_all_mirrors(bool explode)
7588 {
7589         int x, y;
7590
7591         for (x = 0; x < cur_wid; x++)
7592         {
7593                 for (y = 0; y < cur_hgt; y++)
7594                 {
7595                         if (is_mirror_grid(&cave[y][x]))
7596                         {
7597                                 remove_mirror(y, x);
7598                                 if (explode)
7599                                         project(0, 2, y, x, p_ptr->lev / 2 + 5, GF_SHARDS,
7600                                                 (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP | PROJECT_NO_HANGEKI), -1);
7601                         }
7602                 }
7603         }
7604 }