OSDN Git Service

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