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 (randint1(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);
368 if (!get_aim_dir(&dir)) return FALSE;
370 else msg_print("Ìð¤òÊü¤Ã¤¿¡£");
372 else msg_print("You fires an arrow.");
375 fire_bolt(GF_ARROW, dir, damage);
384 if (!get_aim_dir(&dir)) return FALSE;
386 else msg_print("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
388 else msg_print("You breathes acid.");
391 fire_ball(GF_ACID, dir, damage, (plev > 35 ? -3 : -2));
394 if (!get_aim_dir(&dir)) return FALSE;
396 else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
398 else msg_print("You breathes lightning.");
401 fire_ball(GF_ELEC, dir, damage, (plev > 35 ? -3 : -2));
404 if (!get_aim_dir(&dir)) return FALSE;
406 else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
408 else msg_print("You breathes fire.");
411 fire_ball(GF_FIRE, dir, damage, (plev > 35 ? -3 : -2));
414 if (!get_aim_dir(&dir)) return FALSE;
416 else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
418 else msg_print("You breathes frost.");
421 fire_ball(GF_COLD, dir, damage, (plev > 35 ? -3 : -2));
424 if (!get_aim_dir(&dir)) return FALSE;
426 else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
428 else msg_print("You breathes gas.");
431 fire_ball(GF_POIS, dir, damage, (plev > 35 ? -3 : -2));
434 if (!get_aim_dir(&dir)) return FALSE;
436 else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
438 else msg_print("You breathes nether.");
441 fire_ball(GF_NETHER, dir, damage, (plev > 35 ? -3 : -2));
444 if (!get_aim_dir(&dir)) return FALSE;
446 else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
448 else msg_print("You breathes light.");
451 fire_ball(GF_LITE, dir, damage, (plev > 35 ? -3 : -2));
454 if (!get_aim_dir(&dir)) return FALSE;
456 else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
458 else msg_print("You breathes darkness.");
461 fire_ball(GF_DARK, dir, damage, (plev > 35 ? -3 : -2));
464 if (!get_aim_dir(&dir)) return FALSE;
466 else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
468 else msg_print("You breathes confusion.");
471 fire_ball(GF_CONFUSION, dir, damage, (plev > 35 ? -3 : -2));
474 if (!get_aim_dir(&dir)) return FALSE;
476 else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
478 else msg_print("You breathes sound.");
481 fire_ball(GF_SOUND, dir, damage, (plev > 35 ? -3 : -2));
484 if (!get_aim_dir(&dir)) return FALSE;
486 else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
488 else msg_print("You breathes chaos.");
491 fire_ball(GF_CHAOS, dir, damage, (plev > 35 ? -3 : -2));
494 if (!get_aim_dir(&dir)) return FALSE;
496 else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
498 else msg_print("You breathes disenchantment.");
501 fire_ball(GF_DISENCHANT, dir, damage, (plev > 35 ? -3 : -2));
504 if (!get_aim_dir(&dir)) return FALSE;
506 else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
508 else msg_print("You breathes nexus.");
511 fire_ball(GF_NEXUS, dir, damage, (plev > 35 ? -3 : -2));
514 if (!get_aim_dir(&dir)) return FALSE;
516 else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
518 else msg_print("You breathes time.");
521 fire_ball(GF_TIME, dir, damage, (plev > 35 ? -3 : -2));
524 if (!get_aim_dir(&dir)) return FALSE;
526 else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£");
528 else msg_print("You breathes inertia.");
531 fire_ball(GF_INERTIA, dir, damage, (plev > 35 ? -3 : -2));
534 if (!get_aim_dir(&dir)) return FALSE;
536 else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
538 else msg_print("You breathes gravity.");
541 fire_ball(GF_GRAVITY, dir, damage, (plev > 35 ? -3 : -2));
544 if (!get_aim_dir(&dir)) return FALSE;
546 else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£");
548 else msg_print("You breathes shards.");
551 fire_ball(GF_SHARDS, dir, damage, (plev > 35 ? -3 : -2));
554 if (!get_aim_dir(&dir)) return FALSE;
556 else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
558 else msg_print("You breathes plasma.");
561 fire_ball(GF_PLASMA, dir, damage, (plev > 35 ? -3 : -2));
564 if (!get_aim_dir(&dir)) return FALSE;
566 else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
568 else msg_print("You breathes force.");
571 fire_ball(GF_FORCE, dir, damage, (plev > 35 ? -3 : -2));
574 if (!get_aim_dir(&dir)) return FALSE;
576 else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
578 else msg_print("You breathes mana.");
581 fire_ball(GF_MANA, dir, damage, (plev > 35 ? -3 : -2));
584 if (!get_aim_dir(&dir)) return FALSE;
586 else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£");
588 else msg_print("You casts a ball of radiation.");
591 fire_ball(GF_NUKE, dir, damage, 2);
594 if (!get_aim_dir(&dir)) return FALSE;
596 else msg_print("Êü¼ÍÀÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
598 else msg_print("You breathes toxic waste.");
601 fire_ball(GF_NUKE, dir, damage, (plev > 35 ? -3 : -2));
604 if (!get_aim_dir(&dir)) return FALSE;
606 else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£");
608 else msg_print("You invokes a raw Logrus.");
611 fire_ball(GF_CHAOS, dir, damage, 4);
614 if (!get_aim_dir(&dir)) return FALSE;
616 else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
618 else msg_print("You breathes disintegration.");
621 fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 35 ? -3 : -2));
624 if (!get_aim_dir(&dir)) return FALSE;
626 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
628 else msg_print("You casts an acid ball.");
631 fire_ball(GF_ACID, dir, damage, 2);
634 if (!get_aim_dir(&dir)) return FALSE;
636 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
638 else msg_print("You casts a lightning ball.");
641 fire_ball(GF_ELEC, dir, damage, 2);
644 if (!get_aim_dir(&dir)) return FALSE;
646 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
648 else msg_print("You casts a fire ball.");
651 fire_ball(GF_FIRE, dir, damage, 2);
654 if (!get_aim_dir(&dir)) return FALSE;
656 else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
658 else msg_print("You casts a frost ball.");
661 fire_ball(GF_COLD, dir, damage, 2);
664 if (!get_aim_dir(&dir)) return FALSE;
666 else msg_print("°½±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
668 else msg_print("You casts a stinking cloud.");
671 fire_ball(GF_POIS, dir, damage, 2);
674 if (!get_aim_dir(&dir)) return FALSE;
676 else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
678 else msg_print("You casts a nether ball.");
681 fire_ball(GF_NETHER, dir, damage, 2);
684 if (!get_aim_dir(&dir)) return FALSE;
686 else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£");
688 else msg_print("You gestures fluidly.");
691 fire_ball(GF_WATER, dir, damage, 4);
694 if (!get_aim_dir(&dir)) return FALSE;
696 else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
698 else msg_print("You invokes a mana storm.");
701 fire_ball(GF_MANA, dir, damage, 4);
704 if (!get_aim_dir(&dir)) return FALSE;
706 else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
708 else msg_print("You invokes a darkness storm.");
711 fire_ball(GF_DARK, dir, damage, 4);
714 if (!get_aim_dir(&dir)) return FALSE;
715 fire_ball_hide(GF_DRAIN_MANA, dir, randint1(plev*3)+plev, 0);
718 if (!get_aim_dir(&dir)) return FALSE;
719 fire_ball_hide(GF_MIND_BLAST, dir, damage, 0);
722 if (!get_aim_dir(&dir)) return FALSE;
723 fire_ball_hide(GF_BRAIN_SMASH, dir, damage, 0);
726 if (!get_aim_dir(&dir)) return FALSE;
727 fire_ball_hide(GF_CAUSE_1, dir, damage, 0);
730 if (!get_aim_dir(&dir)) return FALSE;
731 fire_ball_hide(GF_CAUSE_2, dir, damage, 0);
734 if (!get_aim_dir(&dir)) return FALSE;
735 fire_ball_hide(GF_CAUSE_3, dir, damage, 0);
738 if (!get_aim_dir(&dir)) return FALSE;
739 fire_ball_hide(GF_CAUSE_4, dir, damage, 0);
742 if (!get_aim_dir(&dir)) return FALSE;
744 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
746 else msg_print("You casts an acid bolt.");
749 fire_bolt(GF_ACID, dir, damage);
752 if (!get_aim_dir(&dir)) return FALSE;
754 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
756 else msg_print("You casts a lightning bolt.");
759 fire_bolt(GF_ELEC, dir, damage);
762 if (!get_aim_dir(&dir)) return FALSE;
764 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
766 else msg_print("You casts a fire bolt.");
769 fire_bolt(GF_FIRE, dir, damage);
772 if (!get_aim_dir(&dir)) return FALSE;
774 else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
776 else msg_print("You casts a frost bolt.");
779 fire_bolt(GF_COLD, dir, damage);
782 if (!get_aim_dir(&dir)) return FALSE;
784 else msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
786 else msg_print("You invokes a starburst.");
789 fire_ball(GF_LITE, dir, damage, 4);
792 if (!get_aim_dir(&dir)) return FALSE;
794 else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
796 else msg_print("You casts a nether bolt.");
799 fire_bolt(GF_NETHER, dir, damage);
802 if (!get_aim_dir(&dir)) return FALSE;
804 else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
806 else msg_print("You casts a water bolt.");
809 fire_bolt(GF_WATER, dir, damage);
812 if (!get_aim_dir(&dir)) return FALSE;
814 else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
816 else msg_print("You casts a mana bolt.");
819 fire_bolt(GF_MANA, dir, damage);
822 if (!get_aim_dir(&dir)) return FALSE;
824 else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
826 else msg_print("You casts a plasma bolt.");
829 fire_bolt(GF_PLASMA, dir, damage);
832 if (!get_aim_dir(&dir)) return FALSE;
834 else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
836 else msg_print("You casts a ice bolt.");
839 fire_bolt(GF_ICE, dir, damage);
841 case MS_MAGIC_MISSILE:
842 if (!get_aim_dir(&dir)) return FALSE;
844 else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
846 else msg_print("You casts a magic missile.");
849 fire_bolt(GF_MISSILE, dir, damage);
852 if (!get_aim_dir(&dir)) return FALSE;
854 else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£");
856 else msg_print("You casts a fearful illusion.");
859 fear_monster(dir, plev+10);
862 if (!get_aim_dir(&dir)) return FALSE;
863 confuse_monster(dir, plev * 2);
866 if (!get_aim_dir(&dir)) return FALSE;
868 else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£");
870 else msg_print("You casts a mesmerizing illusion.");
873 confuse_monster(dir, plev * 2);
876 if (!get_aim_dir(&dir)) return FALSE;
880 if (!get_aim_dir(&dir)) return FALSE;
884 (void)set_fast(randint1(20 + plev) + plev, FALSE);
888 if (!get_aim_dir(&dir)) return FALSE;
890 else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª");
892 else msg_print("You invokes the Hand of Doom!");
895 fire_ball_hide(GF_HAND_DOOM, dir, 200, 0);
900 msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£");
902 msg_print("You concentrates on your wounds!");
904 (void)hp_player(plev*6);
910 msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
912 msg_print("You casts a Globe of Invulnerability.");
914 (void)set_invuln(randint1(7) + 7, FALSE);
920 teleport_player(plev * 5);
924 if (damage == 1 || damage == 2)
926 msg_print("¡Ö¡Ø¥¶¡¦¥ï¡¼¥ë¥É¡Ù¡ª»þ¤Ï»ß¤Þ¤Ã¤¿¡ª¡×");
928 msg_print("You yell 'The World! Time has stopped!'");
930 else if (damage == 3 || damage == 6)
932 msg_print("¡Ö»þ¤è¡ª¡×");
934 msg_print("You yell 'Time!'");
940 p_ptr->energy += (randint1(200)+1200);
943 p_ptr->redraw |= (PR_MAP);
945 /* Update monsters */
946 p_ptr->update |= (PU_MONSTERS);
949 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
960 if (!target_set(TARGET_KILL)) return FALSE;
961 if (!cave[target_row][target_col].m_idx) break;
962 if (!los(py, px, target_row, target_col)) break;
963 m_ptr = &m_list[cave[target_row][target_col].m_idx];
964 monster_desc(m_name, m_ptr, 0);
966 msg_format("%s¤ò°ú¤Ìᤷ¤¿¡£", m_name);
968 msg_format("You commands %s to return.", m_name);
971 teleport_to_player(cave[target_row][target_col].m_idx, 100);
975 if (!get_aim_dir(&dir)) return FALSE;
977 (void)fire_beam(GF_AWAY_ALL, dir, plev);
985 if (!target_set(TARGET_KILL)) return FALSE;
986 if (!cave[target_row][target_col].m_idx) break;
987 if (!los(py, px, target_row, target_col)) break;
988 m_ptr = &m_list[cave[target_row][target_col].m_idx];
989 r_ptr = &r_info[m_ptr->r_idx];
990 monster_desc(m_name, m_ptr, 0);
992 msg_format("%s¤Î¤ò»Ø¤µ¤·¤¿¡£", m_name);
994 msg_format("You gestures at %s's feet.", m_name);
997 if ((r_ptr->flags3 & RF3_RES_TELE) || (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint1(50) > plev + randint1(60)))
1000 msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
1002 msg_format("%s are unaffected!", m_name);
1006 else if (one_in_(2))
1009 msg_format("%s¤Ï¾²¤òÆͤÇˤäÆÄÀ¤ó¤Ç¤¤¤Ã¤¿¡£", m_name);
1011 msg_format("%s sink through the floor.", m_name);
1013 delete_monster_idx(cave[target_row][target_col].m_idx);
1018 msg_format("%s¤ÏÅ·°æ¤òÆͤÇˤäÆÃè¤ØÉ⤤¤Æ¤¤¤Ã¤¿¡£",m_name);
1020 msg_format("%s rise up through the ceiling.", m_name);
1022 delete_monster_idx(cave[target_row][target_col].m_idx);
1027 if (!get_aim_dir(&dir)) return FALSE;
1030 else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£");
1032 else msg_print("You throws a psycho-spear.");
1034 (void)fire_beam(GF_PSY_SPEAR, dir, damage);
1038 msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£");
1040 msg_print("You gestures in shadow.");
1042 (void)unlite_area(10, 3);
1045 if (!target_set(TARGET_KILL)) return FALSE;
1047 msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£");
1049 msg_print("You casts a spell and cackles evilly.");
1051 trap_creation(target_row, target_col);
1055 msg_print("¤·¤«¤·²¿¤âµ¯¤¤Ê¤«¤Ã¤¿¡£");
1057 msg_print("Nothing happen.");
1062 msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1064 msg_print("You casts a animate dead.");
1066 (void)animate_dead(0, py, px);
1071 if (!target_set(TARGET_KILL)) return FALSE;
1074 msg_print("±ç·³¤ò¾¤´¤·¤¿¡£");
1076 msg_print("You summons minions.");
1078 for (k = 0;k < 4; k++)
1080 (void)summon_kin_player(TRUE, plev, target_row, target_col, TRUE);
1087 int max_cyber = (dun_level / 50) + randint1(3);
1088 if (!target_set(TARGET_KILL)) return FALSE;
1090 msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª");
1092 msg_print("You summons Cyberdemons!");
1094 if (max_cyber > 4) max_cyber = 4;
1095 for (k = 0;k < max_cyber; k++)
1096 summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, TRUE, TRUE, TRUE, FALSE, FALSE);
1102 if (!target_set(TARGET_KILL)) return FALSE;
1104 msg_print("Ãç´Ö¤ò¾¤´¤·¤¿¡£");
1106 msg_print("You summons help.");
1108 for (k = 0;k < 1; k++)
1109 summon_specific(-1, target_row, target_col, plev, 0, TRUE, TRUE, TRUE, unique_okay, FALSE);
1115 if (!target_set(TARGET_KILL)) return FALSE;
1117 msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤·¤¿¡ª");
1119 msg_print("You summons monsters!");
1121 for (k = 0;k < 6; k++)
1122 summon_specific(-1, target_row, target_col, plev, 0, TRUE, TRUE, TRUE, unique_okay, FALSE);
1128 if (!target_set(TARGET_KILL)) return FALSE;
1130 msg_print("¥¢¥ê¤ò¾¤´¤·¤¿¡£");
1132 msg_print("You summons ants.");
1134 for (k = 0;k < 6; k++)
1135 summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, TRUE, TRUE, TRUE, FALSE, FALSE);
1141 if (!target_set(TARGET_KILL)) return FALSE;
1143 msg_print("ÃØéá¤ò¾¤´¤·¤¿¡£");
1145 msg_print("You summons spiders.");
1147 for (k = 0;k < 6; k++)
1148 summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, TRUE, TRUE, TRUE, FALSE, FALSE);
1154 if (!target_set(TARGET_KILL)) return FALSE;
1156 msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´¤·¤¿¡£");
1158 msg_print("You summons hounds.");
1160 for (k = 0;k < 4; k++)
1161 summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, TRUE, TRUE, TRUE, FALSE, FALSE);
1167 if (!target_set(TARGET_KILL)) return FALSE;
1169 msg_print("¥Ò¥É¥é¤ò¾¤´¤·¤¿¡£");
1171 msg_print("You summons hydras.");
1173 for (k = 0;k < 4; k++)
1174 summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, TRUE, TRUE, TRUE, FALSE, FALSE);
1180 if (!target_set(TARGET_KILL)) return FALSE;
1182 msg_print("Å·»È¤ò¾¤´¤·¤¿¡ª");
1184 msg_print("You summons angel!");
1186 for (k = 0;k < 1; k++)
1187 summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, TRUE, TRUE, TRUE, FALSE, FALSE);
1193 if (!target_set(TARGET_KILL)) return FALSE;
1195 msg_print("º®Æ٤εÜÄ¤é°Ëâ¤ò¾¤´¤·¤¿¡ª");
1197 msg_print("You summons a demon from the Courts of Chaos!");
1199 for (k = 0;k < 1; k++)
1200 summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, TRUE, TRUE, TRUE, unique_okay, FALSE);
1206 if (!target_set(TARGET_KILL)) return FALSE;
1208 msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´¤·¤¿¡ª");
1210 msg_print("You summons an undead adversary!");
1212 for (k = 0;k < 1; k++)
1213 summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
1219 if (!target_set(TARGET_KILL)) return FALSE;
1221 msg_print("¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1223 msg_print("You summons dragon!");
1225 for (k = 0;k < 1; k++)
1226 summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, TRUE, TRUE, TRUE, unique_okay, FALSE);
1229 case MS_S_HI_UNDEAD:
1232 if (!target_set(TARGET_KILL)) return FALSE;
1234 msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡ª");
1236 msg_print("You summons greater undead!");
1238 for (k = 0;k < 6; k++)
1239 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
1242 case MS_S_HI_DRAGON:
1245 if (!target_set(TARGET_KILL)) return FALSE;
1247 msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1249 msg_print("You summons ancient dragons!");
1251 for (k = 0;k < 4; k++)
1252 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, TRUE, TRUE, TRUE, unique_okay, FALSE);
1258 if (!target_set(TARGET_KILL)) return FALSE;
1260 msg_print("¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´¤·¤¿¡ª");
1262 msg_print("You summons Lords of Amber!");
1264 for (k = 0;k < 4; k++)
1265 summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, TRUE, TRUE, TRUE, TRUE, FALSE);
1271 if (!target_set(TARGET_KILL)) return FALSE;
1273 msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´¤·¤¿¡ª");
1275 msg_print("You summons special opponents!");
1277 for (k = 0;k < 4; k++)
1278 if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, TRUE, TRUE, TRUE, TRUE, FALSE)) count++;
1279 for (k = count;k < 4; k++)
1280 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, TRUE, TRUE, TRUE, unique_okay, FALSE);
1292 * do_cmd_cast calls this function if the player's class
1295 bool do_cmd_mane(bool baigaesi)
1300 int plev = p_ptr->lev;
1301 monster_power spell;
1305 /* not if confused */
1306 if (p_ptr->confused)
1309 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1311 msg_print("You are too confused!");
1320 msg_print("¤Þ¤Í¤é¤ì¤ë¤â¤Î¤¬²¿¤â¤Ê¤¤¡ª");
1322 msg_print("You don't remember any action!");
1329 if (!get_mane_power(&n, baigaesi)) return FALSE;
1331 spell = monster_powers[mane_spell[n]];
1333 /* Spell failure chance */
1334 chance = spell.manefail;
1336 /* Reduce failure rate by "effective" level adjustment */
1337 if (plev > spell.level) chance -= 3 * (plev - spell.level);
1339 if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
1340 if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
1342 /* Reduce failure rate by INT/WIS adjustment */
1343 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[spell.use_stat]] - 1);
1345 if (spell.manedam) chance = chance * damage / spell.manedam;
1347 /* Extract the minimum failure rate */
1348 minfail = adj_mag_fail[p_ptr->stat_ind[spell.use_stat]];
1350 /* Minimum failure rate */
1351 if (chance < minfail) chance = minfail;
1353 /* Stunning makes spells harder */
1354 if (p_ptr->stun > 50) chance += 25;
1355 else if (p_ptr->stun) chance += 15;
1357 /* Always a 5 percent chance of working */
1358 if (chance > 95) chance = 95;
1361 if (randint0(100) < chance)
1363 if (flush_failure) flush();
1365 msg_print("¤â¤Î¤Þ¤Í¤Ë¼ºÇÔ¤·¤¿¡ª");
1367 msg_print("You failed to concentrate hard enough!");
1376 /* Cast the spell */
1377 cast = use_mane(mane_spell[n]);
1379 if (!cast) return FALSE;
1383 for (j = n; j < mane_num;j++)
1385 mane_spell[j] = mane_spell[j+1];
1386 mane_dam[j] = mane_dam[j+1];
1393 p_ptr->redraw |= (PR_MANE);
1394 p_ptr->window |= (PW_PLAYER);
1395 p_ptr->window |= (PW_SPELL);