OSDN Git Service

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