OSDN Git Service

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