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 ";
77 sprintf(p, " %s%d+10d10", s_dam, plev * 8 + 50);
82 sprintf(p, " %s%d", s_dam, hp/4);
86 object_type *o_ptr = NULL;
87 if (buki_motteruka(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM];
88 else if (buki_motteruka(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM];
90 sprintf(p, " %s1", s_dam);
92 sprintf(p, " %s%dd%d+%d", s_dam, o_ptr->dd, o_ptr->ds, o_ptr->to_d);
101 sprintf(p, " %s%d", s_dam, hp/3);
104 sprintf(p, " %s%d", s_dam, MIN(hp/3, 250));
107 sprintf(p, " %s%d", s_dam, MIN(hp/3, 150));
110 sprintf(p, " %s%d", s_dam, MIN(hp/3, 200));
113 sprintf(p, " %s%d", s_dam, MIN(hp/3, 250));
124 sprintf(p, " %s%d", s_dam, hp/6);
128 sprintf(p, " %s%d", s_dam, MIN(hp/6, 200));
131 sprintf(p, " %s%d", s_dam, MIN(hp/6, 150));
134 sprintf(p, " %s%d+10d6", s_dam, plev * 2);
137 sprintf(p, " %s%d+10d10", s_dam, plev * 4);
140 sprintf(p, " %s15+d%d", s_dam, plev * 6);
143 sprintf(p, " %s8+d%d", s_dam, plev * 3);
146 sprintf(p, " %s10+d%d", s_dam, plev * 7);
149 sprintf(p, " %s10+d%d", s_dam, plev * 3);
152 sprintf(p, " %s12d2", s_dam);
155 sprintf(p, " %s%d+10d10", s_dam, plev * 2 + 50);
158 sprintf(p, " %s50+d%d", s_dam, plev * 4);
161 sprintf(p, " %sd%d+%d", s_heal, plev, plev);
164 sprintf(p, " %s8d8", s_dam);
167 sprintf(p, " %s12d15", s_dam);
170 sprintf(p, " %s3d8", s_dam);
173 sprintf(p, " %s8d8", s_dam);
176 sprintf(p, " %s10d15", s_dam);
179 sprintf(p, " %s15d15", s_dam);
182 sprintf(p, " %s%d+7d8", s_dam, plev * 2 / 3);
185 sprintf(p, " %s%d+4d8", s_dam, plev * 2 / 3);
188 sprintf(p, " %s%d+9d8", s_dam, plev * 2 / 3);
191 sprintf(p, " %s%d+6d8", s_dam, plev * 2 / 3);
194 sprintf(p, " %s%d+5d5", s_dam, 30 + plev * 8 / 3);
197 sprintf(p, " %s%d+10d10", s_dam, plev * 2);
200 sprintf(p, " %s50+d%d", s_dam, plev * 7);
203 sprintf(p, " %s%d+8d7", s_dam, plev * 2 + 10);
206 sprintf(p, " %s%d+6d6", s_dam, plev * 2);
208 case MS_MAGIC_MISSILE:
209 sprintf(p, " %s%d+2d6", s_dam, plev * 2 / 3);
212 sprintf(p, " %sd%d+%d", s_dur, 20+plev, plev);
215 sprintf(p, " %s%d", s_heal, plev*4);
218 sprintf(p, " %sd7+7", s_dur);
221 sprintf(p, " %s10", s_range);
224 sprintf(p, " %s%d", s_range, plev * 5);
227 sprintf(p, " %s100+d%d", s_dam, plev * 3);
230 sprintf(p, " %s5", s_range);
239 * Allow user to choose a imitation.
241 * If a valid spell is chosen, saves it in '*sn' and returns TRUE
242 * If the user hits escape, returns FALSE, and set '*sn' to -1
243 * If there are no legal choices, returns FALSE, and sets '*sn' to -2
245 * The "prompt" should be "cast", "recite", or "study"
246 * The "known" should be TRUE for cast/pray, FALSE for study
248 * nb: This function has a (trivial) display bug which will be obvious
249 * when you run it. It's probably easy to fix but I haven't tried,
252 static int get_learned_power(int *sn)
259 int plev = p_ptr->lev;
261 int ask = TRUE, mode = 0;
262 int spellnum[MAX_MONSPELLS];
267 s32b f4 = 0, f5 = 0, f6 = 0;
276 int menu_line = (use_menu ? 1 : 0);
278 /* Assume cancelled */
281 /* Nothing chosen yet */
287 #ifdef ALLOW_REPEAT /* TNB */
289 /* Get the spell, if available */
296 #endif /* ALLOW_REPEAT -- TNB */
305 prt(format(" %s ¥Ü¥ë¥È", (menu_line == 1) ? "¡Õ" : " "), 2, 14);
306 prt(format(" %s ¥Ü¡¼¥ë", (menu_line == 2) ? "¡Õ" : " "), 3, 14);
307 prt(format(" %s ¥Ö¥ì¥¹", (menu_line == 3) ? "¡Õ" : " "), 4, 14);
308 prt(format(" %s ¾¤´", (menu_line == 4) ? "¡Õ" : " "), 5, 14);
309 prt(format(" %s ¤½¤Î¾", (menu_line == 5) ? "¡Õ" : " "), 6, 14);
310 prt("¤É¤Î¼ïÎà¤ÎËâË¡¤ò»È¤¤¤Þ¤¹¤«¡©", 0, 0);
312 prt(format(" %s bolt", (menu_line == 1) ? "> " : " "), 2, 14);
313 prt(format(" %s ball", (menu_line == 2) ? "> " : " "), 3, 14);
314 prt(format(" %s breath", (menu_line == 3) ? "> " : " "), 4, 14);
315 prt(format(" %s sommoning", (menu_line == 4) ? "> " : " "), 5, 14);
316 prt(format(" %s others", (menu_line == 5) ? "> " : " "), 6, 14);
317 prt("use which type of magic? ", 0, 0);
343 if (menu_line > 5) menu_line -= 5;
350 sprintf(comment, "[A]¥Ü¥ë¥È, [B]¥Ü¡¼¥ë, [C]¥Ö¥ì¥¹, [D]¾¤´, [E]¤½¤Î¾:");
352 sprintf(comment, "[A] bolt, [B] ball, [C] breath, [D] summoning, [E] others:");
356 if (!get_com(comment, &ch, TRUE))
360 if (ch == 'A' || ch == 'a')
365 if (ch == 'B' || ch == 'b')
370 if (ch == 'C' || ch == 'c')
375 if (ch == 'D' || ch == 'd')
380 if (ch == 'E' || ch == 'e')
390 f4 = ((RF4_BOLT_MASK | RF4_BEAM_MASK) & ~(RF4_ROCKET));
391 f5 = RF5_BOLT_MASK | RF5_BEAM_MASK;
392 f6 = RF6_BOLT_MASK | RF6_BEAM_MASK;
396 f4 = (RF4_BALL_MASK & ~(RF4_BREATH_MASK));
397 f5 = (RF5_BALL_MASK & ~(RF5_BREATH_MASK));
398 f6 = (RF6_BALL_MASK & ~(RF6_BREATH_MASK));
402 f4 = RF4_BREATH_MASK;
403 f5 = RF5_BREATH_MASK;
404 f6 = RF6_BREATH_MASK;
408 f4 = RF4_SUMMON_MASK;
409 f5 = RF5_SUMMON_MASK;
410 f6 = RF6_SUMMON_MASK;
414 f4 = ~(RF4_BOLT_MASK | RF4_BEAM_MASK | RF4_BALL_MASK | RF4_SUMMON_MASK | RF4_INDIRECT_MASK | RF4_RIDING_MASK);
415 f5 = ~(RF5_BOLT_MASK | RF5_BEAM_MASK | RF5_BALL_MASK | RF5_SUMMON_MASK | RF5_INDIRECT_MASK | RF5_RIDING_MASK);
416 f6 = (~(RF6_BOLT_MASK | RF6_BEAM_MASK | RF6_BALL_MASK | RF6_SUMMON_MASK | RF6_INDIRECT_MASK | RF6_RIDING_MASK)) | (RF6_TRAPS | RF6_DARKNESS);
419 for (i = 0, num = 0; i < 32; i++)
421 if ((0x00000001 << i) & f4) spellnum[num++] = i;
425 if ((0x00000001 << (i - 32)) & f5) spellnum[num++] = i;
429 if ((0x00000001 << (i - 64)) & f6) spellnum[num++] = i;
431 for (i = 0; i < num; i++)
433 if (p_ptr->magic_num2[spellnum[i]])
435 if (use_menu) menu_line = i+1;
442 msg_print("¤½¤Î¼ïÎà¤ÎËâË¡¤Ï³Ð¤¨¤Æ¤¤¤Ê¤¤¡ª");
444 msg_print("You don't know any spell of this type.");
449 /* Build a prompt (accept all spells) */
451 (void) strnfmt(out_val, 78, "(%c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò¾§¤¨¤Þ¤¹¤«¡©",
453 (void)strnfmt(out_val, 78, "(%c-%c, *=List, ESC=exit) Use which %s? ",
456 I2A(0), I2A(num - 1), p);
458 if (use_menu) screen_save();
460 /* Get a spell from the user */
462 choice= (always_show_list || use_menu) ? ESCAPE:1 ;
465 if(choice==ESCAPE) choice = ' ';
466 else if( !get_com(out_val, &choice, TRUE) )break;
468 if (use_menu && choice != ' ')
485 menu_line += (num-1);
486 if (menu_line > num) menu_line -= num;
487 } while(!p_ptr->magic_num2[spellnum[menu_line-1]]);
498 if (menu_line > num) menu_line -= num;
499 } while(!p_ptr->magic_num2[spellnum[menu_line-1]]);
508 while(!p_ptr->magic_num2[spellnum[menu_line-1]]) menu_line--;
517 while(!p_ptr->magic_num2[spellnum[menu_line-1]]) menu_line++;
532 if ((choice == ' ') || (choice == '*') || (choice == '?') || (use_menu && ask))
535 if (!redraw || use_menu)
542 /* Save the screen */
543 if (!use_menu) screen_save();
545 /* Display a list of spells */
548 put_str("̾Á°", y, x + 5);
550 put_str("Name", y, x + 5);
554 put_str("MP ¼ºÎ¨ ¸ú²Ì", y, x + 33);
556 put_str("SP Fail Info", y, x + 32);
560 /* Dump the spells */
561 for (i = 0; i < num; i++)
565 prt("", y + i + 1, x);
566 if (!p_ptr->magic_num2[spellnum[i]]) continue;
568 /* Access the spell */
569 spell = monster_powers[spellnum[i]];
573 /* Reduce failure rate by "effective" level adjustment */
574 if (plev > spell.level) chance -= 3 * (plev - spell.level);
575 else chance += (spell.level - plev);
577 if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
578 if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
579 if ((p_ptr->pseikaku == SEIKAKU_GAMAN) || (p_ptr->pseikaku == SEIKAKU_CHIKARA)) chance++;
581 /* Reduce failure rate by INT/WIS adjustment */
582 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[A_INT]] - 1);
584 if (p_ptr->heavy_spell) chance += 20;
585 if(p_ptr->dec_mana || p_ptr->easy_spell) chance-=4;
586 else if (p_ptr->easy_spell) chance-=3;
587 else if (p_ptr->dec_mana) chance-=2;
589 shouhimana = monster_powers[spellnum[i]].smana;
592 shouhimana = (shouhimana + 1) * 3 / 4;
595 /* Not enough mana to cast */
596 if (shouhimana > p_ptr->csp)
598 chance += 5 * (shouhimana - p_ptr->csp);
601 /* Extract the minimum failure rate */
602 minfail = adj_mag_fail[p_ptr->stat_ind[A_INT]];
604 /* Minimum failure rate */
605 if (chance < minfail) chance = minfail;
607 /* Stunning makes spells harder */
608 if (p_ptr->stun > 50) chance += 25;
609 else if (p_ptr->stun) chance += 15;
611 /* Always a 5 percent chance of working */
612 if (chance > 95) chance = 95;
614 if(p_ptr->dec_mana) chance--;
615 if (p_ptr->heavy_spell) chance += 5;
616 chance = MAX(chance,0);
619 learned_info(comment, spellnum[i]);
624 if (i == (menu_line-1)) strcpy(psi_desc, " ¡Õ");
626 if (i == (menu_line-1)) strcpy(psi_desc, " > ");
628 else strcpy(psi_desc, " ");
630 else sprintf(psi_desc, " %c)", I2A(i));
632 /* Dump the spell --(-- */
633 strcat(psi_desc, format(" %-26s %3d %3d%%%s",
634 spell.name, shouhimana,
636 prt(psi_desc, y + i + 1, x);
639 /* Clear the bottom line */
640 if (y < 22) prt("", y + i + 1, x);
649 /* Restore the screen */
660 ask = isupper(choice);
663 if (ask) choice = tolower(choice);
665 /* Extract request */
666 i = (islower(choice) ? A2I(choice) : -1);
669 /* Totally Illegal */
670 if ((i < 0) || (i >= num) || !p_ptr->magic_num2[spellnum[i]])
676 /* Save the spell index */
677 spell = monster_powers[spellnum[i]];
686 (void) strnfmt(tmp_val, 78, "%s¤ÎËâË¡¤ò¾§¤¨¤Þ¤¹¤«¡©", monster_powers[spellnum[i]].name);
688 (void)strnfmt(tmp_val, 78, "Use %s? ", monster_powers[spellnum[i]].name);
692 /* Belay that order */
693 if (!get_check(tmp_val)) continue;
700 /* Restore the screen */
701 if (redraw) screen_load();
707 p_ptr->window |= (PW_SPELL);
713 /* Abort if needed */
714 if (!flag) return (FALSE);
716 /* Save the choice */
719 #ifdef ALLOW_REPEAT /* TNB */
723 #endif /* ALLOW_REPEAT -- TNB */
731 * do_cmd_cast calls this function if the player's class
734 static bool cast_learned_spell(int spell, bool success)
737 int plev = pseudo_plev();
738 int summon_lev = p_ptr->lev * 2 / 3 + randint1(p_ptr->lev/2);
741 bool unique_okay = FALSE;
743 bool not_pet = (bool)(!pet);
744 bool no_trump = FALSE;
746 if (!success || (randint1(50+plev) < plev/10)) unique_okay = TRUE;
753 msg_print("¤«¤ó¹â¤¤¶âÀÚ¤êÀ¼¤ò¤¢¤²¤¿¡£");
755 msg_print("You make a high pitched shriek.");
758 aggravate_monsters(0);
767 if (!target_set(TARGET_KILL)) return FALSE;
768 if (!cave[target_row][target_col].m_idx) break;
769 if (!los(py, px, target_row, target_col)) break;
770 m_ptr = &m_list[cave[target_row][target_col].m_idx];
771 monster_desc(m_name, m_ptr, 0);
776 msg_format("%s¤Ï¤â¤¦ÌµÅ¨¤Ç¤Ï¤Ê¤¤¡£", m_name);
778 msg_format("%^s is no longer invulnerable.", m_name);
780 m_ptr->energy -= 100;
786 msg_format("%s¤Ï¤â¤¦²Ã®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
788 msg_format("%^s is no longer fast.", m_name);
795 msg_format("%s¤Ï¤â¤¦¸ºÂ®¤µ¤ì¤Æ¤¤¤Ê¤¤¡£", m_name);
797 msg_format("%^s is no longer slow.", m_name);
800 p_ptr->redraw |= (PR_HEALTH);
801 if (p_ptr->riding == cave[target_row][target_col].m_idx) p_ptr->redraw |= (PR_UHEALTH);
806 if (!get_aim_dir(&dir)) return FALSE;
809 msg_print("¥í¥±¥Ã¥È¤òȯ¼Í¤·¤¿¡£");
811 msg_print("You fire a rocket.");
814 fire_rocket(GF_ROCKET, dir, damage, 2);
818 object_type *o_ptr = NULL;
820 if (!get_aim_dir(&dir)) return FALSE;
824 msg_print("Ìð¤òÊü¤Ã¤¿¡£");
826 msg_print("You fire an arrow.");
828 if (buki_motteruka(INVEN_RARM)) o_ptr = &inventory[INVEN_RARM];
829 else if (buki_motteruka(INVEN_LARM)) o_ptr = &inventory[INVEN_LARM];
834 damage = damroll(o_ptr->dd, o_ptr->ds)+ o_ptr->to_d;
835 if (damage < 1) damage = 1;
837 fire_bolt(GF_ARROW, dir, damage);
848 if (!get_aim_dir(&dir)) return FALSE;
850 else msg_print("»À¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
852 else msg_print("You breathe acid.");
855 fire_ball(GF_ACID, dir, damage, (plev > 40 ? -3 : -2));
858 if (!get_aim_dir(&dir)) return FALSE;
860 else msg_print("°ðºÊ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
862 else msg_print("You breathe lightning.");
865 fire_ball(GF_ELEC, dir, damage, (plev > 40 ? -3 : -2));
868 if (!get_aim_dir(&dir)) return FALSE;
870 else msg_print("²Ð±ê¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
872 else msg_print("You breathe fire.");
875 fire_ball(GF_FIRE, dir, damage, (plev > 40 ? -3 : -2));
878 if (!get_aim_dir(&dir)) return FALSE;
880 else msg_print("Î䵤¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
882 else msg_print("You breathe frost.");
885 fire_ball(GF_COLD, dir, damage, (plev > 40 ? -3 : -2));
888 if (!get_aim_dir(&dir)) return FALSE;
890 else msg_print("¥¬¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
892 else msg_print("You breathe gas.");
895 fire_ball(GF_POIS, dir, damage, (plev > 40 ? -3 : -2));
898 if (!get_aim_dir(&dir)) return FALSE;
900 else msg_print("ÃϹö¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
902 else msg_print("You breathe nether.");
905 fire_ball(GF_NETHER, dir, damage, (plev > 40 ? -3 : -2));
908 if (!get_aim_dir(&dir)) return FALSE;
910 else msg_print("Á®¸÷¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
912 else msg_print("You breathe light.");
915 fire_ball(GF_LITE, dir, damage, (plev > 40 ? -3 : -2));
918 if (!get_aim_dir(&dir)) return FALSE;
920 else msg_print("°Å¹õ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
922 else msg_print("You breathe darkness.");
925 fire_ball(GF_DARK, dir, damage, (plev > 40 ? -3 : -2));
928 if (!get_aim_dir(&dir)) return FALSE;
930 else msg_print("º®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
932 else msg_print("You breathe confusion.");
935 fire_ball(GF_CONFUSION, dir, damage, (plev > 40 ? -3 : -2));
938 if (!get_aim_dir(&dir)) return FALSE;
940 else msg_print("¹ì²»¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
942 else msg_print("You breathe sound.");
945 fire_ball(GF_SOUND, dir, damage, (plev > 40 ? -3 : -2));
948 if (!get_aim_dir(&dir)) return FALSE;
950 else msg_print("¥«¥ª¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
952 else msg_print("You breathe chaos.");
955 fire_ball(GF_CHAOS, dir, damage, (plev > 40 ? -3 : -2));
958 if (!get_aim_dir(&dir)) return FALSE;
960 else msg_print("Îô²½¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
962 else msg_print("You breathe disenchantment.");
965 fire_ball(GF_DISENCHANT, dir, damage, (plev > 40 ? -3 : -2));
968 if (!get_aim_dir(&dir)) return FALSE;
970 else msg_print("°ø²Ìº®Íð¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
972 else msg_print("You breathe nexus.");
974 damage = MIN(hp / 3, 250);
975 fire_ball(GF_NEXUS, dir, damage, (plev > 40 ? -3 : -2));
978 if (!get_aim_dir(&dir)) return FALSE;
980 else msg_print("»þ´ÖµÕž¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
982 else msg_print("You breathe time.");
984 damage = MIN(hp / 3, 150);
985 fire_ball(GF_TIME, dir, damage, (plev > 40 ? -3 : -2));
988 if (!get_aim_dir(&dir)) return FALSE;
990 else msg_print("ÃÙÆߤΥ֥쥹¤òÅǤ¤¤¿¡£");
992 else msg_print("You breathe inertia.");
994 damage = MIN(hp / 6, 200);
995 fire_ball(GF_INERTIA, dir, damage, (plev > 40 ? -3 : -2));
998 if (!get_aim_dir(&dir)) return FALSE;
1000 else msg_print("½ÅÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
1002 else msg_print("You breathe gravity.");
1004 damage = MIN(hp / 3, 200);
1005 fire_ball(GF_GRAVITY, dir, damage, (plev > 40 ? -3 : -2));
1008 if (!get_aim_dir(&dir)) return FALSE;
1010 else msg_print("ÇËÊҤΥ֥쥹¤òÅǤ¤¤¿¡£");
1012 else msg_print("You breathe shards.");
1015 fire_ball(GF_SHARDS, dir, damage, (plev > 40 ? -3 : -2));
1018 if (!get_aim_dir(&dir)) return FALSE;
1020 else msg_print("¥×¥é¥º¥Þ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1022 else msg_print("You breathe plasma.");
1024 damage = MIN(hp / 6, 150);
1025 fire_ball(GF_PLASMA, dir, damage, (plev > 40 ? -3 : -2));
1028 if (!get_aim_dir(&dir)) return FALSE;
1030 else msg_print("¥Õ¥©¡¼¥¹¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1032 else msg_print("You breathe force.");
1034 damage = MIN(hp / 6, 200);
1035 fire_ball(GF_FORCE, dir, damage, (plev > 40 ? -3 : -2));
1038 if (!get_aim_dir(&dir)) return FALSE;
1040 else msg_print("ËâÎϤΥ֥쥹¤òÅǤ¤¤¿¡£");
1042 else msg_print("You breathe mana.");
1045 damage = MIN(hp / 3, 250);
1046 fire_ball(GF_MANA, dir, damage, (plev > 40 ? -3 : -2));
1049 if (!get_aim_dir(&dir)) return FALSE;
1051 else msg_print("Êü¼Íǽµå¤òÊü¤Ã¤¿¡£");
1053 else msg_print("You cast a ball of radiation.");
1055 damage = plev * 2 + damroll(10, 6);
1056 fire_ball(GF_NUKE, dir, damage, 2);
1059 if (!get_aim_dir(&dir)) return FALSE;
1061 else msg_print("Êü¼ÍÀÇÑ´þʪ¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1063 else msg_print("You breathe toxic waste.");
1066 fire_ball(GF_NUKE, dir, damage, (plev > 40 ? -3 : -2));
1069 if (!get_aim_dir(&dir)) return FALSE;
1071 else msg_print("½ã¥í¥°¥ë¥¹¤òÊü¤Ã¤¿¡£");
1073 else msg_print("You invoke a raw Logrus.");
1075 damage = plev * 4 + damroll(10, 10);
1076 fire_ball(GF_CHAOS, dir, damage, 4);
1079 if (!get_aim_dir(&dir)) return FALSE;
1081 else msg_print("ʬ²ò¤Î¥Ö¥ì¥¹¤òÅǤ¤¤¿¡£");
1083 else msg_print("You breathe disintegration.");
1085 damage = MIN(hp / 6, 150);
1086 fire_ball(GF_DISINTEGRATE, dir, damage, (plev > 40 ? -3 : -2));
1089 if (!get_aim_dir(&dir)) return FALSE;
1091 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1093 else msg_print("You cast an acid ball.");
1095 damage = randint1(plev * 6) + 15;
1096 fire_ball(GF_ACID, dir, damage, 2);
1099 if (!get_aim_dir(&dir)) return FALSE;
1101 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1103 else msg_print("You cast a lightning ball.");
1105 damage = randint1(plev * 3) + 8;
1106 fire_ball(GF_ELEC, dir, damage, 2);
1109 if (!get_aim_dir(&dir)) return FALSE;
1111 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1113 else msg_print("You cast a fire ball.");
1115 damage = randint1(plev * 7) + 10;
1116 fire_ball(GF_FIRE, dir, damage, 2);
1119 if (!get_aim_dir(&dir)) return FALSE;
1121 else msg_print("¥¢¥¤¥¹¡¦¥Ü¡¼¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1123 else msg_print("You cast a frost ball.");
1125 damage = randint1(plev * 3) + 10;
1126 fire_ball(GF_COLD, dir, damage, 2);
1129 if (!get_aim_dir(&dir)) return FALSE;
1131 else msg_print("°½±À¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1133 else msg_print("You cast a stinking cloud.");
1135 damage = damroll(12,2);
1136 fire_ball(GF_POIS, dir, damage, 2);
1138 case MS_BALL_NETHER:
1139 if (!get_aim_dir(&dir)) return FALSE;
1141 else msg_print("ÃϹöµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1143 else msg_print("You cast a nether ball.");
1145 damage = plev * 2 + 50 + damroll(10, 10);
1146 fire_ball(GF_NETHER, dir, damage, 2);
1149 if (!get_aim_dir(&dir)) return FALSE;
1151 else msg_print("ή¤ì¤ë¤è¤¦¤Ê¿È¿¶¤ê¤ò¤·¤¿¡£");
1153 else msg_print("You gesture fluidly.");
1155 damage = randint1(plev * 4) + 50;
1156 fire_ball(GF_WATER, dir, damage, 4);
1159 if (!get_aim_dir(&dir)) return FALSE;
1161 else msg_print("ËâÎϤÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1163 else msg_print("You invoke a mana storm.");
1165 damage = plev * 8 + 50 + damroll(10, 10);
1166 fire_ball(GF_MANA, dir, damage, 4);
1169 if (!get_aim_dir(&dir)) return FALSE;
1171 else msg_print("°Å¹õ¤ÎÍò¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1173 else msg_print("You invoke a darkness storm.");
1175 damage = plev * 8 + 50 + damroll(10, 10);
1176 fire_ball(GF_DARK, dir, damage, 4);
1179 if (!get_aim_dir(&dir)) return FALSE;
1180 fire_ball_hide(GF_DRAIN_MANA, dir, randint1(plev)+plev, 0);
1183 if (!get_aim_dir(&dir)) return FALSE;
1184 damage = damroll(7, 7);
1185 fire_ball_hide(GF_MIND_BLAST, dir, damage, 0);
1187 case MS_BRAIN_SMASH:
1188 if (!get_aim_dir(&dir)) return FALSE;
1189 damage = damroll(12, 12);
1190 fire_ball_hide(GF_BRAIN_SMASH, dir, damage, 0);
1193 if (!get_aim_dir(&dir)) return FALSE;
1194 damage = damroll(3, 8);
1195 fire_ball_hide(GF_CAUSE_1, dir, damage, 0);
1198 if (!get_aim_dir(&dir)) return FALSE;
1199 damage = damroll(8, 8);
1200 fire_ball_hide(GF_CAUSE_2, dir, damage, 0);
1203 if (!get_aim_dir(&dir)) return FALSE;
1204 damage = damroll(10, 15);
1205 fire_ball_hide(GF_CAUSE_3, dir, damage, 0);
1208 if (!get_aim_dir(&dir)) return FALSE;
1209 damage = damroll(15, 15);
1210 fire_ball_hide(GF_CAUSE_4, dir, damage, 0);
1213 if (!get_aim_dir(&dir)) return FALSE;
1215 else msg_print("¥¢¥·¥Ã¥É¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1217 else msg_print("You cast an acid bolt.");
1219 damage = damroll(7, 8) + plev * 2 / 3;
1220 fire_bolt(GF_ACID, dir, damage);
1223 if (!get_aim_dir(&dir)) return FALSE;
1225 else msg_print("¥µ¥ó¥À¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1227 else msg_print("You cast a lightning bolt.");
1229 damage = damroll(4, 8) + plev * 2 / 3;
1230 fire_bolt(GF_ELEC, dir, damage);
1233 if (!get_aim_dir(&dir)) return FALSE;
1235 else msg_print("¥Õ¥¡¥¤¥¢¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1237 else msg_print("You cast a fire bolt.");
1239 damage = damroll(9, 8) + plev * 2 / 3;
1240 fire_bolt(GF_FIRE, dir, damage);
1243 if (!get_aim_dir(&dir)) return FALSE;
1245 else msg_print("¥¢¥¤¥¹¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1247 else msg_print("You cast a frost bolt.");
1249 damage = damroll(6, 8) + plev * 2 / 3;
1250 fire_bolt(GF_COLD, dir, damage);
1253 if (!get_aim_dir(&dir)) return FALSE;
1256 msg_print("¥¹¥¿¡¼¥Ð¡¼¥¹¥È¤Î¼öʸ¤òÇ°¤¸¤¿¡£");
1258 msg_print("You invoke a starburst.");
1260 damage = plev * 8 + 50 + damroll(10, 10);
1261 fire_ball(GF_LITE, dir, damage, 4);
1263 case MS_BOLT_NETHER:
1264 if (!get_aim_dir(&dir)) return FALSE;
1266 else msg_print("ÃϹö¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1268 else msg_print("You cast a nether bolt.");
1270 damage = 30 + damroll(5, 5) + plev * 8 / 3;
1271 fire_bolt(GF_NETHER, dir, damage);
1274 if (!get_aim_dir(&dir)) return FALSE;
1276 else msg_print("¥¦¥©¡¼¥¿¡¼¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1278 else msg_print("You cast a water bolt.");
1280 damage = damroll(10, 10) + plev * 2;
1281 fire_bolt(GF_WATER, dir, damage);
1284 if (!get_aim_dir(&dir)) return FALSE;
1286 else msg_print("ËâÎϤÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1288 else msg_print("You cast a mana bolt.");
1290 damage = randint1(plev * 7) + 50;
1291 fire_bolt(GF_MANA, dir, damage);
1293 case MS_BOLT_PLASMA:
1294 if (!get_aim_dir(&dir)) return FALSE;
1296 else msg_print("¥×¥é¥º¥Þ¡¦¥Ü¥ë¥È¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1298 else msg_print("You cast a plasma bolt.");
1300 damage = 10 + damroll(8, 7) + plev * 2;
1301 fire_bolt(GF_PLASMA, dir, damage);
1304 if (!get_aim_dir(&dir)) return FALSE;
1306 else msg_print("¶Ë´¨¤ÎÌð¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1308 else msg_print("You cast a ice bolt.");
1310 damage = damroll(6, 6) + plev * 2;
1311 fire_bolt(GF_ICE, dir, damage);
1313 case MS_MAGIC_MISSILE:
1314 if (!get_aim_dir(&dir)) return FALSE;
1316 else msg_print("¥Þ¥¸¥Ã¥¯¡¦¥ß¥µ¥¤¥ë¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1318 else msg_print("You cast a magic missile.");
1320 damage = damroll(2, 6) + plev * 2 / 3;
1321 fire_bolt(GF_MISSILE, dir, damage);
1324 if (!get_aim_dir(&dir)) return FALSE;
1326 else msg_print("¶²¤í¤·¤²¤Ê¸¸³Ð¤òºî¤ê½Ð¤·¤¿¡£");
1328 else msg_print("You cast a fearful illusion.");
1330 fear_monster(dir, plev+10);
1333 if (!get_aim_dir(&dir)) return FALSE;
1334 confuse_monster(dir, plev * 2);
1337 if (!get_aim_dir(&dir)) return FALSE;
1339 else msg_print("ͶÏÇŪ¤Ê¸¸³Ð¤ò¤Ä¤¯¤ê½Ð¤·¤¿¡£");
1341 else msg_print("You cast a mesmerizing illusion.");
1343 confuse_monster(dir, plev * 2);
1346 if (!get_aim_dir(&dir)) return FALSE;
1350 if (!get_aim_dir(&dir)) return FALSE;
1354 (void)set_fast(randint1(20 + plev) + plev, FALSE);
1358 if (!get_aim_dir(&dir)) return FALSE;
1360 else msg_print("<ÇËÌǤμê>¤òÊü¤Ã¤¿¡ª");
1362 else msg_print("You invoke the Hand of Doom!");
1365 fire_ball_hide(GF_HAND_DOOM, dir, plev * 3, 0);
1370 msg_print("¼«Ê¬¤Î½ý¤ËÇ°¤ò½¸Ã椷¤¿¡£");
1372 msg_print("You concentrate on your wounds!");
1374 (void)hp_player(plev*4);
1380 msg_print("̵½ý¤Îµå¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1382 msg_print("You cast a Globe of Invulnerability.");
1384 (void)set_invuln(randint1(4) + 4, FALSE);
1387 teleport_player(10);
1390 teleport_player(plev * 5);
1393 world_player = TRUE;
1395 msg_print("¡Ö»þ¤è¡ª¡×");
1397 msg_print("'Time!'");
1401 p_ptr->energy += (randint1(200)+1200);
1404 p_ptr->redraw |= (PR_MAP);
1406 /* Update monsters */
1407 p_ptr->update |= (PU_MONSTERS);
1410 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
1418 monster_type *m_ptr;
1419 monster_race *r_ptr;
1422 if (!target_set(TARGET_KILL)) return FALSE;
1423 if (!cave[target_row][target_col].m_idx) break;
1424 if (!player_has_los_bold(target_row, target_col)) break;
1425 m_ptr = &m_list[cave[target_row][target_col].m_idx];
1426 r_ptr = &r_info[m_ptr->r_idx];
1427 monster_desc(m_name, m_ptr, 0);
1428 if (r_ptr->flags3 & (RF3_RES_TELE))
1430 if ((r_ptr->flags1 & (RF1_UNIQUE)) || (r_ptr->flags3 & (RF3_RES_ALL)))
1432 r_ptr->r_flags3 |= RF3_RES_TELE;
1434 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª", m_name);
1436 msg_format("%s is unaffected!", m_name);
1441 else if (r_ptr->level > randint1(100))
1443 r_ptr->r_flags3 |= RF3_RES_TELE;
1445 msg_format("%s¤Ë¤ÏÂÑÀ¤¬¤¢¤ë¡ª", m_name);
1447 msg_format("%s resists!", m_name);
1454 msg_format("%s¤ò°ú¤Ìᤷ¤¿¡£", m_name);
1456 msg_format("You command %s to return.", m_name);
1459 teleport_to_player(cave[target_row][target_col].m_idx, 100);
1463 if (!get_aim_dir(&dir)) return FALSE;
1465 (void)fire_beam(GF_AWAY_ALL, dir, 100);
1469 monster_type *m_ptr;
1470 monster_race *r_ptr;
1473 if (!target_set(TARGET_KILL)) return FALSE;
1474 if (!cave[target_row][target_col].m_idx) break;
1475 if (!los(py, px, target_row, target_col)) break;
1476 m_ptr = &m_list[cave[target_row][target_col].m_idx];
1477 r_ptr = &r_info[m_ptr->r_idx];
1478 monster_desc(m_name, m_ptr, 0);
1480 msg_format("%s¤Î¤ò»Ø¤µ¤·¤¿¡£", m_name);
1482 msg_format("You gesture at %s's feet.", m_name);
1485 if ((r_ptr->flags3 & RF3_RES_TELE) || (r_ptr->flags1 & RF1_QUESTOR) || (r_ptr->level + randint1(50) > plev + randint1(60)))
1488 msg_print("¤·¤«¤·¸ú²Ì¤¬¤Ê¤«¤Ã¤¿¡ª");
1490 msg_format("%s are unaffected!", m_name);
1494 else if (one_in_(2))
1497 msg_format("%s¤Ï¾²¤òÆͤÇˤäÆÄÀ¤ó¤Ç¤¤¤Ã¤¿¡£", m_name);
1499 msg_format("%s sinks through the floor.", m_name);
1501 delete_monster_idx(cave[target_row][target_col].m_idx);
1506 msg_format("%s¤ÏÅ·°æ¤òÆͤÇˤäÆÃè¤ØÉ⤤¤Æ¤¤¤Ã¤¿¡£",m_name);
1508 msg_format("%s rises up through the ceiling.", m_name);
1510 delete_monster_idx(cave[target_row][target_col].m_idx);
1515 if (!get_aim_dir(&dir)) return FALSE;
1518 else msg_print("¸÷¤Î·õ¤òÊü¤Ã¤¿¡£");
1520 else msg_print("You throw a psycho-spear.");
1522 damage = randint1(plev * 3) + 100;
1523 (void)fire_beam(GF_PSY_SPEAR, dir, damage);
1527 msg_print("°Å°Ç¤ÎÃæ¤Ç¼ê¤ò¿¶¤Ã¤¿¡£");
1529 msg_print("You gesture in shadow.");
1531 (void)unlite_area(10, 3);
1534 if (!target_set(TARGET_KILL)) return FALSE;
1536 msg_print("¼öʸ¤ò¾§¤¨¤Æ¼Ù°¤ËÈù¾Ð¤ó¤À¡£");
1538 msg_print("You cast a spell and cackle evilly.");
1540 trap_creation(target_row, target_col);
1544 msg_print("¤·¤«¤·²¿¤âµ¯¤¤Ê¤«¤Ã¤¿¡£");
1546 msg_print("Nothing happen.");
1551 msg_print("»à¼ÔÉü³è¤Î¼öʸ¤ò¾§¤¨¤¿¡£");
1553 msg_print("You cast a animate dead.");
1555 (void)animate_dead(0, py, px);
1561 msg_print("±ç·³¤ò¾¤´¤·¤¿¡£");
1563 msg_print("You summon minions.");
1565 for (k = 0;k < 1; k++)
1567 if (summon_kin_player(pet, summon_lev, py, px, FALSE))
1571 msg_print("¾¤´Ô¤µ¤ì¤¿Ãç´Ö¤ÏÅܤäƤ¤¤ë¡ª");
1573 msg_print("Summoned fellows are angry!");
1587 msg_print("¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ò¾¤´¤·¤¿¡ª");
1589 msg_print("You summon a Cyberdemon!");
1591 for (k = 0 ;k < 1 ; k++)
1592 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_CYBER, FALSE, FALSE, pet, FALSE, not_pet))
1596 msg_print("¾¤´Ô¤µ¤ì¤¿¥µ¥¤¥Ð¡¼¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1598 msg_print("The summoned Cyberdemon are angry!");
1611 msg_print("Ãç´Ö¤ò¾¤´¤·¤¿¡£");
1613 msg_print("You summon help.");
1615 for (k = 0;k < 1; k++)
1616 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, FALSE, FALSE, pet, FALSE, not_pet))
1620 msg_print("¾¤´Ô¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1622 msg_print("The summoned monster is angry!");
1635 msg_print("¥â¥ó¥¹¥¿¡¼¤ò¾¤´¤·¤¿¡ª");
1637 msg_print("You summon monsters!");
1639 for (k = 0;k < plev / 15 + 2; k++)
1640 if(summon_specific((pet ? -1 : 0), py, px, summon_lev, 0, FALSE, FALSE, pet, unique_okay, not_pet))
1644 msg_print("¾¤´Ô¤µ¤ì¤¿¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1646 msg_print("Summoned monsters are angry!");
1659 msg_print("¥¢¥ê¤ò¾¤´¤·¤¿¡£");
1661 msg_print("You summon ants.");
1663 for (k = 0;k < 1; k++)
1664 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANT, TRUE, FALSE, pet, FALSE, not_pet))
1668 msg_print("¾¤´Ô¤µ¤ì¤¿¥¢¥ê¤ÏÅܤäƤ¤¤ë¡ª");
1670 msg_print("Summoned ants are angry!");
1683 msg_print("ÃØéá¤ò¾¤´¤·¤¿¡£");
1685 msg_print("You summon spiders.");
1687 for (k = 0;k < 1; k++)
1688 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_SPIDER, TRUE, FALSE, pet, FALSE, not_pet))
1692 msg_print("¾¤´Ô¤µ¤ì¤¿ÃØéá¤ÏÅܤäƤ¤¤ë¡ª");
1694 msg_print("Summoned spiders are angry!");
1707 msg_print("¥Ï¥¦¥ó¥É¤ò¾¤´¤·¤¿¡£");
1709 msg_print("You summon hounds.");
1711 for (k = 0;k < 1; k++)
1712 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HOUND, TRUE, FALSE, pet, FALSE, not_pet))
1716 msg_print("¾¤´Ô¤µ¤ì¤¿¥Ï¥¦¥ó¥É¤ÏÅܤäƤ¤¤ë¡ª");
1718 msg_print("Summoned hounds are angry!");
1731 msg_print("¥Ò¥É¥é¤ò¾¤´¤·¤¿¡£");
1733 msg_print("You summon a hydras.");
1735 for (k = 0;k < 1; k++)
1736 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HYDRA, not_pet, FALSE, pet, FALSE, not_pet))
1740 msg_print("¾¤´Ô¤µ¤ì¤¿¥Ò¥É¥é¤ÏÅܤäƤ¤¤ë¡ª");
1742 msg_print("Summoned hydras are angry!");
1755 msg_print("Å·»È¤ò¾¤´¤·¤¿¡ª");
1757 msg_print("You summon an angel!");
1759 for (k = 0;k < 1; k++)
1760 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_ANGEL, not_pet, FALSE, pet, FALSE, not_pet))
1764 msg_print("¾¤´Ô¤µ¤ì¤¿Å·»È¤ÏÅܤäƤ¤¤ë¡ª");
1766 msg_print("Summoned angels are angry!");
1779 msg_print("º®Æ٤εÜÄ¤é°Ëâ¤ò¾¤´¤·¤¿¡ª");
1781 msg_print("You summon a demon from the Courts of Chaos!");
1783 for (k = 0;k < 1; k++)
1784 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DEMON, not_pet, FALSE, pet, FALSE, not_pet))
1788 msg_print("¾¤´Ô¤µ¤ì¤¿¥Ç¡¼¥â¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1790 msg_print("Summoned demons are angry!");
1803 msg_print("¥¢¥ó¥Ç¥Ã¥É¤Î¶¯Å¨¤ò¾¤´¤·¤¿¡ª");
1805 msg_print("You summon an undead adversary!");
1807 for (k = 0;k < 1; k++)
1808 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNDEAD, not_pet, FALSE, pet, FALSE, not_pet))
1812 msg_print("¾¤´Ô¤µ¤ì¤¿¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1814 msg_print("Summoned undeads are angry!");
1827 msg_print("¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1829 msg_print("You summon a dragon!");
1831 for (k = 0;k < 1; k++)
1832 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_DRAGON, not_pet, FALSE, pet, FALSE, not_pet))
1836 msg_print("¾¤´Ô¤µ¤ì¤¿¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1838 msg_print("Summoned dragons are angry!");
1847 case MS_S_HI_UNDEAD:
1851 msg_print("¶¯ÎϤʥ¢¥ó¥Ç¥Ã¥É¤ò¾¤´¤·¤¿¡ª");
1853 msg_print("You summon a greater undead!");
1855 for (k = 0;k < 1; k++)
1856 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, not_pet, FALSE, pet, unique_okay, not_pet))
1860 msg_print("¾¤´Ô¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1862 msg_print("Summoned greater undeads are angry!");
1871 case MS_S_HI_DRAGON:
1875 msg_print("¸ÅÂå¥É¥é¥´¥ó¤ò¾¤´¤·¤¿¡ª");
1877 msg_print("You summon an ancient dragon!");
1879 for (k = 0;k < 1; k++)
1880 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_DRAGON, not_pet, FALSE, pet, unique_okay, not_pet))
1884 msg_print("¾¤´Ô¤µ¤ì¤¿¸ÅÂå¥É¥é¥´¥ó¤ÏÅܤäƤ¤¤ë¡ª");
1886 msg_print("Summoned ancient dragons are angry!");
1899 msg_print("¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ò¾¤´¤·¤¿¡ª");
1901 msg_print("You summon a Lord of Amber!");
1903 for (k = 0;k < 1; k++)
1904 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_AMBERITES, not_pet, FALSE, pet, unique_okay, not_pet))
1908 msg_print("¾¤´Ô¤µ¤ì¤¿¥¢¥ó¥Ð¡¼¤Î²¦Â²¤ÏÅܤäƤ¤¤ë¡ª");
1910 msg_print("Summoned Lords of Amber are angry!");
1923 msg_print("ÆÃÊ̤ʶ¯Å¨¤ò¾¤´¤·¤¿¡ª");
1925 msg_print("You summon a special opponent!");
1927 for (k = 0;k < 1; k++)
1928 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_UNIQUE, not_pet, FALSE, pet, TRUE, not_pet))
1933 msg_print("¾¤´Ô¤µ¤ì¤¿¥æ¥Ë¡¼¥¯¡¦¥â¥ó¥¹¥¿¡¼¤ÏÅܤäƤ¤¤ë¡ª");
1935 msg_print("Summoned special opponents are angry!");
1938 for (k = count;k < 1; k++)
1939 if (summon_specific((pet ? -1 : 0), py, px, summon_lev, SUMMON_HI_UNDEAD, not_pet, FALSE, pet, TRUE, not_pet))
1944 msg_print("¾¤´Ô¤µ¤ì¤¿¾åµé¥¢¥ó¥Ç¥Ã¥É¤ÏÅܤäƤ¤¤ë¡ª");
1946 msg_print("Summoned greater undeads are angry!");
1961 msg_print("²¿¤â¸½¤ì¤Ê¤«¤Ã¤¿¡£");
1963 msg_print("No one have appeared.");
1972 * do_cmd_cast calls this function if the player's class
1975 bool do_cmd_cast_learned(void)
1980 int plev = p_ptr->lev;
1981 monster_power spell;
1986 /* not if confused */
1987 if (p_ptr->confused)
1990 msg_print("º®Í𤷤Ƥ¤¤Æ¾§¤¨¤é¤ì¤Ê¤¤¡ª");
1992 msg_print("You are too confused!");
1999 if (!get_learned_power(&n)) return FALSE;
2001 spell = monster_powers[n];
2003 shouhimana = spell.smana;
2005 if (p_ptr->dec_mana)
2007 shouhimana = (shouhimana + 1) * 3 / 4;
2010 /* Verify "dangerous" spells */
2011 if (shouhimana > p_ptr->csp)
2015 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
2017 msg_print("You do not have enough mana to use this power.");
2021 if (!over_exert) return FALSE;
2025 if (!get_check("¤½¤ì¤Ç¤âÄ©À路¤Þ¤¹¤«? ")) return FALSE;
2027 if (!get_check("Attempt it anyway? ")) return FALSE;
2032 /* Spell failure chance */
2033 chance = spell.fail;
2035 /* Reduce failure rate by "effective" level adjustment */
2036 if (plev > spell.level) chance -= 3 * (plev - spell.level);
2037 else chance += (spell.level - plev);
2039 if (p_ptr->pseikaku == SEIKAKU_NAMAKE) chance += 10;
2040 if (p_ptr->pseikaku == SEIKAKU_KIREMONO) chance -= 3;
2041 if ((p_ptr->pseikaku == SEIKAKU_GAMAN) || (p_ptr->pseikaku == SEIKAKU_CHIKARA)) chance++;
2043 /* Reduce failure rate by INT/WIS adjustment */
2044 chance -= 3 * (adj_mag_stat[p_ptr->stat_ind[A_INT]] - 1);
2046 if (p_ptr->heavy_spell) chance += 20;
2047 if(p_ptr->dec_mana && p_ptr->easy_spell) chance-=4;
2048 else if (p_ptr->easy_spell) chance-=3;
2049 else if (p_ptr->dec_mana) chance-=2;
2051 /* Not enough mana to cast */
2052 if (shouhimana > p_ptr->csp)
2054 chance += 5 * (shouhimana - p_ptr->csp);
2057 /* Extract the minimum failure rate */
2058 minfail = adj_mag_fail[p_ptr->stat_ind[A_INT]];
2060 /* Minimum failure rate */
2061 if (chance < minfail) chance = minfail;
2063 /* Stunning makes spells harder */
2064 if (p_ptr->stun > 50) chance += 25;
2065 else if (p_ptr->stun) chance += 15;
2067 /* Always a 5 percent chance of working */
2068 if (chance > 95) chance = 95;
2070 if(p_ptr->dec_mana) chance--;
2071 if (p_ptr->heavy_spell) chance += 5;
2072 chance = MAX(chance,0);
2075 if (randint0(100) < chance)
2077 if (flush_failure) flush();
2079 msg_print("ËâË¡¤ò¤¦¤Þ¤¯¾§¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
2081 msg_print("You failed to concentrate hard enough!");
2087 /* Cast the spell */
2088 cast = cast_learned_spell(n, FALSE);
2094 /* Cast the spell */
2095 cast = cast_learned_spell(n, TRUE);
2097 if (!cast) return FALSE;
2100 /* Sufficient mana */
2101 if (shouhimana <= p_ptr->csp)
2104 p_ptr->csp -= shouhimana;
2108 int oops = shouhimana;
2112 p_ptr->csp_frac = 0;
2116 msg_print("Àº¿À¤ò½¸Ã椷¤¹¤®¤Æµ¤¤ò¼º¤Ã¤Æ¤·¤Þ¤Ã¤¿¡ª");
2118 msg_print("You faint from the effort!");
2122 /* Hack -- Bypass free action */
2123 (void)set_paralyzed(p_ptr->paralyzed + randint1(5 * oops + 1));
2125 chg_virtue(V_KNOWLEDGE, -10);
2127 /* Damage CON (possibly permanently) */
2128 if (randint0(100) < 50)
2130 bool perm = (randint0(100) < 25);
2134 msg_print("ÂΤò°¤¯¤·¤Æ¤·¤Þ¤Ã¤¿¡ª");
2136 msg_print("You have damaged your health!");
2140 /* Reduce constitution */
2141 (void)dec_stat(A_CON, 15 + randint1(10), perm);
2149 p_ptr->redraw |= (PR_MANA);
2150 p_ptr->window |= (PW_PLAYER);
2151 p_ptr->window |= (PW_SPELL);
2156 void learn_spell(int monspell)
2158 if (p_ptr->action != ACTION_LEARN) return;
2159 if (p_ptr->magic_num2[monspell]) return;
2160 if (p_ptr->confused || p_ptr->blind || p_ptr->image || p_ptr->stun || p_ptr->paralyzed) return;
2161 if (randint1(p_ptr->lev + 70) > monster_powers[monspell].level + 40)
2163 p_ptr->magic_num2[monspell] = 1;
2165 msg_format("%s¤ò³Ø½¬¤·¤¿¡ª", monster_powers[monspell].name);
2167 msg_format("You have learned %s!", monster_powers[monspell].name);
2169 gain_exp(monster_powers[monspell].level * monster_powers[monspell].smana);
2175 p_ptr->redraw |= (PR_STATE);