3 /* Purpose: Mane code */
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.
18 void mane_info(char *p, int power, int dam)
20 int plev = p_ptr->lev;
24 cptr s_range = "ÈÏ°Ï:";
25 cptr s_heal = "²óÉü:";
29 cptr s_range = "range ";
30 cptr s_heal = "heal ";
35 if ((power > 2 && power < 41) || (power > 41 && power < 59) || (power == 75))
36 sprintf(p, " %s%d", s_dam, dam);
42 sprintf(p, " %sd%d+%d", s_heal, plev * 3, plev);
45 sprintf(p, " %sd%d+%d", s_dur, 20+plev, plev);
48 sprintf(p, " %s%d", s_heal, plev*6);
51 sprintf(p, " %sd7+7", s_dur);
54 sprintf(p, " %s10", s_range);
57 sprintf(p, " %s%d", s_range, plev * 5);
60 sprintf(p, " %s5", s_range);
70 * Allow user to choose a imitation.
72 * If a valid spell is chosen, saves it in '*sn' and returns TRUE
73 * If the user hits escape, returns FALSE, and set '*sn' to -1
74 * If there are no legal choices, returns FALSE, and sets '*sn' to -2
76 * The "prompt" should be "cast", "recite", or "study"
77 * The "known" should be TRUE for cast/pray, FALSE for study
79 * nb: This function has a (trivial) display bug which will be obvious
80 * when you run it. It's probably easy to fix but I haven't tried,
83 static int get_mane_power(int *sn, bool baigaesi)
90 int plev = p_ptr->lev;
105 /* Assume cancelled */
108 /* Nothing chosen yet */
116 /* Build a prompt (accept all spells) */
118 (void) strnfmt(out_val, 78, "(%c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©",
120 (void)strnfmt(out_val, 78, "(%c-%c, *=List, ESC=exit) Use which %s? ",
123 I2A(0), I2A(num - 1), p);
125 /* Get a spell from the user */
127 choice= always_show_list ? ESCAPE:1 ;
130 if(choice==ESCAPE) choice = ' ';
131 else if( !get_com(out_val, &choice, TRUE) )break;
134 if ((choice == ' ') || (choice == '*') || (choice == '?'))
144 /* Save the screen */
147 /* Display a list of spells */
150 put_str("̾Á°", y, x + 5);
152 put_str("Name", y, x + 5);
156 put_str("¼ºÎ¨ ¸ú²Ì", y, x + 36);
158 put_str("Fail Info", y, x + 35);
162 /* Dump the spells */
163 for (i = 0; i < num; i++)
165 /* Access the spell */
166 spell = monster_powers[mane_spell[i]];
168 chance = spell.manefail;
170 /* Reduce failure rate by "effective" level adjustment */
171 if (plev > spell.level) chance -= 3 * (plev - spell.level);
173 /* Reduce failure rate by INT/WIS adjustment */
174 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[spell.use_stat]] + adj_mag_stat[p_ptr->stat_ind[A_DEX]] - 2) / 2;
176 if (spell.manedam) chance = chance * mane_dam[i] / spell.manedam;
178 if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
179 if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
180 if ((p_ptr->pseikaku == SEIKAKU_GAMAN) || (p_ptr->pseikaku == SEIKAKU_CHIKARA)) chance++;
182 /* Extract the minimum failure rate */
183 minfail = adj_mag_fail[p_ptr->stat_ind[spell.use_stat]];
185 /* Minimum failure rate */
186 if (chance < minfail) chance = minfail;
188 /* Stunning makes spells harder */
189 if (p_ptr->stun > 50) chance += 25;
190 else if (p_ptr->stun) chance += 15;
192 /* Always a 5 percent chance of working */
193 if (chance > 95) chance = 95;
196 mane_info(comment, mane_spell[i], (baigaesi ? mane_dam[i]*2 : mane_dam[i]));
198 /* Dump the spell --(-- */
199 sprintf(psi_desc, " %c) %-30s %3d%%%s",
202 prt(psi_desc, y + i + 1, x);
205 /* Clear the bottom line */
206 prt("", y + i + 1, x);
215 /* Restore the screen */
224 ask = isupper(choice);
227 if (ask) choice = tolower(choice);
229 /* Extract request */
230 i = (islower(choice) ? A2I(choice) : -1);
232 /* Totally Illegal */
233 if ((i < 0) || (i >= num))
239 /* Save the spell index */
240 spell = monster_powers[mane_spell[i]];
249 (void) strnfmt(tmp_val, 78, "%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©", monster_powers[mane_spell[i]].name);
251 (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[mane_spell[i]].name);
255 /* Belay that order */
256 if (!get_check(tmp_val)) continue;
263 /* Restore the screen */
264 if (redraw) screen_load();
270 p_ptr->window |= (PW_SPELL);
276 /* Abort if needed */
277 if (!flag) return (FALSE);
279 /* Save the choice */
282 damage = (baigaesi ? mane_dam[i]*2 : mane_dam[i]);
290 * do_cmd_cast calls this function if the player's class
293 static bool use_mane(int spell)
296 int plev = p_ptr->lev;
297 bool unique_okay = FALSE;
298 if (randint(50+plev) < plev/10) unique_okay = TRUE;
306 msg_print("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£");
308 msg_print("You makes a high pitched shriek.");
311 aggravate_monsters(0);
320 if (!target_set(TARGET_KILL)) return FALSE;
321 if (!cave[target_row][target_col].m_idx) break;
322 if (!los(py, px, target_row, target_col)) break;
323 m_ptr = &m_list[cave[target_row][target_col].m_idx];
324 monster_desc(m_name, m_ptr, 0);
329 msg_format("%s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ï¤Ê¤¤¡£", m_name);
331 msg_format("%^s is no longer invulnerable.", m_name);
338 msg_format("%s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
340 msg_format("%^s is no longer fast.", m_name);
347 msg_format("%s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
349 msg_format("%^s is no longer slow.", m_name);
352 p_ptr->redraw |= (PR_HEALTH);
353 if (p_ptr->riding == cave[target_row][target_col].m_idx) p_ptr->redraw |= (PR_HEALTH);
358 if (!get_aim_dir(&dir)) return FALSE;
360 else msg_print("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£");
362 else msg_print("You fires a rocket.");
365 fire_rocket(GF_ROCKET, dir, damage, 2);
369 if (!get_aim_dir(&dir)) return FALSE;
371 else msg_print("Ìð¤òÊü¤Ã¤¿¡£");
373 else msg_print("You fires an arrow.");
376 fire_bolt(GF_ARROW, dir, damage);
380 if (!get_aim_dir(&dir)) return FALSE;
382 else msg_print("¥Ü¥ë¥È¤ò·â¤Ã¤¿¡£");
384 else msg_print("You fires a bolt.");
387 fire_bolt(GF_ARROW, dir, damage);
390 if (!get_aim_dir(&dir)) return FALSE;
392 else msg_print("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
394 else msg_print("You breathes acid.");
397 fire_ball(GF_ACID, dir, damage, (plev > 35 ? -3 : -2));
400 if (!get_aim_dir(&dir)) return FALSE;
402 else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
404 else msg_print("You breathes lightning.");
407 fire_ball(GF_ELEC, dir, damage, (plev > 35 ? -3 : -2));
410 if (!get_aim_dir(&dir)) return FALSE;
412 else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
414 else msg_print("You breathes fire.");
417 fire_ball(GF_FIRE, dir, damage, (plev > 35 ? -3 : -2));
420 if (!get_aim_dir(&dir)) return FALSE;
422 else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
424 else msg_print("You breathes frost.");
427 fire_ball(GF_COLD, dir, damage, (plev > 35 ? -3 : -2));
430 if (!get_aim_dir(&dir)) return FALSE;
432 else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
434 else msg_print("You breathes gas.");
437 fire_ball(GF_POIS, dir, damage, (plev > 35 ? -3 : -2));
440 if (!get_aim_dir(&dir)) return FALSE;
442 else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
444 else msg_print("You breathes nether.");
447 fire_ball(GF_NETHER, dir, damage, (plev > 35 ? -3 : -2));
450 if (!get_aim_dir(&dir)) return FALSE;
452 else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
454 else msg_print("You breathes light.");
457 fire_ball(GF_LITE, dir, damage, (plev > 35 ? -3 : -2));
460 if (!get_aim_dir(&dir)) return FALSE;
462 else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
464 else msg_print("You breathes darkness.");
467 fire_ball(GF_DARK, dir, damage, (plev > 35 ? -3 : -2));
470 if (!get_aim_dir(&dir)) return FALSE;
472 else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
474 else msg_print("You breathes confusion.");
477 fire_ball(GF_CONFUSION, dir, damage, (plev > 35 ? -3 : -2));
480 if (!get_aim_dir(&dir)) return FALSE;
482 else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
484 else msg_print("You breathes sound.");
487 fire_ball(GF_SOUND, dir, damage, (plev > 35 ? -3 : -2));
490 if (!get_aim_dir(&dir)) return FALSE;
492 else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
494 else msg_print("You breathes chaos.");
497 fire_ball(GF_CHAOS, dir, damage, (plev > 35 ? -3 : -2));
500 if (!get_aim_dir(&dir)) return FALSE;
502 else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
504 else msg_print("You breathes disenchantment.");
507 fire_ball(GF_DISENCHANT, dir, damage, (plev > 35 ? -3 : -2));
510 if (!get_aim_dir(&dir)) return FALSE;
512 else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
514 else msg_print("You breathes nexus.");
517 fire_ball(GF_NEXUS, dir, damage, (plev > 35 ? -3 : -2));
520 if (!get_aim_dir(&dir)) return FALSE;
522 else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
524 else msg_print("You breathes time.");
527 fire_ball(GF_TIME, dir, damage, (plev > 35 ? -3 : -2));
530 if (!get_aim_dir(&dir)) return FALSE;
532 else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£");
534 else msg_print("You breathes inertia.");
537 fire_ball(GF_INERTIA, dir, damage, (plev > 35 ? -3 : -2));
540 if (!get_aim_dir(&dir)) return FALSE;
542 else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
544 else msg_print("You breathes gravity.");
547 fire_ball(GF_GRAVITY, dir, damage, (plev > 35 ? -3 : -2));
550 if (!get_aim_dir(&dir)) return FALSE;
552 else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£");
554 else msg_print("You breathes shards.");
557 fire_ball(GF_SHARDS, dir, damage, (plev > 35 ? -3 : -2));
560 if (!get_aim_dir(&dir)) return FALSE;
562 else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
564 else msg_print("You breathes plasma.");
567 fire_ball(GF_PLASMA, dir, damage, (plev > 35 ? -3 : -2));
570 if (!get_aim_dir(&dir)) return FALSE;
572 else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
574 else msg_print("You breathes force.");
577 fire_ball(GF_FORCE, dir, damage, (plev > 35 ? -3 : -2));
580 if (!get_aim_dir(&dir)) return FALSE;
582 else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
584 else msg_print("You breathes mana.");
587 fire_ball(GF_MANA, dir, damage, (plev > 35 ? -3 : -2));
590 if (!get_aim_dir(&dir)) return FALSE;
592 else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£");
594 else msg_print("You casts a ball of radiation.");
597 fire_ball(GF_NUKE, dir, damage, 2);
600 if (!get_aim_dir(&dir)) return FALSE;
602 else msg_print("Êü¼ÍÀÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
604 else msg_print("You breathes toxic waste.");
607 fire_ball(GF_NUKE, dir, damage, (plev > 35 ? -3 : -2));
610 if (!get_aim_dir(&dir)) return FALSE;
612 else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£");
614 else msg_print("You invokes a raw Logrus.");
617 fire_ball(GF_CHAOS, dir, damage, 4);
620 if (!get_aim_dir(&dir)) return FALSE;
622 else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
624 else msg_print("You breathes disintegration.");
627 fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 35 ? -3 : -2));
630 if (!get_aim_dir(&dir)) return FALSE;
632 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
634 else msg_print("You casts an acid ball.");
637 fire_ball(GF_ACID, dir, damage, 2);
640 if (!get_aim_dir(&dir)) return FALSE;
642 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
644 else msg_print("You casts a lightning ball.");
647 fire_ball(GF_ELEC, dir, damage, 2);
650 if (!get_aim_dir(&dir)) return FALSE;
652 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
654 else msg_print("You casts a fire ball.");
657 fire_ball(GF_FIRE, dir, damage, 2);
660 if (!get_aim_dir(&dir)) return FALSE;
662 else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
664 else msg_print("You casts a frost ball.");
667 fire_ball(GF_COLD, dir, damage, 2);
670 if (!get_aim_dir(&dir)) return FALSE;
672 else msg_print("°½±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
674 else msg_print("You casts a stinking cloud.");
677 fire_ball(GF_POIS, dir, damage, 2);
680 if (!get_aim_dir(&dir)) return FALSE;
682 else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
684 else msg_print("You casts a nether ball.");
687 fire_ball(GF_NETHER, dir, damage, 2);
690 if (!get_aim_dir(&dir)) return FALSE;
692 else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£");
694 else msg_print("You gestures fluidly.");
697 fire_ball(GF_WATER, dir, damage, 4);
700 if (!get_aim_dir(&dir)) return FALSE;
702 else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
704 else msg_print("You invokes a mana storm.");
707 fire_ball(GF_MANA, dir, damage, 4);
710 if (!get_aim_dir(&dir)) return FALSE;
712 else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
714 else msg_print("You invokes a darkness storm.");
717 fire_ball(GF_DARK, dir, damage, 4);
720 if (!get_aim_dir(&dir)) return FALSE;
721 fire_ball_hide(GF_DRAIN_MANA, dir, randint(plev*3)+plev, 0);
724 if (!get_aim_dir(&dir)) return FALSE;
725 fire_ball_hide(GF_MIND_BLAST, dir, damage, 0);
728 if (!get_aim_dir(&dir)) return FALSE;
729 fire_ball_hide(GF_BRAIN_SMASH, dir, damage, 0);
732 if (!get_aim_dir(&dir)) return FALSE;
733 fire_ball_hide(GF_CAUSE_1, dir, damage, 0);
736 if (!get_aim_dir(&dir)) return FALSE;
737 fire_ball_hide(GF_CAUSE_2, dir, damage, 0);
740 if (!get_aim_dir(&dir)) return FALSE;
741 fire_ball_hide(GF_CAUSE_3, dir, damage, 0);
744 if (!get_aim_dir(&dir)) return FALSE;
745 fire_ball_hide(GF_CAUSE_4, dir, damage, 0);
748 if (!get_aim_dir(&dir)) return FALSE;
750 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
752 else msg_print("You casts an acid bolt.");
755 fire_bolt(GF_ACID, dir, damage);
758 if (!get_aim_dir(&dir)) return FALSE;
760 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
762 else msg_print("You casts a lightning bolt.");
765 fire_bolt(GF_ELEC, dir, damage);
768 if (!get_aim_dir(&dir)) return FALSE;
770 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
772 else msg_print("You casts a fire bolt.");
775 fire_bolt(GF_FIRE, dir, damage);
778 if (!get_aim_dir(&dir)) return FALSE;
780 else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
782 else msg_print("You casts a frost bolt.");
785 fire_bolt(GF_COLD, dir, damage);
788 if (!get_aim_dir(&dir)) return FALSE;
790 else msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
792 else msg_print("You invokes a starburst.");
795 fire_ball(GF_LITE, dir, damage, 4);
798 if (!get_aim_dir(&dir)) return FALSE;
800 else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
802 else msg_print("You casts a nether bolt.");
805 fire_bolt(GF_NETHER, dir, damage);
808 if (!get_aim_dir(&dir)) return FALSE;
810 else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
812 else msg_print("You casts a water bolt.");
815 fire_bolt(GF_WATER, dir, damage);
818 if (!get_aim_dir(&dir)) return FALSE;
820 else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
822 else msg_print("You casts a mana bolt.");
825 fire_bolt(GF_MANA, dir, damage);
828 if (!get_aim_dir(&dir)) return FALSE;
830 else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
832 else msg_print("You casts a plasma bolt.");
835 fire_bolt(GF_PLASMA, dir, damage);
838 if (!get_aim_dir(&dir)) return FALSE;
840 else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
842 else msg_print("You casts a ice bolt.");
845 fire_bolt(GF_ICE, dir, damage);
847 case MS_MAGIC_MISSILE:
848 if (!get_aim_dir(&dir)) return FALSE;
850 else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
852 else msg_print("You casts a magic missile.");
855 fire_bolt(GF_MISSILE, dir, damage);
858 if (!get_aim_dir(&dir)) return FALSE;
860 else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£");
862 else msg_print("You casts a fearful illusion.");
865 fear_monster(dir, plev+10);
868 if (!get_aim_dir(&dir)) return FALSE;
869 confuse_monster(dir, plev * 2);
872 if (!get_aim_dir(&dir)) return FALSE;
874 else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£");
876 else msg_print("You casts a mesmerizing illusion.");
879 confuse_monster(dir, plev * 2);
882 if (!get_aim_dir(&dir)) return FALSE;
886 if (!get_aim_dir(&dir)) return FALSE;
890 (void)set_fast(randint(20 + plev) + plev, FALSE);
894 if (!get_aim_dir(&dir)) return FALSE;
896 else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª");
898 else msg_print("You invokes the Hand of Doom!");
901 fire_ball_hide(GF_HAND_DOOM, dir, 200, 0);
906 msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£");
908 msg_print("You concentrates on your wounds!");
910 (void)hp_player(plev*6);
916 msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
918 msg_print("You casts a Globe of Invulnerability.");
920 (void)set_invuln(randint(7) + 7, FALSE);
926 teleport_player(plev * 5);
930 if (damage == 1 || damage == 2)
932 msg_print("¡Ö¡Ø¥¶¡¦¥ï¡¼¥ë¥É¡Ù¡ª»þ¤Ï»ß¤Þ¤Ã¤¿¡ª¡×");
934 msg_print("You yell 'The World! Time has stopped!'");
936 else if (damage == 3 || damage == 6)
938 msg_print("¡Ö»þ¤è¡ª¡×");
940 msg_print("You yell 'Time!'");
946 p_ptr->energy += (randint(200)+1200);
949 p_ptr->redraw |= (PR_MAP);
951 /* Update monsters */
952 p_ptr->update |= (PU_MONSTERS);
955 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
966 if (!target_set(TARGET_KILL)) return FALSE;
967 if (!cave[target_row][target_col].m_idx) break;
968 if (!los(py, px, target_row, target_col)) break;
969 m_ptr = &m_list[cave[target_row][target_col].m_idx];
970 monster_desc(m_name, m_ptr, 0);
972 msg_format("%s¤ò°ú¤Ìᤷ¤¿¡£", m_name);
974 msg_format("You commands %s to return.", m_name);
977 teleport_to_player(cave[target_row][target_col].m_idx, 100);
981 if (!get_aim_dir(&dir)) return FALSE;
983 (void)fire_beam(GF_AWAY_ALL, dir, plev);
991 if (!target_set(TARGET_KILL)) return FALSE;
992 if (!cave[target_row][target_col].m_idx) break;
993 if (!los(py, px, target_row, target_col)) break;
994 m_ptr = &m_list[cave[target_row][target_col].m_idx];
995 r_ptr = &r_info[m_ptr->r_idx];
996 monster_desc(m_name, m_ptr, 0);
998 msg_format("%s¤Î¤ò»Ø¤µ¤·¤¿¡£", m_name);
1000 msg_format("You gestures at %s's feet.", m_name);
1003 if ((r_ptr->flags3 & RF3_RES_TELE) || (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint(50) > plev + randint(60)))
1006 msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
1008 msg_format("%s are unaffected!", m_name);
1012 else if (randint(2) == 1)
1015 msg_format("%s¤Ï¾²¤òÆͤÇˤäÆÄÀ¤ó¤Ç¤¤¤Ã¤¿¡£", m_name);
1017 msg_format("%s sink through the floor.", m_name);
1019 delete_monster_idx(cave[target_row][target_col].m_idx);
1024 msg_format("%s¤ÏÅ·°æ¤òÆͤÇˤäÆÃè¤ØÉ⤤¤Æ¤¤¤Ã¤¿¡£",m_name);
1026 msg_format("%s rise up through the ceiling.", m_name);
1028 delete_monster_idx(cave[target_row][target_col].m_idx);
1033 if (!get_aim_dir(&dir)) return FALSE;
1036 else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£");
1038 else msg_print("You throws a psycho-spear.");
1040 (void)fire_beam(GF_PSY_SPEAR, dir, damage);
1044 msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£");
1046 msg_print("You gestures in shadow.");
1048 (void)unlite_area(10, 3);
1051 if (!target_set(TARGET_KILL)) return FALSE;
1053 msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£");
1055 msg_print("You casts a spell and cackles evilly.");
1057 trap_creation(target_row, target_col);
1061 msg_print("¤·¤«¤·²¿¤âµ¯¤¤Ê¤«¤Ã¤¿¡£");
1063 msg_print("Nothing happen.");
1068 msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1070 msg_print("You casts a animate dead.");
1072 (void)animate_dead(0, py, px);
1077 if (!target_set(TARGET_KILL)) return FALSE;
1080 msg_print("±ç·³¤ò¾¤´¤·¤¿¡£");
1082 msg_print("You summons minions.");
1084 for (k = 0;k < 4; k++)
1086 (void)summon_kin_player(TRUE, plev, target_row, target_col, TRUE);
1093 int max_cyber = (dun_level / 50) + randint(3);
1094 if (!target_set(TARGET_KILL)) return FALSE;
1096 msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª");
1098 msg_print("You summons Cyberdemons!");
1100 if (max_cyber > 4) max_cyber = 4;
1101 for (k = 0;k < max_cyber; k++)
1102 summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, TRUE, TRUE, TRUE, FALSE, FALSE);
1108 if (!target_set(TARGET_KILL)) return FALSE;
1110 msg_print("Ãç´Ö¤ò¾¤´¤·¤¿¡£");
1112 msg_print("You summons help.");
1114 for (k = 0;k < 1; k++)
1115 summon_specific(-1, target_row, target_col, plev, 0, TRUE, TRUE, TRUE, unique_okay, FALSE);
1121 if (!target_set(TARGET_KILL)) return FALSE;
1123 msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤·¤¿¡ª");
1125 msg_print("You summons monsters!");
1127 for (k = 0;k < 6; k++)
1128 summon_specific(-1, target_row, target_col, plev, 0, TRUE, TRUE, TRUE, unique_okay, FALSE);
1134 if (!target_set(TARGET_KILL)) return FALSE;
1136 msg_print("¥¢¥ê¤ò¾¤´¤·¤¿¡£");
1138 msg_print("You summons ants.");
1140 for (k = 0;k < 6; k++)
1141 summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, TRUE, TRUE, TRUE, FALSE, FALSE);
1147 if (!target_set(TARGET_KILL)) return FALSE;
1149 msg_print("ÃØéá¤ò¾¤´¤·¤¿¡£");
1151 msg_print("You summons spiders.");
1153 for (k = 0;k < 6; k++)
1154 summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, TRUE, TRUE, TRUE, FALSE, FALSE);
1160 if (!target_set(TARGET_KILL)) return FALSE;
1162 msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´¤·¤¿¡£");
1164 msg_print("You summons hounds.");
1166 for (k = 0;k < 4; k++)
1167 summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, TRUE, TRUE, TRUE, FALSE, FALSE);
1173 if (!target_set(TARGET_KILL)) return FALSE;
1175 msg_print("¥Ò¥É¥é¤ò¾¤´¤·¤¿¡£");
1177 msg_print("You summons hydras.");
1179 for (k = 0;k < 4; k++)
1180 summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, TRUE, TRUE, TRUE, FALSE, FALSE);
1186 if (!target_set(TARGET_KILL)) return FALSE;
1188 msg_print("Å·»È¤ò¾¤´¤·¤¿¡ª");
1190 msg_print("You summons angel!");
1192 for (k = 0;k < 1; k++)
1193 summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, TRUE, TRUE, TRUE, FALSE, FALSE);
1199 if (!target_set(TARGET_KILL)) return FALSE;
1201 msg_print("º®Æ٤εÜÄ¤é°Ëâ¤ò¾¤´¤·¤¿¡ª");
1203 msg_print("You summons a demon from the Courts of Chaos!");
1205 for (k = 0;k < 1; k++)
1206 summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, TRUE, TRUE, TRUE, unique_okay, FALSE);
1212 if (!target_set(TARGET_KILL)) return FALSE;
1214 msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´¤·¤¿¡ª");
1216 msg_print("You summons an undead adversary!");
1218 for (k = 0;k < 1; k++)
1219 summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
1225 if (!target_set(TARGET_KILL)) return FALSE;
1227 msg_print("¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1229 msg_print("You summons dragon!");
1231 for (k = 0;k < 1; k++)
1232 summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, TRUE, TRUE, TRUE, unique_okay, FALSE);
1235 case MS_S_HI_UNDEAD:
1238 if (!target_set(TARGET_KILL)) return FALSE;
1240 msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡ª");
1242 msg_print("You summons greater undead!");
1244 for (k = 0;k < 6; k++)
1245 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
1248 case MS_S_HI_DRAGON:
1251 if (!target_set(TARGET_KILL)) return FALSE;
1253 msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1255 msg_print("You summons ancient dragons!");
1257 for (k = 0;k < 4; k++)
1258 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, TRUE, TRUE, TRUE, unique_okay, FALSE);
1264 if (!target_set(TARGET_KILL)) return FALSE;
1266 msg_print("¥¢¥ó¥Ð¡¼¤Î²¦¤ò¾¤´¤·¤¿¡ª");
1268 msg_print("You summons Lords of Amber!");
1270 for (k = 0;k < 4; k++)
1271 summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, TRUE, TRUE, TRUE, TRUE, FALSE);
1277 if (!target_set(TARGET_KILL)) return FALSE;
1279 msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´¤·¤¿¡ª");
1281 msg_print("You summons special opponents!");
1283 for (k = 0;k < 4; k++)
1284 if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, TRUE, TRUE, TRUE, TRUE, FALSE)) count++;
1285 for (k = count;k < 4; k++)
1286 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
1298 * do_cmd_cast calls this function if the player's class
1301 bool do_cmd_mane(bool baigaesi)
1306 int plev = p_ptr->lev;
1307 monster_power spell;
1311 /* not if confused */
1312 if (p_ptr->confused)
1315 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1317 msg_print("You are too confused!");
1326 msg_print("¤Þ¤Í¤é¤ì¤ë¤â¤Î¤¬²¿¤â¤Ê¤¤¡ª");
1328 msg_print("You don't remember any action!");
1335 if (!get_mane_power(&n, baigaesi)) return FALSE;
1337 spell = monster_powers[mane_spell[n]];
1339 /* Spell failure chance */
1340 chance = spell.manefail;
1342 /* Reduce failure rate by "effective" level adjustment */
1343 if (plev > spell.level) chance -= 3 * (plev - spell.level);
1345 if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
1346 if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
1348 /* Reduce failure rate by INT/WIS adjustment */
1349 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[spell.use_stat]] - 1);
1351 if (spell.manedam) chance = chance * damage / spell.manedam;
1353 /* Extract the minimum failure rate */
1354 minfail = adj_mag_fail[p_ptr->stat_ind[spell.use_stat]];
1356 /* Minimum failure rate */
1357 if (chance < minfail) chance = minfail;
1359 /* Stunning makes spells harder */
1360 if (p_ptr->stun > 50) chance += 25;
1361 else if (p_ptr->stun) chance += 15;
1363 /* Always a 5 percent chance of working */
1364 if (chance > 95) chance = 95;
1367 if (rand_int(100) < chance)
1369 if (flush_failure) flush();
1371 msg_print("¤â¤Î¤Þ¤Í¤Ë¼ºÇÔ¤·¤¿¡ª");
1373 msg_print("You failed to concentrate hard enough!");
1382 /* Cast the spell */
1383 cast = use_mane(mane_spell[n]);
1385 if (!cast) return FALSE;
1389 for (j = n; j < mane_num;j++)
1391 mane_spell[j] = mane_spell[j+1];
1392 mane_dam[j] = mane_dam[j+1];
1399 p_ptr->redraw |= (PR_MANE);
1400 p_ptr->window |= (PW_PLAYER);
1401 p_ptr->window |= (PW_SPELL);