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.
15 #define pseudo_plev() (((p_ptr->lev + 40) * (p_ptr->lev + 40) - 1550) / 130)
17 void learned_info(char *p, int power)
19 int plev = pseudo_plev();
25 cptr s_range = "ÈÏ°Ï:";
26 cptr s_heal = "²óÉü:";
30 cptr s_range = "range ";
31 cptr s_heal = "heal ";
74 sprintf(p, " %s%d+10d10", s_dam, plev * 8 + 50);
79 sprintf(p, " %s%d", s_dam, hp/4);
82 sprintf(p, " %s2d5", s_dam);
85 sprintf(p, " %s3d6", s_dam);
88 sprintf(p, " %s5d6", s_dam);
91 sprintf(p, " %s7d6", s_dam);
99 sprintf(p, " %s%d", s_dam, hp/3);
102 sprintf(p, " %s%d", s_dam, MIN(hp/3, 250));
105 sprintf(p, " %s%d", s_dam, MIN(hp/3, 150));
108 sprintf(p, " %s%d", s_dam, MIN(hp/3, 200));
111 sprintf(p, " %s%d", s_dam, MIN(hp/3, 250));
122 sprintf(p, " %s%d", s_dam, hp/6);
126 sprintf(p, " %s%d", s_dam, MIN(hp/6, 200));
129 sprintf(p, " %s%d", s_dam, MIN(hp/6, 150));
132 sprintf(p, " %s%d+10d6", s_dam, plev * 2);
135 sprintf(p, " %s%d+10d10", s_dam, plev * 4);
138 sprintf(p, " %s15+d%d", s_dam, plev * 6);
141 sprintf(p, " %s8+d%d", s_dam, plev * 3);
144 sprintf(p, " %s10+d%d", s_dam, plev * 7);
147 sprintf(p, " %s10+d%d", s_dam, plev * 3);
150 sprintf(p, " %s12d2", s_dam);
153 sprintf(p, " %s%d+10d10", s_dam, plev * 2 + 50);
156 sprintf(p, " %s50+d%d", s_dam, plev * 4);
159 sprintf(p, " %sd%d+%d", s_heal, plev, plev);
162 sprintf(p, " %s8d8", s_dam);
165 sprintf(p, " %s12d15", s_dam);
168 sprintf(p, " %s3d8", s_dam);
171 sprintf(p, " %s8d8", s_dam);
174 sprintf(p, " %s10d15", s_dam);
177 sprintf(p, " %s15d15", s_dam);
180 sprintf(p, " %s%d+7d8", s_dam, plev * 2 / 3);
183 sprintf(p, " %s%d+4d8", s_dam, plev * 2 / 3);
186 sprintf(p, " %s%d+9d8", s_dam, plev * 2 / 3);
189 sprintf(p, " %s%d+6d8", s_dam, plev * 2 / 3);
192 sprintf(p, " %s%d+5d5", s_dam, 30 + plev * 8 / 3);
195 sprintf(p, " %s%d+10d10", s_dam, plev * 2);
198 sprintf(p, " %s50+d%d", s_dam, plev * 7);
201 sprintf(p, " %s%d+8d7", s_dam, plev * 2 + 10);
204 sprintf(p, " %s%d+6d6", s_dam, plev * 2);
206 case MS_MAGIC_MISSILE:
207 sprintf(p, " %s%d+2d6", s_dam, plev * 2 / 3);
210 sprintf(p, " %sd%d+%d", s_dur, 20+plev, plev);
213 sprintf(p, " %s%d", s_heal, plev*4);
216 sprintf(p, " %sd7+7", s_dur);
219 sprintf(p, " %s10", s_range);
222 sprintf(p, " %s%d", s_range, plev * 5);
225 sprintf(p, " %s100+d%d", s_dam, plev * 3);
228 sprintf(p, " %s5", s_range);
237 * Allow user to choose a imitation.
239 * If a valid spell is chosen, saves it in '*sn' and returns TRUE
240 * If the user hits escape, returns FALSE, and set '*sn' to -1
241 * If there are no legal choices, returns FALSE, and sets '*sn' to -2
243 * The "prompt" should be "cast", "recite", or "study"
244 * The "known" should be TRUE for cast/pray, FALSE for study
246 * nb: This function has a (trivial) display bug which will be obvious
247 * when you run it. It's probably easy to fix but I haven't tried,
250 static int get_learned_power(int *sn)
257 int plev = p_ptr->lev;
259 int ask = TRUE, mode = 0;
260 int spellnum[MAX_MONSPELLS];
265 s32b f4 = 0, f5 = 0, f6 = 0;
274 int menu_line = (use_menu ? 1 : 0);
276 /* Assume cancelled */
279 /* Nothing chosen yet */
285 #ifdef ALLOW_REPEAT /* TNB */
287 /* Get the spell, if available */
294 #endif /* ALLOW_REPEAT -- TNB */
303 prt(format(" %s ¥Ü¥ë¥È", (menu_line == 1) ? "¡Õ" : " "), 2, 14);
304 prt(format(" %s ¥Ü¡¼¥ë", (menu_line == 2) ? "¡Õ" : " "), 3, 14);
305 prt(format(" %s ¥Ö¥ì¥¹", (menu_line == 3) ? "¡Õ" : " "), 4, 14);
306 prt(format(" %s ¾¤´", (menu_line == 4) ? "¡Õ" : " "), 5, 14);
307 prt(format(" %s ¤½¤Î¾", (menu_line == 5) ? "¡Õ" : " "), 6, 14);
308 prt("¤É¤Î¼ïÎà¤ÎËâË¡¤ò»È¤¤¤Þ¤¹¤«¡©", 0, 0);
310 prt(format(" %s bolt", (menu_line == 1) ? "> " : " "), 2, 14);
311 prt(format(" %s ball", (menu_line == 2) ? "> " : " "), 3, 14);
312 prt(format(" %s breath", (menu_line == 3) ? "> " : " "), 4, 14);
313 prt(format(" %s sommoning", (menu_line == 4) ? "> " : " "), 5, 14);
314 prt(format(" %s others", (menu_line == 5) ? "> " : " "), 6, 14);
315 prt("use which type of magic? ", 0, 0);
341 if (menu_line > 5) menu_line -= 5;
348 sprintf(comment, "[A]¥Ü¥ë¥È, [B]¥Ü¡¼¥ë, [C]¥Ö¥ì¥¹, [D]¾¤´, [E]¤½¤Î¾:");
350 sprintf(comment, "[A] bolt, [B] ball, [C] breath, [D] summoning, [E] others:");
354 if (!get_com(comment, &ch, TRUE))
358 if (ch == 'A' || ch == 'a')
363 if (ch == 'B' || ch == 'b')
368 if (ch == 'C' || ch == 'c')
373 if (ch == 'D' || ch == 'd')
378 if (ch == 'E' || ch == 'e')
388 f4 = ((RF4_BOLT_MASK | RF4_BEAM_MASK) & ~(RF4_ROCKET));
389 f5 = RF5_BOLT_MASK | RF5_BEAM_MASK;
390 f6 = RF6_BOLT_MASK | RF6_BEAM_MASK;
394 f4 = (RF4_BALL_MASK & ~(RF4_BREATH_MASK));
395 f5 = (RF5_BALL_MASK & ~(RF5_BREATH_MASK));
396 f6 = (RF6_BALL_MASK & ~(RF6_BREATH_MASK));
400 f4 = RF4_BREATH_MASK;
401 f5 = RF5_BREATH_MASK;
402 f6 = RF6_BREATH_MASK;
406 f4 = RF4_SUMMON_MASK;
407 f5 = RF5_SUMMON_MASK;
408 f6 = RF6_SUMMON_MASK;
412 f4 = ~(RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_SUMMON_MASK | RF4_INDIRECT_MASK | RF4_RIDING_MASK);
413 f5 = ~(RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_SUMMON_MASK | RF5_INDIRECT_MASK | RF5_RIDING_MASK);
414 f6 = (~(RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | RF6_SUMMON_MASK | RF6_INDIRECT_MASK | RF6_RIDING_MASK)) | (RF6_TRAPS | RF6_DARKNESS);
417 for (i = 0, num = 0; i < 32; i++)
419 if ((0x00000001 << i) & f4) spellnum[num++] = i;
423 if ((0x00000001 << (i - 32)) & f5) spellnum[num++] = i;
427 if ((0x00000001 << (i - 64)) & f6) spellnum[num++] = i;
429 for (i = 0; i < num; i++)
431 if (p_ptr->magic_num2[spellnum[i]])
433 if (use_menu) menu_line = i+1;
440 msg_print("¤½¤Î¼ïÎà¤ÎËâË¡¤Ï³Ð¤¨¤Æ¤¤¤Ê¤¤¡ª");
442 msg_print("You don't know any spell of this type.");
447 /* Build a prompt (accept all spells) */
449 (void) strnfmt(out_val, 78, "(%c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò¾§¤¨¤Þ¤¹¤«¡©",
451 (void)strnfmt(out_val, 78, "(%c-%c, *=List, ESC=exit) Use which %s? ",
454 I2A(0), I2A(num - 1), p);
456 if (use_menu) screen_save();
458 /* Get a spell from the user */
460 choice= (always_show_list || use_menu) ? ESCAPE:1 ;
463 if(choice==ESCAPE) choice = ' ';
464 else if( !get_com(out_val, &choice, TRUE) )break;
466 if (use_menu && choice != ' ')
483 menu_line += (num-1);
484 if (menu_line > num) menu_line -= num;
485 } while(!p_ptr->magic_num2[spellnum[menu_line-1]]);
496 if (menu_line > num) menu_line -= num;
497 } while(!p_ptr->magic_num2[spellnum[menu_line-1]]);
506 while(!p_ptr->magic_num2[spellnum[menu_line-1]]) menu_line--;
515 while(!p_ptr->magic_num2[spellnum[menu_line-1]]) menu_line++;
530 if ((choice == ' ') || (choice == '*') || (choice == '?') || (use_menu && ask))
533 if (!redraw || use_menu)
540 /* Save the screen */
541 if (!use_menu) screen_save();
543 /* Display a list of spells */
546 put_str("̾Á°", y, x + 5);
548 put_str("Name", y, x + 5);
552 put_str("MP ¼ºÎ¨ ¸ú²Ì", y, x + 33);
554 put_str("SP Fail Info", y, x + 32);
558 /* Dump the spells */
559 for (i = 0; i < num; i++)
563 prt("", y + i + 1, x);
564 if (!p_ptr->magic_num2[spellnum[i]]) continue;
566 /* Access the spell */
567 spell = monster_powers[spellnum[i]];
571 /* Reduce failure rate by "effective" level adjustment */
572 if (plev > spell.level) chance -= 3 * (plev - spell.level);
573 else chance += (spell.level - plev);
575 if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
576 if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
577 if ((p_ptr->pseikaku == SEIKAKU_GAMAN) || (p_ptr->pseikaku == SEIKAKU_CHIKARA)) chance++;
579 /* Reduce failure rate by INT/WIS adjustment */
580 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[A_INT]] - 1);
582 if (p_ptr->heavy_spell) chance += 20;
583 if(p_ptr->dec_mana || p_ptr->easy_spell) chance-=4;
584 else if (p_ptr->easy_spell) chance-=3;
585 else if (p_ptr->dec_mana) chance-=2;
587 shouhimana = monster_powers[spellnum[i]].smana;
590 shouhimana = (shouhimana + 1) * 3 / 4;
593 /* Not enough mana to cast */
594 if (shouhimana > p_ptr->csp)
596 chance += 5 * (shouhimana - p_ptr->csp);
599 /* Extract the minimum failure rate */
600 minfail = adj_mag_fail[p_ptr->stat_ind[A_INT]];
602 /* Minimum failure rate */
603 if (chance < minfail) chance = minfail;
605 /* Stunning makes spells harder */
606 if (p_ptr->stun > 50) chance += 25;
607 else if (p_ptr->stun) chance += 15;
609 /* Always a 5 percent chance of working */
610 if (chance > 95) chance = 95;
612 if(p_ptr->dec_mana) chance--;
613 if (p_ptr->heavy_spell) chance += 5;
614 chance = MAX(chance,0);
617 learned_info(comment, spellnum[i]);
622 if (i == (menu_line-1)) strcpy(psi_desc, " ¡Õ");
624 if (i == (menu_line-1)) strcpy(psi_desc, " > ");
626 else strcpy(psi_desc, " ");
628 else sprintf(psi_desc, " %c)", I2A(i));
630 /* Dump the spell --(-- */
631 strcat(psi_desc, format(" %-26s %3d %3d%%%s",
632 spell.name, shouhimana,
634 prt(psi_desc, y + i + 1, x);
637 /* Clear the bottom line */
638 if (y < 22) prt("", y + i + 1, x);
647 /* Restore the screen */
658 ask = isupper(choice);
661 if (ask) choice = tolower(choice);
663 /* Extract request */
664 i = (islower(choice) ? A2I(choice) : -1);
667 /* Totally Illegal */
668 if ((i < 0) || (i >= num) || !p_ptr->magic_num2[spellnum[i]])
674 /* Save the spell index */
675 spell = monster_powers[spellnum[i]];
684 (void) strnfmt(tmp_val, 78, "%s¤ÎËâË¡¤ò¾§¤¨¤Þ¤¹¤«¡©", monster_powers[spellnum[i]].name);
686 (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[spellnum[i]].name);
690 /* Belay that order */
691 if (!get_check(tmp_val)) continue;
698 /* Restore the screen */
699 if (redraw) screen_load();
705 p_ptr->window |= (PW_SPELL);
711 /* Abort if needed */
712 if (!flag) return (FALSE);
714 /* Save the choice */
717 #ifdef ALLOW_REPEAT /* TNB */
721 #endif /* ALLOW_REPEAT -- TNB */
729 * do_cmd_cast calls this function if the player's class
732 static bool cast_learned_spell(int spell, bool success)
735 int plev = pseudo_plev();
736 int summon_lev = p_ptr->lev * 2 / 3 + randint(p_ptr->lev/2);
739 bool unique_okay = FALSE;
741 bool not_pet = (bool)(!pet);
742 bool no_trump = FALSE;
744 if (!success || (randint(50+plev) < plev/10)) unique_okay = TRUE;
751 msg_print("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£");
753 msg_print("You makes a high pitched shriek.");
756 aggravate_monsters(0);
765 if (!target_set(TARGET_KILL)) return FALSE;
766 if (!cave[target_row][target_col].m_idx) break;
767 if (!los(py, px, target_row, target_col)) break;
768 m_ptr = &m_list[cave[target_row][target_col].m_idx];
769 monster_desc(m_name, m_ptr, 0);
774 msg_format("%s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ï¤Ê¤¤¡£", m_name);
776 msg_format("%^s is no longer invulnerable.", m_name);
778 m_ptr->energy -= 100;
784 msg_format("%s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
786 msg_format("%^s is no longer fast.", m_name);
793 msg_format("%s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
795 msg_format("%^s is no longer slow.", m_name);
798 p_ptr->redraw |= (PR_HEALTH);
799 if (p_ptr->riding == cave[target_row][target_col].m_idx) p_ptr->redraw |= (PR_UHEALTH);
804 if (!get_aim_dir(&dir)) return FALSE;
807 msg_print("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£");
809 msg_print("You fires a rocket.");
812 fire_rocket(GF_ROCKET, dir, damage, 2);
815 if (!get_aim_dir(&dir)) return FALSE;
818 msg_print("Ìð¤òÊü¤Ã¤¿¡£");
820 msg_print("You fires an arrow.");
822 damage = damroll(2, 5);
823 fire_bolt(GF_ARROW, dir, damage);
826 if (!get_aim_dir(&dir)) return FALSE;
829 msg_print("Ìð¤òÊü¤Ã¤¿¡£");
831 msg_print("You fires an arrow.");
833 damage = damroll(3, 6);
834 fire_bolt(GF_ARROW, dir, damage);
837 if (!get_aim_dir(&dir)) return FALSE;
840 msg_print("¥Ü¥ë¥È¤ò·â¤Ã¤¿¡£");
842 msg_print("You fires a bolt.");
844 damage = damroll(5, 6);
845 fire_bolt(GF_ARROW, dir, damage);
848 if (!get_aim_dir(&dir)) return FALSE;
851 msg_print("¥Ü¥ë¥È¤ò·â¤Ã¤¿¡£");
853 msg_print("You fires a bolt.");
855 damage = damroll(7, 6);
856 fire_bolt(GF_ARROW, dir, damage);
859 if (!get_aim_dir(&dir)) return FALSE;
861 else msg_print("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
863 else msg_print("You breathes acid.");
866 fire_ball(GF_ACID, dir, damage, (plev > 40 ? -3 : -2));
869 if (!get_aim_dir(&dir)) return FALSE;
871 else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
873 else msg_print("You breathes lightning.");
876 fire_ball(GF_ELEC, dir, damage, (plev > 40 ? -3 : -2));
879 if (!get_aim_dir(&dir)) return FALSE;
881 else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
883 else msg_print("You breathes fire.");
886 fire_ball(GF_FIRE, dir, damage, (plev > 40 ? -3 : -2));
889 if (!get_aim_dir(&dir)) return FALSE;
891 else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
893 else msg_print("You breathes frost.");
896 fire_ball(GF_COLD, dir, damage, (plev > 40 ? -3 : -2));
899 if (!get_aim_dir(&dir)) return FALSE;
901 else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
903 else msg_print("You breathes gas.");
906 fire_ball(GF_POIS, dir, damage, (plev > 40 ? -3 : -2));
909 if (!get_aim_dir(&dir)) return FALSE;
911 else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
913 else msg_print("You breathes nether.");
916 fire_ball(GF_NETHER, dir, damage, (plev > 40 ? -3 : -2));
919 if (!get_aim_dir(&dir)) return FALSE;
921 else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
923 else msg_print("You breathes light.");
926 fire_ball(GF_LITE, dir, damage, (plev > 40 ? -3 : -2));
929 if (!get_aim_dir(&dir)) return FALSE;
931 else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
933 else msg_print("You breathes darkness.");
936 fire_ball(GF_DARK, dir, damage, (plev > 40 ? -3 : -2));
939 if (!get_aim_dir(&dir)) return FALSE;
941 else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
943 else msg_print("You breathes confusion.");
946 fire_ball(GF_CONFUSION, dir, damage, (plev > 40 ? -3 : -2));
949 if (!get_aim_dir(&dir)) return FALSE;
951 else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
953 else msg_print("You breathes sound.");
956 fire_ball(GF_SOUND, dir, damage, (plev > 40 ? -3 : -2));
959 if (!get_aim_dir(&dir)) return FALSE;
961 else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
963 else msg_print("You breathes chaos.");
966 fire_ball(GF_CHAOS, dir, damage, (plev > 40 ? -3 : -2));
969 if (!get_aim_dir(&dir)) return FALSE;
971 else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
973 else msg_print("You breathes disenchantment.");
976 fire_ball(GF_DISENCHANT, dir, damage, (plev > 40 ? -3 : -2));
979 if (!get_aim_dir(&dir)) return FALSE;
981 else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
983 else msg_print("You breathes nexus.");
985 damage = MIN(hp / 3, 250);
986 fire_ball(GF_NEXUS, dir, damage, (plev > 40 ? -3 : -2));
989 if (!get_aim_dir(&dir)) return FALSE;
991 else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
993 else msg_print("You breathes time.");
995 damage = MIN(hp / 3, 150);
996 fire_ball(GF_TIME, dir, damage, (plev > 40 ? -3 : -2));
999 if (!get_aim_dir(&dir)) return FALSE;
1001 else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£");
1003 else msg_print("You breathes inertia.");
1005 damage = MIN(hp / 6, 200);
1006 fire_ball(GF_INERTIA, dir, damage, (plev > 40 ? -3 : -2));
1009 if (!get_aim_dir(&dir)) return FALSE;
1011 else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
1013 else msg_print("You breathes gravity.");
1015 damage = MIN(hp / 3, 200);
1016 fire_ball(GF_GRAVITY, dir, damage, (plev > 40 ? -3 : -2));
1019 if (!get_aim_dir(&dir)) return FALSE;
1021 else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£");
1023 else msg_print("You breathes shards.");
1026 fire_ball(GF_SHARDS, dir, damage, (plev > 40 ? -3 : -2));
1029 if (!get_aim_dir(&dir)) return FALSE;
1031 else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1033 else msg_print("You breathes plasma.");
1035 damage = MIN(hp / 6, 150);
1036 fire_ball(GF_PLASMA, dir, damage, (plev > 40 ? -3 : -2));
1039 if (!get_aim_dir(&dir)) return FALSE;
1041 else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1043 else msg_print("You breathes force.");
1045 damage = MIN(hp / 6, 200);
1046 fire_ball(GF_FORCE, dir, damage, (plev > 40 ? -3 : -2));
1049 if (!get_aim_dir(&dir)) return FALSE;
1051 else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
1053 else msg_print("You breathes mana.");
1056 damage = MIN(hp / 3, 250);
1057 fire_ball(GF_MANA, dir, damage, (plev > 40 ? -3 : -2));
1060 if (!get_aim_dir(&dir)) return FALSE;
1062 else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£");
1064 else msg_print("You casts a ball of radiation.");
1066 damage = plev * 2 + damroll(10, 6);
1067 fire_ball(GF_NUKE, dir, damage, 2);
1070 if (!get_aim_dir(&dir)) return FALSE;
1072 else msg_print("Êü¼ÍÀÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1074 else msg_print("You breathes toxic waste.");
1077 fire_ball(GF_NUKE, dir, damage, (plev > 40 ? -3 : -2));
1080 if (!get_aim_dir(&dir)) return FALSE;
1082 else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£");
1084 else msg_print("You invokes a raw Logrus.");
1086 damage = plev * 4 + damroll(10, 10);
1087 fire_ball(GF_CHAOS, dir, damage, 4);
1090 if (!get_aim_dir(&dir)) return FALSE;
1092 else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1094 else msg_print("You breathes disintegration.");
1096 damage = MIN(hp / 6, 150);
1097 fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 40 ? -3 : -2));
1100 if (!get_aim_dir(&dir)) return FALSE;
1102 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1104 else msg_print("You casts an acid ball.");
1106 damage = randint(plev * 6) + 15;
1107 fire_ball(GF_ACID, dir, damage, 2);
1110 if (!get_aim_dir(&dir)) return FALSE;
1112 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1114 else msg_print("You casts a lightning ball.");
1116 damage = randint(plev * 3) + 8;
1117 fire_ball(GF_ELEC, dir, damage, 2);
1120 if (!get_aim_dir(&dir)) return FALSE;
1122 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1124 else msg_print("You casts a fire ball.");
1126 damage = randint(plev * 7) + 10;
1127 fire_ball(GF_FIRE, dir, damage, 2);
1130 if (!get_aim_dir(&dir)) return FALSE;
1132 else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1134 else msg_print("You casts a frost ball.");
1136 damage = randint(plev * 3) + 10;
1137 fire_ball(GF_COLD, dir, damage, 2);
1140 if (!get_aim_dir(&dir)) return FALSE;
1142 else msg_print("°½±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1144 else msg_print("You casts a stinking cloud.");
1146 damage = damroll(12,2);
1147 fire_ball(GF_POIS, dir, damage, 2);
1149 case MS_BALL_NETHER:
1150 if (!get_aim_dir(&dir)) return FALSE;
1152 else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1154 else msg_print("You casts a nether ball.");
1156 damage = plev * 2 + 50 + damroll(10, 10);
1157 fire_ball(GF_NETHER, dir, damage, 2);
1160 if (!get_aim_dir(&dir)) return FALSE;
1162 else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£");
1164 else msg_print("You gestures fluidly.");
1166 damage = randint(plev * 4) + 50;
1167 fire_ball(GF_WATER, dir, damage, 4);
1170 if (!get_aim_dir(&dir)) return FALSE;
1172 else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1174 else msg_print("You invokes a mana storm.");
1176 damage = plev * 8 + 50 + damroll(10, 10);
1177 fire_ball(GF_MANA, dir, damage, 4);
1180 if (!get_aim_dir(&dir)) return FALSE;
1182 else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1184 else msg_print("You invokes a darkness storm.");
1186 damage = plev * 8 + 50 + damroll(10, 10);
1187 fire_ball(GF_DARK, dir, damage, 4);
1190 if (!get_aim_dir(&dir)) return FALSE;
1191 fire_ball_hide(GF_DRAIN_MANA, dir, randint(plev)+plev, 0);
1194 if (!get_aim_dir(&dir)) return FALSE;
1195 damage = damroll(7, 7);
1196 fire_ball_hide(GF_MIND_BLAST, dir, damage, 0);
1198 case MS_BRAIN_SMASH:
1199 if (!get_aim_dir(&dir)) return FALSE;
1200 damage = damroll(12, 12);
1201 fire_ball_hide(GF_BRAIN_SMASH, dir, damage, 0);
1204 if (!get_aim_dir(&dir)) return FALSE;
1205 damage = damroll(3, 8);
1206 fire_ball_hide(GF_CAUSE_1, dir, damage, 0);
1209 if (!get_aim_dir(&dir)) return FALSE;
1210 damage = damroll(8, 8);
1211 fire_ball_hide(GF_CAUSE_2, dir, damage, 0);
1214 if (!get_aim_dir(&dir)) return FALSE;
1215 damage = damroll(10, 15);
1216 fire_ball_hide(GF_CAUSE_3, dir, damage, 0);
1219 if (!get_aim_dir(&dir)) return FALSE;
1220 damage = damroll(15, 15);
1221 fire_ball_hide(GF_CAUSE_4, dir, damage, 0);
1224 if (!get_aim_dir(&dir)) return FALSE;
1226 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1228 else msg_print("You casts an acid bolt.");
1230 damage = damroll(7, 8) + plev * 2 / 3;
1231 fire_bolt(GF_ACID, dir, damage);
1234 if (!get_aim_dir(&dir)) return FALSE;
1236 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1238 else msg_print("You casts a lightning bolt.");
1240 damage = damroll(4, 8) + plev * 2 / 3;
1241 fire_bolt(GF_ELEC, dir, damage);
1244 if (!get_aim_dir(&dir)) return FALSE;
1246 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1248 else msg_print("You casts a fire bolt.");
1250 damage = damroll(9, 8) + plev * 2 / 3;
1251 fire_bolt(GF_FIRE, dir, damage);
1254 if (!get_aim_dir(&dir)) return FALSE;
1256 else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1258 else msg_print("You casts a frost bolt.");
1260 damage = damroll(6, 8) + plev * 2 / 3;
1261 fire_bolt(GF_COLD, dir, damage);
1264 if (!get_aim_dir(&dir)) return FALSE;
1267 msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1269 msg_print("You invokes a starburst.");
1271 damage = plev * 8 + 50 + damroll(10, 10);
1272 fire_ball(GF_LITE, dir, damage, 4);
1274 case MS_BOLT_NETHER:
1275 if (!get_aim_dir(&dir)) return FALSE;
1277 else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1279 else msg_print("You casts a nether bolt.");
1281 damage = 30 + damroll(5, 5) + plev * 8 / 3;
1282 fire_bolt(GF_NETHER, dir, damage);
1285 if (!get_aim_dir(&dir)) return FALSE;
1287 else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1289 else msg_print("You casts a water bolt.");
1291 damage = damroll(10, 10) + plev * 2;
1292 fire_bolt(GF_WATER, dir, damage);
1295 if (!get_aim_dir(&dir)) return FALSE;
1297 else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1299 else msg_print("You casts a mana bolt.");
1301 damage = randint(plev * 7) + 50;
1302 fire_bolt(GF_MANA, dir, damage);
1304 case MS_BOLT_PLASMA:
1305 if (!get_aim_dir(&dir)) return FALSE;
1307 else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1309 else msg_print("You casts a plasma bolt.");
1311 damage = 10 + damroll(8, 7) + plev * 2;
1312 fire_bolt(GF_PLASMA, dir, damage);
1315 if (!get_aim_dir(&dir)) return FALSE;
1317 else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1319 else msg_print("You casts a ice bolt.");
1321 damage = damroll(6, 6) + plev * 2;
1322 fire_bolt(GF_ICE, dir, damage);
1324 case MS_MAGIC_MISSILE:
1325 if (!get_aim_dir(&dir)) return FALSE;
1327 else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1329 else msg_print("You casts a magic missile.");
1331 damage = damroll(2, 6) + plev * 2 / 3;
1332 fire_bolt(GF_MISSILE, dir, damage);
1335 if (!get_aim_dir(&dir)) return FALSE;
1337 else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£");
1339 else msg_print("You casts a fearful illusion.");
1341 fear_monster(dir, plev+10);
1344 if (!get_aim_dir(&dir)) return FALSE;
1345 confuse_monster(dir, plev * 2);
1348 if (!get_aim_dir(&dir)) return FALSE;
1350 else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£");
1352 else msg_print("You casts a mesmerizing illusion.");
1354 confuse_monster(dir, plev * 2);
1357 if (!get_aim_dir(&dir)) return FALSE;
1361 if (!get_aim_dir(&dir)) return FALSE;
1365 (void)set_fast(randint(20 + plev) + plev, FALSE);
1369 if (!get_aim_dir(&dir)) return FALSE;
1371 else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª");
1373 else msg_print("You invokes the Hand of Doom!");
1376 fire_ball_hide(GF_HAND_DOOM, dir, plev * 3, 0);
1381 msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£");
1383 msg_print("You concentrates on your wounds!");
1385 (void)hp_player(plev*4);
1391 msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1393 msg_print("You casts a Globe of Invulnerability.");
1395 (void)set_invuln(randint(4) + 4, FALSE);
1398 teleport_player(10);
1401 teleport_player(plev * 5);
1404 world_player = TRUE;
1406 msg_print("¡Ö»þ¤è¡ª¡×");
1408 msg_print("'Time!'");
1412 p_ptr->energy += (randint(200)+1200);
1415 p_ptr->redraw |= (PR_MAP);
1417 /* Update monsters */
1418 p_ptr->update |= (PU_MONSTERS);
1421 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1429 monster_type *m_ptr;
1430 monster_race *r_ptr;
1433 if (!target_set(TARGET_KILL)) return FALSE;
1434 if (!cave[target_row][target_col].m_idx) break;
1435 if (!player_has_los_bold(target_row, target_col)) break;
1436 m_ptr = &m_list[cave[target_row][target_col].m_idx];
1437 r_ptr = &r_info[m_ptr->r_idx];
1438 monster_desc(m_name, m_ptr, 0);
1439 if (r_ptr->flags3 & (RF3_RES_TELE))
1441 if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flags3 & (RF3_RES_ALL)))
1443 r_ptr->r_flags3 |= RF3_RES_TELE;
1445 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", m_name);
1447 msg_format("%s is unaffected!", m_name);
1452 else if (r_ptr->level > randint(100))
1454 r_ptr->r_flags3 |= RF3_RES_TELE;
1456 msg_format("%s¤Ë¤ÏÂÑÀ¤¬¤¢¤ë¡ª", m_name);
1458 msg_format("%s resists!", m_name);
1465 msg_format("%s¤ò°ú¤Ìᤷ¤¿¡£", m_name);
1467 msg_format("You command %s to return.", m_name);
1470 teleport_to_player(cave[target_row][target_col].m_idx, 100);
1474 if (!get_aim_dir(&dir)) return FALSE;
1476 (void)fire_beam(GF_AWAY_ALL, dir, 100);
1480 monster_type *m_ptr;
1481 monster_race *r_ptr;
1484 if (!target_set(TARGET_KILL)) return FALSE;
1485 if (!cave[target_row][target_col].m_idx) break;
1486 if (!los(py, px, target_row, target_col)) break;
1487 m_ptr = &m_list[cave[target_row][target_col].m_idx];
1488 r_ptr = &r_info[m_ptr->r_idx];
1489 monster_desc(m_name, m_ptr, 0);
1491 msg_format("%s¤Î¤ò»Ø¤µ¤·¤¿¡£", m_name);
1493 msg_format("You gestures at %s's feet.", m_name);
1496 if ((r_ptr->flags3 & RF3_RES_TELE) || (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint(50) > plev + randint(60)))
1499 msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
1501 msg_format("%s are unaffected!", m_name);
1505 else if (randint(2) == 1)
1508 msg_format("%s¤Ï¾²¤òÆͤÇˤäÆÄÀ¤ó¤Ç¤¤¤Ã¤¿¡£", m_name);
1510 msg_format("%s sink through the floor.", m_name);
1512 delete_monster_idx(cave[target_row][target_col].m_idx);
1517 msg_format("%s¤ÏÅ·°æ¤òÆͤÇˤäÆÃè¤ØÉ⤤¤Æ¤¤¤Ã¤¿¡£",m_name);
1519 msg_format("%s rise up through the ceiling.", m_name);
1521 delete_monster_idx(cave[target_row][target_col].m_idx);
1526 if (!get_aim_dir(&dir)) return FALSE;
1529 else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£");
1531 else msg_print("You throws a psycho-spear.");
1533 damage = randint(plev * 3) + 100;
1534 (void)fire_beam(GF_PSY_SPEAR, dir, damage);
1538 msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£");
1540 msg_print("You gestures in shadow.");
1542 (void)unlite_area(10, 3);
1545 if (!target_set(TARGET_KILL)) return FALSE;
1547 msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£");
1549 msg_print("You casts a spell and cackles evilly.");
1551 trap_creation(target_row, target_col);
1555 msg_print("¤·¤«¤·²¿¤âµ¯¤¤Ê¤«¤Ã¤¿¡£");
1557 msg_print("Nothing happen.");
1562 msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1564 msg_print("You casts a animate dead.");
1566 (void)animate_dead(0, py, px);
1572 msg_print("±ç·³¤ò¾¤´¤·¤¿¡£");
1574 msg_print("You summons minions.");
1576 for (k = 0;k < 1; k++)
1578 if (summon_kin_player(pet, summon_lev, py, px, FALSE))
1582 msg_print("¾¤´Ô¤µ¤ì¤¿Ãç´Ö¤ÏÅܤäƤ¤¤ë¡ª");
1584 msg_print("Summoned fellows is angry!");
1598 msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª");
1600 msg_print("You summons Cyberdemons!");
1602 for (k = 0 ;k < 1 ; k++)
1603 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_CYBER, FALSE, FALSE, pet, FALSE, not_pet))
1607 msg_print("¾¤´Ô¤µ¤ì¤¿¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1609 msg_print("Summoned Cyberdemons are angry!");
1622 msg_print("Ãç´Ö¤ò¾¤´¤·¤¿¡£");
1624 msg_print("You summons help.");
1626 for (k = 0;k < 1; k++)
1627 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, FALSE, FALSE, pet, FALSE, not_pet))
1631 msg_print("¾¤´Ô¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1633 msg_print("Summoned monster is angry!");
1646 msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤·¤¿¡ª");
1648 msg_print("You summons monsters!");
1650 for (k = 0;k < plev / 15 + 2; k++)
1651 if(summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, FALSE, FALSE, pet, unique_okay, not_pet))
1655 msg_print("¾¤´Ô¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1657 msg_print("Summoned monsters are angry!");
1670 msg_print("¥¢¥ê¤ò¾¤´¤·¤¿¡£");
1672 msg_print("You summons ants.");
1674 for (k = 0;k < 1; k++)
1675 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANT, TRUE, FALSE, pet, FALSE, not_pet))
1679 msg_print("¾¤´Ô¤µ¤ì¤¿¥¢¥ê¤ÏÅܤäƤ¤¤ë¡ª");
1681 msg_print("Summoned ants are angry!");
1694 msg_print("ÃØéá¤ò¾¤´¤·¤¿¡£");
1696 msg_print("You summons spiders.");
1698 for (k = 0;k < 1; k++)
1699 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_SPIDER, TRUE, FALSE, pet, FALSE, not_pet))
1703 msg_print("¾¤´Ô¤µ¤ì¤¿ÃØéá¤ÏÅܤäƤ¤¤ë¡ª");
1705 msg_print("Summoned spiders are angry!");
1718 msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´¤·¤¿¡£");
1720 msg_print("You summons hounds.");
1722 for (k = 0;k < 1; k++)
1723 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HOUND, TRUE, FALSE, pet, FALSE, not_pet))
1727 msg_print("¾¤´Ô¤µ¤ì¤¿¥Ï¥¦¥ó¥É¤ÏÅܤäƤ¤¤ë¡ª");
1729 msg_print("Summoned hounds are angry!");
1742 msg_print("¥Ò¥É¥é¤ò¾¤´¤·¤¿¡£");
1744 msg_print("You summons hydras.");
1746 for (k = 0;k < 1; k++)
1747 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HYDRA, not_pet, FALSE, pet, FALSE, not_pet))
1751 msg_print("¾¤´Ô¤µ¤ì¤¿¥Ò¥É¥é¤ÏÅܤäƤ¤¤ë¡ª");
1753 msg_print("Summoned hydras are angry!");
1766 msg_print("Å·»È¤ò¾¤´¤·¤¿¡ª");
1768 msg_print("You summons angel!");
1770 for (k = 0;k < 1; k++)
1771 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANGEL, not_pet, FALSE, pet, FALSE, not_pet))
1775 msg_print("¾¤´Ô¤µ¤ì¤¿Å·»È¤ÏÅܤäƤ¤¤ë¡ª");
1777 msg_print("Summoned angel is angry!");
1790 msg_print("º®Æ٤εÜÄ¤é°Ëâ¤ò¾¤´¤·¤¿¡ª");
1792 msg_print("You summons a demon from the Courts of Chaos!");
1794 for (k = 0;k < 1; k++)
1795 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DEMON, not_pet, FALSE, pet, FALSE, not_pet))
1799 msg_print("¾¤´Ô¤µ¤ì¤¿¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1801 msg_print("Summoned demon is angry!");
1814 msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´¤·¤¿¡ª");
1816 msg_print("You summons an undead adversary!");
1818 for (k = 0;k < 1; k++)
1819 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNDEAD, not_pet, FALSE, pet, FALSE, not_pet))
1823 msg_print("¾¤´Ô¤µ¤ì¤¿¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1825 msg_print("Summoned undead is angry!");
1838 msg_print("¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1840 msg_print("You summons dragon!");
1842 for (k = 0;k < 1; k++)
1843 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DRAGON, not_pet, FALSE, pet, FALSE, not_pet))
1847 msg_print("¾¤´Ô¤µ¤ì¤¿¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1849 msg_print("Summoned dragon is angry!");
1858 case MS_S_HI_UNDEAD:
1862 msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡ª");
1864 msg_print("You summons greater undead!");
1866 for (k = 0;k < 1; k++)
1867 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, not_pet, FALSE, pet, unique_okay, not_pet))
1871 msg_print("¾¤´Ô¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1873 msg_print("Summoned greater undead is angry!");
1882 case MS_S_HI_DRAGON:
1886 msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1888 msg_print("You summons ancient dragons!");
1890 for (k = 0;k < 1; k++)
1891 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_DRAGON, not_pet, FALSE, pet, unique_okay, not_pet))
1895 msg_print("¾¤´Ô¤µ¤ì¤¿¸ÅÂå¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1897 msg_print("Summoned ancient dragon is angry!");
1910 msg_print("¥¢¥ó¥Ð¡¼¤Î²¦¤ò¾¤´¤·¤¿¡ª");
1912 msg_print("You summons Lords of Amber!");
1914 for (k = 0;k < 1; k++)
1915 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_AMBERITES, not_pet, FALSE, pet, unique_okay, not_pet))
1919 msg_print("¾¤´Ô¤µ¤ì¤¿¥¢¥ó¥Ð¡¼¤Î²¦¤ÏÅܤäƤ¤¤ë¡ª");
1921 msg_print("Summoned Lords of Amber are angry!");
1934 msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´¤·¤¿¡ª");
1936 msg_print("You summons special opponents!");
1938 for (k = 0;k < 1; k++)
1939 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNIQUE, not_pet, FALSE, pet, TRUE, not_pet))
1944 msg_print("¾¤´Ô¤µ¤ì¤¿¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1946 msg_print("Summoned special opponents are angry!");
1949 for (k = count;k < 1; k++)
1950 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, not_pet, FALSE, pet, TRUE, not_pet))
1955 msg_print("¾¤´Ô¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1957 msg_print("Summoned greater undead are angry!");
1972 msg_print("²¿¤â¸½¤ì¤Ê¤«¤Ã¤¿¡£");
1974 msg_print("No one have appeared.");
1983 * do_cmd_cast calls this function if the player's class
1986 bool do_cmd_cast_learned(void)
1991 int plev = p_ptr->lev;
1992 monster_power spell;
1997 /* not if confused */
1998 if (p_ptr->confused)
2001 msg_print("º®Í𤷤Ƥ¤¤Æ¾§¤¨¤é¤ì¤Ê¤¤¡ª");
2003 msg_print("You are too confused!");
2010 if (!get_learned_power(&n)) return FALSE;
2012 spell = monster_powers[n];
2014 shouhimana = spell.smana;
2016 if (p_ptr->dec_mana)
2018 shouhimana = (shouhimana + 1) * 3 / 4;
2021 /* Verify "dangerous" spells */
2022 if (shouhimana > p_ptr->csp)
2026 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
2028 msg_print("You do not have enough mana to use this power.");
2032 if (!over_exert) return FALSE;
2036 if (!get_check("¤½¤ì¤Ç¤âÄ©À路¤Þ¤¹¤«? ")) return FALSE;
2038 if (!get_check("Attempt it anyway? ")) return FALSE;
2043 /* Spell failure chance */
2044 chance = spell.fail;
2046 /* Reduce failure rate by "effective" level adjustment */
2047 if (plev > spell.level) chance -= 3 * (plev - spell.level);
2048 else chance += (spell.level - plev);
2050 if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
2051 if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
2052 if ((p_ptr->pseikaku == SEIKAKU_GAMAN) || (p_ptr->pseikaku == SEIKAKU_CHIKARA)) chance++;
2054 /* Reduce failure rate by INT/WIS adjustment */
2055 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[A_INT]] - 1);
2057 if (p_ptr->heavy_spell) chance += 20;
2058 if(p_ptr->dec_mana && p_ptr->easy_spell) chance-=4;
2059 else if (p_ptr->easy_spell) chance-=3;
2060 else if (p_ptr->dec_mana) chance-=2;
2062 /* Not enough mana to cast */
2063 if (shouhimana > p_ptr->csp)
2065 chance += 5 * (shouhimana - p_ptr->csp);
2068 /* Extract the minimum failure rate */
2069 minfail = adj_mag_fail[p_ptr->stat_ind[A_INT]];
2071 /* Minimum failure rate */
2072 if (chance < minfail) chance = minfail;
2074 /* Stunning makes spells harder */
2075 if (p_ptr->stun > 50) chance += 25;
2076 else if (p_ptr->stun) chance += 15;
2078 /* Always a 5 percent chance of working */
2079 if (chance > 95) chance = 95;
2081 if(p_ptr->dec_mana) chance--;
2082 if (p_ptr->heavy_spell) chance += 5;
2083 chance = MAX(chance,0);
2086 if (rand_int(100) < chance)
2088 if (flush_failure) flush();
2090 msg_print("ËâË¡¤ò¤¦¤Þ¤¯¾§¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
2092 msg_print("You failed to concentrate hard enough!");
2098 /* Cast the spell */
2099 cast = cast_learned_spell(n, FALSE);
2105 /* Cast the spell */
2106 cast = cast_learned_spell(n, TRUE);
2108 if (!cast) return FALSE;
2111 /* Sufficient mana */
2112 if (shouhimana <= p_ptr->csp)
2115 p_ptr->csp -= shouhimana;
2119 int oops = shouhimana;
2123 p_ptr->csp_frac = 0;
2127 msg_print("Àº¿À¤ò½¸Ã椷¤¹¤®¤Æµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
2129 msg_print("You faint from the effort!");
2133 /* Hack -- Bypass free action */
2134 (void)set_paralyzed(p_ptr->paralyzed + randint(5 * oops + 1));
2136 chg_virtue(V_KNOWLEDGE, -10);
2138 /* Damage CON (possibly permanently) */
2139 if (rand_int(100) < 50)
2141 bool perm = (rand_int(100) < 25);
2145 msg_print("ÂΤò°¤¯¤·¤Æ¤·¤Þ¤Ã¤¿¡ª");
2147 msg_print("You have damaged your health!");
2151 /* Reduce constitution */
2152 (void)dec_stat(A_CON, 15 + randint(10), perm);
2160 p_ptr->redraw |= (PR_MANA);
2161 p_ptr->window |= (PW_PLAYER);
2162 p_ptr->window |= (PW_SPELL);
2167 void learn_spell(int monspell)
2169 if (p_ptr->action != ACTION_LEARN) return;
2170 if (p_ptr->magic_num2[monspell]) return;
2171 if (p_ptr->confused || p_ptr->blind || p_ptr->image || p_ptr->stun || p_ptr->paralyzed) return;
2172 if (randint(p_ptr->lev + 70) > monster_powers[monspell].level + 40)
2174 p_ptr->magic_num2[monspell] = 1;
2176 msg_format("%s¤ò³Ø½¬¤·¤¿¡ª", monster_powers[monspell].name);
2178 msg_format("You have learned %s!", monster_powers[monspell].name);
2180 gain_exp(monster_powers[monspell].level * monster_powers[monspell].smana);
2186 p_ptr->redraw |= (PR_STATE);