OSDN Git Service

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