OSDN Git Service

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