OSDN Git Service

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