3 /* Purpose: Spell code (part 2) */
6 * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke
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.
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
23 * It is now a lot more efficient. -BEN-
25 * See also "identify_fully()".
27 * XXX XXX XXX Use the "show_file()" method, perhaps.
29 void self_knowledge(void)
34 char v_string [8] [128];
35 char s_string [6] [128];
37 u32b f1 = 0L, f2 = 0L, f3 = 0L;
48 int plev = p_ptr->lev;
52 p_ptr->knowledge |= (KNOW_STAT | KNOW_HPRATE);
56 percent = (int)(((long)player_hp[PY_MAX_LEVEL - 1] * 200L) /
58 ((PY_MAX_LEVEL - 1+3) * (p_ptr->hitdie + 1))));
61 sprintf(Dummy, "¸½ºß¤ÎÂÎÎÏ¥é¥ó¥¯ : %d/100", percent);
63 sprintf(Dummy, "Your current Life Rating is %d/100.", percent);
66 strcpy(buf[0], Dummy);
70 chg_virtue(V_KNOWLEDGE, 1);
71 chg_virtue(V_ENLIGHTEN, 1);
73 /* Acquire item flags from equipment */
74 for (k = INVEN_RARM; k < INVEN_TOTAL; k++)
78 o_ptr = &inventory[k];
80 /* Skip non-objects */
81 if (!o_ptr->k_idx) continue;
83 /* Extract the flags */
84 object_flags(o_ptr, &t1, &t2, &t3);
93 info[i++] = "ǽÎϤκÇÂçÃÍ";
95 info[i++] = "Limits of maximum stats";
98 for (v_nr = 0; v_nr < 6; v_nr++)
102 sprintf(stat_desc, "%s 18/%d", stat_names[v_nr], p_ptr->stat_max_max[v_nr]-18);
104 strcpy(s_string[v_nr], stat_desc);
106 info[i++] = s_string[v_nr];
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);
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);
129 strcpy(buf[1], Dummy);
131 for (v_nr = 0; v_nr < 8; v_nr++)
135 int tester = p_ptr->virtues[v_nr];
137 strcpy(v_name, virtue[(p_ptr->vir_types[v_nr])-1]);
140 sprintf(vir_desc, "¤ª¤Ã¤È¡£%s¤Î¾ðÊó¤Ê¤·¡£", v_name);
142 sprintf(vir_desc, "Oops. No info about %s.", v_name);
146 sprintf(vir_desc, "[%s]¤ÎÂÐ¶Ë (%d)",
148 sprintf(vir_desc, "You are the polar opposite of %s (%d).",
151 else if (tester < -80)
153 sprintf(vir_desc, "[%s]¤ÎÂçŨ (%d)",
155 sprintf(vir_desc, "You are an arch-enemy of %s (%d).",
158 else if (tester < -60)
160 sprintf(vir_desc, "[%s]¤Î¶¯Å¨ (%d)",
162 sprintf(vir_desc, "You are a bitter enemy of %s (%d).",
165 else if (tester < -40)
167 sprintf(vir_desc, "[%s]¤ÎŨ (%d)",
169 sprintf(vir_desc, "You are an enemy of %s (%d).",
172 else if (tester < -20)
174 sprintf(vir_desc, "[%s]¤Îºá¼Ô (%d)",
176 sprintf(vir_desc, "You have sinned against %s (%d).",
181 sprintf(vir_desc, "[%s]¤ÎÌÂÆ»¼Ô (%d)",
183 sprintf(vir_desc, "You have strayed from the path of %s (%d).",
186 else if (tester == 0)
188 sprintf(vir_desc, "[%s]¤ÎÃæΩ¼Ô (%d)",
190 sprintf(vir_desc,"You are neutral to %s (%d).",
193 else if (tester < 20)
195 sprintf(vir_desc, "[%s]¤Î¾®ÆÁ¼Ô (%d)",
197 sprintf(vir_desc,"You are somewhat virtuous in %s (%d).",
200 else if (tester < 40)
202 sprintf(vir_desc, "[%s]¤ÎÃæÆÁ¼Ô (%d)",
204 sprintf(vir_desc,"You are virtuous in %s (%d).",
207 else if (tester < 60)
209 sprintf(vir_desc, "[%s]¤Î¹âÆÁ¼Ô (%d)",
211 sprintf(vir_desc,"You are very virtuous in %s (%d).",
214 else if (tester < 80)
216 sprintf(vir_desc, "[%s]¤ÎÇÆ¼Ô (%d)",
218 sprintf(vir_desc,"You are a champion of %s (%d).",
221 else if (tester < 100)
223 sprintf(vir_desc, "[%s]¤Î°ÎÂç¤ÊÇÆ¼Ô (%d)",
225 sprintf(vir_desc,"You are a great champion of %s (%d).",
230 sprintf(vir_desc, "[%s]¤Î¶ñ¸½¼Ô (%d)",
232 sprintf(vir_desc,"You are the living embodiment of %s (%d).",
236 strcpy(v_string[v_nr], vir_desc);
238 info[i++] = v_string[v_nr];
242 /* Racial powers... */
243 if (p_ptr->mimic_form)
245 switch (p_ptr->mimic_form)
248 case MIMIC_DEMON_LORD:
250 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÃϹö¤«²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤¤ë¡£(%d MP)", 3 * plev, 10+plev/3);
252 sprintf(Dummy, "You can nether breathe, dam. %d (cost %d).", 3 * plev, 10+plev/3);
261 sprintf(Dummy, "¤¢¤Ê¤¿¤ÏŨ¤«¤é %d-%d HP ¤ÎÀ¸Ì¿ÎϤòµÛ¼ý¤Ç¤¤ë¡£(%d MP)",
263 sprintf(Dummy, "You can steal life from a foe, dam. %d-%d (cost %d).",
266 plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
274 switch (p_ptr->prace)
280 info[i++] = "¤¢¤Ê¤¿¤Ï櫤ȥɥ¢¤È³¬Ãʤò´¶ÃΤǤ¤ë¡£(5 MP)";
282 info[i++] = "You can find traps, doors and stairs (cost 5).";
290 info[i++] = "¤¢¤Ê¤¿¤Ï¿©ÎÁ¤òÀ¸À®¤Ç¤¤ë¡£(10 MP)";
292 info[i++] = "You can produce food (cost 10).";
301 sprintf(Dummy, "¤¢¤Ê¤¿¤ÏÈÏ°Ï %d °ÊÆâ¤Ë¥Æ¥ì¥Ý¡¼¥È¤Ç¤¤ë¡£(%d MP)",
303 sprintf(Dummy, "You can teleport, range %d (cost %d).",
306 (1 + plev), (5 + (plev / 5)));
313 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤò½üµî¤Ç¤¤ë¡£(5 MP)";
315 info[i++] = "You can remove fear (cost 5).";
319 case RACE_HALF_TROLL:
322 info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Ë½²½¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(12 MP) ";
324 info[i++] = "You enter berserk fury (cost 12).";
331 info[i++] = "¤¢¤Ê¤¿¤Ï¥·¥ã¥É¥¦¥·¥Õ¥È¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(50 MP)";
333 info[i++] = "You can Shift Shadows (cost 50).";
338 info[i++] = "¤¢¤Ê¤¿¤Ï¡Ö¥Ñ¥¿¡¼¥ó¡×¤ò¿´¤ËÉÁ¤¤¤ÆÊ⤯¤³¤È¤¬¤Ç¤¤ë¡£(75 MP)";
340 info[i++] = "You can mentally Walk the Pattern (cost 75).";
347 info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Ë½²½¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(10 MP) ";
349 info[i++] = "You can enter berserk fury (cost 10).";
356 info[i++] = "¤¢¤Ê¤¿¤ÏÇúȯ¤Î¥ë¡¼¥ó¤ò»Å³Ý¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£(35 MP)";
358 info[i++] = "You can set an Explosive Rune (cost 35).";
362 case RACE_HALF_GIANT:
365 info[i++] = "¤¢¤Ê¤¿¤ÏÀФÎÊɤò²õ¤¹¤³¤È¤¬¤Ç¤¤ë¡£(10 MP)";
367 info[i++] = "You can break stone walls (cost 10).";
371 case RACE_HALF_TITAN:
374 info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤ò¥¹¥¥ã¥ó¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(20 MP)";
376 info[i++] = "You can probe monsters (cost 20).";
384 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î´äÀФòÅꤲ¤ë¤³¤È¤¬¤Ç¤¤ë¡£(15 MP)",
386 sprintf(Dummy, "You can throw a boulder, dam. %d (cost 15).",
396 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤò¸Æ¤Óµ¯¤³¤¹¶«¤ÓÀ¼¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(15 MP)";
398 info[i++] = "You can make a terrifying scream (cost 15).";
406 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î»À¤ò¿á¤¤«¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£(9 MP)", plev);
408 sprintf(Dummy, "You can spit acid, dam. %d (cost 9).", plev);
419 "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÆÇÌð¤òÅꤲ¤ë¤³¤È¤¬¤Ç¤¤ë¡£(8 MP)", plev);
421 "You can throw a dart of poison, dam. %d (cost 8).", plev);
431 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò»È¤¨¤ë¡£(2 MP)",
433 sprintf(Dummy, "You can cast a Magic Missile, dam %d (cost 2).",
436 (3 + ((plev-1) / 5)));
442 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤¤ë¡£(%d MP)", 2 * plev, plev);
444 sprintf(Dummy, "You can breathe, dam. %d (cost %d).", 2 * plev, plev);
449 case RACE_MIND_FLAYER:
452 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÀº¿À¹¶·â¤ò¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(12 MP)", plev);
454 sprintf(Dummy, "You can mind blast your enemies, dam %d (cost 12).", plev);
463 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò»È¤¨¤ë¡£(15 MP)", plev);
465 sprintf(Dummy, "You can cast a Fire Ball, dam. %d (cost 15).", plev);
473 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò»È¤¨¤ë¡£(15 MP)", plev);
475 sprintf(Dummy, "You can cast a Fire Bolt, dam. %d (cost 15).", plev);
484 info[i++] = "¤¢¤Ê¤¿¤Ï d20+30 ¥¿¡¼¥ó¤Î´ÖÈ©¤òÀФËÊѲ½¤µ¤»¤é¤ì¤ë¡£(15 MP)";
486 info[i++] = "You can turn your skin to stone, dur d20+30 (cost 15).";
494 info[i++] = "¤¢¤Ê¤¿¤Ï¼º¤Ã¤¿À¸Ì¿ÎϤò²óÉü¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(30 MP)";
496 info[i++] = "You can restore lost life forces (cost 30).";
504 sprintf(Dummy, "¤¢¤Ê¤¿¤ÏŨ¤«¤é %d-%d HP ¤ÎÀ¸Ì¿ÎϤòµÛ¼ý¤Ç¤¤ë¡£(%d MP)",
506 sprintf(Dummy, "You can steal life from a foe, dam. %d-%d (cost %d).",
509 plev + MAX(1, plev / 10), plev + plev * MAX(1, plev / 10), 1 + (plev / 3));
517 info[i++] = "¤¢¤Ê¤¿¤Ïµã¤¶«¤ó¤ÇŨ¤ò¶²Éݤµ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£(3 MP)";
519 info[i++] = "You can wail to terrify your enemies (cost 3).";
528 info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤ò̲¤é¤»¤ëËâË¡¤ÎÊ´¤òÅꤲ¤ë¤³¤È¤¬¤Ç¤¤ë¡£(12 MP)";
530 info[i++] = "You can throw magical dust which induces sleep (cost 12).";
537 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤ÎÃϹö¤«²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤¤ë¡£(%d MP)", 3 * plev, 10+plev/3);
539 sprintf(Dummy, "You can breathe nether, dam. %d (cost %d).", 3 * plev, 10+plev/3);
547 info[i++] = "¤¢¤Ê¤¿¤Ï d20+30 ¥¿¡¼¥ó¤Î´Ö²£¤Ë¿¤Ó¤ë¤³¤È¤¬¤Ç¤¤ë¡£(15 MP)";
549 info[i++] = "You can expand horizontally, dur d20+30 (cost 15).";
556 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥ì¥¤¥¬¥ó¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(7 MP)", (plev + 1) / 2);
558 sprintf(Dummy, "You can fire a ray gun with damage %d (cost 7).", (plev+1)/2);
562 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ö¥é¥¹¥¿¡¼¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(13 MP)", plev);
564 sprintf(Dummy, "You can fire a blaster with damage %d (cost 13).", plev);
568 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ð¥º¡¼¥«¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(26 MP)", plev * 2);
570 sprintf(Dummy, "You can fire a bazooka with damage %d (cost 26).", plev * 2);
574 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥Ó¡¼¥à¥¥ã¥Î¥ó¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(40 MP)", plev * 2);
576 sprintf(Dummy, "You can fire a beam cannon with damage %d (cost 40).", plev * 2);
580 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï %d ¥À¥á¡¼¥¸¤Î¥í¥±¥Ã¥È¤ò·â¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(60 MP)", plev * 5);
582 sprintf(Dummy, "You can fire a rocket with damage %d (cost 60).", plev * 5);
592 switch(p_ptr->pclass)
598 info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤ÊÊý¸þ¤ËÂФ·¤Æ¿ô²ó¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(75 MP)";
600 info[i++] = "You can attack some random directions at a time (cost 75).";
605 case CLASS_HIGH_MAGE:
610 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤ÎËâÎϤòµÛ¼ý¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(1 MP)";
612 info[i++] = "You can absorb charges from an item (cost 1).";
617 if (p_ptr->realm1 == REALM_LIFE)
622 info[i++] = "¤¢¤Ê¤¿¤ÏÉð´ï¤ò½ËÊ¡¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(70 MP)";
624 info[i++] = "You can bless a weapon (cost 70).";
633 info[i++] = "¤¢¤Ê¤¿¤Ï¼þ¤ê¤Î¤¹¤Ù¤Æ¤Î¥â¥ó¥¹¥¿¡¼¤ò¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(40 MP)";
635 info[i++] = "You can damages all monsters in sight (cost 40).";
644 info[i++] = "¤¢¤Ê¤¿¤Ï¹¶·â¤·¤Æ¨ºÂ¤Ëƨ¤²¤ë¤³¤È¤¬¤Ç¤¤ë¡£(12 MP)";
646 info[i++] = "You can hit a monster and teleport at a time (cost 12).";
654 info[i++] = "¤¢¤Ê¤¿¤Ï²øʪ¤òÄ´ºº¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(20 MP)";
656 info[i++] = "You can prove monsters (cost 20).";
661 if (p_ptr->realm1 == REALM_LIFE)
666 info[i++] = "¤¢¤Ê¤¿¤ÏÀ»¤Ê¤ëÁä¤òÊü¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(30 MP)";
668 info[i++] = "You can fires a holy spear (cost 30).";
677 info[i++] = "¤¢¤Ê¤¿¤ÏÀ¸Ì¿ÎϤò¸º¾¯¤µ¤»¤ëÁä¤òÊü¤Ä¤³¤È¤¬¤Ç¤¤ë¡£(30 MP)";
679 info[i++] = "You can fires a spear which drains vitality (cost 30).";
684 case CLASS_WARRIOR_MAGE:
688 info[i++] = "¤¢¤Ê¤¿¤Ï£È£Ð¤ò£Í£Ð¤ËÊÑ´¹¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
690 info[i++] = "You can convert HP to SP (cost 0).";
693 info[i++] = "¤¢¤Ê¤¿¤Ï£Í£Ð¤ò£È£Ð¤ËÊÑ´¹¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
695 info[i++] = "You can convert SP to HP (cost 0).";
699 case CLASS_CHAOS_WARRIOR:
703 info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Ë²øʪ¤òÏǤ魯¸÷¤òȯÀ¸¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£(50 MP)";
705 info[i++] = "You can radiate light which confuses nearby monsters (cost 50).";
713 info[i++] = "¤¢¤Ê¤¿¤Ï¹½¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
715 info[i++] = "You can assume a posture of special form (cost 0).";
721 info[i++] = "¤¢¤Ê¤¿¤ÏÄ̾ï¤Î2Çܤι¶·â¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤¤ë¡£(30 MP)";
723 info[i++] = "You can perform double attacks in a time (cost 30).";
727 case CLASS_MINDCRAFTER:
728 case CLASS_FORCETRAINER:
732 info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¤ò½¸Ã椷¤Æ£Í£Ð¤ò²óÉü¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
734 info[i++] = "You can concentrate to regenerate your mana (cost 0).";
740 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ì¿¿¤ò»£±Æ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
742 info[i++] = "You can take a photograph (cost 0).";
747 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤ò´°Á´¤Ë´ÕÄꤹ¤ë¤³¤È¤¬¤Ç¤¤ë¡£(20 MP)";
749 info[i++] = "You can *identify* items (cost 20).";
757 info[i++] = "¤¢¤Ê¤¿¤Ï²øʪ¤ÎÆü칶·â¤ò¥À¥á¡¼¥¸2ÇܤǤޤͤ뤳¤È¤¬¤Ç¤¤ë¡£(100 MP)";
759 info[i++] = "You can imitate monster's special attacks with double damage (cost 100).";
763 case CLASS_BEASTMASTER:
765 info[i++] = "¤¢¤Ê¤¿¤Ï1ɤ¤ÎÀ¸Ì¿¤Î¤¢¤ë¥â¥ó¥¹¥¿¡¼¤ò»ÙÇÛ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥ì¥Ù¥ë/4 MP)";
767 info[i++] = "You can dominate a monster (cost level/4).";
772 info[i++] = "¤¢¤Ê¤¿¤Ï»ë³¦Æâ¤ÎÀ¸Ì¿¤Î¤¢¤ë¥â¥ó¥¹¥¿¡¼¤ò»ÙÇÛ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£((¥ì¥Ù¥ë+20)/2 MP)";
774 info[i++] = "You can dominate living monsters in sight (cost (level+20)/4).";
778 case CLASS_MAGIC_EATER:
780 info[i++] = "¤¢¤Ê¤¿¤Ï¾ó/ËâË¡ËÀ/¥í¥Ã¥É¤ÎËâÎϤò¼«Ê¬¤Î¤â¤Î¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
782 info[i++] = "You can absorb a staff, wand or rod itself.";
789 info[i++] = "¤¢¤Ê¤¿¤Ï1¥¿¡¼¥ó¤Ë2²óËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£(77 MP)";
791 info[i++] = "You can cast two spells in one time (cost 77).";
798 info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¤ò½¸Ã椷¤Æµ¤¹ç¤¤¤òί¤á¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
800 info[i++] = "You can concentrate to regenerate your mana.";
806 info[i++] = "¤¢¤Ê¤¿¤ÏÆüì¤Ê·¿¤Ç¹½¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
808 info[i++] = "You can assume a posture of special form.";
812 case CLASS_BLUE_MAGE:
814 info[i++] = "¤¢¤Ê¤¿¤ÏÁê¼ê¤Ë»È¤ï¤ì¤¿ËâË¡¤ò³Ø¤Ö¤³¤È¤¬¤Ç¤¤ë¡£";
816 info[i++] = "You can study spells which your enemy casts on you.";
823 info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤Ë¾è¤Ã¤Æ̵ÍýÌðÍý¥Ú¥Ã¥È¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
825 info[i++] = "You can ride on a hostile monster forcibly to turn it into pet.";
829 case CLASS_BERSERKER:
833 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Ç¶õÊ¢¤òËþ¤¿¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
835 info[i++] = "You can satisfy hunger.";
841 info[i++] = "¤¢¤Ê¤¿¤Ï³¹¤È¥À¥ó¥¸¥ç¥ó¤Î´Ö¤ò¹Ô¤Í褹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
843 info[i++] = "You can travel between town and the depths.";
847 case CLASS_MIRROR_MASTER:
849 info[i++] = "¤¢¤Ê¤¿¤Ï¶À¤òºî¤ê½Ð¤¹¤³¤È¤¬¤Ç¤¤ë¡£(2 MP)";
851 info[i++] = "You can create a Mirror (cost 2).";
854 info[i++] = "¤¢¤Ê¤¿¤Ï¶À¤ò³ä¤ë¤³¤È¤¬¤Ç¤¤ë¡£(0 MP)";
856 info[i++] = "You can break distant Mirrors (cost 0).";
863 info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÁ᤯°ÜÆ°¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
865 info[i++] = "You can walk extremery fast.";
873 if (p_ptr->muta1 & MUT1_SPIT_ACID)
876 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤ò¿á¤¤«¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX1)";
878 info[i++] = "You can spit acid (dam lvl).";
882 if (p_ptr->muta1 & MUT1_BR_FIRE)
885 info[i++] = "¤¢¤Ê¤¿¤Ï±ê¤Î¥Ö¥ì¥¹¤òÅǤ¯¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
887 info[i++] = "You can breathe fire (dam lvl * 2).";
891 if (p_ptr->muta1 & MUT1_HYPN_GAZE)
894 info[i++] = "¤¢¤Ê¤¿¤ÎâˤߤϺÅ̲¸ú²Ì¤ò¤â¤Ä¡£";
896 info[i++] = "Your gaze is hypnotic.";
900 if (p_ptr->muta1 & MUT1_TELEKINES)
903 info[i++] = "¤¢¤Ê¤¿¤ÏÇ°Æ°ÎϤò¤â¤Ã¤Æ¤¤¤ë¡£";
905 info[i++] = "You are telekinetic.";
909 if (p_ptr->muta1 & MUT1_VTELEPORT)
912 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¥Æ¥ì¥Ý¡¼¥È¤Ç¤¤ë¡£";
914 info[i++] = "You can teleport at will.";
918 if (p_ptr->muta1 & MUT1_MIND_BLST)
921 info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿À¹¶·â¤ò¹Ô¤¨¤ë¡£(¥À¥á¡¼¥¸ 3¡Á12d3)";
923 info[i++] = "You can Mind Blast your enemies (3 to 12d3 dam).";
927 if (p_ptr->muta1 & MUT1_RADIATION)
930 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¶¯¤¤Êü¼ÍÀþ¤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
932 info[i++] = "You can emit hard radiation at will (dam lvl * 2).";
936 if (p_ptr->muta1 & MUT1_VAMPIRISM)
939 info[i++] = "¤¢¤Ê¤¿¤ÏµÛ·ìµ´¤Î¤è¤¦¤ËŨ¤«¤éÀ¸Ì¿ÎϤòµÛ¼ý¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
941 info[i++] = "You can drain life from a foe like a vampire (dam lvl * 2).";
945 if (p_ptr->muta1 & MUT1_SMELL_MET)
948 info[i++] = "¤¢¤Ê¤¿¤Ï¶á¤¯¤Ë¤¢¤ëµ®¶â°¤ò¤«¤®Ê¬¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
950 info[i++] = "You can smell nearby precious metal.";
954 if (p_ptr->muta1 & MUT1_SMELL_MON)
957 info[i++] = "¤¢¤Ê¤¿¤Ï¶á¤¯¤Î¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò¤«¤®Ê¬¤±¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
959 info[i++] = "You can smell nearby monsters.";
963 if (p_ptr->muta1 & MUT1_BLINK)
966 info[i++] = "¤¢¤Ê¤¿¤Ïû¤¤µ÷Î¥¤ò¥Æ¥ì¥Ý¡¼¥È¤Ç¤¤ë¡£";
968 info[i++] = "You can teleport yourself short distances.";
972 if (p_ptr->muta1 & MUT1_EAT_ROCK)
975 info[i++] = "¤¢¤Ê¤¿¤Ï¹Å¤¤´ä¤ò¿©¤Ù¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
977 info[i++] = "You can consume solid rock.";
981 if (p_ptr->muta1 & MUT1_SWAP_POS)
984 info[i++] = "¤¢¤Ê¤¿¤Ï¾¤Î¼Ô¤È¾ì½ê¤òÆþ¤ìÂؤï¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
986 info[i++] = "You can switch locations with another being.";
990 if (p_ptr->muta1 & MUT1_SHRIEK)
993 info[i++] = "¤¢¤Ê¤¿¤Ï¿È¤ÎÌÓ¤â¤è¤À¤Ä¶«¤ÓÀ¼¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
995 info[i++] = "You can emit a horrible shriek (dam 2 * lvl).";
999 if (p_ptr->muta1 & MUT1_ILLUMINE)
1002 info[i++] = "¤¢¤Ê¤¿¤ÏÌÀ¤ë¤¤¸÷¤òÊü¤Ä¤³¤È¤¬¤Ç¤¤ë¡£";
1004 info[i++] = "You can emit bright light.";
1008 if (p_ptr->muta1 & MUT1_DET_CURSE)
1011 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤ÊËâË¡¤Î´í¸±¤ò´¶¤¸¤È¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1013 info[i++] = "You can feel the danger of evil magic.";
1017 if (p_ptr->muta1 & MUT1_BERSERK)
1020 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»×¤Ç¶¸ÍðÀïÆ®¾õÂ֤ˤʤ뤳¤È¤¬¤Ç¤¤ë¡£";
1022 info[i++] = "You can drive yourself into a berserk frenzy.";
1026 if (p_ptr->muta1 & MUT1_POLYMORPH)
1029 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Î°Õ»Ö¤ÇÊѲ½¤Ç¤¤ë¡£";
1031 info[i++] = "You can polymorph yourself at will.";
1035 if (p_ptr->muta1 & MUT1_MIDAS_TCH)
1038 info[i++] = "¤¢¤Ê¤¿¤ÏÄ̾異¥¤¥Æ¥à¤ò¶â¤ËÊѤ¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1040 info[i++] = "You can turn ordinary items to gold.";
1044 if (p_ptr->muta1 & MUT1_GROW_MOLD)
1047 info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Ë¥¥Î¥³¤òÀ¸¤ä¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1049 info[i++] = "You can cause mold to grow near you.";
1053 if (p_ptr->muta1 & MUT1_RESIST)
1056 info[i++] = "¤¢¤Ê¤¿¤Ï¸µÁǤι¶·â¤ËÂФ·¤Æ¿È¤ò¹Å¤¯¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1058 info[i++] = "You can harden yourself to the ravages of the elements.";
1062 if (p_ptr->muta1 & MUT1_EARTHQUAKE)
1065 info[i++] = "¤¢¤Ê¤¿¤Ï¼þ°Ï¤Î¥À¥ó¥¸¥ç¥ó¤òÊø²õ¤µ¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1067 info[i++] = "You can bring down the dungeon around your ears.";
1071 if (p_ptr->muta1 & MUT1_EAT_MAGIC)
1074 info[i++] = "¤¢¤Ê¤¿¤ÏËâË¡¤Î¥¨¥Í¥ë¥®¡¼¤ò¼«Ê¬¤Îʪ¤È¤·¤Æ»ÈÍѤǤ¤ë¡£";
1076 info[i++] = "You can consume magic energy for your own use.";
1080 if (p_ptr->muta1 & MUT1_WEIGH_MAG)
1083 info[i++] = "¤¢¤Ê¤¿¤Ï¼«Ê¬¤Ë±Æ¶Á¤òÍ¿¤¨¤ëËâË¡¤ÎÎϤò´¶¤¸¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1085 info[i++] = "You can feel the strength of the magics affecting you.";
1089 if (p_ptr->muta1 & MUT1_STERILITY)
1092 info[i++] = "¤¢¤Ê¤¿¤Ï½¸ÃÄŪÀ¸¿£ÉÔǽ¤òµ¯¤³¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1094 info[i++] = "You can cause mass impotence.";
1098 if (p_ptr->muta1 & MUT1_PANIC_HIT)
1101 info[i++] = "¤¢¤Ê¤¿¤Ï¹¶·â¤·¤¿¸å¿È¤ò¼é¤ë¤¿¤áƨ¤²¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1103 info[i++] = "You can run for your life after hitting something.";
1107 if (p_ptr->muta1 & MUT1_DAZZLE)
1110 info[i++] = "¤¢¤Ê¤¿¤Ïº®Íð¤ÈÌÕÌܤò°ú¤µ¯¤³¤¹Êü¼Íǽ¤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£ ";
1112 info[i++] = "You can emit confusing, blinding radiation.";
1116 if (p_ptr->muta1 & MUT1_LASER_EYE)
1119 info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ«¤é¥ì¡¼¥¶¡¼¸÷Àþ¤òȯ¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX2)";
1121 info[i++] = "Your eyes can fire laser beams (dam 2 * lvl).";
1125 if (p_ptr->muta1 & MUT1_RECALL)
1128 info[i++] = "¤¢¤Ê¤¿¤Ï³¹¤È¥À¥ó¥¸¥ç¥ó¤Î´Ö¤ò¹Ô¤Í褹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1130 info[i++] = "You can travel between town and the depths.";
1134 if (p_ptr->muta1 & MUT1_BANISH)
1137 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¥â¥ó¥¹¥¿¡¼¤òÃϹö¤ËÍî¤È¤¹¤³¤È¤¬¤Ç¤¤ë¡£";
1139 info[i++] = "You can send evil creatures directly to Hell.";
1143 if (p_ptr->muta1 & MUT1_COLD_TOUCH)
1146 info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤ò¿¨¤Ã¤ÆÅà¤é¤»¤ë¤³¤È¤¬¤Ç¤¤ë¡£(¥À¥á¡¼¥¸ ¥ì¥Ù¥ëX3)";
1148 info[i++] = "You can freeze things with a touch (dam 3 * lvl).";
1152 if (p_ptr->muta1 & MUT1_LAUNCHER)
1155 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥¤¥Æ¥à¤òÎ϶¯¤¯Åꤲ¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1157 info[i++] = "You can hurl objects with great force.";
1165 if (p_ptr->muta2 & MUT2_BERS_RAGE)
1168 info[i++] = "¤¢¤Ê¤¿¤Ï¶¸Àï»Î²½¤Îȯºî¤òµ¯¤³¤¹¡£";
1170 info[i++] = "You are subject to berserker fits.";
1174 if (p_ptr->muta2 & MUT2_COWARDICE)
1177 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹²²É¤ˤʤ롣";
1179 info[i++] = "You are subject to cowardice.";
1183 if (p_ptr->muta2 & MUT2_RTELEPORT)
1186 info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤Ë¥Æ¥ì¥Ý¡¼¥È¤¹¤ë¡£";
1188 info[i++] = "You are teleporting randomly.";
1192 if (p_ptr->muta2 & MUT2_ALCOHOL)
1195 info[i++] = "¤¢¤Ê¤¿¤ÎÂΤϥ¢¥ë¥³¡¼¥ë¤òʬÈ礹¤ë¡£";
1197 info[i++] = "Your body produces alcohol.";
1201 if (p_ptr->muta2 & MUT2_HALLU)
1204 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò°ú¤µ¯¤³¤¹Àº¿ÀºøÍð¤Ë¿¯¤µ¤ì¤Æ¤¤¤ë¡£";
1206 info[i++] = "You have a hallucinatory insanity.";
1210 if (p_ptr->muta2 & MUT2_FLATULENT)
1213 info[i++] = "¤¢¤Ê¤¿¤ÏÀ©¸æ¤Ç¤¤Ê¤¤¶¯Îõ¤ÊÕû¤ò¤³¤¯¡£";
1215 info[i++] = "You are subject to uncontrollable flatulence.";
1219 if (p_ptr->muta2 & MUT2_PROD_MANA)
1222 info[i++] = "¤¢¤Ê¤¿¤ÏÀ©¸æÉÔǽ¤ÊËâË¡¤Î¥¨¥Í¥ë¥®¡¼¤òȯ¤·¤Æ¤¤¤ë¡£";
1224 info[i++] = "You are producing magical energy uncontrollably.";
1228 if (p_ptr->muta2 & MUT2_ATT_DEMON)
1231 info[i++] = "¤¢¤Ê¤¿¤Ï¥Ç¡¼¥â¥ó¤ò°ú¤¤Ä¤±¤ë¡£";
1233 info[i++] = "You attract demons.";
1237 if (p_ptr->muta2 & MUT2_SCOR_TAIL)
1240 info[i++] = "¤¢¤Ê¤¿¤Ï¥µ¥½¥ê¤Î¿¬Èø¤¬À¸¤¨¤Æ¤¤¤ë¡£(ÆÇ¡¢¥À¥á¡¼¥¸ 3d7)";
1242 info[i++] = "You have a scorpion tail (poison, 3d7).";
1246 if (p_ptr->muta2 & MUT2_HORNS)
1249 info[i++] = "¤¢¤Ê¤¿¤Ï³Ñ¤¬À¸¤¨¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d6)";
1251 info[i++] = "You have horns (dam. 2d6).";
1255 if (p_ptr->muta2 & MUT2_BEAK)
1258 info[i++] = "¤¢¤Ê¤¿¤Ï¥¯¥Á¥Ð¥·¤¬À¸¤¨¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d4)";
1260 info[i++] = "You have a beak (dam. 2d4).";
1264 if (p_ptr->muta2 & MUT2_SPEED_FLUX)
1267 info[i++] = "¤¢¤Ê¤¿¤Ï¥é¥ó¥À¥à¤ËÁ᤯ư¤¤¤¿¤êÃÙ¤¯Æ°¤¤¤¿¤ê¤¹¤ë¡£";
1269 info[i++] = "You move faster or slower randomly.";
1273 if (p_ptr->muta2 & MUT2_BANISH_ALL)
1276 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹¶á¤¯¤Î¥â¥ó¥¹¥¿¡¼¤ò¾ÃÌǤµ¤»¤ë¡£";
1278 info[i++] = "You sometimes cause nearby creatures to vanish.";
1282 if (p_ptr->muta2 & MUT2_EAT_LIGHT)
1285 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹¼þ°Ï¤Î¸÷¤òµÛ¼ý¤·¤Æ±ÉÍܤˤ¹¤ë¡£";
1287 info[i++] = "You sometimes feed off of the light around you.";
1291 if (p_ptr->muta2 & MUT2_TRUNK)
1294 info[i++] = "¤¢¤Ê¤¿¤Ï¾Ý¤Î¤è¤¦¤ÊÉ¡¤ò»ý¤Ã¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 1d4)";
1296 info[i++] = "You have an elephantine trunk (dam 1d4).";
1300 if (p_ptr->muta2 & MUT2_ATT_ANIMAL)
1303 info[i++] = "¤¢¤Ê¤¿¤Ïưʪ¤ò°ú¤¤Ä¤±¤ë¡£";
1305 info[i++] = "You attract animals.";
1309 if (p_ptr->muta2 & MUT2_TENTACLES)
1312 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¿¨¼ê¤ò»ý¤Ã¤Æ¤¤¤ë¡£(¥À¥á¡¼¥¸ 2d5)";
1314 info[i++] = "You have evil looking tentacles (dam 2d5).";
1318 if (p_ptr->muta2 & MUT2_RAW_CHAOS)
1321 info[i++] = "¤¢¤Ê¤¿¤Ï¤·¤Ð¤·¤Ð½ã¥«¥ª¥¹¤ËÊñ¤Þ¤ì¤ë¡£";
1323 info[i++] = "You occasionally are surrounded with raw chaos.";
1327 if (p_ptr->muta2 & MUT2_NORMALITY)
1330 info[i++] = "¤¢¤Ê¤¿¤ÏÊÑ°Û¤·¤Æ¤¤¤¿¤¬¡¢²óÉü¤·¤Æ¤¤Æ¤¤¤ë¡£";
1332 info[i++] = "You may be mutated, but you're recovering.";
1336 if (p_ptr->muta2 & MUT2_WRAITH)
1339 info[i++] = "¤¢¤Ê¤¿¤ÎÆùÂΤÏÍ©Â⽤·¤¿¤ê¼ÂÂ⽤·¤¿¤ê¤¹¤ë¡£";
1341 info[i++] = "You fade in and out of physical reality.";
1345 if (p_ptr->muta2 & MUT2_POLY_WOUND)
1348 info[i++] = "¤¢¤Ê¤¿¤Î·ò¹¯¤Ï¥«¥ª¥¹¤ÎÎϤ˱ƶÁ¤ò¼õ¤±¤ë¡£";
1350 info[i++] = "Your health is subject to chaotic forces.";
1354 if (p_ptr->muta2 & MUT2_WASTING)
1357 info[i++] = "¤¢¤Ê¤¿¤Ï¿ê¼å¤¹¤ë¶²¤í¤·¤¤Éµ¤¤Ë¤«¤«¤Ã¤Æ¤¤¤ë¡£";
1359 info[i++] = "You have a horrible wasting disease.";
1363 if (p_ptr->muta2 & MUT2_ATT_DRAGON)
1366 info[i++] = "¤¢¤Ê¤¿¤Ï¥É¥é¥´¥ó¤ò°ú¤¤Ä¤±¤ë¡£";
1368 info[i++] = "You attract dragons.";
1372 if (p_ptr->muta2 & MUT2_WEIRD_MIND)
1375 info[i++] = "¤¢¤Ê¤¿¤ÎÀº¿À¤Ï¥é¥ó¥À¥à¤Ë³ÈÂ礷¤¿¤ê½Ì¾®¤·¤¿¤ê¤·¤Æ¤¤¤ë¡£";
1377 info[i++] = "Your mind randomly expands and contracts.";
1381 if (p_ptr->muta2 & MUT2_NAUSEA)
1384 info[i++] = "¤¢¤Ê¤¿¤Î°ß¤ÏÈó¾ï¤ËÍî¤ÁÃ夤¬¤Ê¤¤¡£";
1386 info[i++] = "You have a seriously upset stomach.";
1390 if (p_ptr->muta2 & MUT2_CHAOS_GIFT)
1393 info[i++] = "¤¢¤Ê¤¿¤Ï¥«¥ª¥¹¤Î¼é¸î°Ë⤫¤éË«Èþ¤ò¤¦¤±¤È¤ë¡£";
1395 info[i++] = "Chaos deities give you gifts.";
1399 if (p_ptr->muta2 & MUT2_WALK_SHAD)
1402 info[i++] = "¤¢¤Ê¤¿¤Ï¤·¤Ð¤·¤Ð¾¤Î¡Ö±Æ¡×¤Ë̤¤¹þ¤à¡£";
1404 info[i++] = "You occasionally stumble into other shadows.";
1408 if (p_ptr->muta2 & MUT2_WARNING)
1411 info[i++] = "¤¢¤Ê¤¿¤ÏŨ¤Ë´Ø¤¹¤ë·Ù¹ð¤ò´¶¤¸¤ë¡£";
1413 info[i++] = "You receive warnings about your foes.";
1417 if (p_ptr->muta2 & MUT2_INVULN)
1420 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹É餱ÃΤ餺¤Êµ¤Ê¬¤Ë¤Ê¤ë¡£";
1422 info[i++] = "You occasionally feel invincible.";
1426 if (p_ptr->muta2 & MUT2_SP_TO_HP)
1429 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹·ì¤¬¶ÚÆù¤Ë¤É¤Ã¤Èή¤ì¤ë¡£";
1431 info[i++] = "Your blood sometimes rushes to your muscles.";
1435 if (p_ptr->muta2 & MUT2_HP_TO_SP)
1438 info[i++] = "¤¢¤Ê¤¿¤Ï»þ¡¹Æ¬¤Ë·ì¤¬¤É¤Ã¤Èή¤ì¤ë¡£";
1440 info[i++] = "Your blood sometimes rushes to your head.";
1444 if (p_ptr->muta2 & MUT2_DISARM)
1447 info[i++] = "¤¢¤Ê¤¿¤Ï¤è¤¯¤Ä¤Þ¤Å¤¤¤Æʪ¤òÍî¤È¤¹¡£";
1449 info[i++] = "You occasionally stumble and drop things.";
1457 if (p_ptr->muta3 & MUT3_HYPER_STR)
1460 info[i++] = "¤¢¤Ê¤¿¤ÏĶ¿ÍŪ¤Ë¶¯¤¤¡£(ÏÓÎÏ+4)";
1462 info[i++] = "You are superhumanly strong (+4 STR).";
1466 if (p_ptr->muta3 & MUT3_PUNY)
1469 info[i++] = "¤¢¤Ê¤¿¤Ïµõ¼å¤À¡£(ÏÓÎÏ-4)";
1471 info[i++] = "You are puny (-4 STR).";
1475 if (p_ptr->muta3 & MUT3_HYPER_INT)
1478 info[i++] = "¤¢¤Ê¤¿¤ÎǾ¤ÏÀ¸ÂÎ¥³¥ó¥Ô¥å¡¼¥¿¤À¡£(ÃÎǽ¡õ¸¤µ+4)";
1480 info[i++] = "Your brain is a living computer (+4 INT/WIS).";
1484 if (p_ptr->muta3 & MUT3_MORONIC)
1487 info[i++] = "¤¢¤Ê¤¿¤ÏÀº¿ÀÇö¼å¤À¡£(ÃÎǽ¡õ¸¤µ-4)";
1489 info[i++] = "You are moronic (-4 INT/WIS).";
1493 if (p_ptr->muta3 & MUT3_RESILIENT)
1496 info[i++] = "¤¢¤Ê¤¿¤ÏÈó¾ï¤Ë¥¿¥Õ¤À¡£(Âѵ×+4)";
1498 info[i++] = "You are very resilient (+4 CON).";
1502 if (p_ptr->muta3 & MUT3_XTRA_FAT)
1505 info[i++] = "¤¢¤Ê¤¿¤Ï¶Ëü¤ËÂÀ¤Ã¤Æ¤¤¤ë¡£(Âѵ×+2,¥¹¥Ô¡¼¥É-2)";
1507 info[i++] = "You are extremely fat (+2 CON, -2 speed).";
1511 if (p_ptr->muta3 & MUT3_ALBINO)
1514 info[i++] = "¤¢¤Ê¤¿¤Ï¥¢¥ë¥Ó¥Î¤À¡£(Âѵ×-4)";
1516 info[i++] = "You are albino (-4 CON).";
1520 if (p_ptr->muta3 & MUT3_FLESH_ROT)
1523 info[i++] = "¤¢¤Ê¤¿¤ÎÆùÂΤÏÉåÇÔ¤·¤Æ¤¤¤ë¡£(Âѵ×-2,Ì¥ÎÏ-1)";
1525 info[i++] = "Your flesh is rotting (-2 CON, -1 CHR).";
1529 if (p_ptr->muta3 & MUT3_SILLY_VOI)
1532 info[i++] = "¤¢¤Ê¤¿¤ÎÀ¼¤Ï´ÖÈ´¤±¤Ê¥¡¼¥¡¼À¼¤À¡£(Ì¥ÎÏ-4)";
1534 info[i++] = "Your voice is a silly squeak (-4 CHR).";
1538 if (p_ptr->muta3 & MUT3_BLANK_FAC)
1541 info[i++] = "¤¢¤Ê¤¿¤Ï¤Î¤Ã¤Ú¤é¤Ü¤¦¤À¡£(Ì¥ÎÏ-1)";
1543 info[i++] = "Your face is featureless (-1 CHR).";
1547 if (p_ptr->muta3 & MUT3_ILL_NORM)
1550 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸±Æ¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
1552 info[i++] = "Your appearance is masked with illusion.";
1556 if (p_ptr->muta3 & MUT3_XTRA_EYES)
1559 info[i++] = "¤¢¤Ê¤¿¤Ï;ʬ¤ËÆó¤Ä¤ÎÌܤò»ý¤Ã¤Æ¤¤¤ë¡£(õº÷+15)";
1561 info[i++] = "You have an extra pair of eyes (+15 search).";
1565 if (p_ptr->muta3 & MUT3_MAGIC_RES)
1568 info[i++] = "¤¢¤Ê¤¿¤ÏËâË¡¤Ø¤ÎÂÑÀ¤ò¤â¤Ã¤Æ¤¤¤ë¡£";
1570 info[i++] = "You are resistant to magic.";
1574 if (p_ptr->muta3 & MUT3_XTRA_NOIS)
1577 info[i++] = "¤¢¤Ê¤¿¤ÏÊѤʲ»¤òȯ¤·¤Æ¤¤¤ë¡£(±£Ì©-3)";
1579 info[i++] = "You make a lot of strange noise (-3 stealth).";
1583 if (p_ptr->muta3 & MUT3_INFRAVIS)
1586 info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÀ²¤é¤·¤¤ÀÖ³°Àþ»ëÎϤò»ý¤Ã¤Æ¤¤¤ë¡£(+3)";
1588 info[i++] = "You have remarkable infravision (+3).";
1592 if (p_ptr->muta3 & MUT3_XTRA_LEGS)
1595 info[i++] = "¤¢¤Ê¤¿¤Ï;ʬ¤ËÆóËܤΤ¬À¸¤¨¤Æ¤¤¤ë¡£(²Ã®+3)";
1597 info[i++] = "You have an extra pair of legs (+3 speed).";
1601 if (p_ptr->muta3 & MUT3_SHORT_LEG)
1604 info[i++] = "¤¢¤Ê¤¿¤Î¤Ïû¤¤Æ͵¯¤À¡£(²Ã®-3)";
1606 info[i++] = "Your legs are short stubs (-3 speed).";
1610 if (p_ptr->muta3 & MUT3_ELEC_TOUC)
1613 info[i++] = "¤¢¤Ê¤¿¤Î·ì´É¤Ë¤ÏÅÅή¤¬Î®¤ì¤Æ¤¤¤ë¡£";
1615 info[i++] = "Electricity is running through your veins.";
1619 if (p_ptr->muta3 & MUT3_FIRE_BODY)
1622 info[i++] = "¤¢¤Ê¤¿¤ÎÂΤϱê¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
1624 info[i++] = "Your body is enveloped in flames.";
1627 if (p_ptr->muta3 & MUT3_WART_SKIN)
1630 info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤Ï¥¤¥Ü¤ËÈï¤ï¤ì¤Æ¤¤¤ë¡£(Ì¥ÎÏ-2, AC+5)";
1632 info[i++] = "Your skin is covered with warts (-2 CHR, +5 AC).";
1636 if (p_ptr->muta3 & MUT3_SCALES)
1639 info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤ÏÎڤˤʤäƤ¤¤ë¡£(Ì¥ÎÏ-1, AC+10)";
1641 info[i++] = "Your skin has turned into scales (-1 CHR, +10 AC).";
1645 if (p_ptr->muta3 & MUT3_IRON_SKIN)
1648 info[i++] = "¤¢¤Ê¤¿¤ÎÈ©¤ÏÅ´¤Ç¤Ç¤¤Æ¤¤¤ë¡£(´ïÍÑ-1, AC+25)";
1650 info[i++] = "Your skin is made of steel (-1 DEX, +25 AC).";
1654 if (p_ptr->muta3 & MUT3_WINGS)
1657 info[i++] = "¤¢¤Ê¤¿¤Ï±©¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
1659 info[i++] = "You have wings.";
1663 if (p_ptr->muta3 & MUT3_FEARLESS)
1667 if (p_ptr->muta3 & MUT3_REGEN)
1671 if (p_ptr->muta3 & MUT3_ESP)
1675 if (p_ptr->muta3 & MUT3_LIMBER)
1678 info[i++] = "¤¢¤Ê¤¿¤ÎÂΤÏÈó¾ï¤Ë¤·¤Ê¤ä¤«¤À¡£(´ïÍÑ+3)";
1680 info[i++] = "Your body is very limber (+3 DEX).";
1684 if (p_ptr->muta3 & MUT3_ARTHRITIS)
1687 info[i++] = "¤¢¤Ê¤¿¤Ï¤¤¤Ä¤â´ØÀá¤ËÄˤߤò´¶¤¸¤Æ¤¤¤ë¡£(´ïÍÑ-3)";
1689 info[i++] = "Your joints ache constantly (-3 DEX).";
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))
1697 info[i++] = "¤¢¤Ê¤¿¤Ï¸µÁǤι¶·â¤Ë¼å¤¤¡£";
1699 info[i++] = "You are susceptible to damage from the elements.";
1703 if (p_ptr->muta3 & MUT3_MOTION)
1706 info[i++] = "¤¢¤Ê¤¿¤ÎÆ°ºî¤ÏÀµ³Î¤ÇÎ϶¯¤¤¡£(±£Ì©+1)";
1708 info[i++] = "Your movements are precise and forceful (+1 STL).";
1712 if (p_ptr->muta3 & MUT3_GOOD_LUCK)
1715 info[i++] = "¤¢¤Ê¤¿¤ÏÇò¤¤¥ª¡¼¥é¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
1717 info[i++] = "There is a white aura surrounding you.";
1720 if (p_ptr->muta3 & MUT3_BAD_LUCK)
1723 info[i++] = "¤¢¤Ê¤¿¤Ï¹õ¤¤¥ª¡¼¥é¤Ë¤Ä¤Ä¤Þ¤ì¤Æ¤¤¤ë¡£";
1725 info[i++] = "There is a black aura surrounding you.";
1733 info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤¡£";
1735 info[i++] = "You cannot see.";
1739 if (p_ptr->confused)
1742 info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë¡£";
1744 info[i++] = "You are confused.";
1751 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
1753 info[i++] = "You are terrified.";
1760 info[i++] = "¤¢¤Ê¤¿¤Ï½Ð·ì¤·¤Æ¤¤¤ë¡£";
1762 info[i++] = "You are bleeding.";
1769 info[i++] = "¤¢¤Ê¤¿¤Ï¤â¤¦¤í¤¦¤È¤·¤Æ¤¤¤ë¡£";
1771 info[i++] = "You are stunned.";
1775 if (p_ptr->poisoned)
1778 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
1780 info[i++] = "You are poisoned.";
1787 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë¡£";
1789 info[i++] = "You are hallucinating.";
1793 if (p_ptr->aggravate)
1796 info[i++] = "¤¢¤Ê¤¿¤Ï¥â¥ó¥¹¥¿¡¼¤òÅܤ餻¤Æ¤¤¤ë¡£";
1798 info[i++] = "You aggravate monsters.";
1802 if (p_ptr->teleport)
1805 info[i++] = "¤¢¤Ê¤¿¤Î°ÌÃ֤ϤҤ¸¤ç¤¦¤ËÉÔ°ÂÄê¤À¡£";
1807 info[i++] = "Your position is very uncertain.";
1814 info[i++] = "¤¢¤Ê¤¿¤Ï¸øÀµ¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
1816 info[i++] = "You feel rightous.";
1823 info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À¡£";
1825 info[i++] = "You feel heroic.";
1832 info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À¡£";
1834 info[i++] = "You are in a battle rage.";
1838 if (p_ptr->protevil)
1841 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¡£";
1843 info[i++] = "You are protected from evil.";
1850 info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë¡£";
1852 info[i++] = "You are protected by a mystic shield.";
1859 info[i++] = "¤¢¤Ê¤¿¤Ï¸½ºß½ý¤Ä¤«¤Ê¤¤¡£";
1861 info[i++] = "You are temporarily invulnerable.";
1865 if (p_ptr->wraith_form)
1868 info[i++] = "¤¢¤Ê¤¿¤Ï°ì»þŪ¤ËÍ©Â⽤·¤Æ¤¤¤ë¡£";
1870 info[i++] = "You are temporarily incorporeal.";
1874 if (p_ptr->special_attack & ATTACK_CONFUSE)
1877 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
1879 info[i++] = "Your hands are glowing dull red.";
1883 if (p_ptr->special_attack & ATTACK_FIRE)
1886 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤Ï²Ð±ê¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
1888 info[i++] = "You can strike enemy with flame.";
1892 if (p_ptr->special_attack & ATTACK_COLD)
1895 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÎ䵤¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
1897 info[i++] = "You can strike enemy with cold.";
1901 if (p_ptr->special_attack & ATTACK_ACID)
1904 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤Ï»À¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
1906 info[i++] = "You can strike enemy with acid.";
1910 if (p_ptr->special_attack & ATTACK_ELEC)
1913 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÅÅ·â¤Ëʤ¤ï¤ì¤Æ¤¤¤ë¡£";
1915 info[i++] = "You can strike enemy with electoric shock.";
1919 if (p_ptr->special_attack & ATTACK_POIS)
1922 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÆǤËʤ¤ï¤ì¤Æ¤¤¤ë¡£";
1924 info[i++] = "You can strike enemy with poison.";
1928 if (p_ptr->special_attack & ATTACK_CONFUSE)
1931 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
1933 info[i++] = "Your hands are glowing dull red.";
1937 if (p_ptr->special_attack & ATTACK_CONFUSE)
1940 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
1942 info[i++] = "Your hands are glowing dull red.";
1946 switch (p_ptr->action)
1950 info[i++] = "¤¢¤Ê¤¿¤Ï¤Ò¤¸¤ç¤¦¤ËÃí°Õ¿¼¤¯¼þ°Ï¤ò¸«ÅϤ·¤Æ¤¤¤ë¡£";
1952 info[i++] = "You are looking around very carefully.";
1956 if (p_ptr->new_spells)
1959 info[i++] = "¤¢¤Ê¤¿¤Ï¼öʸ¤äµ§¤ê¤ò³Ø¤Ö¤³¤È¤¬¤Ç¤¤ë¡£";
1961 info[i++] = "You can learn some spells/prayers.";
1965 if (p_ptr->word_recall)
1968 info[i++] = "¤¢¤Ê¤¿¤Ï¤¹¤°¤Ëµ¢´Ô¤¹¤ë¤À¤í¤¦¡£";
1970 info[i++] = "You will soon be recalled.";
1974 if (p_ptr->see_infra)
1977 info[i++] = "¤¢¤Ê¤¿¤ÎÆ·¤ÏÀÖ³°Àþ¤ËÉÒ´¶¤Ç¤¢¤ë¡£";
1979 info[i++] = "Your eyes are sensitive to infrared light.";
1986 info[i++] = "¤¢¤Ê¤¿¤ÏÆ©ÌÀ¤Ê¥â¥ó¥¹¥¿¡¼¤ò¸«¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
1988 info[i++] = "You can see invisible creatures.";
1995 info[i++] = "¤¢¤Ê¤¿¤ÏÈô¤Ö¤³¤È¤¬¤Ç¤¤ë¡£";
1997 info[i++] = "You can fly.";
2001 if (p_ptr->free_act)
2004 info[i++] = "¤¢¤Ê¤¿¤ÏËãáãÃΤ餺¤Î¸ú²Ì¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2006 info[i++] = "You have free action.";
2010 if (p_ptr->regenerate)
2013 info[i++] = "¤¢¤Ê¤¿¤ÏÁÇÁ᤯ÂÎÎϤò²óÉü¤¹¤ë¡£";
2015 info[i++] = "You regenerate quickly.";
2019 if (p_ptr->slow_digest)
2022 info[i++] = "¤¢¤Ê¤¿¤Ï¿©Íߤ¬¾¯¤Ê¤¤¡£";
2024 info[i++] = "Your appetite is small.";
2028 if (p_ptr->telepathy)
2031 info[i++] = "¤¢¤Ê¤¿¤ÏĶǽÎϤò»ý¤Ã¤Æ¤¤¤ë¡£";
2033 info[i++] = "You have ESP.";
2037 if (p_ptr->hold_life)
2040 info[i++] = "¤¢¤Ê¤¿¤Ï¼«¸Ê¤ÎÀ¸Ì¿ÎϤò¤·¤Ã¤«¤ê¤È°Ý»ý¤¹¤ë¡£";
2042 info[i++] = "You have a firm hold on your life force.";
2049 info[i++] = "¤¢¤Ê¤¿¤ÏÌð¤ä¥Ü¥ë¥È¤òÈ¿¼Í¤¹¤ë¡£";
2051 info[i++] = "You reflect arrows and bolts.";
2058 info[i++] = "¤¢¤Ê¤¿¤Ï±ê¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2060 info[i++] = "You are surrounded with a fiery aura.";
2067 info[i++] = "¤¢¤Ê¤¿¤ÏÅŵ¤¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2069 info[i++] = "You are surrounded with electricity.";
2076 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Î¥ª¡¼¥é¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2078 info[i++] = "You are surrounded with a coldly aura.";
2082 if (p_ptr->anti_magic)
2085 info[i++] = "¤¢¤Ê¤¿¤ÏÈ¿ËâË¡¥·¡¼¥ë¥É¤ËÊñ¤Þ¤ì¤Æ¤¤¤ë¡£";
2087 info[i++] = "You are surrounded by an anti-magic shell.";
2091 if (p_ptr->anti_tele)
2094 info[i++] = "¤¢¤Ê¤¿¤Ï¥Æ¥ì¥Ý¡¼¥È¤Ç¤¤Ê¤¤¡£";
2096 info[i++] = "You cannot teleport.";
2103 info[i++] = "¤¢¤Ê¤¿¤Î¿ÈÂΤϸ÷¤Ã¤Æ¤¤¤ë¡£";
2105 info[i++] = "You are carrying a permanent light.";
2112 info[i++] = "¤¢¤Ê¤¿¤Ï¹ÔÆ°¤ÎÁ°¤Ë´í¸±¤ò»¡ÃΤ¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2114 info[i++] = "You will be warn before dangerous action.";
2118 if (p_ptr->dec_mana)
2121 info[i++] = "¤¢¤Ê¤¿¤Ï¾¯¤Ê¤¤¾ÃÈñËâÎϤÇËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2123 info[i++] = "You can cast spell with fewer mana.";
2127 if (p_ptr->easy_spell)
2130 info[i++] = "¤¢¤Ê¤¿¤ÏÄ㤤¼ºÇÔΨ¤ÇËâË¡¤ò¾§¤¨¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2132 info[i++] = "Fail rate of your magic is decreased.";
2136 if (p_ptr->heavy_spell)
2139 info[i++] = "¤¢¤Ê¤¿¤Ï¹â¤¤¼ºÇÔΨ¤ÇËâË¡¤ò¾§¤¨¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤¡£";
2141 info[i++] = "Fail rate of your magic is incresed.";
2145 if (p_ptr->mighty_throw)
2148 info[i++] = "¤¢¤Ê¤¿¤Ï¶¯¤¯Êª¤òÅꤲ¤ë¡£";
2150 info[i++] = "You can throw objects powerfully.";
2155 if (p_ptr->immune_acid)
2158 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2160 info[i++] = "You are completely immune to acid.";
2164 else if ((p_ptr->resist_acid) && (p_ptr->oppose_acid))
2167 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤Î¶¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2169 info[i++] = "You resist acid exceptionally well.";
2173 else if ((p_ptr->resist_acid) || (p_ptr->oppose_acid))
2176 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2178 info[i++] = "You are resistant to acid.";
2183 if (p_ptr->immune_elec)
2186 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2188 info[i++] = "You are completely immune to lightning.";
2192 else if ((p_ptr->resist_elec) && (p_ptr->oppose_elec))
2195 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤Î¶¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2197 info[i++] = "You resist lightning exceptionally well.";
2201 else if ((p_ptr->resist_elec) || (p_ptr->oppose_elec))
2204 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2206 info[i++] = "You are resistant to lightning.";
2211 if (prace_is_(RACE_ANDROID) && !p_ptr->immune_elec)
2214 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ë¼å¤¤¡£";
2216 info[i++] = "You are susceptible to damage from lightning.";
2221 if (p_ptr->immune_fire)
2224 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2226 info[i++] = "You are completely immune to fire.";
2230 else if ((p_ptr->resist_fire) && (p_ptr->oppose_fire))
2233 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤Î¶¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2235 info[i++] = "You resist fire exceptionally well.";
2239 else if ((p_ptr->resist_fire) || (p_ptr->oppose_fire))
2242 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2244 info[i++] = "You are resistant to fire.";
2249 if (prace_is_(RACE_ENT) && !p_ptr->immune_fire)
2252 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ë¼å¤¤¡£";
2254 info[i++] = "You are susceptible to damage from fire.";
2259 if (p_ptr->immune_cold)
2262 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2264 info[i++] = "You are completely immune to cold.";
2268 else if ((p_ptr->resist_cold) && (p_ptr->oppose_cold))
2271 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤Î¶¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2273 info[i++] = "You resist cold exceptionally well.";
2277 else if ((p_ptr->resist_cold) || (p_ptr->oppose_cold))
2280 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2282 info[i++] = "You are resistant to cold.";
2287 if ((p_ptr->resist_pois) && (p_ptr->oppose_pois))
2290 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤζ¯ÎϤÊÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2292 info[i++] = "You resist poison exceptionally well.";
2296 else if ((p_ptr->resist_pois) || (p_ptr->oppose_pois))
2299 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2301 info[i++] = "You are resistant to poison.";
2306 if (p_ptr->resist_lite)
2309 info[i++] = "¤¢¤Ê¤¿¤ÏÁ®¸÷¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2311 info[i++] = "You are resistant to bright light.";
2316 if (prace_is_(RACE_VAMPIRE) || prace_is_(RACE_S_FAIRY) || (p_ptr->mimic_form == MIMIC_VAMPIRE))
2319 info[i++] = "¤¢¤Ê¤¿¤ÏÁ®¸÷¤Ë¼å¤¤¡£";
2321 info[i++] = "You are susceptible to damage from bright light.";
2326 if (prace_is_(RACE_VAMPIRE) || (p_ptr->mimic_form == MIMIC_VAMPIRE) || p_ptr->wraith_form)
2329 info[i++] = "¤¢¤Ê¤¿¤Ï°Å¹õ¤ËÂФ¹¤ë´°Á´¤Ê¤ëÌȱ֤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2331 info[i++] = "You are completely immune to darkness.";
2335 else if (p_ptr->resist_dark)
2338 info[i++] = "¤¢¤Ê¤¿¤Ï°Å¹õ¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2340 info[i++] = "You are resistant to darkness.";
2344 if (p_ptr->resist_conf)
2347 info[i++] = "¤¢¤Ê¤¿¤Ïº®Íð¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2349 info[i++] = "You are resistant to confusion.";
2353 if (p_ptr->resist_sound)
2356 info[i++] = "¤¢¤Ê¤¿¤Ï²»ÇȤξ׷â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2358 info[i++] = "You are resistant to sonic attacks.";
2362 if (p_ptr->resist_disen)
2365 info[i++] = "¤¢¤Ê¤¿¤ÏÎô²½¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2367 info[i++] = "You are resistant to disenchantment.";
2371 if (p_ptr->resist_chaos)
2374 info[i++] = "¤¢¤Ê¤¿¤Ï¥«¥ª¥¹¤ÎÎϤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2376 info[i++] = "You are resistant to chaos.";
2380 if (p_ptr->resist_shard)
2383 info[i++] = "¤¢¤Ê¤¿¤ÏÇËÊҤι¶·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2385 info[i++] = "You are resistant to blasts of shards.";
2389 if (p_ptr->resist_nexus)
2392 info[i++] = "¤¢¤Ê¤¿¤Ï°ø²Ìº®Íð¤Î¹¶·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2394 info[i++] = "You are resistant to nexus attacks.";
2399 if (prace_is_(RACE_SPECTRE))
2402 info[i++] = "¤¢¤Ê¤¿¤ÏÃϹö¤ÎÎϤòµÛ¼ý¤Ç¤¤ë¡£";
2404 info[i++] = "You can drain nether forces.";
2408 else if (p_ptr->resist_neth)
2411 info[i++] = "¤¢¤Ê¤¿¤ÏÃϹö¤ÎÎϤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2413 info[i++] = "You are resistant to nether forces.";
2417 if (p_ptr->resist_fear)
2420 info[i++] = "¤¢¤Ê¤¿¤ÏÁ´¤¯¶²Éݤò´¶¤¸¤Ê¤¤¡£";
2422 info[i++] = "You are completely fearless.";
2426 if (p_ptr->resist_blind)
2429 info[i++] = "¤¢¤Ê¤¿¤ÎÌܤÏÌÕÌܤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2431 info[i++] = "Your eyes are resistant to blindness.";
2435 if (p_ptr->resist_time)
2438 info[i++] = "¤¢¤Ê¤¿¤Ï»þ´ÖµÕž¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
2440 info[i++] = "You are resistant to time.";
2445 if (p_ptr->sustain_str)
2448 info[i++] = "¤¢¤Ê¤¿¤ÎÏÓÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2450 info[i++] = "Your strength is sustained.";
2454 if (p_ptr->sustain_int)
2457 info[i++] = "¤¢¤Ê¤¿¤ÎÃÎǽ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2459 info[i++] = "Your intelligence is sustained.";
2463 if (p_ptr->sustain_wis)
2466 info[i++] = "¤¢¤Ê¤¿¤Î¸¤µ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2468 info[i++] = "Your wisdom is sustained.";
2472 if (p_ptr->sustain_con)
2475 info[i++] = "¤¢¤Ê¤¿¤ÎÂѵ×ÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2477 info[i++] = "Your constitution is sustained.";
2481 if (p_ptr->sustain_dex)
2484 info[i++] = "¤¢¤Ê¤¿¤Î´ïÍѤµ¤Ï°Ý»ý¤µ¤ì¤Æ¤¤¤ë¡£";
2486 info[i++] = "Your dexterity is sustained.";
2490 if (p_ptr->sustain_chr)
2493 info[i++] = "¤¢¤Ê¤¿¤ÎÌ¥ÎϤϰݻý¤µ¤ì¤Æ¤¤¤ë¡£";
2495 info[i++] = "Your charisma is sustained.";
2503 info[i++] = "¤¢¤Ê¤¿¤ÎÏÓÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2505 info[i++] = "Your strength is affected by your equipment.";
2512 info[i++] = "¤¢¤Ê¤¿¤ÎÃÎǽ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2514 info[i++] = "Your intelligence is affected by your equipment.";
2521 info[i++] = "¤¢¤Ê¤¿¤Î¸¤µ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2523 info[i++] = "Your wisdom is affected by your equipment.";
2530 info[i++] = "¤¢¤Ê¤¿¤Î´ïÍѤµ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2532 info[i++] = "Your dexterity is affected by your equipment.";
2539 info[i++] = "¤¢¤Ê¤¿¤ÎÂѵ×ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2541 info[i++] = "Your constitution is affected by your equipment.";
2548 info[i++] = "¤¢¤Ê¤¿¤ÎÌ¥ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2550 info[i++] = "Your charisma is affected by your equipment.";
2555 if (f1 & (TR1_STEALTH))
2558 info[i++] = "¤¢¤Ê¤¿¤Î±£Ì©¹ÔưǽÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2560 info[i++] = "Your stealth is affected by your equipment.";
2564 if (f1 & (TR1_SEARCH))
2567 info[i++] = "¤¢¤Ê¤¿¤Îõº÷ǽÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2569 info[i++] = "Your searching ability is affected by your equipment.";
2573 if (f1 & (TR1_INFRA))
2576 info[i++] = "¤¢¤Ê¤¿¤ÎÀÖ³°Àþ»ëÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2578 info[i++] = "Your infravision is affected by your equipment.";
2582 if (f1 & (TR1_TUNNEL))
2585 info[i++] = "¤¢¤Ê¤¿¤ÎºÎ·¡Ç½ÎϤÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2587 info[i++] = "Your digging ability is affected by your equipment.";
2591 if (f1 & (TR1_SPEED))
2594 info[i++] = "¤¢¤Ê¤¿¤Î¥¹¥Ô¡¼¥É¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2596 info[i++] = "Your speed is affected by your equipment.";
2600 if (f1 & (TR1_BLOWS))
2603 info[i++] = "¤¢¤Ê¤¿¤Î¹¶·â®ÅÙ¤ÏÁõÈ÷¤Ë¤è¤Ã¤Æ±Æ¶Á¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2605 info[i++] = "Your attack speed is affected by your equipment.";
2611 /* Access the current weapon */
2612 o_ptr = &inventory[INVEN_RARM];
2614 /* Analyze the weapon */
2617 /* Indicate Blessing */
2618 if (f3 & (TR3_BLESSED))
2621 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¿À¤Î½ËÊ¡¤ò¼õ¤±¤Æ¤¤¤ë¡£";
2623 info[i++] = "Your weapon has been blessed by the gods.";
2628 if (f1 & (TR1_CHAOTIC))
2631 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥í¥°¥ë¥¹¤Îħ¤Î°À¤ò¤â¤Ä¡£";
2633 info[i++] = "Your weapon is branded with the Sign of Logrus.";
2639 if (f1 & (TR1_IMPACT))
2642 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÂÇ·â¤ÇÃϿ̤òȯÀ¸¤¹¤ë¤³¤È¤¬¤Ç¤¤ë¡£";
2644 info[i++] = "The impact of your weapon can cause earthquakes.";
2649 if (f1 & (TR1_VORPAL))
2652 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÈó¾ï¤Ë±Ô¤¤¡£";
2654 info[i++] = "Your weapon is very sharp.";
2659 if (f1 & (TR1_VAMPIRIC))
2662 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤«¤éÀ¸Ì¿ÎϤòµÛ¼ý¤¹¤ë¡£";
2664 info[i++] = "Your weapon drains life from your foes.";
2669 /* Special "Attack Bonuses" */
2670 if (f1 & (TR1_BRAND_ACID))
2673 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÍϤ«¤¹¡£";
2675 info[i++] = "Your weapon melts your foes.";
2679 if (f1 & (TR1_BRAND_ELEC))
2682 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤ò´¶ÅŤµ¤»¤ë¡£";
2684 info[i++] = "Your weapon shocks your foes.";
2688 if (f1 & (TR1_BRAND_FIRE))
2691 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òdz¤ä¤¹¡£";
2693 info[i++] = "Your weapon burns your foes.";
2697 if (f1 & (TR1_BRAND_COLD))
2700 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÅà¤é¤»¤ë¡£";
2702 info[i++] = "Your weapon freezes your foes.";
2706 if (f1 & (TR1_BRAND_POIS))
2709 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏŨ¤òÆǤǿ¯¤¹¡£";
2711 info[i++] = "Your weapon poisons your foes.";
2716 /* Special "slay" flags */
2717 if (f1 & (TR1_SLAY_ANIMAL))
2720 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ïưʪ¤ËÂФ·¤Æ¶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2722 info[i++] = "Your weapon strikes at animals with extra force.";
2726 if (f1 & (TR1_SLAY_EVIL))
2729 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¼Ù°¤Ê¤ë¸ºß¤ËÂФ·¤Æ¶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2731 info[i++] = "Your weapon strikes at evil with extra force.";
2735 if (f1 & (TR1_SLAY_UNDEAD))
2738 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¢¥ó¥Ç¥Ã¥É¤ËÂФ·¤Æ¿ÀÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2740 info[i++] = "Your weapon strikes at undead with holy wrath.";
2744 if (f1 & (TR1_SLAY_DEMON))
2747 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥Ç¡¼¥â¥ó¤ËÂФ·¤Æ¿ÀÀ»¤Ê¤ëÎϤòȯ´ø¤¹¤ë¡£";
2749 info[i++] = "Your weapon strikes at demons with holy wrath.";
2753 if (f1 & (TR1_SLAY_ORC))
2756 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥ª¡¼¥¯¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2758 info[i++] = "Your weapon is especially deadly against orcs.";
2762 if (f1 & (TR1_SLAY_TROLL))
2765 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥È¥í¥ë¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2767 info[i++] = "Your weapon is especially deadly against trolls.";
2771 if (f1 & (TR1_SLAY_GIANT))
2774 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥¸¥ã¥¤¥¢¥ó¥È¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2776 info[i++] = "Your weapon is especially deadly against giants.";
2780 /* Special "kill" flags */
2781 if (f1 & (TR1_KILL_DRAGON))
2784 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥É¥é¥´¥ó¤ÎŷŨ¤Ç¤¢¤ë¡£";
2786 info[i++] = "Your weapon is a great bane of dragons.";
2790 else if (f1 & (TR1_SLAY_DRAGON))
2793 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤Ï¥É¥é¥´¥ó¤ËÂФ·¤ÆÆä˶¯¤¤ÎϤòȯ´ø¤¹¤ë¡£";
2795 info[i++] = "Your weapon is especially deadly against dragons.";
2800 if (f1 & (TR1_FORCE_WEPON))
2803 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏMP¤ò»È¤Ã¤Æ¹¶·â¤¹¤ë¡£";
2805 info[i++] = "Your weapon causes greate damages using your MP.";
2809 if (f2 & (TR2_THROW))
2812 info[i++] = "¤¢¤Ê¤¿¤ÎÉð´ï¤ÏÅꤲ¤ä¤¹¤¤¡£";
2814 info[i++] = "Your weapon can be thrown well.";
2820 /* Save the screen */
2823 /* Erase the screen */
2824 for (k = 1; k < 24; k++) prt("", k, 13);
2826 /* Label the information */
2828 prt(" ¤¢¤Ê¤¿¤Î¾õÂÖ:", 1, 15);
2830 prt(" Your Attributes:", 1, 15);
2834 /* We will print on top of the map (column 13) */
2835 for (k = 2, j = 0; j < i; j++)
2838 prt(info[j], k++, 15);
2840 /* Every 20 entries (lines 2 to 21), start over */
2841 if ((k == 22) && (j+1 < i))
2844 prt("-- ³¤¯ --", k, 15);
2846 prt("-- more --", k, 15);
2850 for (; k > 2; k--) prt("", k, 15);
2856 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 13);
2858 prt("[Press any key to continue]", k, 13);
2863 /* Restore the screen */
2868 static int report_magics_aux(int dur)
2886 else if (dur <= 100)
2890 else if (dur <= 200)
2900 static cptr report_magic_durations[] =
2909 "¿®¤¸Æñ¤¤¤Û¤ÉŤ¤´Ö",
2910 "¥â¥ó¥¹¥¿¡¼¤ò¹¶·â¤¹¤ë¤Þ¤Ç"
2913 "for a little while",
2917 "for a very long time",
2918 "for an incredibly long time",
2919 "until you hit a monster"
2926 * Report all currently active magical effects.
2928 void report_magics(void)
2938 info2[i] = report_magics_aux(p_ptr->blind);
2940 info[i++] = "¤¢¤Ê¤¿¤ÏÌܤ¬¸«¤¨¤Ê¤¤¡£";
2942 info[i++] = "You cannot see";
2946 if (p_ptr->confused)
2948 info2[i] = report_magics_aux(p_ptr->confused);
2950 info[i++] = "¤¢¤Ê¤¿¤Ïº®Í𤷤Ƥ¤¤ë¡£";
2952 info[i++] = "You are confused";
2958 info2[i] = report_magics_aux(p_ptr->afraid);
2960 info[i++] = "¤¢¤Ê¤¿¤Ï¶²Éݤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
2962 info[i++] = "You are terrified";
2966 if (p_ptr->poisoned)
2968 info2[i] = report_magics_aux(p_ptr->poisoned);
2970 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤ˿¯¤µ¤ì¤Æ¤¤¤ë¡£";
2972 info[i++] = "You are poisoned";
2978 info2[i] = report_magics_aux(p_ptr->image);
2980 info[i++] = "¤¢¤Ê¤¿¤Ï¸¸³Ð¤ò¸«¤Æ¤¤¤ë¡£";
2982 info[i++] = "You are hallucinating";
2988 info2[i] = report_magics_aux(p_ptr->blessed);
2990 info[i++] = "¤¢¤Ê¤¿¤Ï¸øÀµ¤µ¤ò´¶¤¸¤Æ¤¤¤ë¡£";
2992 info[i++] = "You feel rightous";
2998 info2[i] = report_magics_aux(p_ptr->hero);
3000 info[i++] = "¤¢¤Ê¤¿¤Ï¥Ò¡¼¥í¡¼µ¤Ê¬¤À¡£";
3002 info[i++] = "You feel heroic";
3008 info2[i] = report_magics_aux(p_ptr->shero);
3010 info[i++] = "¤¢¤Ê¤¿¤ÏÀïÆ®¶¸¤À¡£";
3012 info[i++] = "You are in a battle rage";
3016 if (p_ptr->protevil)
3018 info2[i] = report_magics_aux(p_ptr->protevil);
3020 info[i++] = "¤¢¤Ê¤¿¤Ï¼Ù°¤Ê¤ë¸ºß¤«¤é¼é¤é¤ì¤Æ¤¤¤ë¡£";
3022 info[i++] = "You are protected from evil";
3028 info2[i] = report_magics_aux(p_ptr->shield);
3030 info[i++] = "¤¢¤Ê¤¿¤Ï¿ÀÈë¤Î¥·¡¼¥ë¥É¤Ç¼é¤é¤ì¤Æ¤¤¤ë¡£";
3032 info[i++] = "You are protected by a mystic shield";
3038 info2[i] = report_magics_aux(p_ptr->invuln);
3040 info[i++] = "̵Ũ¤Ç¤¤¤é¤ì¤ë¡£";
3042 info[i++] = "You are invulnerable";
3046 if (p_ptr->wraith_form)
3048 info2[i] = report_magics_aux(p_ptr->wraith_form);
3050 info[i++] = "Í©Âβ½¤Ç¤¤ë¡£";
3052 info[i++] = "You are incorporeal";
3056 if (p_ptr->special_attack & ATTACK_CONFUSE)
3060 info[i++] = "¤¢¤Ê¤¿¤Î¼ê¤ÏÀÖ¤¯µ±¤¤¤Æ¤¤¤ë¡£";
3062 info[i++] = "Your hands are glowing dull red.";
3066 if (p_ptr->word_recall)
3068 info2[i] = report_magics_aux(p_ptr->word_recall);
3070 info[i++] = "¤Î¸åµ¢´Ô¤Î¾Û¤òȯư¤¹¤ë¡£";
3072 info[i++] = "You waiting to be recalled";
3076 if (p_ptr->oppose_acid)
3078 info2[i] = report_magics_aux(p_ptr->oppose_acid);
3080 info[i++] = "¤¢¤Ê¤¿¤Ï»À¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3082 info[i++] = "You are resistant to acid";
3086 if (p_ptr->oppose_elec)
3088 info2[i] = report_magics_aux(p_ptr->oppose_elec);
3090 info[i++] = "¤¢¤Ê¤¿¤ÏÅÅ·â¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3092 info[i++] = "You are resistant to lightning";
3096 if (p_ptr->oppose_fire)
3098 info2[i] = report_magics_aux(p_ptr->oppose_fire);
3100 info[i++] = "¤¢¤Ê¤¿¤Ï²Ð¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3102 info[i++] = "You are resistant to fire";
3106 if (p_ptr->oppose_cold)
3108 info2[i] = report_magics_aux(p_ptr->oppose_cold);
3110 info[i++] = "¤¢¤Ê¤¿¤ÏÎ䵤¤Ø¤ÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3112 info[i++] = "You are resistant to cold";
3116 if (p_ptr->oppose_pois)
3118 info2[i] = report_magics_aux(p_ptr->oppose_pois);
3120 info[i++] = "¤¢¤Ê¤¿¤ÏÆǤؤÎÂÑÀ¤ò»ý¤Ã¤Æ¤¤¤ë¡£";
3122 info[i++] = "You are resistant to poison";
3127 /* Save the screen */
3130 /* Erase the screen */
3131 for (k = 1; k < 24; k++) prt("", k, 13);
3133 /* Label the information */
3135 prt(" ËâË¡ :", 1, 15);
3137 prt(" Your Current Magic:", 1, 15);
3141 /* We will print on top of the map (column 13) */
3142 for (k = 2, j = 0; j < i; j++)
3146 sprintf(Dummy, "¤¢¤Ê¤¿¤Ï%s%s", info[j],
3148 sprintf(Dummy, "%s %s.", info[j],
3151 report_magic_durations[info2[j]]);
3152 prt(Dummy, k++, 15);
3154 /* Every 20 entries (lines 2 to 21), start over */
3155 if ((k == 22) && (j + 1 < i))
3158 prt("-- ³¤¯ --", k, 15);
3160 prt("-- more --", k, 15);
3164 for (; k > 2; k--) prt("", k, 15);
3170 prt("[²¿¤«¥¡¼¤ò²¡¤¹¤È¥²¡¼¥à¤ËÌá¤ê¤Þ¤¹]", k, 13);
3172 prt("[Press any key to continue]", k, 13);
3177 /* Restore the screen */
3183 * Detect all traps on current panel
3185 bool detect_traps(int range)
3188 bool detect = FALSE;
3192 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3194 /* Scan the current panel */
3195 for (y = 1; y < cur_hgt - 1; y++)
3197 for (x = 1; x <= cur_wid - 1; x++)
3199 if (distance(py, px, y, x) > range) continue;
3201 /* Access the grid */
3202 c_ptr = &cave[y][x];
3204 /* Detect invisible traps */
3205 if (c_ptr->info & CAVE_TRAP)
3212 if (is_trap(c_ptr->feat))
3214 /* Hack -- Memorize */
3215 c_ptr->info |= (CAVE_MARK);
3226 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT)) detect = FALSE;
3232 msg_print("¥È¥é¥Ã¥×¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3234 msg_print("You sense the presence of traps!");
3246 * Detect all doors on current panel
3248 bool detect_doors(int range)
3252 bool detect = FALSE;
3256 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3258 /* Scan the panel */
3259 for (y = 1; y < cur_hgt - 1; y++)
3261 for (x = 1; x < cur_wid - 1; x++)
3263 if (distance(py, px, y, x) > range) continue;
3265 c_ptr = &cave[y][x];
3267 /* Detect secret doors */
3268 if (c_ptr->feat == FEAT_SECRET)
3271 place_closed_door(y, x);
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)))
3280 /* Hack -- Memorize */
3281 c_ptr->info |= (CAVE_MARK);
3292 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT)) detect = FALSE;
3298 msg_print("¥É¥¢¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3300 msg_print("You sense the presence of doors!");
3311 * Detect all stairs on current panel
3313 bool detect_stairs(int range)
3317 bool detect = FALSE;
3321 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3323 /* Scan the panel */
3324 for (y = 1; y < cur_hgt - 1; y++)
3326 for (x = 1; x < cur_wid - 1; x++)
3328 if (distance(py, px, y, x) > range) continue;
3330 c_ptr = &cave[y][x];
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))
3339 /* Hack -- Memorize */
3340 c_ptr->info |= (CAVE_MARK);
3351 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT)) detect = FALSE;
3357 msg_print("³¬Ãʤθºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3359 msg_print("You sense the presence of stairs!");
3370 * Detect any treasure on the current panel
3372 bool detect_treasure(int range)
3376 bool detect = FALSE;
3380 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3382 /* Scan the current panel */
3383 for (y = 1; y < cur_hgt; y++)
3385 for (x = 1; x < cur_wid; x++)
3387 if (distance(py, px, y, x) > range) continue;
3389 c_ptr = &cave[y][x];
3391 /* Notice embedded gold */
3392 if ((c_ptr->feat == FEAT_MAGMA_H) ||
3393 (c_ptr->feat == FEAT_QUARTZ_H))
3395 /* Expose the gold */
3396 c_ptr->feat += 0x02;
3399 /* Magma/Quartz + Known Gold */
3400 if ((c_ptr->feat == FEAT_MAGMA_K) ||
3401 (c_ptr->feat == FEAT_QUARTZ_K))
3403 /* Hack -- Memorize */
3404 c_ptr->info |= (CAVE_MARK);
3415 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT+6)) detect = FALSE;
3421 msg_print("Ë䢤µ¤ì¤¿ºâÊõ¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3423 msg_print("You sense the presence of buried treasure!");
3436 * Detect all "gold" objects on the current panel
3438 bool detect_objects_gold(int range)
3443 bool detect = FALSE;
3445 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
3448 for (i = 1; i < o_max; i++)
3450 object_type *o_ptr = &o_list[i];
3452 /* Skip dead objects */
3453 if (!o_ptr->k_idx) continue;
3455 /* Skip held objects */
3456 if (o_ptr->held_m_idx) continue;
3462 /* Only detect nearby objects */
3463 if (distance(py, px, y, x) > range2) continue;
3465 /* Detect "gold" objects */
3466 if (o_ptr->tval == TV_GOLD)
3468 /* Hack -- memorize it */
3469 o_ptr->marked = TRUE;
3479 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT+6)) detect = FALSE;
3485 msg_print("ºâÊõ¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3487 msg_print("You sense the presence of treasure!");
3492 if (detect_monsters_string(range, "$"))
3503 * Detect all "normal" objects on the current panel
3505 bool detect_objects_normal(int range)
3510 bool detect = FALSE;
3512 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range2 /= 3;
3515 for (i = 1; i < o_max; i++)
3517 object_type *o_ptr = &o_list[i];
3519 /* Skip dead objects */
3520 if (!o_ptr->k_idx) continue;
3522 /* Skip held objects */
3523 if (o_ptr->held_m_idx) continue;
3529 /* Only detect nearby objects */
3530 if (distance(py, px, y, x) > range2) continue;
3532 /* Detect "real" objects */
3533 if (o_ptr->tval != TV_GOLD)
3535 /* Hack -- memorize it */
3536 o_ptr->marked = TRUE;
3546 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT+6)) detect = FALSE;
3552 msg_print("¥¢¥¤¥Æ¥à¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3554 msg_print("You sense the presence of objects!");
3559 if (detect_monsters_string(range, "!=?|/`"))
3570 * Detect all "magic" objects on the current panel.
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.
3576 * It can probably be argued that this function is now too powerful.
3578 bool detect_objects_magic(int range)
3582 bool detect = FALSE;
3584 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3586 /* Scan all objects */
3587 for (i = 1; i < o_max; i++)
3589 object_type *o_ptr = &o_list[i];
3591 /* Skip dead objects */
3592 if (!o_ptr->k_idx) continue;
3594 /* Skip held objects */
3595 if (o_ptr->held_m_idx) continue;
3601 /* Only detect nearby objects */
3602 if (distance(py, px, y, x) > range) continue;
3604 /* Examine the tval */
3607 /* Artifacts, misc magic items, or enchanted wearables */
3608 if (artifact_p(o_ptr) ||
3609 ego_item_p(o_ptr) ||
3611 (tv == TV_WHISTLE) ||
3612 (tv == TV_AMULET) ||
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)))
3632 /* Memorize the item */
3633 o_ptr->marked = TRUE;
3647 msg_print("ËâË¡¤Î¥¢¥¤¥Æ¥à¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3649 msg_print("You sense the presence of magic objects!");
3660 * Detect all "normal" monsters on the current panel
3662 bool detect_monsters_normal(int range)
3668 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3671 for (i = 1; i < m_max; i++)
3673 monster_type *m_ptr = &m_list[i];
3674 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3676 /* Skip dead monsters */
3677 if (!m_ptr->r_idx) continue;
3683 /* Only detect nearby monsters */
3684 if (distance(py, px, y, x) > range) continue;
3686 /* Detect all non-invisible monsters */
3687 if ((!(r_ptr->flags2 & RF2_INVISIBLE)) ||
3688 p_ptr->see_inv || p_ptr->tim_invis)
3690 /* Repair visibility later */
3691 repair_monsters = TRUE;
3693 /* Hack -- Detect monster */
3694 m_ptr->mflag |= (MFLAG_MARK | MFLAG_SHOW);
3696 /* Update the monster */
3697 update_mon(i, FALSE);
3704 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT+3)) flag = FALSE;
3709 /* Describe result */
3711 msg_print("¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3713 msg_print("You sense the presence of monsters!");
3724 * Detect all "invisible" monsters around the player
3726 bool detect_monsters_invis(int range)
3731 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3734 for (i = 1; i < m_max; i++)
3736 monster_type *m_ptr = &m_list[i];
3737 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3739 /* Skip dead monsters */
3740 if (!m_ptr->r_idx) continue;
3746 /* Only detect nearby monsters */
3747 if (distance(py, px, y, x) > range) continue;
3749 /* Detect invisible monsters */
3750 if (r_ptr->flags2 & RF2_INVISIBLE)
3752 /* Update monster recall window */
3753 if (p_ptr->monster_race_idx == m_ptr->r_idx)
3756 p_ptr->window |= (PW_MONSTER);
3759 /* Repair visibility later */
3760 repair_monsters = TRUE;
3762 /* Hack -- Detect monster */
3763 m_ptr->mflag |= (MFLAG_MARK | MFLAG_SHOW);
3765 /* Update the monster */
3766 update_mon(i, FALSE);
3773 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT+3)) flag = FALSE;
3778 /* Describe result */
3780 msg_print("Æ©ÌÀ¤ÊÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3782 msg_print("You sense the presence of invisible creatures!");
3794 * Detect all "evil" monsters on current panel
3796 bool detect_monsters_evil(int range)
3801 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3804 for (i = 1; i < m_max; i++)
3806 monster_type *m_ptr = &m_list[i];
3807 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3809 /* Skip dead monsters */
3810 if (!m_ptr->r_idx) continue;
3816 /* Only detect nearby monsters */
3817 if (distance(py, px, y, x) > range) continue;
3819 /* Detect evil monsters */
3820 if (r_ptr->flags3 & RF3_EVIL)
3822 /* Take note that they are evil */
3823 r_ptr->r_flags3 |= (RF3_EVIL);
3825 /* Update monster recall window */
3826 if (p_ptr->monster_race_idx == m_ptr->r_idx)
3829 p_ptr->window |= (PW_MONSTER);
3832 /* Repair visibility later */
3833 repair_monsters = TRUE;
3835 /* Hack -- Detect monster */
3836 m_ptr->mflag |= (MFLAG_MARK | MFLAG_SHOW);
3838 /* Update the monster */
3839 update_mon(i, FALSE);
3849 /* Describe result */
3851 msg_print("¼Ù°¤Ê¤ëÀ¸Êª¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3853 msg_print("You sense the presence of evil creatures!");
3866 * Detect all "nonliving", "undead" or "demonic" monsters on current panel
3868 bool detect_monsters_nonliving(int range)
3873 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3876 for (i = 1; i < m_max; i++)
3878 monster_type *m_ptr = &m_list[i];
3879 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3881 /* Skip dead monsters */
3882 if (!m_ptr->r_idx) continue;
3888 /* Only detect nearby monsters */
3889 if (distance(py, px, y, x) > range) continue;
3891 /* Detect non-living monsters */
3892 if (!monster_living(r_ptr))
3894 /* Update monster recall window */
3895 if (p_ptr->monster_race_idx == m_ptr->r_idx)
3898 p_ptr->window |= (PW_MONSTER);
3901 /* Repair visibility later */
3902 repair_monsters = TRUE;
3904 /* Hack -- Detect monster */
3905 m_ptr->mflag |= (MFLAG_MARK | MFLAG_SHOW);
3907 /* Update the monster */
3908 update_mon(i, FALSE);
3918 /* Describe result */
3920 msg_print("¼«Á³¤Ç¤Ê¤¤¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤¿¡ª");
3922 msg_print("You sense the presence of unnatural beings!");
3933 * Detect all monsters it has mind on current panel
3935 bool detect_monsters_mind(int range)
3940 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
3943 for (i = 1; i < m_max; i++)
3945 monster_type *m_ptr = &m_list[i];
3946 monster_race *r_ptr = &r_info[m_ptr->r_idx];
3948 /* Skip dead monsters */
3949 if (!m_ptr->r_idx) continue;
3955 /* Only detect nearby monsters */
3956 if (distance(py, px, y, x) > range) continue;
3958 /* Detect non-living monsters */
3959 if (!(r_ptr->flags2 & RF2_EMPTY_MIND))
3961 /* Update monster recall window */
3962 if (p_ptr->monster_race_idx == m_ptr->r_idx)
3965 p_ptr->window |= (PW_MONSTER);
3968 /* Repair visibility later */
3969 repair_monsters = TRUE;
3971 /* Hack -- Detect monster */
3972 m_ptr->mflag |= (MFLAG_MARK | MFLAG_SHOW);
3974 /* Update the monster */
3975 update_mon(i, FALSE);
3985 /* Describe result */
3987 msg_print("»¦µ¤¤ò´¶¤¸¤È¤Ã¤¿¡ª");
3989 msg_print("You sense the presence of someone's mind!");
4000 * Detect all (string) monsters on current panel
4002 bool detect_monsters_string(int range, cptr Match)
4007 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
4010 for (i = 1; i < m_max; i++)
4012 monster_type *m_ptr = &m_list[i];
4013 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4015 /* Skip dead monsters */
4016 if (!m_ptr->r_idx) continue;
4022 /* Only detect nearby monsters */
4023 if (distance(py, px, y, x) > range) continue;
4025 /* Detect monsters with the same symbol */
4026 if (strchr(Match, r_ptr->d_char))
4028 /* Update monster recall window */
4029 if (p_ptr->monster_race_idx == m_ptr->r_idx)
4032 p_ptr->window |= (PW_MONSTER);
4035 /* Repair visibility later */
4036 repair_monsters = TRUE;
4038 /* Hack -- Detect monster */
4039 m_ptr->mflag |= (MFLAG_MARK | MFLAG_SHOW);
4041 /* Update the monster */
4042 update_mon(i, FALSE);
4049 if ((p_ptr->pclass == CLASS_BARD) && (p_ptr->magic_num1[0] > MUSIC_DETECT+3)) flag = FALSE;
4054 /* Describe result */
4056 msg_print("¥â¥ó¥¹¥¿¡¼¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª");
4058 msg_print("You sense the presence of monsters!");
4069 * A "generic" detect monsters routine, tagged to flags3
4071 bool detect_monsters_xxx(int range, u32b match_flag)
4076 cptr desc_monsters = "ÊѤʥâ¥ó¥¹¥¿¡¼";
4078 cptr desc_monsters = "weird monsters";
4081 if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
4084 for (i = 1; i < m_max; i++)
4086 monster_type *m_ptr = &m_list[i];
4087 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4089 /* Skip dead monsters */
4090 if (!m_ptr->r_idx) continue;
4096 /* Only detect nearby monsters */
4097 if (distance(py, px, y, x) > range) continue;
4099 /* Detect evil monsters */
4100 if (r_ptr->flags3 & (match_flag))
4102 /* Take note that they are something */
4103 r_ptr->r_flags3 |= (match_flag);
4105 /* Update monster recall window */
4106 if (p_ptr->monster_race_idx == m_ptr->r_idx)
4109 p_ptr->window |= (PW_MONSTER);
4112 /* Repair visibility later */
4113 repair_monsters = TRUE;
4115 /* Hack -- Detect monster */
4116 m_ptr->mflag |= (MFLAG_MARK | MFLAG_SHOW);
4118 /* Update the monster */
4119 update_mon(i, FALSE);
4133 desc_monsters = "¥Ç¡¼¥â¥ó";
4135 desc_monsters = "demons";
4141 desc_monsters = "¥¢¥ó¥Ç¥Ã¥É";
4143 desc_monsters = "the undead";
4149 /* Describe result */
4151 msg_format("%s¤Î¸ºß¤ò´¶¤¸¤È¤Ã¤¿¡ª", desc_monsters);
4153 msg_format("You sense the presence of %s!", desc_monsters);
4167 bool detect_all(int range)
4169 bool detect = FALSE;
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;
4187 * Apply a "project()" directly to all viewable monsters
4189 * Note that affected monsters are NOT auto-tracked by this usage.
4191 * To avoid misbehavior when monster deaths have side-effects,
4192 * this is done in two passes. -- JDL
4194 bool project_hack(int typ, int dam)
4197 int flg = PROJECT_JUMP | PROJECT_KILL | PROJECT_HIDE | PROJECT_NO_REF;
4198 bool obvious = FALSE;
4201 /* Mark all (nearby) monsters */
4202 for (i = 1; i < m_max; i++)
4204 monster_type *m_ptr = &m_list[i];
4206 /* Paranoia -- Skip dead monsters */
4207 if (!m_ptr->r_idx) continue;
4213 /* Require line of sight */
4214 if (!player_has_los_bold(y, x)) continue;
4216 /* Mark the monster */
4217 m_ptr->mflag |= (MFLAG_TEMP);
4220 /* Affect all marked monsters */
4221 for (i = 1; i < m_max; i++)
4223 monster_type *m_ptr = &m_list[i];
4225 /* Skip unmarked monsters */
4226 if (!(m_ptr->mflag & (MFLAG_TEMP))) continue;
4229 m_ptr->mflag &= ~(MFLAG_TEMP);
4235 /* Jump directly to the target monster */
4236 if (project(0, 0, y, x, dam, typ, flg, -1)) obvious = TRUE;
4247 bool speed_monsters(void)
4249 return (project_hack(GF_OLD_SPEED, p_ptr->lev));
4255 bool slow_monsters(void)
4257 return (project_hack(GF_OLD_SLOW, p_ptr->lev));
4263 bool sleep_monsters(void)
4265 return (project_hack(GF_OLD_SLEEP, p_ptr->lev));
4270 * Banish evil monsters
4272 bool banish_evil(int dist)
4274 return (project_hack(GF_AWAY_EVIL, dist));
4281 bool turn_undead(void)
4283 bool tester = (project_hack(GF_TURN_UNDEAD, p_ptr->lev));
4285 chg_virtue(V_UNLIFE, -1);
4291 * Dispel undead monsters
4293 bool dispel_undead(int dam)
4295 bool tester = (project_hack(GF_DISP_UNDEAD, dam));
4297 chg_virtue(V_UNLIFE, -2);
4302 * Dispel evil monsters
4304 bool dispel_evil(int dam)
4306 return (project_hack(GF_DISP_EVIL, dam));
4310 * Dispel good monsters
4312 bool dispel_good(int dam)
4314 return (project_hack(GF_DISP_GOOD, dam));
4318 * Dispel all monsters
4320 bool dispel_monsters(int dam)
4322 return (project_hack(GF_DISP_ALL, dam));
4326 * Dispel 'living' monsters
4328 bool dispel_living(int dam)
4330 return (project_hack(GF_DISP_LIVING, dam));
4336 bool dispel_demons(int dam)
4338 return (project_hack(GF_DISP_DEMON, dam));
4343 * Wake up all monsters, and speed up "los" monsters.
4345 void aggravate_monsters(int who)
4352 /* Aggravate everyone nearby */
4353 for (i = 1; i < m_max; i++)
4355 monster_type *m_ptr = &m_list[i];
4356 // monster_race *r_ptr = &r_info[m_ptr->r_idx];
4358 /* Paranoia -- Skip dead monsters */
4359 if (!m_ptr->r_idx) continue;
4361 /* Skip aggravating monster (or player) */
4362 if (i == who) continue;
4364 /* Wake up nearby sleeping monsters */
4365 if (m_ptr->cdis < MAX_SIGHT * 2)
4374 if (!is_pet(m_ptr)) m_ptr->mflag2 |= MFLAG_NOPET;
4377 /* Speed up monsters in line of sight */
4378 if (player_has_los_bold(m_ptr->fy, m_ptr->fx))
4382 m_ptr->fast = MIN(200, m_ptr->fast + 100);
4390 if (speed) msg_print("ÉÕ¶á¤Ç²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤Ê´¶¤¸¤ò¼õ¤±¤¿¡ª");
4391 else if (sleep) msg_print("²¿¤«¤¬ÆÍÇ¡¶½Ê³¤·¤¿¤è¤¦¤ÊÁû¡¹¤·¤¤²»¤¬±ó¤¯¤Ëʹ¤³¤¨¤¿¡ª");
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!");
4396 if (p_ptr->riding) p_ptr->update |= PU_BONUS;
4402 * Delete all non-unique/non-quest monsters of a given "type" from the level
4404 bool symbol_genocide(int power, int player_cast)
4408 bool result = FALSE;
4409 int msec = delay_factor * delay_factor * delay_factor;
4411 /* Prevent genocide in quest levels */
4412 if (p_ptr->inside_quest && !random_quest_number(dun_level))
4417 /* Mega-Hack -- Get a monster symbol */
4419 while(!get_com("¤É¤Î¼ïÎà(ʸ»ú)¤Î¥â¥ó¥¹¥¿¡¼¤òËõ»¦¤·¤Þ¤¹¤«: ", &typ, FALSE));
4421 while(!get_com("Choose a monster race (by symbol) to genocide: ", &typ, FALSE));
4425 /* Delete the monsters of that "type" */
4426 for (i = 1; i < m_max; i++)
4428 monster_type *m_ptr = &m_list[i];
4429 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4433 /* Paranoia -- Skip dead monsters */
4434 if (!m_ptr->r_idx) continue;
4436 /* Skip "wrong" monsters */
4437 if (r_ptr->d_char != typ) continue;
4439 if (is_pet(m_ptr) && !player_cast) continue;
4441 /* Hack -- Skip Unique Monsters */
4442 if (r_ptr->flags1 & (RF1_UNIQUE)) angry = TRUE;
4444 /* Hack -- Skip Quest Monsters */
4445 else if (r_ptr->flags1 & RF1_QUESTOR) angry = TRUE;
4447 else if (r_ptr->flags7 & RF7_UNIQUE2) angry = TRUE;
4449 else if (i == p_ptr->riding) angry = TRUE;
4451 else if (player_cast && (r_ptr->level > rand_int(power))) angry = TRUE;
4453 else if (player_cast && (m_ptr->mflag2 & MFLAG_NOGENO)) angry = TRUE;
4455 /* Delete the monster */
4456 else delete_monster_idx(i);
4458 if (angry && player_cast)
4460 monster_desc(m_name, m_ptr, 0);
4461 if (m_ptr->ml && !p_ptr->blind)
4464 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
4466 msg_format("%^s is unaffected.", m_name);
4472 if (m_ptr->ml && !p_ptr->blind)
4475 msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
4477 msg_format("%^s wakes up.", m_name);
4481 if (is_friendly(m_ptr) && !is_pet(m_ptr))
4483 if (m_ptr->ml && !p_ptr->blind)
4486 msg_format("%s¤ÏÅܤä¿¡ª", m_name);
4488 msg_format("%^s gets angry!", m_name);
4493 if (one_in_(13)) m_ptr->mflag2 |= MFLAG_NOGENO;
4500 take_hit(DAMAGE_GENO, randint(4), "Ëõ»¦¤Î¼öʸ¤ò¾§¤¨¤¿ÈèÏ«", -1);
4502 take_hit(DAMAGE_GENO, randint(4), "the strain of casting Genocide", -1);
4507 /* Visual feedback */
4508 move_cursor_relative(py, px);
4511 p_ptr->redraw |= (PR_HP);
4514 p_ptr->window |= (PW_PLAYER);
4523 Term_xtra(TERM_XTRA_DELAY, msec);
4530 chg_virtue(V_VITALITY, -2);
4531 chg_virtue(V_CHANCE, -1);
4539 * Delete all nearby (non-unique) monsters
4541 bool mass_genocide(int power, int player_cast)
4544 bool result = FALSE;
4545 int msec = delay_factor * delay_factor * delay_factor;
4548 /* Prevent mass genocide in quest levels */
4549 if (p_ptr->inside_quest && !random_quest_number(dun_level))
4554 /* Delete the (nearby) monsters */
4555 for (i = 1; i < m_max; i++)
4557 monster_type *m_ptr = &m_list[i];
4558 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4562 /* Paranoia -- Skip dead monsters */
4563 if (!m_ptr->r_idx) continue;
4565 /* Skip distant monsters */
4566 if (m_ptr->cdis > MAX_SIGHT) continue;
4568 if (is_pet(m_ptr) && !player_cast) continue;
4570 /* Hack -- Skip unique monsters */
4571 if (r_ptr->flags1 & (RF1_UNIQUE)) angry = TRUE;
4573 /* Hack -- Skip Quest Monsters */
4574 else if (r_ptr->flags1 & RF1_QUESTOR) angry = TRUE;
4576 else if (r_ptr->flags7 & RF7_UNIQUE2) angry = TRUE;
4578 else if (i == p_ptr->riding) angry = TRUE;
4580 else if (player_cast && (r_ptr->level > rand_int(power))) angry = TRUE;
4582 else if (player_cast && (m_ptr->mflag2 & MFLAG_NOGENO)) angry = TRUE;
4584 /* Delete the monster */
4585 else delete_monster_idx(i);
4587 if (angry && player_cast)
4589 monster_desc(m_name, m_ptr, 0);
4590 if (m_ptr->ml && !p_ptr->blind)
4593 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
4595 msg_format("%^s is unaffected.", m_name);
4601 if (m_ptr->ml && !p_ptr->blind)
4604 msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
4606 msg_format("%^s wakes up.", m_name);
4610 if (is_friendly(m_ptr) && !is_pet(m_ptr))
4612 if (m_ptr->ml && !p_ptr->blind)
4615 msg_format("%s¤ÏÅܤä¿¡ª", m_name);
4617 msg_format("%^s gets angry!", m_name);
4622 if (one_in_(13)) m_ptr->mflag2 |= MFLAG_NOGENO;
4627 /* Hack -- visual feedback */
4629 take_hit(DAMAGE_GENO, randint(3), "¼þÊÕËõ»¦¤Î¼öʸ¤ò¾§¤¨¤¿ÈèÏ«", -1);
4631 take_hit(DAMAGE_GENO, randint(3), "the strain of casting Mass Genocide", -1);
4636 move_cursor_relative(py, px);
4639 p_ptr->redraw |= (PR_HP);
4642 p_ptr->window |= (PW_PLAYER);
4651 Term_xtra(TERM_XTRA_DELAY, msec);
4659 chg_virtue(V_VITALITY, -2);
4660 chg_virtue(V_CHANCE, -1);
4669 * Delete all nearby (non-unique) undead
4671 bool mass_genocide_undead(int power, int player_cast)
4674 bool result = FALSE;
4675 int msec = delay_factor * delay_factor * delay_factor;
4678 /* Prevent mass genocide in quest levels */
4679 if (p_ptr->inside_quest && !random_quest_number(dun_level))
4684 /* Delete the (nearby) monsters */
4685 for (i = 1; i < m_max; i++)
4687 monster_type *m_ptr = &m_list[i];
4688 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4692 /* Paranoia -- Skip dead monsters */
4693 if (!m_ptr->r_idx) continue;
4695 if (!(r_ptr->flags3 & RF3_UNDEAD)) continue;
4697 /* Skip distant monsters */
4698 if (m_ptr->cdis > MAX_SIGHT) continue;
4700 if (is_pet(m_ptr) && !player_cast) continue;
4702 /* Hack -- Skip unique monsters */
4703 if (r_ptr->flags1 & (RF1_UNIQUE)) angry = TRUE;
4705 /* Hack -- Skip Quest Monsters */
4706 else if (r_ptr->flags1 & RF1_QUESTOR) angry = TRUE;
4708 else if (r_ptr->flags7 & RF7_UNIQUE2) angry = TRUE;
4710 else if (i == p_ptr->riding) angry = TRUE;
4712 else if (player_cast && (r_ptr->level > rand_int(power))) angry = TRUE;
4714 else if (player_cast && (m_ptr->mflag2 & MFLAG_NOGENO)) angry = TRUE;
4716 /* Delete the monster */
4717 else delete_monster_idx(i);
4719 if (angry && player_cast)
4721 monster_desc(m_name, m_ptr, 0);
4722 if (m_ptr->ml && !p_ptr->blind)
4725 msg_format("%^s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡£", m_name);
4727 msg_format("%^s is unaffected.", m_name);
4733 if (m_ptr->ml && !p_ptr->blind)
4736 msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
4738 msg_format("%^s wakes up.", m_name);
4742 if (is_friendly(m_ptr) && !is_pet(m_ptr))
4744 if (m_ptr->ml && !p_ptr->blind)
4747 msg_format("%s¤ÏÅܤä¿¡ª", m_name);
4749 msg_format("%^s gets angry!", m_name);
4754 if (one_in_(13)) m_ptr->mflag2 |= MFLAG_NOGENO;
4759 /* Hack -- visual feedback */
4761 take_hit(DAMAGE_GENO, randint(3), "¥¢¥ó¥Ç¥Ã¥É¾ÃÌǤμöʸ¤ò¾§¤¨¤¿ÈèÏ«", -1);
4763 take_hit(DAMAGE_GENO, randint(3), "the strain of casting Mass Genocide", -1);
4768 move_cursor_relative(py, px);
4771 p_ptr->redraw |= (PR_HP);
4774 p_ptr->window |= (PW_PLAYER);
4783 Term_xtra(TERM_XTRA_DELAY, msec);
4791 chg_virtue(V_UNLIFE, -2);
4792 chg_virtue(V_CHANCE, -1);
4801 * Probe nearby monsters
4815 /* Probe all (nearby) monsters */
4816 for (i = 1; i < m_max; i++)
4818 monster_type *m_ptr = &m_list[i];
4819 monster_race *r_ptr = &r_info[m_ptr->r_idx];
4821 /* Paranoia -- Skip dead monsters */
4822 if (!m_ptr->r_idx) continue;
4824 /* Require line of sight */
4825 if (!player_has_los_bold(m_ptr->fy, m_ptr->fx)) continue;
4827 /* Probe visible monsters */
4832 /* Start the message */
4834 if (!probe) {msg_print("Ä´ººÃæ...");msg_print(NULL);}
4836 if (!probe) {msg_print("Probing...");msg_print(NULL);}
4839 if (m_ptr->mflag2 & MFLAG_KAGE)
4841 m_ptr->mflag2 &= ~(MFLAG_KAGE);
4842 lite_spot(m_ptr->fy, m_ptr->fx);
4844 /* Get "the monster" or "something" */
4845 monster_desc(m_name, m_ptr, 0x204);
4847 speed = m_ptr->mspeed - 110;
4848 if(m_ptr->fast) speed += 10;
4849 if(m_ptr->slow) speed -= 10;
4850 /* Describe the monster */
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);
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);
4856 if (r_ptr->next_r_idx)
4858 strcat(buf, format("%d/%d ", m_ptr->exp, r_ptr->next_exp));
4862 strcat(buf, "xxx ");
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,"̵Ũ ");
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 ");
4878 buf[strlen(buf)-1] = '\0';
4881 /* HACK : Add the line to message buffer */
4883 p_ptr->window |= (PW_MESSAGE);
4886 /* Learn all of the non-spell, non-treasure flags */
4889 if (m_ptr->ml) move_cursor_relative(m_ptr->fy, m_ptr->fx);
4892 Term_erase(0, 0, 255);
4906 chg_virtue(V_KNOWLEDGE, 1);
4909 msg_print("¤³¤ì¤ÇÁ´Éô¤Ç¤¹¡£");
4911 msg_print("That's all.");
4923 * The spell of destruction
4925 * This spell "deletes" monsters (instead of "killing" them).
4927 * Later we may use one function for both "destruction" and
4928 * "earthquake" by using the "full" to select "destruction".
4930 bool destroy_area(int y1, int x1, int r, int full)
4937 /* Prevent destruction of quest levels and town */
4938 if ((p_ptr->inside_quest && (p_ptr->inside_quest < MIN_RANDOM_QUEST)) || !dun_level)
4943 /* Big area of affect */
4944 for (y = (y1 - r); y <= (y1 + r); y++)
4946 for (x = (x1 - r); x <= (x1 + r); x++)
4948 monster_type *m_ptr;
4949 monster_race *r_ptr;
4951 /* Skip illegal grids */
4952 if (!in_bounds(y, x)) continue;
4954 /* Extract the distance */
4955 k = distance(y1, x1, y, x);
4957 /* Stay in the circle of death */
4958 if (k > r) continue;
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];
4965 /* Lose room and vault */
4966 c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY | CAVE_TRAP);
4968 /* Lose light and knowledge */
4969 c_ptr->info &= ~(CAVE_MARK | CAVE_GLOW);
4971 /* Hack -- Notice player affect */
4972 if ((x == px) && (y == py))
4974 /* Hurt the player later */
4977 /* Do not hurt this grid */
4981 /* Hack -- Skip the epicenter */
4982 if ((y == y1) && (x == x1)) continue;
4984 if ((r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->flags7 & RF7_GUARDIAN) || ((m_ptr->mflag2 & MFLAG_CHAMELEON) && (r_ptr->flags1 & RF1_UNIQUE)))
4986 /* Heal the monster */
4987 m_list[c_ptr->m_idx].hp = m_list[c_ptr->m_idx].maxhp;
4989 /* Try to teleport away quest monsters */
4990 if (!teleport_away(c_ptr->m_idx, (r * 2) + 1, TRUE)) continue;
4996 if (record_named_pet && is_pet(&m_list[c_ptr->m_idx]) && m_list[c_ptr->m_idx].nickname)
5000 monster_desc(m_name, &m_list[c_ptr->m_idx], 0x08);
5001 do_cmd_write_nikki(NIKKI_NAMED_PET, 6, m_name);
5004 /* Delete the monster (if any) */
5005 delete_monster(y, x);
5010 s16b this_o_idx, next_o_idx = 0;
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)
5017 /* Acquire object */
5018 o_ptr = &o_list[this_o_idx];
5020 /* Acquire next object */
5021 next_o_idx = o_ptr->next_o_idx;
5023 /* Hack -- Preserve unknown artifacts */
5024 if (artifact_p(o_ptr) && !object_known_p(o_ptr))
5026 /* Mega-Hack -- Preserve the artifact */
5027 a_info[o_ptr->name1].cur_num = 0;
5031 delete_object(y, x);
5033 /* Destroy "valid" grids */
5034 if (!cave_perma_bold(y, x))
5036 /* Wall (or floor) type */
5042 /* Create granite wall */
5043 c_ptr->feat = FEAT_WALL_EXTRA;
5049 /* Create quartz vein */
5050 c_ptr->feat = FEAT_QUARTZ;
5056 /* Create magma vein */
5057 c_ptr->feat = FEAT_MAGMA;
5064 c_ptr->feat = floor_type[rand_int(100)];
5065 c_ptr->info &= ~(CAVE_MASK);
5066 c_ptr->info |= CAVE_FLOOR;
5073 /* Hack -- Affect player */
5078 msg_print("dz¤¨¤ë¤è¤¦¤ÊÁ®¸÷¤¬È¯À¸¤·¤¿¡ª");
5080 msg_print("There is a searing blast of light!");
5084 /* Blind the player */
5085 if (!p_ptr->resist_blind && !p_ptr->resist_lite)
5088 (void)set_blind(p_ptr->blind + 10 + randint(10));
5094 /* Mega-Hack -- Forget the view and lite */
5095 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
5098 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
5100 /* Update the monsters */
5101 p_ptr->update |= (PU_MONSTERS);
5104 p_ptr->redraw |= (PR_MAP);
5107 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
5115 * Induce an "earthquake" of the given radius at the given location.
5117 * This will turn some walls into floors and some floors into walls.
5119 * The player will take damage and "jump" into a safe grid if possible,
5120 * otherwise, he will "tunnel" through the rubble instantaneously.
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.
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.
5132 bool earthquake(int cy, int cx, int r)
5134 int i, t, y, x, yy, xx, dy, dx, oy, ox;
5136 int sn = 0, sy = 0, sx = 0;
5142 /* Prevent destruction of quest levels and town */
5143 if ((p_ptr->inside_quest && (p_ptr->inside_quest < MIN_RANDOM_QUEST)) || !dun_level)
5148 /* Paranoia -- Enforce maximum range */
5151 /* Clear the "maximal blast" area */
5152 for (y = 0; y < 32; y++)
5154 for (x = 0; x < 32; x++)
5160 /* Check around the epicenter */
5161 for (dy = -r; dy <= r; dy++)
5163 for (dx = -r; dx <= r; dx++)
5165 /* Extract the location */
5169 /* Skip illegal grids */
5170 if (!in_bounds(yy, xx)) continue;
5172 /* Skip distant grids */
5173 if (distance(cy, cx, yy, xx) > r) continue;
5175 /* Access the grid */
5176 c_ptr = &cave[yy][xx];
5178 /* Lose room and vault */
5179 c_ptr->info &= ~(CAVE_ROOM | CAVE_ICKY | CAVE_TRAP);
5181 /* Lose light and knowledge */
5182 c_ptr->info &= ~(CAVE_GLOW | CAVE_MARK);
5184 /* Skip the epicenter */
5185 if (!dx && !dy) continue;
5187 /* Skip most grids */
5188 if (rand_int(100) < 85) continue;
5190 /* Damage this grid */
5191 map[16+yy-cy][16+xx-cx] = TRUE;
5193 /* Hack -- Take note of player damage */
5194 if ((yy == py) && (xx == px)) hurt = TRUE;
5198 /* First, affect the player (if necessary) */
5199 if (hurt && !(p_ptr->prace == RACE_SPECTRE) && !(p_ptr->wraith_form) && !(p_ptr->kabenuke))
5201 /* Check around the player */
5202 for (i = 0; i < 8; i++)
5204 /* Access the location */
5205 y = py + ddy_ddd[i];
5206 x = px + ddx_ddd[i];
5208 /* Skip non-empty grids */
5209 if (!cave_empty_bold(y, x)) continue;
5211 /* Important -- Skip "quake" grids */
5212 if (map[16+y-cy][16+x-cx]) continue;
5214 if (cave[y][x].m_idx) continue;
5216 /* Count "safe" grids */
5219 /* Randomize choice */
5220 if (rand_int(sn) > 0) continue;
5222 /* Save the safe location */
5226 /* Random message */
5232 msg_print("¥À¥ó¥¸¥ç¥ó¤ÎÊɤ¬Êø¤ì¤¿¡ª");
5234 msg_print("The cave ceiling collapses!");
5242 msg_print("¥À¥ó¥¸¥ç¥ó¤Î¾²¤¬ÉÔ¼«Á³¤Ë¤Í¤¸¶Ê¤¬¤Ã¤¿¡ª");
5244 msg_print("The cave floor twists in an unnatural way!");
5252 msg_print("¥À¥ó¥¸¥ç¥ó¤¬Íɤ줿¡ªÊø¤ì¤¿´ä¤¬Æ¬¤Ë¹ß¤Ã¤Æ¤¤¿¡ª");
5254 msg_print("The cave quakes! You are pummeled with debris!");
5261 /* Hurt the player a lot */
5264 /* Message and damage */
5266 msg_print("¤¢¤Ê¤¿¤Ï¤Ò¤É¤¤²ø²æ¤òÉé¤Ã¤¿¡ª");
5268 msg_print("You are severely crushed!");
5274 /* Destroy the grid, and push the player to safety */
5277 /* Calculate results */
5283 msg_print("¹ß¤êÃí¤°´ä¤ò¤¦¤Þ¤¯Èò¤±¤¿¡ª");
5285 msg_print("You nimbly dodge the blast!");
5294 msg_print("´äÀФ¬¤¢¤Ê¤¿¤Ëľ·â¤·¤¿!");
5296 msg_print("You are bashed by rubble!");
5299 damage = damroll(10, 4);
5300 (void)set_stun(p_ptr->stun + randint(50));
5306 msg_print("¤¢¤Ê¤¿¤Ï¾²¤ÈÊɤȤδ֤˶´¤Þ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
5308 msg_print("You are crushed between the floor and ceiling!");
5311 damage = damroll(10, 4);
5312 (void)set_stun(p_ptr->stun + randint(50));
5317 /* Save the old location */
5321 /* Move the player to the safe location */
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);
5336 /* Redraw the old spot */
5339 /* Redraw the new spot */
5342 /* Check for new panel */
5346 /* Important -- no wall on player */
5347 map[16+py-cy][16+px-cx] = FALSE;
5349 /* Take some damage */
5351 if (damage) take_hit(DAMAGE_ATTACK, damage, "ÃÏ¿Ì", -1);
5353 if (damage) take_hit(DAMAGE_ATTACK, damage, "an earthquake", -1);
5359 /* Examine the quaked region */
5360 for (dy = -r; dy <= r; dy++)
5362 for (dx = -r; dx <= r; dx++)
5364 /* Extract the location */
5368 /* Skip unaffected grids */
5369 if (!map[16+yy-cy][16+xx-cx]) continue;
5371 /* Access the grid */
5372 c_ptr = &cave[yy][xx];
5374 if (c_ptr->m_idx == p_ptr->riding) continue;
5376 /* Process monsters */
5379 monster_type *m_ptr = &m_list[c_ptr->m_idx];
5380 monster_race *r_ptr = &r_info[m_ptr->r_idx];
5382 /* Quest monsters */
5383 if (r_ptr->flags1 & RF1_QUESTOR)
5385 /* No wall on quest monsters */
5386 map[16+yy-cy][16+xx-cx] = FALSE;
5391 /* Most monsters cannot co-exist with rock */
5392 if (!(r_ptr->flags2 & (RF2_KILL_WALL)) &&
5393 !(r_ptr->flags2 & (RF2_PASS_WALL)))
5397 /* Assume not safe */
5400 /* Monster can move to escape the wall */
5401 if (!(r_ptr->flags1 & (RF1_NEVER_MOVE)))
5403 /* Look for safety */
5404 for (i = 0; i < 8; i++)
5406 /* Access the grid */
5407 y = yy + ddy_ddd[i];
5408 x = xx + ddx_ddd[i];
5410 /* Skip non-empty grids */
5411 if (!cave_empty_bold(y, x)) continue;
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;
5417 /* ... nor on the Pattern */
5418 if ((cave[y][x].feat <= FEAT_PATTERN_XTRA2) &&
5419 (cave[y][x].feat >= FEAT_PATTERN_START))
5422 /* Important -- Skip "quake" grids */
5423 if (map[16+y-cy][16+x-cx]) continue;
5425 if (cave[y][x].m_idx) continue;
5426 if ((y == py) && (x == px)) continue;
5428 /* Count "safe" grids */
5431 /* Randomize choice */
5432 if (rand_int(sn) > 0) continue;
5434 /* Save the safe grid */
5439 /* Describe the monster */
5440 monster_desc(m_name, m_ptr, 0);
5442 /* Scream in pain */
5444 msg_format("%^s¤Ï¶ìÄˤǵ㤤ï¤á¤¤¤¿¡ª", m_name);
5446 msg_format("%^s wails out in pain!", m_name);
5450 /* Take damage from the quake */
5451 damage = (sn ? damroll(4, 8) : (m_ptr->hp + 1));
5453 /* Monster is certainly awake */
5456 /* Apply damage directly */
5457 m_ptr->hp -= damage;
5459 /* Delete (not kill) "dead" monsters */
5464 msg_format("%^s¤Ï´äÀФËËä¤â¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª", m_name);
5466 msg_format("%^s is embedded in the rock!", m_name);
5471 if (record_named_pet && is_pet(&m_list[c_ptr->m_idx]) && m_list[c_ptr->m_idx].nickname)
5475 monster_desc(m2_name, m_ptr, 0x08);
5476 do_cmd_write_nikki(NIKKI_NAMED_PET, 7, m2_name);
5480 /* Delete the monster */
5481 delete_monster(yy, xx);
5483 /* No longer safe */
5487 /* Hack -- Escape from the rock */
5490 int m_idx = cave[yy][xx].m_idx;
5492 /* Update the new location */
5493 cave[sy][sx].m_idx = m_idx;
5495 /* Update the old location */
5496 cave[yy][xx].m_idx = 0;
5498 /* Move the monster */
5502 /* Update the monster (new location) */
5503 update_mon(m_idx, TRUE);
5505 /* Redraw the old grid */
5508 /* Redraw the new grid */
5517 /* Examine the quaked region */
5518 for (dy = -r; dy <= r; dy++)
5520 for (dx = -r; dx <= r; dx++)
5522 /* Extract the location */
5526 /* Skip unaffected grids */
5527 if (!map[16+yy-cy][16+xx-cx]) continue;
5529 /* Access the cave grid */
5530 c_ptr = &cave[yy][xx];
5532 /* Paranoia -- never affect player */
5533 // if ((yy == py) && (xx == px)) continue;
5535 /* Destroy location (if valid) */
5536 if (cave_valid_bold(yy, xx))
5538 bool floor = cave_floor_bold(yy, xx);
5540 /* Delete objects */
5541 delete_object(yy, xx);
5543 /* Wall (or floor) type */
5544 t = (floor ? rand_int(100) : 200);
5549 /* Create granite wall */
5550 c_ptr->feat = FEAT_WALL_EXTRA;
5556 /* Create quartz vein */
5557 c_ptr->feat = FEAT_QUARTZ;
5563 /* Create magma vein */
5564 c_ptr->feat = FEAT_MAGMA;
5571 c_ptr->feat = floor_type[rand_int(100)];
5572 c_ptr->info &= ~(CAVE_MASK);
5573 c_ptr->info |= CAVE_FLOOR;
5580 /* Mega-Hack -- Forget the view and lite */
5581 p_ptr->update |= (PU_UN_VIEW | PU_UN_LITE);
5584 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
5586 /* Update the monsters */
5587 p_ptr->update |= (PU_DISTANCE);
5589 /* Update the health bar */
5590 p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
5593 p_ptr->redraw |= (PR_MAP);
5596 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
5603 void discharge_minion(bool force)
5608 for (i = 1; i < m_max; i++)
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;
5614 if (!okay || p_ptr->riding)
5616 if (!get_check("ËÜÅö¤ËÁ´¥Ú¥Ã¥È¤òÇúÇˤ·¤Þ¤¹¤«¡©"))
5619 for (i = 1; i < m_max; i++)
5622 monster_type *m_ptr = &m_list[i];
5623 monster_race *r_ptr;
5625 if (!m_ptr->r_idx || !is_pet(m_ptr)) continue;
5626 r_ptr = &r_info[m_ptr->r_idx];
5630 if (r_ptr->level/2+randint(r_ptr->level/2) > p_ptr->lev/2+randint(p_ptr->lev/2))
5633 monster_desc(m_name, m_ptr, 0x00);
5634 msg_format("%s¤ÏÇúÇˤµ¤ì¤ë¤Î¤ò·ù¤¬¤ê¡¢¾¡¼ê¤Ë¼«Ê¬¤ÎÀ¤³¦¤Ø¤Èµ¢¤Ã¤¿¡£", m_name);
5635 delete_monster_idx(i);
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);
5652 * This routine clears the entire "temp" set.
5654 * This routine will Perma-Lite all "temp" grids.
5656 * This routine is used (only) by "lite_room()"
5658 * Dark grids are illuminated.
5660 * Also, process all affected monsters.
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
5666 static void cave_temp_room_lite(void)
5670 /* Clear them all */
5671 for (i = 0; i < temp_n; i++)
5676 cave_type *c_ptr = &cave[y][x];
5678 /* No longer in the array */
5679 c_ptr->info &= ~(CAVE_TEMP);
5681 /* Update only non-CAVE_GLOW grids */
5682 /* if (c_ptr->info & (CAVE_GLOW)) continue; */
5685 c_ptr->info |= (CAVE_GLOW);
5687 /* Process affected monsters */
5692 monster_type *m_ptr = &m_list[c_ptr->m_idx];
5694 monster_race *r_ptr = &r_info[m_ptr->r_idx];
5696 /* Update the monster */
5697 update_mon(c_ptr->m_idx, FALSE);
5699 /* Stupid monsters rarely wake up */
5700 if (r_ptr->flags2 & (RF2_STUPID)) chance = 10;
5702 /* Smart monsters always wake up */
5703 if (r_ptr->flags2 & (RF2_SMART)) chance = 100;
5705 /* Sometimes monsters wake up */
5706 if (m_ptr->csleep && (rand_int(100) < chance))
5711 /* Notice the "waking up" */
5716 /* Acquire the monster name */
5717 monster_desc(m_name, m_ptr, 0);
5719 /* Dump a message */
5721 msg_format("%^s¤¬Ìܤò³Ð¤Þ¤·¤¿¡£", m_name);
5723 msg_format("%^s wakes up.", m_name);
5725 /* Redraw the health bar */
5726 if (p_ptr->health_who == c_ptr->m_idx)
5727 p_ptr->redraw |= (PR_HEALTH);
5747 * This routine clears the entire "temp" set.
5749 * This routine will "darken" all "temp" grids.
5751 * In addition, some of these grids will be "unmarked".
5753 * This routine is used (only) by "unlite_room()"
5755 * Also, process all affected monsters
5757 static void cave_temp_room_unlite(void)
5761 /* Clear them all */
5762 for (i = 0; i < temp_n; i++)
5767 cave_type *c_ptr = &cave[y][x];
5769 /* No longer in the array */
5770 c_ptr->info &= ~(CAVE_TEMP);
5772 /* Darken the grid */
5773 c_ptr->info &= ~(CAVE_GLOW);
5775 /* Hack -- Forget "boring" grids */
5776 if ((c_ptr->feat <= FEAT_INVIS) || (c_ptr->feat == FEAT_DIRT) || (c_ptr->feat == FEAT_GRASS))
5778 /* Forget the grid */
5779 c_ptr->info &= ~(CAVE_MARK);
5785 /* Process affected monsters */
5788 /* Update the monster */
5789 update_mon(c_ptr->m_idx, FALSE);
5803 * Aux function -- see below
5805 static void cave_temp_room_aux(int y, int x)
5810 // if (!in_bounds(y, x)) return;
5813 c_ptr = &cave[y][x];
5815 /* Avoid infinite recursion */
5816 if (c_ptr->info & (CAVE_TEMP)) return;
5818 /* Do not "leave" the current room */
5819 if (!(c_ptr->info & (CAVE_ROOM))) return;
5821 /* Paranoia -- verify space */
5822 if (temp_n == TEMP_MAX) return;
5824 /* Mark the grid as "seen" */
5825 c_ptr->info |= (CAVE_TEMP);
5827 /* Add it to the "seen" set */
5837 * Illuminate any room containing the given location.
5839 void lite_room(int y1, int x1)
5843 /* Add the initial grid */
5844 cave_temp_room_aux(y1, x1);
5846 /* While grids are in the queue, add their neighbors */
5847 for (i = 0; i < temp_n; i++)
5849 x = temp_x[i], y = temp_y[i];
5851 /* Walls get lit, but stop light */
5852 if (!cave_floor_bold(y, x)) continue;
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);
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);
5867 /* Now, lite them all up at once */
5868 cave_temp_room_lite();
5873 * Darken all rooms containing the given location
5875 void unlite_room(int y1, int x1)
5879 /* Add the initial grid */
5880 cave_temp_room_aux(y1, x1);
5882 /* Spread, breadth first */
5883 for (i = 0; i < temp_n; i++)
5885 x = temp_x[i], y = temp_y[i];
5887 /* Walls get dark, but stop darkness */
5888 if (!cave_floor_bold(y, x)) continue;
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);
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);
5903 /* Now, darken them all at once */
5904 cave_temp_room_unlite();
5910 * Hack -- call light around the player
5911 * Affect all monsters in the projection radius
5913 bool lite_area(int dam, int rad)
5915 int flg = PROJECT_GRID | PROJECT_KILL;
5917 if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
5919 msg_print("¥À¥ó¥¸¥ç¥ó¤¬¸÷¤òµÛ¼ý¤·¤¿¡£");
5923 /* Hack -- Message */
5927 msg_print("Çò¤¤¸÷¤¬ÊÕ¤ê¤òʤ¤Ã¤¿¡£");
5929 msg_print("You are surrounded by a white light.");
5934 /* Hook into the "project()" function */
5935 (void)project(0, rad, py, px, dam, GF_LITE_WEAK, flg, -1);
5937 /* Lite up the room */
5940 if (p_ptr->special_defense & NINJA_S_STEALTH)
5942 set_superstealth(FALSE);
5951 * Hack -- call darkness around the player
5952 * Affect all monsters in the projection radius
5954 bool unlite_area(int dam, int rad)
5956 int flg = PROJECT_GRID | PROJECT_KILL;
5958 /* Hack -- Message */
5962 msg_print("°Å°Ç¤¬ÊÕ¤ê¤òʤ¤Ã¤¿¡£");
5964 msg_print("Darkness surrounds you.");
5969 /* Hook into the "project()" function */
5970 (void)project(0, rad, py, px, dam, GF_DARK_WEAK, flg, -1);
5972 /* Lite up the room */
5973 unlite_room(py, px);
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
5987 bool fire_ball(int typ, int dir, int dam, int rad)
5991 int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_NO_REF;
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];
5998 /* Hack -- Use an actual "target" */
5999 if ((dir == 5) && target_okay())
6001 flg &= ~(PROJECT_STOP);
6006 /* Analyze the "dir" and the "target". Hurt items on floor. */
6007 return (project(0, rad, ty, tx, dam, typ, flg, -1));
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
6017 bool fire_rocket(int typ, int dir, int dam, int rad)
6021 int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_NO_REF;
6023 /* Use the given direction */
6024 tx = px + 99 * ddx[dir];
6025 ty = py + 99 * ddy[dir];
6027 /* Hack -- Use an actual "target" */
6028 if ((dir == 5) && target_okay())
6034 /* Analyze the "dir" and the "target". Hurt items on floor. */
6035 return (project(0, rad, ty, tx, dam, typ, flg, -1));
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
6045 bool fire_ball_hide(int typ, int dir, int dam, int rad)
6049 int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_NO_REF | PROJECT_HIDE;
6051 /* Use the given direction */
6052 tx = px + 99 * ddx[dir];
6053 ty = py + 99 * ddy[dir];
6055 /* Hack -- Use an actual "target" */
6056 if ((dir == 5) && target_okay())
6058 flg &= ~(PROJECT_STOP);
6063 /* Analyze the "dir" and the "target". Hurt items on floor. */
6064 return (project(0, rad, ty, tx, dam, typ, flg, -1));
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-
6074 * Option to hurt the player.
6076 bool fire_meteor(int who, int typ, int y, int x, int dam, int rad)
6078 int flg = PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_NO_REF;
6080 /* Analyze the "target" and the caster. */
6081 return (project(who, rad, y, x, dam, typ, flg, -1));
6086 * Switch position with a monster.
6088 bool teleport_swap(int dir)
6092 monster_type * m_ptr;
6093 monster_race * r_ptr;
6095 if ((dir == 5) && target_okay())
6105 c_ptr = &cave[ty][tx];
6107 if (p_ptr->anti_tele)
6110 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
6112 msg_print("A mysterious force prevents you from teleporting!");
6118 if (!c_ptr->m_idx || (c_ptr->m_idx == p_ptr->riding))
6121 msg_print("¤½¤ì¤È¤Ï¾ì½ê¤ò¸ò´¹¤Ç¤¤Þ¤»¤ó¡£");
6123 msg_print("You can't trade places with that!");
6131 if ((c_ptr->info & CAVE_ICKY) || (distance(ty, tx, py, px) > p_ptr->lev * 3 / 2 + 10))
6134 msg_print("¼ºÇÔ¤·¤¿¡£");
6136 msg_print("Failed to swap.");
6144 m_ptr = &m_list[c_ptr->m_idx];
6145 r_ptr = &r_info[m_ptr->r_idx];
6147 if (r_ptr->flags3 & RF3_RES_TELE)
6150 msg_print("¥Æ¥ì¥Ý¡¼¥È¤ò¼ÙË⤵¤ì¤¿¡ª");
6152 msg_print("Your teleportation is blocked!");
6160 sound(SOUND_TELEPORT);
6162 cave[py][px].m_idx = c_ptr->m_idx;
6164 /* Update the old location */
6165 c_ptr->m_idx = p_ptr->riding;
6167 /* Move the monster */
6168 m_ptr->fy = (byte)py;
6169 m_ptr->fx = (byte)px;
6171 /* Move the player */
6177 m_list[p_ptr->riding].fy = ty;
6178 m_list[p_ptr->riding].fx = tx;
6180 /* Update the monster (new location) */
6181 update_mon(cave[ty][tx].m_idx, TRUE);
6189 /* Update the monster (new location) */
6190 update_mon(cave[ty][tx].m_idx, TRUE);
6192 /* Redraw the old grid */
6195 /* Redraw the new grid */
6198 /* Check for new panel (redraw map) */
6202 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW);
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))
6207 /* Update some things */
6208 p_ptr->update |= (PU_MON_LITE);
6211 /* Update the monsters */
6212 p_ptr->update |= (PU_DISTANCE);
6215 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
6217 /* Redraw the health bar */
6218 if (p_ptr->health_who == cave[ty][tx].m_idx)
6219 p_ptr->redraw |= (PR_HEALTH);
6221 /* Handle stuff XXX XXX XXX */
6230 * Hack -- apply a "projection()" in a direction (or at the target)
6232 bool project_hook(int typ, int dir, int dam, int flg)
6236 /* Pass through the target if needed */
6237 flg |= (PROJECT_THRU);
6239 /* Use the given direction */
6243 /* Hack -- Use an actual "target" */
6244 if ((dir == 5) && target_okay())
6250 /* Analyze the "dir" and the "target", do NOT explode */
6251 return (project(0, 0, ty, tx, dam, typ, flg, -1));
6257 * Stop if we hit a monster, as a "bolt"
6258 * Affect monsters (not grids or objects)
6260 bool fire_bolt(int typ, int dir, int dam)
6262 int flg = PROJECT_STOP | PROJECT_KILL | PROJECT_GRID;
6263 return (project_hook(typ, dir, dam, flg));
6269 * Pass through monsters, as a "beam"
6270 * Affect monsters (not grids or objects)
6272 bool fire_beam(int typ, int dir, int dam)
6274 int flg = PROJECT_BEAM | PROJECT_KILL | PROJECT_GRID | PROJECT_ITEM;
6275 return (project_hook(typ, dir, dam, flg));
6280 * Cast a bolt spell, or rarely, a beam spell
6282 bool fire_bolt_or_beam(int prob, int typ, int dir, int dam)
6284 if (rand_int(100) < prob)
6286 return (fire_beam(typ, dir, dam));
6290 return (fire_bolt(typ, dir, dam));
6296 * Some of the old functions
6298 bool lite_line(int dir)
6300 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_KILL;
6301 return (project_hook(GF_LITE_WEAK, dir, damroll(6, 8), flg));
6305 bool drain_life(int dir, int dam)
6307 int flg = PROJECT_STOP | PROJECT_KILL;
6308 return (project_hook(GF_OLD_DRAIN, dir, dam, flg));
6312 bool wall_to_mud(int dir)
6314 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6315 return (project_hook(GF_KILL_WALL, dir, 20 + randint(30), flg));
6319 bool wizard_lock(int dir)
6321 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL;
6322 return (project_hook(GF_JAM_DOOR, dir, 20 + randint(30), flg));
6326 bool destroy_door(int dir)
6328 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
6329 return (project_hook(GF_KILL_DOOR, dir, 0, flg));
6333 bool disarm_trap(int dir)
6335 int flg = PROJECT_BEAM | PROJECT_GRID | PROJECT_ITEM;
6336 return (project_hook(GF_KILL_TRAP, dir, 0, flg));
6340 bool heal_monster(int dir, int dam)
6342 int flg = PROJECT_STOP | PROJECT_KILL;
6343 return (project_hook(GF_OLD_HEAL, dir, dam, flg));
6347 bool speed_monster(int dir)
6349 int flg = PROJECT_STOP | PROJECT_KILL;
6350 return (project_hook(GF_OLD_SPEED, dir, p_ptr->lev, flg));
6354 bool slow_monster(int dir)
6356 int flg = PROJECT_STOP | PROJECT_KILL;
6357 return (project_hook(GF_OLD_SLOW, dir, p_ptr->lev, flg));
6361 bool sleep_monster(int dir)
6363 int flg = PROJECT_STOP | PROJECT_KILL;
6364 return (project_hook(GF_OLD_SLEEP, dir, p_ptr->lev, flg));
6368 bool stasis_monster(int dir)
6370 return (fire_ball_hide(GF_STASIS, dir, p_ptr->lev*2, 0));
6374 bool confuse_monster(int dir, int plev)
6376 int flg = PROJECT_STOP | PROJECT_KILL;
6377 return (project_hook(GF_OLD_CONF, dir, plev, flg));
6381 bool stun_monster(int dir, int plev)
6383 int flg = PROJECT_STOP | PROJECT_KILL;
6384 return (project_hook(GF_STUN, dir, plev, flg));
6388 bool poly_monster(int dir)
6390 int flg = PROJECT_STOP | PROJECT_KILL;
6391 bool tester = (project_hook(GF_OLD_POLY, dir, p_ptr->lev, flg));
6393 chg_virtue(V_CHANCE, 1);
6398 bool clone_monster(int dir)
6400 int flg = PROJECT_STOP | PROJECT_KILL;
6401 return (project_hook(GF_OLD_CLONE, dir, 0, flg));
6405 bool fear_monster(int dir, int plev)
6407 int flg = PROJECT_STOP | PROJECT_KILL;
6408 return (project_hook(GF_TURN_ALL, dir, plev, flg));
6412 bool death_ray(int dir, int plev)
6414 int flg = PROJECT_STOP | PROJECT_KILL;
6415 return (project_hook(GF_DEATH_RAY, dir, plev * 200, flg));
6419 bool teleport_monster(int dir)
6421 int flg = PROJECT_BEAM | PROJECT_KILL;
6422 return (project_hook(GF_AWAY_ALL, dir, MAX_SIGHT * 5, flg));
6426 * Hooks -- affect adjacent grids (radius 1 ball attack)
6428 bool door_creation(void)
6430 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6431 return (project(0, 1, py, px, 0, GF_MAKE_DOOR, flg, -1));
6435 bool trap_creation(int y, int x)
6437 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6438 return (project(0, 1, y, x, 0, GF_MAKE_TRAP, flg, -1));
6442 bool tree_creation(void)
6444 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6445 return (project(0, 1, py, px, 0, GF_MAKE_TREE, flg, -1));
6449 bool glyph_creation(void)
6451 int flg = PROJECT_GRID | PROJECT_ITEM;
6452 return (project(0, 1, py, px, 0, GF_MAKE_GLYPH, flg, -1));
6456 bool wall_stone(void)
6458 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6460 bool dummy = (project(0, 1, py, px, 0, GF_STONE_WALL, flg, -1));
6463 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW);
6465 /* Update the monsters */
6466 p_ptr->update |= (PU_MONSTERS);
6469 p_ptr->redraw |= (PR_MAP);
6472 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
6478 bool destroy_doors_touch(void)
6480 int flg = PROJECT_GRID | PROJECT_ITEM | PROJECT_HIDE;
6481 return (project(0, 1, py, px, 0, GF_KILL_DOOR, flg, -1));
6485 bool sleep_monsters_touch(void)
6487 int flg = PROJECT_KILL | PROJECT_HIDE;
6488 return (project(0, 1, py, px, p_ptr->lev, GF_OLD_SLEEP, flg, -1));
6492 bool animate_dead(int who, int y, int x)
6494 int flg = PROJECT_ITEM | PROJECT_HIDE;
6495 return (project(who, 5, y, x, 0, GF_ANIM_DEAD, flg, -1));
6499 void call_chaos(void)
6501 int Chaos_type, dummy, dir;
6502 int plev = p_ptr->lev;
6503 bool line_chaos = FALSE;
6505 int hurt_types[31] =
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
6517 Chaos_type = hurt_types[rand_int(31)];
6518 if (randint(4) == 1) line_chaos = TRUE;
6520 if (randint(6) == 1)
6522 for (dummy = 1; dummy < 10; dummy++)
6527 fire_beam(Chaos_type, dummy, 150);
6529 fire_ball(Chaos_type, dummy, 150, 2);
6533 else if (randint(3) == 1)
6535 fire_ball(Chaos_type, 0, 500, 8);
6539 if (!get_aim_dir(&dir)) return;
6541 fire_beam(Chaos_type, dir, 250);
6543 fire_ball(Chaos_type, dir, 250, 3 + (plev / 35));
6549 * Activate the evil Topi Ylinen curse
6550 * rr9: Stop the nasty things when a Cyberdemon is summoned
6551 * or the player gets paralyzed.
6553 bool activate_ty_curse(bool stop_ty, int *count)
6557 int flg = (PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL | PROJECT_JUMP);
6561 switch (randint(34))
6567 msg_print("ÃÏÌ̤¬Íɤ줿...");
6569 msg_print("The ground trembles...");
6572 earthquake(py, px, 5 + rand_int(10));
6573 if (randint(6) != 1) break;
6578 int dam = damroll(10, 10);
6580 msg_print("½ã¿è¤ÊËâÎϤμ¡¸µ¤Ø¤ÎÈ⤬³«¤¤¤¿¡ª");
6582 msg_print("A portal opens to a plane of raw mana!");
6585 project(0, 8, py, px, dam, GF_MANA, flg, -1);
6587 take_hit(DAMAGE_NOESCAPE, dam, "½ã¿è¤ÊËâÎϤβòÊü", -1);
6589 take_hit(DAMAGE_NOESCAPE, dam, "released pure mana", -1);
6591 if (randint(6) != 1) break;
6597 msg_print("¼þ°Ï¤Î¶õ´Ö¤¬ÏĤó¤À¡ª");
6599 msg_print("Space warps about you!");
6602 teleport_player(damroll(10, 10));
6603 if (rand_int(13)) (*count) += activate_hi_summon(py, px, FALSE);
6604 if (randint(6) != 1) break;
6608 msg_print("¥¨¥Í¥ë¥®¡¼¤Î¤¦¤Í¤ê¤ò´¶¤¸¤¿¡ª");
6610 msg_print("You feel a surge of energy!");
6616 project(0, 7, py, px, 50, GF_KILL_WALL, flg, -1);
6618 take_hit(DAMAGE_NOESCAPE, 50, "¥¨¥Í¥ë¥®¡¼¤Î¤¦¤Í¤ê", -1);
6620 take_hit(DAMAGE_NOESCAPE, 50, "surge of energy", -1);
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:
6635 msg_print("À¸Ì¿ÎϤ¬ÂΤ«¤éµÛ¤¤¼è¤é¤ì¤¿µ¤¤¬¤¹¤ë¡ª");
6637 msg_print("You feel your life draining away...");
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))
6650 msg_print("ĦÁü¤Ë¤Ê¤Ã¤¿µ¤Ê¬¤À¡ª");
6652 msg_print("You feel like a statue!");
6655 if (p_ptr->free_act)
6656 set_paralyzed(p_ptr->paralyzed + randint(3));
6658 set_paralyzed(p_ptr->paralyzed + randint(13));
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;
6667 msg_print("¤Û¤¨¡©»ä¤Ïï¡©¤³¤³¤Ç²¿¤·¤Æ¤ë¡©");
6669 msg_print("Huh? Who am I? What am I doing here?");
6673 if (randint(6) != 1) break;
6676 * Only summon Cyberdemons deep in the dungeon.
6678 if ((dun_level > 65) && !stop_ty)
6680 (*count) += summon_cyber(-1, py, px);
6684 if (randint(6) != 1) break;
6690 (void)do_dec_stat(i);
6692 while (randint(2) == 1);
6698 while ((randint(3) == 1) && !stop_ty);
6704 int activate_hi_summon(int y, int x, bool can_pet)
6708 bool pet = FALSE, friendly = FALSE;
6722 summon_lev = (pet ? p_ptr->lev * 2 / 3 + randint(p_ptr->lev / 2) : dun_level);
6724 for (i = 0; i < (randint(7) + (dun_level / 40)); i++)
6726 switch (randint(25) + (dun_level / 20))
6729 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANT, TRUE, friendly, pet, FALSE, !pet);
6732 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_SPIDER, TRUE, friendly, pet, FALSE, !pet);
6735 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HOUND, TRUE, friendly, pet, FALSE, !pet);
6738 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HYDRA, TRUE, friendly, pet, FALSE, !pet);
6741 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_ANGEL, TRUE, friendly, pet, FALSE, !pet);
6744 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNDEAD, TRUE, friendly, pet, FALSE, !pet);
6747 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DRAGON, TRUE, friendly, pet, FALSE, !pet);
6750 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_DEMON, TRUE, friendly, pet, FALSE, !pet);
6753 if (pet || friendly) break;
6754 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_AMBERITES, TRUE, friendly, pet, TRUE, !pet);
6757 if (pet || friendly) break;
6758 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_UNIQUE, TRUE, friendly, pet, TRUE, !pet);
6761 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_UNDEAD, TRUE, friendly, pet, (!friendly && !pet), !pet);
6764 count += summon_specific((pet ? -1 : 0), y, x, summon_lev, SUMMON_HI_DRAGON, TRUE, friendly, pet, (!friendly && !pet), !pet);
6767 count += summon_specific((pet ? -1 : 0), y, x, 100, SUMMON_CYBER, TRUE, friendly, pet, FALSE, !pet);
6770 count += summon_specific((pet ? -1 : 0), y, x,pet ? summon_lev : (((summon_lev * 3) / 2) + 5), 0, TRUE, friendly, pet, (!friendly && !pet), !pet);
6779 int summon_cyber(int who, int y, int x)
6782 int max_cyber = (easy_band ? 1 : (dun_level / 50) + randint(2));
6785 bool friendly = FALSE;
6788 /* Summoned by a monster */
6791 monster_type *m_ptr = &m_list[who];
6792 friendly = is_friendly(m_ptr);
6793 pet = is_pet(m_ptr);
6796 if (max_cyber > 4) max_cyber = 4;
6798 for (i = 0; i < max_cyber; i++)
6800 count += summon_specific(who, y, x, 100, SUMMON_CYBER, TRUE, friendly, pet, FALSE, FALSE);
6807 void wall_breaker(void)
6811 int attempts = 1000;
6813 if (randint(80 + p_ptr->lev) < 70)
6817 scatter(&y, &x, py, px, 4, 0);
6819 if (!cave_floor_bold(y, x)) continue;
6821 if ((y != py) || (x != px)) break;
6824 project(0, 0, y, x, 20 + randint(30), GF_KILL_WALL,
6825 (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
6827 else if (randint(100) > 30)
6829 earthquake(py, px, 1);
6833 int num = damroll(5, 3);
6835 for (i = 0; i < num; i++)
6839 scatter(&y, &x, py, px, 10, 0);
6841 if ((y != py) && (x != px)) break;
6844 project(0, 0, y, x, 20 + randint(30), GF_KILL_WALL,
6845 (PROJECT_BEAM | PROJECT_THRU | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
6854 bool confuse_monsters(int dam)
6856 return (project_hack(GF_OLD_CONF, dam));
6863 bool charm_monsters(int dam)
6865 return (project_hack(GF_CHARM, dam));
6872 bool charm_animals(int dam)
6874 return (project_hack(GF_CONTROL_ANIMAL, dam));
6881 bool stun_monsters(int dam)
6883 return (project_hack(GF_STUN, dam));
6890 bool stasis_monsters(int dam)
6892 return (project_hack(GF_STASIS, dam));
6897 * Mindblast monsters
6899 bool mindblast_monsters(int dam)
6901 return (project_hack(GF_PSI, dam));
6906 * Banish all monsters
6908 bool banish_monsters(int dist)
6910 return (project_hack(GF_AWAY_ALL, dist));
6917 bool turn_evil(int dam)
6919 return (project_hack(GF_TURN_EVIL, dam));
6926 bool turn_monsters(int dam)
6928 return (project_hack(GF_TURN_ALL, dam));
6933 * Death-ray all monsters (note: OBSCENELY powerful)
6935 bool deathray_monsters(void)
6937 return (project_hack(GF_DEATH_RAY, p_ptr->lev * 200));
6941 bool charm_monster(int dir, int plev)
6943 int flg = PROJECT_STOP | PROJECT_KILL;
6944 return (project_hook(GF_CHARM, dir, plev, flg));
6948 bool control_one_undead(int dir, int plev)
6950 int flg = PROJECT_STOP | PROJECT_KILL;
6951 return (project_hook(GF_CONTROL_UNDEAD, dir, plev, flg));
6955 bool control_one_demon(int dir, int plev)
6957 int flg = PROJECT_STOP | PROJECT_KILL;
6958 return (project_hook(GF_CONTROL_DEMON, dir, plev, flg));
6962 bool charm_animal(int dir, int plev)
6964 int flg = PROJECT_STOP | PROJECT_KILL;
6965 return (project_hook(GF_CONTROL_ANIMAL, dir, plev, flg));
6969 bool charm_living(int dir, int plev)
6971 int flg = PROJECT_STOP | PROJECT_KILL;
6972 return (project_hook(GF_CONTROL_LIVING, dir, plev, flg));
6976 void kawarimi(bool success)
6979 object_type *q_ptr = &forge;
6982 if (p_ptr->confused || p_ptr->blind || p_ptr->paralyzed || p_ptr->image) return;
6983 if (rand_int(200) < p_ptr->stun) return;
6985 if (!success && one_in_(3))
6988 msg_print("¼ºÇÔ¡ªÆ¨¤²¤é¤ì¤Ê¤«¤Ã¤¿¡£");
6990 msg_print("Failed! You couldn't run away.");
6992 p_ptr->special_defense &= ~(NINJA_KAWARIMI);
6993 p_ptr->redraw |= (PR_STATUS);
7000 teleport_player(10+randint(90));
7004 object_prep(q_ptr, lookup_kind(TV_STATUE, SV_WOODEN_STATUE));
7007 q_ptr->python = object_create_callback(q_ptr);
7008 #endif /* USE_SCRIPT */
7010 q_ptr->pval = MON_NINJA;
7012 /* Drop it in the dungeon */
7013 (void)drop_near(q_ptr, -1, y, x);
7016 if (success) msg_print("¹¶·â¤ò¼õ¤±¤ëÁ°¤ËÁÇÁ᤯¿È¤ò¤Ò¤ë¤¬¤¨¤·¤¿¡£");
7017 else msg_print("¼ºÇÔ¡ª¹¶·â¤ò¼õ¤±¤Æ¤·¤Þ¤Ã¤¿¡£");
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.");
7023 p_ptr->special_defense &= ~(NINJA_KAWARIMI);
7024 p_ptr->redraw |= (PR_STATUS);