3 * @brief ÀÄËâË¡¤Î½èÍý¼ÂÁõ / Blue magic
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke\n
7 * This software may be copied and distributed for educational, research,\n
8 * and not for profit purposes provided that this copyright and statement\n
9 * are included in all such copies. Other copyrights may also apply.\n
10 * 2014 Deskull rearranged comment for Doxygen.\n
15 #define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130) /*!< ¥â¥ó¥¹¥¿¡¼ËâË¡¤ò¥×¥ì¥¤¥ä¡¼¤¬»ÈÍѤ¹¤ë¾ì¹ç¤Î´¹»»¥ì¥Ù¥ë */
18 * @brief ¼õ¤±¼è¤Ã¤¿¥â¥ó¥¹¥¿¡¼ËâË¡¤ÎID¤Ë±þ¤¸¤ÆÀÄËâË¡¤Î¸ú²Ì¾ðÊó¤ò¤Þ¤È¤á¤¿¥Õ¥©¡¼¥Þ¥Ã¥È¤òÊÖ¤¹
19 * @param p ¾ðÊó¤òÊÖ¤¹Ê¸»úÎ󻲾ȥݥ¤¥ó¥¿
20 * @param power ¥â¥ó¥¹¥¿¡¼ËâË¡¤ÎID
23 static void learned_info(char *p, int power)
25 int plev = pseudo_plev();
31 cptr s_range = "ÈÏ°Ï:";
32 cptr s_heal = "²óÉü:";
36 cptr s_range = "range ";
37 cptr s_heal = "heal ";
83 sprintf(p, " %s%d+10d10", s_dam, plev * 8 + 50);
88 sprintf(p, " %s%d", s_dam, hp/4);
92 object_type *o_ptr = NULL;
93 if (buki_motteruka(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM];
94 else if (buki_motteruka(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM];
96 sprintf(p, " %s1", s_dam);
98 sprintf(p, " %s%dd%d+%d", s_dam, o_ptr->dd, o_ptr->ds, o_ptr->to_d);
107 sprintf(p, " %s%d", s_dam, hp/3);
110 sprintf(p, " %s%d", s_dam, MIN(hp/3, 250));
113 sprintf(p, " %s%d", s_dam, MIN(hp/3, 150));
116 sprintf(p, " %s%d", s_dam, MIN(hp/3, 200));
119 sprintf(p, " %s%d", s_dam, MIN(hp/3, 250));
130 sprintf(p, " %s%d", s_dam, hp/6);
134 sprintf(p, " %s%d", s_dam, MIN(hp/6, 200));
137 sprintf(p, " %s%d", s_dam, MIN(hp/6, 150));
140 sprintf(p, " %s%d+10d6", s_dam, plev * 2);
143 sprintf(p, " %s%d+10d10", s_dam, plev * 4);
146 sprintf(p, " %s15+d%d", s_dam, plev * 6);
149 sprintf(p, " %s8+d%d", s_dam, plev * 3);
152 sprintf(p, " %s10+d%d", s_dam, plev * 7);
155 sprintf(p, " %s10+d%d", s_dam, plev * 3);
158 sprintf(p, " %s12d2", s_dam);
161 sprintf(p, " %s%d+10d10", s_dam, plev * 2 + 50);
164 sprintf(p, " %s50+d%d", s_dam, plev * 4);
167 sprintf(p, " %sd%d+%d", s_heal, plev, plev);
170 sprintf(p, " %s8d8", s_dam);
173 sprintf(p, " %s12d15", s_dam);
176 sprintf(p, " %s3d8", s_dam);
179 sprintf(p, " %s8d8", s_dam);
182 sprintf(p, " %s10d15", s_dam);
185 sprintf(p, " %s15d15", s_dam);
188 sprintf(p, " %s%d+7d8", s_dam, plev * 2 / 3);
191 sprintf(p, " %s%d+4d8", s_dam, plev * 2 / 3);
194 sprintf(p, " %s%d+9d8", s_dam, plev * 2 / 3);
197 sprintf(p, " %s%d+6d8", s_dam, plev * 2 / 3);
200 sprintf(p, " %s%d+5d5", s_dam, 30 + plev * 8 / 3);
203 sprintf(p, " %s%d+10d10", s_dam, plev * 2);
206 sprintf(p, " %s50+d%d", s_dam, plev * 7);
209 sprintf(p, " %s%d+8d7", s_dam, plev * 2 + 10);
212 sprintf(p, " %s%d+6d6", s_dam, plev * 2);
214 case MS_MAGIC_MISSILE:
215 sprintf(p, " %s%d+2d6", s_dam, plev * 2 / 3);
218 sprintf(p, " %sd%d+%d", s_dur, 20+plev, plev);
221 sprintf(p, " %s%d", s_heal, plev*4);
224 sprintf(p, " %sd7+7", s_dur);
227 sprintf(p, " %s10", s_range);
230 sprintf(p, " %s%d", s_range, plev * 5);
233 sprintf(p, " %s100+d%d", s_dam, plev * 3);
236 sprintf(p, " %s5", s_range);
245 * @brief »ÈÍѲÄǽ¤ÊÀÄËâË¡¤òÁªÂò¤¹¤ë /
246 * Allow user to choose a imitation.
247 * @param sn ÁªÂò¤·¤¿¥â¥ó¥¹¥¿¡¼¹¶·âID¡¢¥¥ã¥ó¥»¥ë¤Î¾ì¹ç-1¡¢ÉÔÀµ¤ÊÁªÂò¤Î¾ì¹ç-2¤òÊÖ¤¹
248 * @return ȯư²Äǽ¤ÊËâË¡¤òÁªÂò¤·¤¿¾ì¹çTRUE¡¢¥¥ã¥ó¥»¥ë½èÍý¤«ÉÔÀµ¤ÊÁªÂò¤¬¹Ô¤ï¤ì¤¿¾ì¹çFALSE¤òÊÖ¤¹¡£
250 * If a valid spell is chosen, saves it in '*sn' and returns TRUE\n
251 * If the user hits escape, returns FALSE, and set '*sn' to -1\n
252 * If there are no legal choices, returns FALSE, and sets '*sn' to -2\n
254 * The "prompt" should be "cast", "recite", or "study"\n
255 * The "known" should be TRUE for cast/pray, FALSE for study\n
257 * nb: This function has a (trivial) display bug which will be obvious\n
258 * when you run it. It's probably easy to fix but I haven't tried,\n
261 static int get_learned_power(int *sn)
268 int plev = p_ptr->lev;
270 int ask = TRUE, mode = 0;
271 int spellnum[MAX_MONSPELLS];
276 s32b f4 = 0, f5 = 0, f6 = 0;
285 int menu_line = (use_menu ? 1 : 0);
287 /* Assume cancelled */
290 /* Nothing chosen yet */
296 #ifdef ALLOW_REPEAT /* TNB */
298 /* Get the spell, if available */
305 #endif /* ALLOW_REPEAT -- TNB */
314 prt(format(" %s ¥Ü¥ë¥È", (menu_line == 1) ? "¡Õ" : " "), 2, 14);
315 prt(format(" %s ¥Ü¡¼¥ë", (menu_line == 2) ? "¡Õ" : " "), 3, 14);
316 prt(format(" %s ¥Ö¥ì¥¹", (menu_line == 3) ? "¡Õ" : " "), 4, 14);
317 prt(format(" %s ¾¤´", (menu_line == 4) ? "¡Õ" : " "), 5, 14);
318 prt(format(" %s ¤½¤Î¾", (menu_line == 5) ? "¡Õ" : " "), 6, 14);
319 prt("¤É¤Î¼ïÎà¤ÎËâË¡¤ò»È¤¤¤Þ¤¹¤«¡©", 0, 0);
321 prt(format(" %s bolt", (menu_line == 1) ? "> " : " "), 2, 14);
322 prt(format(" %s ball", (menu_line == 2) ? "> " : " "), 3, 14);
323 prt(format(" %s breath", (menu_line == 3) ? "> " : " "), 4, 14);
324 prt(format(" %s sommoning", (menu_line == 4) ? "> " : " "), 5, 14);
325 prt(format(" %s others", (menu_line == 5) ? "> " : " "), 6, 14);
326 prt("use which type of magic? ", 0, 0);
352 if (menu_line > 5) menu_line -= 5;
359 sprintf(comment, "[A]¥Ü¥ë¥È, [B]¥Ü¡¼¥ë, [C]¥Ö¥ì¥¹, [D]¾¤´, [E]¤½¤Î¾:");
361 sprintf(comment, "[A] bolt, [B] ball, [C] breath, [D] summoning, [E] others:");
365 if (!get_com(comment, &ch, TRUE))
369 if (ch == 'A' || ch == 'a')
374 if (ch == 'B' || ch == 'b')
379 if (ch == 'C' || ch == 'c')
384 if (ch == 'D' || ch == 'd')
389 if (ch == 'E' || ch == 'e')
397 set_rf_masks(&f4, &f5, &f6, mode);
399 for (i = 0, num = 0; i < 32; i++)
401 if ((0x00000001 << i) & f4) spellnum[num++] = i;
405 if ((0x00000001 << (i - 32)) & f5) spellnum[num++] = i;
409 if ((0x00000001 << (i - 64)) & f6) spellnum[num++] = i;
411 for (i = 0; i < num; i++)
413 if (p_ptr->magic_num2[spellnum[i]])
415 if (use_menu) menu_line = i+1;
422 msg_print("¤½¤Î¼ïÎà¤ÎËâË¡¤Ï³Ð¤¨¤Æ¤¤¤Ê¤¤¡ª");
424 msg_print("You don't know any spell of this type.");
429 /* Build a prompt (accept all spells) */
430 (void)strnfmt(out_val, 78,
432 "(%c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò¾§¤¨¤Þ¤¹¤«¡©",
434 "(%c-%c, *=List, ESC=exit) Use which %s? ",
436 I2A(0), I2A(num - 1), p);
438 if (use_menu) screen_save();
440 /* Get a spell from the user */
442 choice= (always_show_list || use_menu) ? ESCAPE:1 ;
445 if(choice==ESCAPE) choice = ' ';
446 else if( !get_com(out_val, &choice, TRUE) )break;
448 if (use_menu && choice != ' ')
464 menu_line += (num-1);
465 if (menu_line > num) menu_line -= num;
466 } while(!p_ptr->magic_num2[spellnum[menu_line-1]]);
477 if (menu_line > num) menu_line -= num;
478 } while(!p_ptr->magic_num2[spellnum[menu_line-1]]);
487 while(!p_ptr->magic_num2[spellnum[menu_line-1]]) menu_line--;
496 while(!p_ptr->magic_num2[spellnum[menu_line-1]]) menu_line++;
511 if ((choice == ' ') || (choice == '*') || (choice == '?') || (use_menu && ask))
514 if (!redraw || use_menu)
521 /* Save the screen */
522 if (!use_menu) screen_save();
524 /* Display a list of spells */
527 put_str("̾Á°", y, x + 5);
529 put_str("Name", y, x + 5);
533 put_str("MP ¼ºÎ¨ ¸ú²Ì", y, x + 33);
535 put_str("SP Fail Info", y, x + 32);
539 /* Dump the spells */
540 for (i = 0; i < num; i++)
544 prt("", y + i + 1, x);
545 if (!p_ptr->magic_num2[spellnum[i]]) continue;
547 /* Access the spell */
548 spell = monster_powers[spellnum[i]];
552 /* Reduce failure rate by "effective" level adjustment */
553 if (plev > spell.level) chance -= 3 * (plev - spell.level);
554 else chance += (spell.level - plev);
556 /* Reduce failure rate by INT/WIS adjustment */
557 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[A_INT]] - 1);
559 chance = mod_spell_chance_1(chance);
561 need_mana = mod_need_mana(monster_powers[spellnum[i]].smana, 0, REALM_NONE);
563 /* Not enough mana to cast */
564 if (need_mana > p_ptr->csp)
566 chance += 5 * (need_mana - p_ptr->csp);
569 /* Extract the minimum failure rate */
570 minfail = adj_mag_fail[p_ptr->stat_ind[A_INT]];
572 /* Minimum failure rate */
573 if (chance < minfail) chance = minfail;
575 /* Stunning makes spells harder */
576 if (p_ptr->stun > 50) chance += 25;
577 else if (p_ptr->stun) chance += 15;
579 /* Always a 5 percent chance of working */
580 if (chance > 95) chance = 95;
582 chance = mod_spell_chance_2(chance);
585 learned_info(comment, spellnum[i]);
590 if (i == (menu_line-1)) strcpy(psi_desc, " ¡Õ");
592 if (i == (menu_line-1)) strcpy(psi_desc, " > ");
594 else strcpy(psi_desc, " ");
596 else sprintf(psi_desc, " %c)", I2A(i));
598 /* Dump the spell --(-- */
599 strcat(psi_desc, format(" %-26s %3d %3d%%%s",
600 spell.name, need_mana,
602 prt(psi_desc, y + i + 1, x);
605 /* Clear the bottom line */
606 if (y < 22) prt("", y + i + 1, x);
615 /* Restore the screen */
626 ask = isupper(choice);
629 if (ask) choice = tolower(choice);
631 /* Extract request */
632 i = (islower(choice) ? A2I(choice) : -1);
635 /* Totally Illegal */
636 if ((i < 0) || (i >= num) || !p_ptr->magic_num2[spellnum[i]])
642 /* Save the spell index */
643 spell = monster_powers[spellnum[i]];
652 (void) strnfmt(tmp_val, 78, "%s¤ÎËâË¡¤ò¾§¤¨¤Þ¤¹¤«¡©", monster_powers[spellnum[i]].name);
654 (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[spellnum[i]].name);
658 /* Belay that order */
659 if (!get_check(tmp_val)) continue;
666 /* Restore the screen */
667 if (redraw) screen_load();
670 p_ptr->window |= (PW_SPELL);
675 /* Abort if needed */
676 if (!flag) return (FALSE);
678 /* Save the choice */
681 #ifdef ALLOW_REPEAT /* TNB */
685 #endif /* ALLOW_REPEAT -- TNB */
693 * @brief ÀÄËâË¡¤Îȯư /
694 * do_cmd_cast calls this function if the player's class is 'blue-mage'.
695 * @param spell ȯư¤¹¤ë¥â¥ó¥¹¥¿¡¼¹¶·â¤ÎID
696 * @param success TRUE¤ÏÀ®¸ù»þ¡¢FALSE¤Ï¼ºÇÔ»þ¤Î½èÍý¤ò¹Ô¤¦
697 * @return ½èÍý¤ò¼Â¹Ô¤·¤¿¤éTRUE¡¢¥¥ã¥ó¥»¥ë¤·¤¿¾ì¹çFALSE¤òÊÖ¤¹¡£
699 static bool cast_learned_spell(int spell, bool success)
702 int plev = pseudo_plev();
703 int summon_lev = p_ptr->lev * 2 / 3 + randint1(p_ptr->lev/2);
707 bool no_trump = FALSE;
708 u32b p_mode, u_mode = 0L, g_mode;
712 p_mode = PM_FORCE_PET;
718 g_mode = PM_ALLOW_GROUP;
721 if (!success || (randint1(50+plev) < plev/10)) u_mode = PM_ALLOW_UNIQUE;
728 msg_print("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£");
730 msg_print("You make a high pitched shriek.");
733 aggravate_monsters(0);
741 if (!target_set(TARGET_KILL)) return FALSE;
742 m_idx = cave[target_row][target_col].m_idx;
744 if (!player_has_los_bold(target_row, target_col)) break;
745 if (!projectable(py, px, target_row, target_col)) break;
746 dispel_monster_status(m_idx);
750 if (!get_aim_dir(&dir)) return FALSE;
753 msg_print("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£");
755 msg_print("You fire a rocket.");
758 fire_rocket(GF_ROCKET, dir, damage, 2);
762 object_type *o_ptr = NULL;
764 if (!get_aim_dir(&dir)) return FALSE;
768 msg_print("Ìð¤òÊü¤Ã¤¿¡£");
770 msg_print("You fire an arrow.");
772 if (buki_motteruka(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM];
773 else if (buki_motteruka(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM];
778 damage = damroll(o_ptr->dd, o_ptr->ds)+ o_ptr->to_d;
779 if (damage < 1) damage = 1;
781 fire_bolt(GF_ARROW, dir, damage);
792 if (!get_aim_dir(&dir)) return FALSE;
794 else msg_print("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
796 else msg_print("You breathe acid.");
799 fire_ball(GF_ACID, dir, damage, (plev > 40 ? -3 : -2));
802 if (!get_aim_dir(&dir)) return FALSE;
804 else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
806 else msg_print("You breathe lightning.");
809 fire_ball(GF_ELEC, dir, damage, (plev > 40 ? -3 : -2));
812 if (!get_aim_dir(&dir)) return FALSE;
814 else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
816 else msg_print("You breathe fire.");
819 fire_ball(GF_FIRE, dir, damage, (plev > 40 ? -3 : -2));
822 if (!get_aim_dir(&dir)) return FALSE;
824 else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
826 else msg_print("You breathe frost.");
829 fire_ball(GF_COLD, dir, damage, (plev > 40 ? -3 : -2));
832 if (!get_aim_dir(&dir)) return FALSE;
834 else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
836 else msg_print("You breathe gas.");
839 fire_ball(GF_POIS, dir, damage, (plev > 40 ? -3 : -2));
842 if (!get_aim_dir(&dir)) return FALSE;
844 else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
846 else msg_print("You breathe nether.");
849 fire_ball(GF_NETHER, dir, damage, (plev > 40 ? -3 : -2));
852 if (!get_aim_dir(&dir)) return FALSE;
854 else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
856 else msg_print("You breathe light.");
859 fire_ball(GF_LITE, dir, damage, (plev > 40 ? -3 : -2));
862 if (!get_aim_dir(&dir)) return FALSE;
864 else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
866 else msg_print("You breathe darkness.");
869 fire_ball(GF_DARK, dir, damage, (plev > 40 ? -3 : -2));
872 if (!get_aim_dir(&dir)) return FALSE;
874 else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
876 else msg_print("You breathe confusion.");
879 fire_ball(GF_CONFUSION, dir, damage, (plev > 40 ? -3 : -2));
882 if (!get_aim_dir(&dir)) return FALSE;
884 else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
886 else msg_print("You breathe sound.");
889 fire_ball(GF_SOUND, dir, damage, (plev > 40 ? -3 : -2));
892 if (!get_aim_dir(&dir)) return FALSE;
894 else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
896 else msg_print("You breathe chaos.");
899 fire_ball(GF_CHAOS, dir, damage, (plev > 40 ? -3 : -2));
902 if (!get_aim_dir(&dir)) return FALSE;
904 else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
906 else msg_print("You breathe disenchantment.");
909 fire_ball(GF_DISENCHANT, dir, damage, (plev > 40 ? -3 : -2));
912 if (!get_aim_dir(&dir)) return FALSE;
914 else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
916 else msg_print("You breathe nexus.");
918 damage = MIN(hp / 3, 250);
919 fire_ball(GF_NEXUS, dir, damage, (plev > 40 ? -3 : -2));
922 if (!get_aim_dir(&dir)) return FALSE;
924 else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
926 else msg_print("You breathe time.");
928 damage = MIN(hp / 3, 150);
929 fire_ball(GF_TIME, dir, damage, (plev > 40 ? -3 : -2));
932 if (!get_aim_dir(&dir)) return FALSE;
934 else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£");
936 else msg_print("You breathe inertia.");
938 damage = MIN(hp / 6, 200);
939 fire_ball(GF_INERTIA, dir, damage, (plev > 40 ? -3 : -2));
942 if (!get_aim_dir(&dir)) return FALSE;
944 else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
946 else msg_print("You breathe gravity.");
948 damage = MIN(hp / 3, 200);
949 fire_ball(GF_GRAVITY, dir, damage, (plev > 40 ? -3 : -2));
952 if (!get_aim_dir(&dir)) return FALSE;
954 else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£");
956 else msg_print("You breathe shards.");
959 fire_ball(GF_SHARDS, dir, damage, (plev > 40 ? -3 : -2));
962 if (!get_aim_dir(&dir)) return FALSE;
964 else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
966 else msg_print("You breathe plasma.");
968 damage = MIN(hp / 6, 150);
969 fire_ball(GF_PLASMA, dir, damage, (plev > 40 ? -3 : -2));
972 if (!get_aim_dir(&dir)) return FALSE;
974 else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
976 else msg_print("You breathe force.");
978 damage = MIN(hp / 6, 200);
979 fire_ball(GF_FORCE, dir, damage, (plev > 40 ? -3 : -2));
982 if (!get_aim_dir(&dir)) return FALSE;
984 else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
986 else msg_print("You breathe mana.");
989 damage = MIN(hp / 3, 250);
990 fire_ball(GF_MANA, dir, damage, (plev > 40 ? -3 : -2));
993 if (!get_aim_dir(&dir)) return FALSE;
995 else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£");
997 else msg_print("You cast a ball of radiation.");
999 damage = plev * 2 + damroll(10, 6);
1000 fire_ball(GF_NUKE, dir, damage, 2);
1003 if (!get_aim_dir(&dir)) return FALSE;
1005 else msg_print("Êü¼ÍÀÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1007 else msg_print("You breathe toxic waste.");
1010 fire_ball(GF_NUKE, dir, damage, (plev > 40 ? -3 : -2));
1013 if (!get_aim_dir(&dir)) return FALSE;
1015 else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£");
1017 else msg_print("You invoke a raw Logrus.");
1019 damage = plev * 4 + damroll(10, 10);
1020 fire_ball(GF_CHAOS, dir, damage, 4);
1023 if (!get_aim_dir(&dir)) return FALSE;
1025 else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1027 else msg_print("You breathe disintegration.");
1029 damage = MIN(hp / 6, 150);
1030 fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 40 ? -3 : -2));
1033 if (!get_aim_dir(&dir)) return FALSE;
1035 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1037 else msg_print("You cast an acid ball.");
1039 damage = randint1(plev * 6) + 15;
1040 fire_ball(GF_ACID, dir, damage, 2);
1043 if (!get_aim_dir(&dir)) return FALSE;
1045 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1047 else msg_print("You cast a lightning ball.");
1049 damage = randint1(plev * 3) + 8;
1050 fire_ball(GF_ELEC, dir, damage, 2);
1053 if (!get_aim_dir(&dir)) return FALSE;
1055 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1057 else msg_print("You cast a fire ball.");
1059 damage = randint1(plev * 7) + 10;
1060 fire_ball(GF_FIRE, dir, damage, 2);
1063 if (!get_aim_dir(&dir)) return FALSE;
1065 else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1067 else msg_print("You cast a frost ball.");
1069 damage = randint1(plev * 3) + 10;
1070 fire_ball(GF_COLD, dir, damage, 2);
1073 if (!get_aim_dir(&dir)) return FALSE;
1075 else msg_print("°½±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1077 else msg_print("You cast a stinking cloud.");
1079 damage = damroll(12,2);
1080 fire_ball(GF_POIS, dir, damage, 2);
1082 case MS_BALL_NETHER:
1083 if (!get_aim_dir(&dir)) return FALSE;
1085 else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1087 else msg_print("You cast a nether ball.");
1089 damage = plev * 2 + 50 + damroll(10, 10);
1090 fire_ball(GF_NETHER, dir, damage, 2);
1093 if (!get_aim_dir(&dir)) return FALSE;
1095 else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£");
1097 else msg_print("You gesture fluidly.");
1099 damage = randint1(plev * 4) + 50;
1100 fire_ball(GF_WATER, dir, damage, 4);
1103 if (!get_aim_dir(&dir)) return FALSE;
1105 else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1107 else msg_print("You invoke a mana storm.");
1109 damage = plev * 8 + 50 + damroll(10, 10);
1110 fire_ball(GF_MANA, dir, damage, 4);
1113 if (!get_aim_dir(&dir)) return FALSE;
1115 else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1117 else msg_print("You invoke a darkness storm.");
1119 damage = plev * 8 + 50 + damroll(10, 10);
1120 fire_ball(GF_DARK, dir, damage, 4);
1123 if (!get_aim_dir(&dir)) return FALSE;
1124 fire_ball_hide(GF_DRAIN_MANA, dir, randint1(plev)+plev, 0);
1127 if (!get_aim_dir(&dir)) return FALSE;
1128 damage = damroll(7, 7);
1129 fire_ball_hide(GF_MIND_BLAST, dir, damage, 0);
1131 case MS_BRAIN_SMASH:
1132 if (!get_aim_dir(&dir)) return FALSE;
1133 damage = damroll(12, 12);
1134 fire_ball_hide(GF_BRAIN_SMASH, dir, damage, 0);
1137 if (!get_aim_dir(&dir)) return FALSE;
1138 damage = damroll(3, 8);
1139 fire_ball_hide(GF_CAUSE_1, dir, damage, 0);
1142 if (!get_aim_dir(&dir)) return FALSE;
1143 damage = damroll(8, 8);
1144 fire_ball_hide(GF_CAUSE_2, dir, damage, 0);
1147 if (!get_aim_dir(&dir)) return FALSE;
1148 damage = damroll(10, 15);
1149 fire_ball_hide(GF_CAUSE_3, dir, damage, 0);
1152 if (!get_aim_dir(&dir)) return FALSE;
1153 damage = damroll(15, 15);
1154 fire_ball_hide(GF_CAUSE_4, dir, damage, 0);
1157 if (!get_aim_dir(&dir)) return FALSE;
1159 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1161 else msg_print("You cast an acid bolt.");
1163 damage = damroll(7, 8) + plev * 2 / 3;
1164 fire_bolt(GF_ACID, dir, damage);
1167 if (!get_aim_dir(&dir)) return FALSE;
1169 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1171 else msg_print("You cast a lightning bolt.");
1173 damage = damroll(4, 8) + plev * 2 / 3;
1174 fire_bolt(GF_ELEC, dir, damage);
1177 if (!get_aim_dir(&dir)) return FALSE;
1179 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1181 else msg_print("You cast a fire bolt.");
1183 damage = damroll(9, 8) + plev * 2 / 3;
1184 fire_bolt(GF_FIRE, dir, damage);
1187 if (!get_aim_dir(&dir)) return FALSE;
1189 else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1191 else msg_print("You cast a frost bolt.");
1193 damage = damroll(6, 8) + plev * 2 / 3;
1194 fire_bolt(GF_COLD, dir, damage);
1197 if (!get_aim_dir(&dir)) return FALSE;
1200 msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1202 msg_print("You invoke a starburst.");
1204 damage = plev * 8 + 50 + damroll(10, 10);
1205 fire_ball(GF_LITE, dir, damage, 4);
1207 case MS_BOLT_NETHER:
1208 if (!get_aim_dir(&dir)) return FALSE;
1210 else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1212 else msg_print("You cast a nether bolt.");
1214 damage = 30 + damroll(5, 5) + plev * 8 / 3;
1215 fire_bolt(GF_NETHER, dir, damage);
1218 if (!get_aim_dir(&dir)) return FALSE;
1220 else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1222 else msg_print("You cast a water bolt.");
1224 damage = damroll(10, 10) + plev * 2;
1225 fire_bolt(GF_WATER, dir, damage);
1228 if (!get_aim_dir(&dir)) return FALSE;
1230 else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1232 else msg_print("You cast a mana bolt.");
1234 damage = randint1(plev * 7) + 50;
1235 fire_bolt(GF_MANA, dir, damage);
1237 case MS_BOLT_PLASMA:
1238 if (!get_aim_dir(&dir)) return FALSE;
1240 else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1242 else msg_print("You cast a plasma bolt.");
1244 damage = 10 + damroll(8, 7) + plev * 2;
1245 fire_bolt(GF_PLASMA, dir, damage);
1248 if (!get_aim_dir(&dir)) return FALSE;
1250 else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1252 else msg_print("You cast a ice bolt.");
1254 damage = damroll(6, 6) + plev * 2;
1255 fire_bolt(GF_ICE, dir, damage);
1257 case MS_MAGIC_MISSILE:
1258 if (!get_aim_dir(&dir)) return FALSE;
1260 else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1262 else msg_print("You cast a magic missile.");
1264 damage = damroll(2, 6) + plev * 2 / 3;
1265 fire_bolt(GF_MISSILE, dir, damage);
1268 if (!get_aim_dir(&dir)) return FALSE;
1270 else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£");
1272 else msg_print("You cast a fearful illusion.");
1274 fear_monster(dir, plev+10);
1277 if (!get_aim_dir(&dir)) return FALSE;
1278 confuse_monster(dir, plev * 2);
1281 if (!get_aim_dir(&dir)) return FALSE;
1283 else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£");
1285 else msg_print("You cast a mesmerizing illusion.");
1287 confuse_monster(dir, plev * 2);
1290 if (!get_aim_dir(&dir)) return FALSE;
1291 slow_monster(dir, plev);
1294 if (!get_aim_dir(&dir)) return FALSE;
1295 sleep_monster(dir, plev);
1298 (void)set_fast(randint1(20 + plev) + plev, FALSE);
1302 if (!get_aim_dir(&dir)) return FALSE;
1304 else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª");
1306 else msg_print("You invoke the Hand of Doom!");
1309 fire_ball_hide(GF_HAND_DOOM, dir, plev * 3, 0);
1314 msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£");
1316 msg_print("You concentrate on your wounds!");
1318 (void)hp_player(plev*4);
1324 msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1326 msg_print("You cast a Globe of Invulnerability.");
1328 (void)set_invuln(randint1(4) + 4, FALSE);
1331 teleport_player(10, 0L);
1334 teleport_player(plev * 5, 0L);
1337 world_player = TRUE;
1339 msg_print("¡Ö»þ¤è¡ª¡×");
1341 msg_print("'Time!'");
1346 p_ptr->energy_need -= 1000 + (100 + randint1(200)+200)*TURNS_PER_TICK/10;
1349 p_ptr->redraw |= (PR_MAP);
1351 /* Update monsters */
1352 p_ptr->update |= (PU_MONSTERS);
1355 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1363 monster_type *m_ptr;
1364 monster_race *r_ptr;
1367 if (!target_set(TARGET_KILL)) return FALSE;
1368 if (!cave[target_row][target_col].m_idx) break;
1369 if (!player_has_los_bold(target_row, target_col)) break;
1370 if (!projectable(py, px, target_row, target_col)) break;
1371 m_ptr = &m_list[cave[target_row][target_col].m_idx];
1372 r_ptr = &r_info[m_ptr->r_idx];
1373 monster_desc(m_name, m_ptr, 0);
1374 if (r_ptr->flagsr & RFR_RES_TELE)
1376 if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flagsr & RFR_RES_ALL))
1378 if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
1380 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", m_name);
1382 msg_format("%s is unaffected!", m_name);
1387 else if (r_ptr->level > randint1(100))
1389 if (is_original_ap_and_seen(m_ptr)) r_ptr->r_flagsr |= RFR_RES_TELE;
1391 msg_format("%s¤Ë¤ÏÂÑÀ¤¬¤¢¤ë¡ª", m_name);
1393 msg_format("%s resists!", m_name);
1400 msg_format("%s¤ò°ú¤Ìᤷ¤¿¡£", m_name);
1402 msg_format("You command %s to return.", m_name);
1405 teleport_monster_to(cave[target_row][target_col].m_idx, py, px, 100, TELEPORT_PASSIVE);
1409 if (!get_aim_dir(&dir)) return FALSE;
1411 (void)fire_beam(GF_AWAY_ALL, dir, 100);
1416 monster_type *m_ptr;
1417 monster_race *r_ptr;
1420 if (!target_set(TARGET_KILL)) return FALSE;
1421 target_m_idx = cave[target_row][target_col].m_idx;
1422 if (!target_m_idx) break;
1423 if (!player_has_los_bold(target_row, target_col)) break;
1424 if (!projectable(py, px, target_row, target_col)) break;
1425 m_ptr = &m_list[target_m_idx];
1426 r_ptr = &r_info[m_ptr->r_idx];
1427 monster_desc(m_name, m_ptr, 0);
1429 msg_format("%^s¤Î¤ò»Ø¤µ¤·¤¿¡£", m_name);
1431 msg_format("You gesture at %^s's feet.", m_name);
1434 if ((r_ptr->flagsr & (RFR_EFF_RES_NEXU_MASK | RFR_RES_TELE)) ||
1435 (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint1(50) > plev + randint1(60)))
1438 msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
1440 msg_format("%^s is unaffected!", m_name);
1443 else teleport_level(target_m_idx);
1447 if (!get_aim_dir(&dir)) return FALSE;
1450 else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£");
1452 else msg_print("You throw a psycho-spear.");
1454 damage = randint1(plev * 3) + 100;
1455 (void)fire_beam(GF_PSY_SPEAR, dir, damage);
1459 msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£");
1461 msg_print("You gesture in shadow.");
1463 (void)unlite_area(10, 3);
1466 if (!target_set(TARGET_KILL)) return FALSE;
1468 msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£");
1470 msg_print("You cast a spell and cackle evilly.");
1472 trap_creation(target_row, target_col);
1476 msg_print("¤·¤«¤·²¿¤âµ¯¤¤Ê¤«¤Ã¤¿¡£");
1478 msg_print("Nothing happen.");
1483 msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1485 msg_print("You cast a animate dead.");
1487 (void)animate_dead(0, py, px);
1493 msg_print("±ç·³¤ò¾¤´¤·¤¿¡£");
1495 msg_print("You summon minions.");
1497 for (k = 0;k < 1; k++)
1499 if (summon_kin_player(summon_lev, py, px, (pet ? PM_FORCE_PET : 0L)))
1503 msg_print("¾¤´¤µ¤ì¤¿Ãç´Ö¤ÏÅܤäƤ¤¤ë¡ª");
1505 msg_print("Summoned fellows are angry!");
1519 msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª");
1521 msg_print("You summon a Cyberdemon!");
1523 for (k = 0 ;k < 1 ; k++)
1524 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_CYBER, p_mode))
1528 msg_print("¾¤´¤µ¤ì¤¿¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1530 msg_print("The summoned Cyberdemon are angry!");
1543 msg_print("Ãç´Ö¤ò¾¤´¤·¤¿¡£");
1545 msg_print("You summon help.");
1547 for (k = 0;k < 1; k++)
1548 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, p_mode))
1552 msg_print("¾¤´¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1554 msg_print("The summoned monster is angry!");
1567 msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤·¤¿¡ª");
1569 msg_print("You summon monsters!");
1571 for (k = 0;k < plev / 15 + 2; k++)
1572 if(summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, (p_mode | u_mode)))
1576 msg_print("¾¤´¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1578 msg_print("Summoned monsters are angry!");
1591 msg_print("¥¢¥ê¤ò¾¤´¤·¤¿¡£");
1593 msg_print("You summon ants.");
1595 for (k = 0;k < 1; k++)
1596 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANT, (PM_ALLOW_GROUP | p_mode)))
1600 msg_print("¾¤´¤µ¤ì¤¿¥¢¥ê¤ÏÅܤäƤ¤¤ë¡ª");
1602 msg_print("Summoned ants are angry!");
1615 msg_print("ÃØéá¤ò¾¤´¤·¤¿¡£");
1617 msg_print("You summon spiders.");
1619 for (k = 0;k < 1; k++)
1620 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_SPIDER, (PM_ALLOW_GROUP | p_mode)))
1624 msg_print("¾¤´¤µ¤ì¤¿ÃØéá¤ÏÅܤäƤ¤¤ë¡ª");
1626 msg_print("Summoned spiders are angry!");
1639 msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´¤·¤¿¡£");
1641 msg_print("You summon hounds.");
1643 for (k = 0;k < 1; k++)
1644 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HOUND, (PM_ALLOW_GROUP | p_mode)))
1648 msg_print("¾¤´¤µ¤ì¤¿¥Ï¥¦¥ó¥É¤ÏÅܤäƤ¤¤ë¡ª");
1650 msg_print("Summoned hounds are angry!");
1663 msg_print("¥Ò¥É¥é¤ò¾¤´¤·¤¿¡£");
1665 msg_print("You summon a hydras.");
1667 for (k = 0;k < 1; k++)
1668 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HYDRA, (g_mode | p_mode)))
1672 msg_print("¾¤´¤µ¤ì¤¿¥Ò¥É¥é¤ÏÅܤäƤ¤¤ë¡ª");
1674 msg_print("Summoned hydras are angry!");
1687 msg_print("Å·»È¤ò¾¤´¤·¤¿¡ª");
1689 msg_print("You summon an angel!");
1691 for (k = 0;k < 1; k++)
1692 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANGEL, (g_mode | p_mode)))
1696 msg_print("¾¤´¤µ¤ì¤¿Å·»È¤ÏÅܤäƤ¤¤ë¡ª");
1698 msg_print("Summoned angels are angry!");
1711 msg_print("º®Æ٤εÜÄ¤é°Ëâ¤ò¾¤´¤·¤¿¡ª");
1713 msg_print("You summon a demon from the Courts of Chaos!");
1715 for (k = 0;k < 1; k++)
1716 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DEMON, (g_mode | p_mode)))
1720 msg_print("¾¤´¤µ¤ì¤¿¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1722 msg_print("Summoned demons are angry!");
1735 msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´¤·¤¿¡ª");
1737 msg_print("You summon an undead adversary!");
1739 for (k = 0;k < 1; k++)
1740 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNDEAD, (g_mode | p_mode)))
1744 msg_print("¾¤´¤µ¤ì¤¿¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1746 msg_print("Summoned undeads are angry!");
1759 msg_print("¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1761 msg_print("You summon a dragon!");
1763 for (k = 0;k < 1; k++)
1764 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DRAGON, (g_mode | p_mode)))
1768 msg_print("¾¤´¤µ¤ì¤¿¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1770 msg_print("Summoned dragons are angry!");
1779 case MS_S_HI_UNDEAD:
1783 msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡ª");
1785 msg_print("You summon a greater undead!");
1787 for (k = 0;k < 1; k++)
1788 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | u_mode)))
1792 msg_print("¾¤´¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1794 msg_print("Summoned greater undeads are angry!");
1803 case MS_S_HI_DRAGON:
1807 msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1809 msg_print("You summon an ancient dragon!");
1811 for (k = 0;k < 1; k++)
1812 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_DRAGON, (g_mode | p_mode | u_mode)))
1816 msg_print("¾¤´¤µ¤ì¤¿¸ÅÂå¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1818 msg_print("Summoned ancient dragons are angry!");
1831 msg_print("¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´¤·¤¿¡ª");
1833 msg_print("You summon a Lord of Amber!");
1835 for (k = 0;k < 1; k++)
1836 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_AMBERITES, (g_mode | p_mode | u_mode)))
1840 msg_print("¾¤´¤µ¤ì¤¿¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ÏÅܤäƤ¤¤ë¡ª");
1842 msg_print("Summoned Lords of Amber are angry!");
1855 msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´¤·¤¿¡ª");
1857 msg_print("You summon a special opponent!");
1859 for (k = 0;k < 1; k++)
1860 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNIQUE, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
1865 msg_print("¾¤´¤µ¤ì¤¿¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1867 msg_print("Summoned special opponents are angry!");
1870 for (k = count;k < 1; k++)
1871 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, (g_mode | p_mode | PM_ALLOW_UNIQUE)))
1876 msg_print("¾¤´¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1878 msg_print("Summoned greater undeads are angry!");
1893 msg_print("²¿¤â¸½¤ì¤Ê¤«¤Ã¤¿¡£");
1895 msg_print("No one have appeared.");
1903 * @brief ÀÄËâË¡¥³¥Þ¥ó¥É¤Î¥á¥¤¥ó¥ë¡¼¥Á¥ó /
1904 * do_cmd_cast calls this function if the player's class is 'Blue-Mage'.
1905 * @return ½èÍý¤ò¼Â¹Ô¤·¤¿¤éTRUE¡¢¥¥ã¥ó¥»¥ë¤·¤¿¾ì¹çFALSE¤òÊÖ¤¹¡£
1907 bool do_cmd_cast_learned(void)
1912 int plev = p_ptr->lev;
1913 monster_power spell;
1918 /* not if confused */
1919 if (p_ptr->confused)
1922 msg_print("º®Í𤷤Ƥ¤¤Æ¾§¤¨¤é¤ì¤Ê¤¤¡ª");
1924 msg_print("You are too confused!");
1931 if (!get_learned_power(&n)) return FALSE;
1933 spell = monster_powers[n];
1935 need_mana = mod_need_mana(spell.smana, 0, REALM_NONE);
1937 /* Verify "dangerous" spells */
1938 if (need_mana > p_ptr->csp)
1942 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
1944 msg_print("You do not have enough mana to use this power.");
1948 if (!over_exert) return FALSE;
1952 if (!get_check("¤½¤ì¤Ç¤âÄ©À路¤Þ¤¹¤«? ")) return FALSE;
1954 if (!get_check("Attempt it anyway? ")) return FALSE;
1959 /* Spell failure chance */
1960 chance = spell.fail;
1962 /* Reduce failure rate by "effective" level adjustment */
1963 if (plev > spell.level) chance -= 3 * (plev - spell.level);
1964 else chance += (spell.level - plev);
1966 /* Reduce failure rate by INT/WIS adjustment */
1967 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[A_INT]] - 1);
1969 chance = mod_spell_chance_1(chance);
1971 /* Not enough mana to cast */
1972 if (need_mana > p_ptr->csp)
1974 chance += 5 * (need_mana - p_ptr->csp);
1977 /* Extract the minimum failure rate */
1978 minfail = adj_mag_fail[p_ptr->stat_ind[A_INT]];
1980 /* Minimum failure rate */
1981 if (chance < minfail) chance = minfail;
1983 /* Stunning makes spells harder */
1984 if (p_ptr->stun > 50) chance += 25;
1985 else if (p_ptr->stun) chance += 15;
1987 /* Always a 5 percent chance of working */
1988 if (chance > 95) chance = 95;
1990 chance = mod_spell_chance_2(chance);
1993 if (randint0(100) < chance)
1995 if (flush_failure) flush();
1997 msg_print("ËâË¡¤ò¤¦¤Þ¤¯¾§¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
1999 msg_print("You failed to concentrate hard enough!");
2005 /* Cast the spell */
2006 cast = cast_learned_spell(n, FALSE);
2012 /* Cast the spell */
2013 cast = cast_learned_spell(n, TRUE);
2015 if (!cast) return FALSE;
2018 /* Sufficient mana */
2019 if (need_mana <= p_ptr->csp)
2022 p_ptr->csp -= need_mana;
2026 int oops = need_mana;
2030 p_ptr->csp_frac = 0;
2034 msg_print("Àº¿À¤ò½¸Ã椷¤¹¤®¤Æµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
2036 msg_print("You faint from the effort!");
2040 /* Hack -- Bypass free action */
2041 (void)set_paralyzed(p_ptr->paralyzed + randint1(5 * oops + 1));
2043 chg_virtue(V_KNOWLEDGE, -10);
2045 /* Damage CON (possibly permanently) */
2046 if (randint0(100) < 50)
2048 bool perm = (randint0(100) < 25);
2052 msg_print("ÂΤò°¤¯¤·¤Æ¤·¤Þ¤Ã¤¿¡ª");
2054 msg_print("You have damaged your health!");
2058 /* Reduce constitution */
2059 (void)dec_stat(A_CON, 15 + randint1(10), perm);
2067 p_ptr->redraw |= (PR_MANA);
2068 p_ptr->window |= (PW_PLAYER);
2069 p_ptr->window |= (PW_SPELL);
2075 * @brief ÀÄËâË¡¤Î¥é¡¼¥Ë¥ó¥°È½Äê¤ÈÀ®¸ù¤·¤¿¾ì¹ç¤Î¥é¡¼¥Ë¥ó¥°½èÍý
2076 * @param monspell ¥é¡¼¥Ë¥ó¥°¤ò»î¤ß¤ë¥â¥ó¥¹¥¿¡¼¹¶·â¤ÎID
2079 void learn_spell(int monspell)
2081 if (p_ptr->action != ACTION_LEARN) return;
2082 if (monspell < 0) return; /* Paranoia */
2083 if (p_ptr->magic_num2[monspell]) return;
2084 if (p_ptr->confused || p_ptr->blind || p_ptr->image || p_ptr->stun || p_ptr->paralyzed) return;
2085 if (randint1(p_ptr->lev + 70) > monster_powers[monspell].level + 40)
2087 p_ptr->magic_num2[monspell] = 1;
2089 msg_format("%s¤ò³Ø½¬¤·¤¿¡ª", monster_powers[monspell].name);
2091 msg_format("You have learned %s!", monster_powers[monspell].name);
2093 gain_exp(monster_powers[monspell].level * monster_powers[monspell].smana);
2099 p_ptr->redraw |= (PR_STATE);
2105 * @brief ¥â¥ó¥¹¥¿¡¼ÆüìǽÎϤΥե饰ÇÛÎ󤫤éÆÃÄê¾ò·ï¤ÎËâË¡¤À¤±¤òÈ´¤½Ð¤¹½èÍý
2106 * Extract monster spells mask for the given mode
2107 * @param f4 ¥â¥ó¥¹¥¿¡¼ÆüìǽÎϤÎ4ÈÖÌܤΥե饰ÇÛÎó
2108 * @param f5 ¥â¥ó¥¹¥¿¡¼ÆüìǽÎϤÎ5ÈÖÌܤΥե饰ÇÛÎó
2109 * @param f6 ¥â¥ó¥¹¥¿¡¼ÆüìǽÎϤÎ6ÈÖÌܤΥե饰ÇÛÎó
2110 * @param mode È´¤½Ð¤·¤¿¤¤¾ò·ï
2115 void set_rf_masks(s32b *f4, s32b *f5, s32b *f6, int mode)
2119 case MONSPELL_TYPE_BOLT:
2120 *f4 = ((RF4_BOLT_MASK | RF4_BEAM_MASK) & ~(RF4_ROCKET));
2121 *f5 = RF5_BOLT_MASK | RF5_BEAM_MASK;
2122 *f6 = RF6_BOLT_MASK | RF6_BEAM_MASK;
2125 case MONSPELL_TYPE_BALL:
2126 *f4 = (RF4_BALL_MASK & ~(RF4_BREATH_MASK));
2127 *f5 = (RF5_BALL_MASK & ~(RF5_BREATH_MASK));
2128 *f6 = (RF6_BALL_MASK & ~(RF6_BREATH_MASK));
2131 case MONSPELL_TYPE_BREATH:
2132 *f4 = RF4_BREATH_MASK;
2133 *f5 = RF5_BREATH_MASK;
2134 *f6 = RF6_BREATH_MASK;
2137 case MONSPELL_TYPE_SUMMON:
2138 *f4 = RF4_SUMMON_MASK;
2139 *f5 = RF5_SUMMON_MASK;
2140 *f6 = RF6_SUMMON_MASK;
2143 case MONSPELL_TYPE_OTHER:
2144 *f4 = RF4_ATTACK_MASK & ~(RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_INDIRECT_MASK);
2145 *f5 = RF5_ATTACK_MASK & ~(RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_INDIRECT_MASK);
2146 *f6 = RF6_ATTACK_MASK & ~(RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | RF6_INDIRECT_MASK);