OSDN Git Service

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