4 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
6 * This software may be copied and distributed for educational, research,
7 * and not for profit purposes provided that this copyright and statement
8 * are included in all such copies. Other copyrights may also apply.
11 /* Purpose: Mane code */
18 static 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 */
114 num = p_ptr->mane_num;
116 /* Build a prompt (accept all spells) */
117 (void)strnfmt(out_val, 78,
119 "(%c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©",
121 "(%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[p_ptr->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 * p_ptr->mane_dam[i] / spell.manedam;
178 chance += p_ptr->to_m_chance;
180 /* Extract the minimum failure rate */
181 minfail = adj_mag_fail[p_ptr->stat_ind[spell.use_stat]];
183 /* Minimum failure rate */
184 if (chance < minfail) chance = minfail;
186 /* Stunning makes spells harder */
187 if (p_ptr->stun > 50) chance += 25;
188 else if (p_ptr->stun) chance += 15;
190 /* Always a 5 percent chance of working */
191 if (chance > 95) chance = 95;
194 mane_info(comment, p_ptr->mane_spell[i], (baigaesi ? p_ptr->mane_dam[i]*2 : p_ptr->mane_dam[i]));
196 /* Dump the spell --(-- */
197 sprintf(psi_desc, " %c) %-30s %3d%%%s",
200 prt(psi_desc, y + i + 1, x);
203 /* Clear the bottom line */
204 prt("", y + i + 1, x);
213 /* Restore the screen */
222 ask = isupper(choice);
225 if (ask) choice = tolower(choice);
227 /* Extract request */
228 i = (islower(choice) ? A2I(choice) : -1);
230 /* Totally Illegal */
231 if ((i < 0) || (i >= num))
237 /* Save the spell index */
238 spell = monster_powers[p_ptr->mane_spell[i]];
247 (void) strnfmt(tmp_val, 78, "%s¤ò¤Þ¤Í¤Þ¤¹¤«¡©", monster_powers[p_ptr->mane_spell[i]].name);
249 (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[p_ptr->mane_spell[i]].name);
253 /* Belay that order */
254 if (!get_check(tmp_val)) continue;
261 /* Restore the screen */
262 if (redraw) screen_load();
265 p_ptr->window |= (PW_SPELL);
270 /* Abort if needed */
271 if (!flag) return (FALSE);
273 /* Save the choice */
276 damage = (baigaesi ? p_ptr->mane_dam[i]*2 : p_ptr->mane_dam[i]);
284 * do_cmd_cast calls this function if the player's class
287 static bool use_mane(int spell)
290 int plev = p_ptr->lev;
291 u32b mode = (PM_ALLOW_GROUP | PM_FORCE_PET);
294 if (randint1(50+plev) < plev/10) u_mode = PM_ALLOW_UNIQUE;
302 msg_print("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£");
304 msg_print("You make a high pitched shriek.");
307 aggravate_monsters(0);
316 if (!target_set(TARGET_KILL)) return FALSE;
317 if (!cave[target_row][target_col].m_idx) break;
318 if (!los(py, px, target_row, target_col)) break;
319 if (!projectable(py, px, target_row, target_col)) break;
320 m_ptr = &m_list[cave[target_row][target_col].m_idx];
321 monster_desc(m_name, m_ptr, 0);
328 msg_format("%s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ï¤Ê¤¤¡£", m_name);
330 msg_format("%^s is no longer invulnerable.", m_name);
332 p_ptr->redraw |= (PR_HEALTH);
333 if (p_ptr->riding == cave[target_row][target_col].m_idx) p_ptr->redraw |= (PR_UHEALTH);
335 m_ptr->energy_need += ENERGY_NEED();
341 if (m_ptr->ml) msg_format("%s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
343 if (m_ptr->ml) msg_format("%^s is no longer fast.", m_name);
350 if (m_ptr->ml) msg_format("%s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
352 if (m_ptr->ml) msg_format("%^s is no longer slow.", m_name);
359 if (!get_aim_dir(&dir)) return FALSE;
361 else msg_print("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£");
363 else msg_print("You fire a rocket.");
366 fire_rocket(GF_ROCKET, dir, damage, 2);
369 if (!get_aim_dir(&dir)) return FALSE;
371 else msg_print("Ìð¤òÊü¤Ã¤¿¡£");
373 else msg_print("You fire an arrow.");
376 fire_bolt(GF_ARROW, dir, damage);
385 if (!get_aim_dir(&dir)) return FALSE;
387 else msg_print("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
389 else msg_print("You breathe acid.");
392 fire_ball(GF_ACID, dir, damage, (plev > 35 ? -3 : -2));
395 if (!get_aim_dir(&dir)) return FALSE;
397 else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
399 else msg_print("You breathe lightning.");
402 fire_ball(GF_ELEC, dir, damage, (plev > 35 ? -3 : -2));
405 if (!get_aim_dir(&dir)) return FALSE;
407 else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
409 else msg_print("You breathe fire.");
412 fire_ball(GF_FIRE, dir, damage, (plev > 35 ? -3 : -2));
415 if (!get_aim_dir(&dir)) return FALSE;
417 else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
419 else msg_print("You breathe frost.");
422 fire_ball(GF_COLD, dir, damage, (plev > 35 ? -3 : -2));
425 if (!get_aim_dir(&dir)) return FALSE;
427 else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
429 else msg_print("You breathe gas.");
432 fire_ball(GF_POIS, dir, damage, (plev > 35 ? -3 : -2));
435 if (!get_aim_dir(&dir)) return FALSE;
437 else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
439 else msg_print("You breathe nether.");
442 fire_ball(GF_NETHER, dir, damage, (plev > 35 ? -3 : -2));
445 if (!get_aim_dir(&dir)) return FALSE;
447 else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
449 else msg_print("You breathe light.");
452 fire_ball(GF_LITE, dir, damage, (plev > 35 ? -3 : -2));
455 if (!get_aim_dir(&dir)) return FALSE;
457 else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
459 else msg_print("You breathe darkness.");
462 fire_ball(GF_DARK, dir, damage, (plev > 35 ? -3 : -2));
465 if (!get_aim_dir(&dir)) return FALSE;
467 else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
469 else msg_print("You breathe confusion.");
472 fire_ball(GF_CONFUSION, dir, damage, (plev > 35 ? -3 : -2));
475 if (!get_aim_dir(&dir)) return FALSE;
477 else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
479 else msg_print("You breathe sound.");
482 fire_ball(GF_SOUND, dir, damage, (plev > 35 ? -3 : -2));
485 if (!get_aim_dir(&dir)) return FALSE;
487 else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
489 else msg_print("You breathe chaos.");
492 fire_ball(GF_CHAOS, dir, damage, (plev > 35 ? -3 : -2));
495 if (!get_aim_dir(&dir)) return FALSE;
497 else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
499 else msg_print("You breathe disenchantment.");
502 fire_ball(GF_DISENCHANT, dir, damage, (plev > 35 ? -3 : -2));
505 if (!get_aim_dir(&dir)) return FALSE;
507 else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
509 else msg_print("You breathe nexus.");
512 fire_ball(GF_NEXUS, dir, damage, (plev > 35 ? -3 : -2));
515 if (!get_aim_dir(&dir)) return FALSE;
517 else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
519 else msg_print("You breathe time.");
522 fire_ball(GF_TIME, dir, damage, (plev > 35 ? -3 : -2));
525 if (!get_aim_dir(&dir)) return FALSE;
527 else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£");
529 else msg_print("You breathe inertia.");
532 fire_ball(GF_INERTIA, dir, damage, (plev > 35 ? -3 : -2));
535 if (!get_aim_dir(&dir)) return FALSE;
537 else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
539 else msg_print("You breathe gravity.");
542 fire_ball(GF_GRAVITY, dir, damage, (plev > 35 ? -3 : -2));
545 if (!get_aim_dir(&dir)) return FALSE;
547 else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£");
549 else msg_print("You breathe shards.");
552 fire_ball(GF_SHARDS, dir, damage, (plev > 35 ? -3 : -2));
555 if (!get_aim_dir(&dir)) return FALSE;
557 else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
559 else msg_print("You breathe plasma.");
562 fire_ball(GF_PLASMA, dir, damage, (plev > 35 ? -3 : -2));
565 if (!get_aim_dir(&dir)) return FALSE;
567 else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
569 else msg_print("You breathe force.");
572 fire_ball(GF_FORCE, dir, damage, (plev > 35 ? -3 : -2));
575 if (!get_aim_dir(&dir)) return FALSE;
577 else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
579 else msg_print("You breathe mana.");
582 fire_ball(GF_MANA, dir, damage, (plev > 35 ? -3 : -2));
585 if (!get_aim_dir(&dir)) return FALSE;
587 else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£");
589 else msg_print("You cast a ball of radiation.");
592 fire_ball(GF_NUKE, dir, damage, 2);
595 if (!get_aim_dir(&dir)) return FALSE;
597 else msg_print("Êü¼ÍÀÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
599 else msg_print("You breathe toxic waste.");
602 fire_ball(GF_NUKE, dir, damage, (plev > 35 ? -3 : -2));
605 if (!get_aim_dir(&dir)) return FALSE;
607 else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£");
609 else msg_print("You invoke a raw Logrus.");
612 fire_ball(GF_CHAOS, dir, damage, 4);
615 if (!get_aim_dir(&dir)) return FALSE;
617 else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
619 else msg_print("You breathe disintegration.");
622 fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 35 ? -3 : -2));
625 if (!get_aim_dir(&dir)) return FALSE;
627 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
629 else msg_print("You cast an acid ball.");
632 fire_ball(GF_ACID, dir, damage, 2);
635 if (!get_aim_dir(&dir)) return FALSE;
637 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
639 else msg_print("You cast a lightning ball.");
642 fire_ball(GF_ELEC, dir, damage, 2);
645 if (!get_aim_dir(&dir)) return FALSE;
647 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
649 else msg_print("You cast a fire ball.");
652 fire_ball(GF_FIRE, dir, damage, 2);
655 if (!get_aim_dir(&dir)) return FALSE;
657 else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
659 else msg_print("You cast a frost ball.");
662 fire_ball(GF_COLD, dir, damage, 2);
665 if (!get_aim_dir(&dir)) return FALSE;
667 else msg_print("°½±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
669 else msg_print("You cast a stinking cloud.");
672 fire_ball(GF_POIS, dir, damage, 2);
675 if (!get_aim_dir(&dir)) return FALSE;
677 else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
679 else msg_print("You cast a nether ball.");
682 fire_ball(GF_NETHER, dir, damage, 2);
685 if (!get_aim_dir(&dir)) return FALSE;
687 else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£");
689 else msg_print("You gesture fluidly.");
692 fire_ball(GF_WATER, dir, damage, 4);
695 if (!get_aim_dir(&dir)) return FALSE;
697 else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
699 else msg_print("You invoke a mana storm.");
702 fire_ball(GF_MANA, dir, damage, 4);
705 if (!get_aim_dir(&dir)) return FALSE;
707 else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
709 else msg_print("You invoke a darkness storm.");
712 fire_ball(GF_DARK, dir, damage, 4);
715 if (!get_aim_dir(&dir)) return FALSE;
716 fire_ball_hide(GF_DRAIN_MANA, dir, randint1(plev*3)+plev, 0);
719 if (!get_aim_dir(&dir)) return FALSE;
720 fire_ball_hide(GF_MIND_BLAST, dir, damage, 0);
723 if (!get_aim_dir(&dir)) return FALSE;
724 fire_ball_hide(GF_BRAIN_SMASH, dir, damage, 0);
727 if (!get_aim_dir(&dir)) return FALSE;
728 fire_ball_hide(GF_CAUSE_1, dir, damage, 0);
731 if (!get_aim_dir(&dir)) return FALSE;
732 fire_ball_hide(GF_CAUSE_2, dir, damage, 0);
735 if (!get_aim_dir(&dir)) return FALSE;
736 fire_ball_hide(GF_CAUSE_3, dir, damage, 0);
739 if (!get_aim_dir(&dir)) return FALSE;
740 fire_ball_hide(GF_CAUSE_4, dir, damage, 0);
743 if (!get_aim_dir(&dir)) return FALSE;
745 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
747 else msg_print("You cast an acid bolt.");
750 fire_bolt(GF_ACID, dir, damage);
753 if (!get_aim_dir(&dir)) return FALSE;
755 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
757 else msg_print("You cast a lightning bolt.");
760 fire_bolt(GF_ELEC, dir, damage);
763 if (!get_aim_dir(&dir)) return FALSE;
765 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
767 else msg_print("You cast a fire bolt.");
770 fire_bolt(GF_FIRE, dir, damage);
773 if (!get_aim_dir(&dir)) return FALSE;
775 else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
777 else msg_print("You cast a frost bolt.");
780 fire_bolt(GF_COLD, dir, damage);
783 if (!get_aim_dir(&dir)) return FALSE;
785 else msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
787 else msg_print("You invoke a starburst.");
790 fire_ball(GF_LITE, dir, damage, 4);
793 if (!get_aim_dir(&dir)) return FALSE;
795 else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
797 else msg_print("You cast a nether bolt.");
800 fire_bolt(GF_NETHER, dir, damage);
803 if (!get_aim_dir(&dir)) return FALSE;
805 else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
807 else msg_print("You cast a water bolt.");
810 fire_bolt(GF_WATER, dir, damage);
813 if (!get_aim_dir(&dir)) return FALSE;
815 else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
817 else msg_print("You cast a mana bolt.");
820 fire_bolt(GF_MANA, dir, damage);
823 if (!get_aim_dir(&dir)) return FALSE;
825 else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
827 else msg_print("You cast a plasma bolt.");
830 fire_bolt(GF_PLASMA, dir, damage);
833 if (!get_aim_dir(&dir)) return FALSE;
835 else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
837 else msg_print("You cast a ice bolt.");
840 fire_bolt(GF_ICE, dir, damage);
842 case MS_MAGIC_MISSILE:
843 if (!get_aim_dir(&dir)) return FALSE;
845 else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
847 else msg_print("You cast a magic missile.");
850 fire_bolt(GF_MISSILE, dir, damage);
853 if (!get_aim_dir(&dir)) return FALSE;
855 else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£");
857 else msg_print("You cast a fearful illusion.");
860 fear_monster(dir, plev+10);
863 if (!get_aim_dir(&dir)) return FALSE;
864 confuse_monster(dir, plev * 2);
867 if (!get_aim_dir(&dir)) return FALSE;
869 else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£");
871 else msg_print("You cast a mesmerizing illusion.");
874 confuse_monster(dir, plev * 2);
877 if (!get_aim_dir(&dir)) return FALSE;
881 if (!get_aim_dir(&dir)) return FALSE;
885 (void)set_fast(randint1(20 + plev) + plev, FALSE);
889 if (!get_aim_dir(&dir)) return FALSE;
891 else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª");
893 else msg_print("You invoke the Hand of Doom!");
896 fire_ball_hide(GF_HAND_DOOM, dir, 200, 0);
901 msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£");
903 msg_print("You concentrate on your wounds!");
905 (void)hp_player(plev*6);
911 msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
913 msg_print("You cast a Globe of Invulnerability.");
915 (void)set_invuln(randint1(7) + 7, FALSE);
921 teleport_player(plev * 5);
925 if (damage == 1 || damage == 2)
927 msg_print("¡Ö¡Ø¥¶¡¦¥ï¡¼¥ë¥É¡Ù¡ª»þ¤Ï»ß¤Þ¤Ã¤¿¡ª¡×");
929 msg_print("You yell 'The World! Time has stopped!'");
931 else if (damage == 3 || damage == 6)
933 msg_print("¡Ö»þ¤è¡ª¡×");
935 msg_print("You yell 'Time!'");
942 p_ptr->energy_need -= 1000 + (100 + randint1(200)+200)*TURNS_PER_TICK/10;
945 p_ptr->redraw |= (PR_MAP);
947 /* Update monsters */
948 p_ptr->update |= (PU_MONSTERS);
951 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
963 if (!target_set(TARGET_KILL)) return FALSE;
964 if (!cave[target_row][target_col].m_idx) break;
965 if (!player_has_los_bold(target_row, target_col)) break;
966 if (!projectable(py, px, target_row, target_col)) break;
967 m_ptr = &m_list[cave[target_row][target_col].m_idx];
968 r_ptr = &r_info[m_ptr->r_idx];
969 monster_desc(m_name, m_ptr, 0);
970 if (r_ptr->flagsr & RFR_RES_TELE)
972 if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
974 if (is_original_ap(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
976 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", m_name);
978 msg_format("%s is unaffected!", m_name);
983 else if (r_ptr->level > randint1(100))
985 if (is_original_ap(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
987 msg_format("%s¤Ë¤ÏÂÑÀ¤¬¤¢¤ë¡ª", m_name);
989 msg_format("%s resists!", m_name);
996 msg_format("%s¤ò°ú¤Ìᤷ¤¿¡£", m_name);
998 msg_format("You command %s to return.", m_name);
1001 teleport_monster_to(cave[target_row][target_col].m_idx, py, px, 100);
1005 if (!get_aim_dir(&dir)) return FALSE;
1007 (void)fire_beam(GF_AWAY_ALL, dir, plev);
1012 monster_type *m_ptr;
1013 monster_race *r_ptr;
1016 if (!target_set(TARGET_KILL)) return FALSE;
1017 target_m_idx = cave[target_row][target_col].m_idx;
1018 if (!target_m_idx) break;
1019 if (!los(py, px, target_row, target_col)) break;
1020 if (!projectable(py, px, target_row, target_col)) break;
1021 m_ptr = &m_list[target_m_idx];
1022 r_ptr = &r_info[m_ptr->r_idx];
1023 monster_desc(m_name, m_ptr, 0);
1025 msg_format("%^s¤Î¤ò»Ø¤µ¤·¤¿¡£", m_name);
1027 msg_format("You gesture at %^s's feet.", m_name);
1030 if ((r_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE)) ||
1031 (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint1(50) > plev + randint1(60)))
1034 msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
1036 msg_format("%^s is unaffected!", m_name);
1039 else teleport_level(target_m_idx);
1043 if (!get_aim_dir(&dir)) return FALSE;
1046 else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£");
1048 else msg_print("You throw a psycho-spear.");
1050 (void)fire_beam(GF_PSY_SPEAR, dir, damage);
1054 msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£");
1056 msg_print("You gesture in shadow.");
1058 (void)unlite_area(10, 3);
1061 if (!target_set(TARGET_KILL)) return FALSE;
1063 msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£");
1065 msg_print("You cast a spell and cackles evilly.");
1067 trap_creation(target_row, target_col);
1071 msg_print("¤·¤«¤·²¿¤âµ¯¤¤Ê¤«¤Ã¤¿¡£");
1073 msg_print("Nothing happen.");
1078 msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1080 msg_print("You cast a animate dead.");
1082 (void)animate_dead(0, py, px);
1087 if (!target_set(TARGET_KILL)) return FALSE;
1090 msg_print("±ç·³¤ò¾¤´¤·¤¿¡£");
1092 msg_print("You summon minions.");
1094 for (k = 0;k < 4; k++)
1096 (void)summon_kin_player(plev, target_row, target_col, (PM_FORCE_PET | PM_ALLOW_GROUP));
1103 int max_cyber = (dun_level / 50) + randint1(3);
1104 if (!target_set(TARGET_KILL)) return FALSE;
1106 msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª");
1108 msg_print("You summon Cyberdemons!");
1110 if (max_cyber > 4) max_cyber = 4;
1111 for (k = 0;k < max_cyber; k++)
1112 summon_specific(-1, target_row, target_col, plev, SUMMON_CYBER, mode);
1118 if (!target_set(TARGET_KILL)) return FALSE;
1120 msg_print("Ãç´Ö¤ò¾¤´¤·¤¿¡£");
1122 msg_print("You summon help.");
1124 for (k = 0;k < 1; k++)
1125 summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
1131 if (!target_set(TARGET_KILL)) return FALSE;
1133 msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤·¤¿¡ª");
1135 msg_print("You summon monsters!");
1137 for (k = 0;k < 6; k++)
1138 summon_specific(-1, target_row, target_col, plev, 0, (mode | u_mode));
1144 if (!target_set(TARGET_KILL)) return FALSE;
1146 msg_print("¥¢¥ê¤ò¾¤´¤·¤¿¡£");
1148 msg_print("You summon ants.");
1150 for (k = 0;k < 6; k++)
1151 summon_specific(-1, target_row, target_col, plev, SUMMON_ANT, mode);
1157 if (!target_set(TARGET_KILL)) return FALSE;
1159 msg_print("ÃØéá¤ò¾¤´¤·¤¿¡£");
1161 msg_print("You summon spiders.");
1163 for (k = 0;k < 6; k++)
1164 summon_specific(-1, target_row, target_col, plev, SUMMON_SPIDER, mode);
1170 if (!target_set(TARGET_KILL)) return FALSE;
1172 msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´¤·¤¿¡£");
1174 msg_print("You summon hounds.");
1176 for (k = 0;k < 4; k++)
1177 summon_specific(-1, target_row, target_col, plev, SUMMON_HOUND, mode);
1183 if (!target_set(TARGET_KILL)) return FALSE;
1185 msg_print("¥Ò¥É¥é¤ò¾¤´¤·¤¿¡£");
1187 msg_print("You summon hydras.");
1189 for (k = 0;k < 4; k++)
1190 summon_specific(-1, target_row, target_col, plev, SUMMON_HYDRA, mode);
1196 if (!target_set(TARGET_KILL)) return FALSE;
1198 msg_print("Å·»È¤ò¾¤´¤·¤¿¡ª");
1200 msg_print("You summon angel!");
1202 for (k = 0;k < 1; k++)
1203 summon_specific(-1, target_row, target_col, plev, SUMMON_ANGEL, mode);
1209 if (!target_set(TARGET_KILL)) return FALSE;
1211 msg_print("º®Æ٤εÜÄ¤é°Ëâ¤ò¾¤´¤·¤¿¡ª");
1213 msg_print("You summon a demon from the Courts of Chaos!");
1215 for (k = 0;k < 1; k++)
1216 summon_specific(-1, target_row, target_col, plev, SUMMON_DEMON, (mode | u_mode));
1222 if (!target_set(TARGET_KILL)) return FALSE;
1224 msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´¤·¤¿¡ª");
1226 msg_print("You summon an undead adversary!");
1228 for (k = 0;k < 1; k++)
1229 summon_specific(-1, target_row, target_col, plev, SUMMON_UNDEAD, (mode | u_mode));
1235 if (!target_set(TARGET_KILL)) return FALSE;
1237 msg_print("¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1239 msg_print("You summon dragon!");
1241 for (k = 0;k < 1; k++)
1242 summon_specific(-1, target_row, target_col, plev, SUMMON_DRAGON, (mode | u_mode));
1245 case MS_S_HI_UNDEAD:
1248 if (!target_set(TARGET_KILL)) return FALSE;
1250 msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡ª");
1252 msg_print("You summon greater undead!");
1254 for (k = 0;k < 6; k++)
1255 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
1258 case MS_S_HI_DRAGON:
1261 if (!target_set(TARGET_KILL)) return FALSE;
1263 msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1265 msg_print("You summon ancient dragons!");
1267 for (k = 0;k < 4; k++)
1268 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_DRAGON, (mode | u_mode));
1274 if (!target_set(TARGET_KILL)) return FALSE;
1276 msg_print("¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´¤·¤¿¡ª");
1278 msg_print("You summon Lords of Amber!");
1280 for (k = 0;k < 4; k++)
1281 summon_specific(-1, target_row, target_col, plev, SUMMON_AMBERITES, (mode | PM_ALLOW_UNIQUE));
1287 if (!target_set(TARGET_KILL)) return FALSE;
1289 msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´¤·¤¿¡ª");
1291 msg_print("You summon special opponents!");
1293 for (k = 0;k < 4; k++)
1294 if (summon_specific(-1, target_row, target_col, plev, SUMMON_UNIQUE, (mode | PM_ALLOW_UNIQUE))) count++;
1295 for (k = count;k < 4; k++)
1296 summon_specific(-1, target_row, target_col, plev, SUMMON_HI_UNDEAD, (mode | u_mode));
1308 * do_cmd_cast calls this function if the player's class
1311 bool do_cmd_mane(bool baigaesi)
1316 int plev = p_ptr->lev;
1317 monster_power spell;
1321 /* not if confused */
1322 if (p_ptr->confused)
1325 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1327 msg_print("You are too confused!");
1333 if (!p_ptr->mane_num)
1336 msg_print("¤Þ¤Í¤é¤ì¤ë¤â¤Î¤¬²¿¤â¤Ê¤¤¡ª");
1338 msg_print("You don't remember any action!");
1345 if (!get_mane_power(&n, baigaesi)) return FALSE;
1347 spell = monster_powers[p_ptr->mane_spell[n]];
1349 /* Spell failure chance */
1350 chance = spell.manefail;
1352 /* Reduce failure rate by "effective" level adjustment */
1353 if (plev > spell.level) chance -= 3 * (plev - spell.level);
1355 /* Reduce failure rate by 1 stat and DEX adjustment */
1356 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[spell.use_stat]] + adj_mag_stat[p_ptr->stat_ind[A_DEX]] - 2) / 2;
1358 if (spell.manedam) chance = chance * damage / spell.manedam;
1360 chance += p_ptr->to_m_chance;
1362 /* Extract the minimum failure rate */
1363 minfail = adj_mag_fail[p_ptr->stat_ind[spell.use_stat]];
1365 /* Minimum failure rate */
1366 if (chance < minfail) chance = minfail;
1368 /* Stunning makes spells harder */
1369 if (p_ptr->stun > 50) chance += 25;
1370 else if (p_ptr->stun) chance += 15;
1372 /* Always a 5 percent chance of working */
1373 if (chance > 95) chance = 95;
1376 if (randint0(100) < chance)
1378 if (flush_failure) flush();
1380 msg_print("¤â¤Î¤Þ¤Í¤Ë¼ºÇÔ¤·¤¿¡ª");
1382 msg_print("You failed to concentrate hard enough!");
1391 /* Cast the spell */
1392 cast = use_mane(p_ptr->mane_spell[n]);
1394 if (!cast) return FALSE;
1398 for (j = n; j < p_ptr->mane_num;j++)
1400 p_ptr->mane_spell[j] = p_ptr->mane_spell[j+1];
1401 p_ptr->mane_dam[j] = p_ptr->mane_dam[j+1];
1408 p_ptr->redraw |= (PR_MANE);
1409 p_ptr->window |= (PW_PLAYER);
1410 p_ptr->window |= (PW_SPELL);