OSDN Git Service

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