OSDN Git Service

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