3 /* Purpose: Mindcrafter 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 TECHNIC_HISSATSU (REALM_HISSATSU - MIN_TECHNIC - 1)
18 * Allow user to choose a mindcrafter power.
20 * If a valid spell is chosen, saves it in '*sn' and returns TRUE
21 * If the user hits escape, returns FALSE, and set '*sn' to -1
22 * If there are no legal choices, returns FALSE, and sets '*sn' to -2
24 * The "prompt" should be "cast", "recite", or "study"
25 * The "known" should be TRUE for cast/pray, FALSE for study
27 * nb: This function has a (trivial) display bug which will be obvious
28 * when you run it. It's probably easy to fix but I haven't tried,
31 static int get_hissatsu_power(int *sn)
37 int plev = p_ptr->lev;
45 cptr p = "special attack";
50 int menu_line = (use_menu ? 1 : 0);
52 /* Assume cancelled */
55 #ifdef ALLOW_REPEAT /* TNB */
57 /* Get the spell, if available */
60 /* Verify the spell */
61 if (technic_info[TECHNIC_HISSATSU][*sn].slevel <= plev)
68 #endif /* ALLOW_REPEAT -- TNB */
70 /* Nothing chosen yet */
76 for (i = 0; i < 32; i++)
78 if (technic_info[TECHNIC_HISSATSU][i].slevel <= PY_MAX_LEVEL)
85 /* Build a prompt (accept all spells) */
87 (void) strnfmt(out_val, 78, "(%^s %c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò»È¤¤¤Þ¤¹¤«¡©",
89 (void)strnfmt(out_val, 78, "(%^ss %c-%c, *=List, ESC=exit) Use which %s? ",
91 p, I2A(0), "abcdefghijklmnopqrstuvwxyz012345"[num-1], p);
93 if (use_menu) screen_save();
95 /* Get a spell from the user */
97 choice= always_show_list ? ESCAPE:1 ;
100 if(choice==ESCAPE) choice = ' ';
101 else if( !get_com(out_val, &choice, FALSE) )break;
103 if (use_menu && choice != ' ')
121 if (menu_line > 32) menu_line -= 32;
122 } while(!(spell_learned1 & (1L << (menu_line-1))));
133 if (menu_line > 32) menu_line -= 32;
134 } while(!(spell_learned1 & (1L << (menu_line-1))));
145 bool reverse = FALSE;
146 if ((choice == '4') || (choice == 'h') || (choice == 'H')) reverse = TRUE;
153 while(!(spell_learned1 & (1L << (menu_line-1))))
158 if (menu_line < 2) reverse = FALSE;
163 if (menu_line > 31) reverse = TRUE;
180 if ((choice == ' ') || (choice == '*') || (choice == '?') || (use_menu && ask))
183 if (!redraw || use_menu)
191 /* Save the screen */
192 if (!use_menu) screen_save();
194 /* Display a list of spells */
197 put_str("̾Á° Lv MP ̾Á° Lv MP ", y, x + 5);
199 put_str("name Lv SP name Lv SP ", y, x + 5);
202 /* Dump the spells */
203 for (i = 0, line = 0; i < 32; i++)
205 spell = technic_info[TECHNIC_HISSATSU][i];
207 if (spell.slevel > PY_MAX_LEVEL) continue;
209 if (!(spell_learned1 >> i)) break;
211 /* Access the spell */
212 if (spell.slevel > plev) continue;
213 if (!(spell_learned1 & (1L << i))) continue;
216 if (i == (menu_line-1))
218 strcpy(psi_desc, " ¡Õ");
220 strcpy(psi_desc, " > ");
222 else strcpy(psi_desc, " ");
229 letter = I2A(line-1);
231 letter = '0' + line - 27;
232 sprintf(psi_desc, " %c)",letter);
235 /* Dump the spell --(-- */
236 strcat(psi_desc, format(" %-18s%2d %3d",
237 spell_names[technic2magic(REALM_HISSATSU)-1][i],
238 spell.slevel, spell.smana));
239 prt(psi_desc, y + (line%17) + (line >= 17), x+(line/17)*30);
240 prt("", y + (line%17) + (line >= 17) + 1, x+(line/17)*30);
250 /* Restore the screen */
263 ask = (isupper(choice));
266 if (ask) choice = tolower(choice);
268 /* Extract request */
269 i = (islower(choice) ? A2I(choice) : -1);
273 ask = FALSE; /* Can't uppercase digits */
275 i = choice - '0' + 26;
279 /* Totally Illegal */
280 if ((i < 0) || (i >= 32) || !(spell_learned1 & (1 << sentaku[i])))
295 (void) strnfmt(tmp_val, 78, "%s¤ò»È¤¤¤Þ¤¹¤«¡©", spell_names[technic2magic(REALM_HISSATSU)-1][j]);
297 (void)strnfmt(tmp_val, 78, "Use %s? ", spell_names[technic2magic(REALM_HISSATSU)-1][j]);
301 /* Belay that order */
302 if (!get_check(tmp_val)) continue;
309 /* Restore the screen */
310 if (redraw) screen_load();
316 p_ptr->window |= (PW_SPELL);
322 /* Abort if needed */
323 if (!flag) return (FALSE);
325 /* Save the choice */
328 #ifdef ALLOW_REPEAT /* TNB */
332 #endif /* ALLOW_REPEAT -- TNB */
340 * do_cmd_cast calls this function if the player's class
343 static bool cast_hissatsu_spell(int spell)
354 if (!get_aim_dir(&dir)) return FALSE;
355 project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL | PROJECT_NO_REF);
361 if (!get_rep_dir2(&dir)) return FALSE;
362 if (dir == 5) return FALSE;
363 for (cdir = 0;cdir < 8; cdir++)
365 if (cdd[cdir] == dir) break;
367 if (cdir == 8) return FALSE;
368 y = py + ddy_cdd[cdir];
369 x = px + ddx_cdd[cdir];
370 if (cave[y][x].m_idx)
374 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
376 msg_print("You attack the empty air.");
378 y = py + ddy_cdd[(cdir + 7) % 8];
379 x = px + ddx_cdd[(cdir + 7) % 8];
380 if (cave[y][x].m_idx)
384 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
386 msg_print("You attack the empty air.");
388 y = py + ddy_cdd[(cdir + 1) % 8];
389 x = px + ddx_cdd[(cdir + 1) % 8];
390 if (cave[y][x].m_idx)
394 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
396 msg_print("You attack the empty air.");
403 if (!do_cmd_throw_aux(1, TRUE, 0)) return FALSE;
408 if (!get_rep_dir2(&dir)) return FALSE;
409 if (dir == 5) return FALSE;
412 if (cave[y][x].m_idx)
413 py_attack(y, x, HISSATSU_FIRE);
417 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
419 msg_print("There is no monster.");
427 detect_monsters_mind(DETECT_RAD_DEFAULT);
432 if (!get_rep_dir2(&dir)) return FALSE;
433 if (dir == 5) return FALSE;
436 if (cave[y][x].m_idx)
437 py_attack(y, x, HISSATSU_MINEUCHI);
441 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
443 msg_print("There is no monster.");
454 msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
456 msg_print("You cannot do it when riding.");
461 msg_print("Áê¼ê¤Î¹¶·â¤ËÂФ·¤Æ¿È¹½¤¨¤¿¡£");
463 msg_print("You prepare to counter blow.");
465 p_ptr->counter = TRUE;
473 msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
475 msg_print("You cannot do it when riding.");
480 if (!get_rep_dir2(&dir)) return FALSE;
482 if (dir == 5) return FALSE;
486 if (!cave[y][x].m_idx)
489 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
491 msg_print("There is no monster.");
498 if (!player_can_enter(cave[y][x].feat) || is_trap(cave[y][x].feat))
504 if (player_can_enter(cave[y][x].feat) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
510 /* Save the old location */
514 /* Move the player */
520 /* Redraw the old spot */
523 /* Redraw the new spot */
526 /* Check for new panel (redraw map) */
530 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW);
532 /* Update the monsters */
533 p_ptr->update |= (PU_DISTANCE);
536 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
538 /* Handle stuff XXX XXX XXX */
545 if (!get_rep_dir2(&dir)) return FALSE;
546 if (dir == 5) return FALSE;
549 if (cave[y][x].m_idx)
550 py_attack(y, x, HISSATSU_POISON);
554 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
556 msg_print("There is no monster.");
564 if (!get_rep_dir2(&dir)) return FALSE;
565 if (dir == 5) return FALSE;
568 if (cave[y][x].m_idx)
569 py_attack(y, x, HISSATSU_ZANMA);
573 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
575 msg_print("There is no monster.");
583 if (!get_rep_dir2(&dir)) return FALSE;
584 if (dir == 5) return FALSE;
587 if (cave[y][x].m_idx)
592 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
594 msg_print("There is no monster.");
598 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
602 if (cave[y][x].m_idx)
607 int m_idx = cave[y][x].m_idx;
608 monster_type *m_ptr = &m_list[m_idx];
611 monster_desc(m_name, m_ptr, 0);
613 for (i = 0; i < 5; i++)
617 if (cave_empty_bold(y, x))
624 if ((ty != oy) || (tx != ox))
627 msg_format("%s¤ò¿á¤Èô¤Ð¤·¤¿¡ª", m_name);
629 msg_format("You blow %s away!", m_name);
631 cave[oy][ox].m_idx = 0;
632 cave[ty][tx].m_idx = m_idx;
636 update_mon(m_idx, TRUE);
647 if (!identify_fully(TRUE)) return FALSE;
651 if (!ident_spell(TRUE)) return FALSE;
657 if (!get_rep_dir2(&dir)) return FALSE;
658 if (dir == 5) return FALSE;
661 if (cave[y][x].m_idx)
662 py_attack(y, x, HISSATSU_HAGAN);
664 /* Non-walls (etc) */
665 if (cave_floor_bold(y, x)) break;
667 /* Permanent walls */
668 if (cave[y][x].feat >= FEAT_PERM_EXTRA) break;
670 if (cave[y][x].feat < FEAT_DOOR_HEAD) break;
672 /* Forget the wall */
673 cave[y][x].info &= ~(CAVE_MARK);
675 /* Destroy the feature */
676 cave[y][x].feat = floor_type[rand_int(100)];
677 cave[y][x].info &= ~(CAVE_MASK);
678 cave[y][x].info |= CAVE_FLOOR;
680 /* Update some things */
681 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
689 if (!get_rep_dir2(&dir)) return FALSE;
690 if (dir == 5) return FALSE;
693 if (cave[y][x].m_idx)
694 py_attack(y, x, HISSATSU_COLD);
698 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
700 msg_print("There is no monster.");
708 if (!get_rep_dir2(&dir)) return FALSE;
709 if (dir == 5) return FALSE;
712 if (cave[y][x].m_idx)
713 py_attack(y, x, HISSATSU_KYUSHO);
717 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
719 msg_print("There is no monster.");
727 if (!get_rep_dir2(&dir)) return FALSE;
728 if (dir == 5) return FALSE;
731 if (cave[y][x].m_idx)
732 py_attack(y, x, HISSATSU_MAJIN);
736 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
738 msg_print("There is no monster.");
746 if (!get_rep_dir2(&dir)) return FALSE;
747 if (dir == 5) return FALSE;
750 if (cave[y][x].m_idx)
751 py_attack(y, x, HISSATSU_SUTEMI);
755 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
757 msg_print("There is no monster.");
761 p_ptr->sutemi = TRUE;
766 if (!get_rep_dir2(&dir)) return FALSE;
767 if (dir == 5) return FALSE;
770 if (cave[y][x].m_idx)
771 py_attack(y, x, HISSATSU_ELEC);
775 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
777 msg_print("There is no monster.");
785 if (!get_aim_dir(&dir)) return FALSE;
786 project_hook(GF_ATTACK, dir, HISSATSU_NYUSIN, PROJECT_STOP | PROJECT_KILL | PROJECT_NO_REF);
789 case 19: /* Whirlwind Attack */
795 if (p_ptr->cut < 300)
796 set_cut(p_ptr->cut + 300);
798 set_cut(p_ptr->cut * 2);
800 for (dir = 0; dir < 8; dir++)
802 y = py + ddy_ddd[dir];
803 x = px + ddx_ddd[dir];
806 /* Get the monster */
807 m_ptr = &m_list[c_ptr->m_idx];
809 /* Hack -- attack monsters */
810 if (c_ptr->m_idx && (m_ptr->ml || cave_floor_bold(y, x)))
812 if (r_info[m_list[c_ptr->m_idx].r_idx].flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING))
816 monster_desc(m_name, &m_list[c_ptr->m_idx], 0);
817 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤¤¡ª", m_name);
819 else py_attack(y, x, HISSATSU_SEKIRYUKA);
826 if (!get_rep_dir2(&dir)) return FALSE;
827 if (dir == 5) return FALSE;
830 if (cave[y][x].m_idx)
831 py_attack(y, x, HISSATSU_QUAKE);
834 earthquake(py, px, 10);
840 int total_damage = 0, basedam, i;
843 if (!get_aim_dir(&dir)) return FALSE;
845 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
847 msg_print("You swing your weapon downward.");
849 for (i = 0; i < 2; i++)
853 if (!buki_motteruka(INVEN_RARM+i)) break;
854 o_ptr = &inventory[INVEN_RARM+i];
855 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
856 damage = o_ptr->to_d * 100;
857 object_flags(o_ptr, &f1, &f2, &f3);
858 if (o_ptr->name1 == ART_VORPAL_BLADE)
864 else if (object_known_p(o_ptr) && (f1 & TR1_VORPAL))
866 /* vorpal flag only */
871 damage *= p_ptr->num_blow[i];
872 total_damage += damage / 200;
873 if (i) total_damage = total_damage*7/10;
875 fire_beam(GF_FORCE, dir, total_damage);
881 msg_print("ͺ¶«¤Ó¤ò¤¢¤²¤¿¡ª");
883 msg_print("You roar out!");
885 project_hack(GF_SOUND, randint(p_ptr->lev * 3));
886 aggravate_monsters(0);
892 if (!get_rep_dir2(&dir)) return FALSE;
893 if (dir == 5) return FALSE;
896 for (i = 0; i < 3; i++)
898 if (cave[y][x].m_idx)
899 py_attack(y, x, HISSATSU_3DAN);
903 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
905 msg_print("There is no monster.");
909 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
913 if (cave[y][x].m_idx)
916 int ny = y + ddy[dir];
917 int nx = x + ddx[dir];
918 int m_idx = cave[y][x].m_idx;
919 monster_type *m_ptr = &m_list[m_idx];
920 if (cave_empty_bold(ny, nx))
922 cave[y][x].m_idx = 0;
923 cave[ny][nx].m_idx = m_idx;
927 update_mon(m_idx, TRUE);
929 /* Save the old location */
933 /* Move the player */
940 tmp = cave[py][px].m_idx;
941 cave[py][px].m_idx = cave[oy][ox].m_idx;
942 cave[oy][ox].m_idx = tmp;
943 m_list[p_ptr->riding].fy = py;
944 m_list[p_ptr->riding].fx = px;
945 update_mon(cave[py][px].m_idx, TRUE);
950 /* Redraw the old spot */
953 /* Redraw the new spot */
956 /* Redraw the new spot */
959 /* Check for new panel (redraw map) */
963 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW);
965 /* Update the monsters */
966 p_ptr->update |= (PU_DISTANCE);
969 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
971 /* Handle stuff XXX XXX XXX */
974 if (i < 2) msg_print(NULL);
985 if (!get_rep_dir2(&dir)) return FALSE;
986 if (dir == 5) return FALSE;
989 if (cave[y][x].m_idx)
990 py_attack(y, x, HISSATSU_DRAIN);
994 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
996 msg_print("There is no monster.");
1005 msg_print("Éð´ï¤òÉÔµ¬Â§¤ËÍɤ餷¤¿¡¥¡¥¡¥");
1007 msg_print("You irregularly wave your weapon...");
1009 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1010 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1011 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1021 if (!get_aim_dir(&dir)) break;
1023 p_ptr->csp -= technic_info[TECHNIC_HISSATSU][26].smana;
1027 if (!project_hook(GF_ATTACK, dir, HISSATSU_NYUSIN, PROJECT_STOP | PROJECT_KILL | PROJECT_NO_REF)) break;
1030 p_ptr->redraw |= PR_MANA;
1032 } while (p_ptr->csp > 8);
1033 if (new) return FALSE;
1038 if (!tgt_pt(&x, &y)) return FALSE;
1039 if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
1040 (distance(y, x, py, px) > MAX_SIGHT / 2) ||
1041 !projectable(py, px, y, x))
1044 msg_print("¼ºÇÔ¡ª");
1046 msg_print("You cannot move to that place!");
1050 if (p_ptr->anti_tele)
1053 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
1055 msg_print("A mysterious force prevents you from teleporting!");
1060 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL | PROJECT_NO_REF, -1);
1061 teleport_player_to(y, x, TRUE);
1068 if (!get_rep_dir(&dir, FALSE)) return FALSE;
1071 if (cave[y][x].m_idx)
1074 if (cave[y][x].m_idx)
1083 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1085 msg_print("You don't see any monster in this direction");
1093 int total_damage = 0, basedam, i;
1098 if (!get_rep_dir2(&dir)) return FALSE;
1099 if (dir == 5) return FALSE;
1102 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
1105 msg_print("¤Ê¤¼¤«¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¡£");
1107 msg_print("Something prevent you from attacking.");
1112 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
1114 msg_print("You swing your weapon downward.");
1116 for (i = 0; i < 2; i++)
1119 if (!buki_motteruka(INVEN_RARM+i)) break;
1120 o_ptr = &inventory[INVEN_RARM+i];
1121 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
1122 damage = o_ptr->to_d * 100;
1123 object_flags(o_ptr, &f1, &f2, &f3);
1124 if (o_ptr->name1 == ART_VORPAL_BLADE)
1130 else if (object_known_p(o_ptr) && (f1 & TR1_VORPAL))
1132 /* vorpal flag only */
1137 damage += p_ptr->to_d[i] * 100;
1138 damage *= p_ptr->num_blow[i];
1139 total_damage += (damage / 100);
1141 project(0, (cave_floor_bold(y, x) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
1146 if (!get_rep_dir2(&dir)) return FALSE;
1147 if (dir == 5) return FALSE;
1150 if (cave[y][x].m_idx)
1151 py_attack(y, x, HISSATSU_UNDEAD);
1155 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1157 msg_print("There is no monster.");
1162 take_hit(DAMAGE_NOESCAPE, 100 + randint(100), "·Ä±Àµ´Ç¦·õ¤ò»È¤Ã¤¿¾×·â", -1);
1164 take_hit(DAMAGE_NOESCAPE, 100 + randint(100), "reaction of your attack", -1); /*nanka*/
1172 if (!get_check("ËÜÅö¤Ë¼«»¦¤·¤Þ¤¹¤«¡©")) return FALSE;
1174 if (!get_check("Do you really want to commit suicide? ")) return FALSE;
1176 /* Special Verification for suicide */
1178 prt("³Îǧ¤Î¤¿¤á '@' ¤ò²¡¤·¤Æ²¼¤µ¤¤¡£", 0, 0);
1180 prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
1186 if (i != '@') return FALSE;
1189 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1190 total_winner = TRUE;
1195 msg_print("Éð»ÎÆ»¤È¤Ï¡¢»à¤Ì¤³¤È¤È¸«¤Ä¤±¤¿¤ê¡£");
1196 take_hit(DAMAGE_FORCE, 9999, "ÀÚÊ¢", -1);
1198 msg_print("Meaning of Bushi-do is found in the death.");
1199 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1206 msg_print("¤Ê¤Ë¡©");
1218 * do_cmd_cast calls this function if the player's class
1221 void do_cmd_hissatsu(void)
1228 /* not if confused */
1229 if (p_ptr->confused)
1232 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1234 msg_print("You are too confused!");
1239 if (!buki_motteruka(INVEN_RARM))
1241 if (flush_failure) flush();
1243 msg_print("Éð´ï¤ò»ý¤¿¤Ê¤¤¤Èɬ»¦µ»¤Ï»È¤¨¤Ê¤¤¡ª");
1245 msg_print("You need to wield a weapon!");
1250 if (!spell_learned1)
1253 msg_print("²¿¤âµ»¤òÃΤé¤Ê¤¤¡£");
1255 msg_print("You don't know any martial arts.");
1261 if (p_ptr->special_defense & KATA_MASK)
1263 set_action(ACTION_NONE);
1267 if (!get_hissatsu_power(&n)) return;
1269 spell = technic_info[TECHNIC_HISSATSU][n];
1271 /* Verify "dangerous" spells */
1272 if (spell.smana > p_ptr->csp)
1274 if (flush_failure) flush();
1277 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
1279 msg_print("You do not have enough mana to use this power.");
1287 /* Cast the spell */
1288 cast = cast_hissatsu_spell(n);
1296 if (n != 25) p_ptr->csp -= spell.smana;
1299 if (p_ptr->csp < 0) p_ptr->csp = 0;
1302 p_ptr->redraw |= (PR_MANA);
1305 p_ptr->window |= (PW_PLAYER);
1306 p_ptr->window |= (PW_SPELL);
1310 void do_cmd_gain_hissatsu(void)
1319 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
1321 set_action(ACTION_NONE);
1324 if (p_ptr->blind || no_lite())
1327 msg_print("Ìܤ¬¸«¤¨¤Ê¤¤¡ª");
1329 msg_print("You cannot see!");
1335 if (p_ptr->confused)
1338 msg_print("º®Í𤷤Ƥ¤¤ÆÆɤá¤Ê¤¤¡ª");
1340 msg_print("You are too confused!");
1346 if (!(p_ptr->new_spells))
1349 msg_print("¿·¤·¤¤É¬»¦µ»¤ò³Ð¤¨¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¡ª");
1351 msg_print("You cannot learn any new special attacks!");
1358 if( p_ptr->new_spells < 10 ){
1359 msg_format("¤¢¤È %d ¤Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1361 msg_format("¤¢¤È %d ¸Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1364 msg_format("You can learn %d new special attack%s.", p_ptr->new_spells,
1365 (p_ptr->new_spells == 1?"":"s"));
1368 item_tester_tval = TV_HISSATSU_BOOK;
1372 q = "¤É¤Î½ñ¤«¤é³Ø¤Ó¤Þ¤¹¤«? ";
1374 q = "Study which book? ";
1378 s = "Æɤá¤ë½ñ¤¬¤Ê¤¤¡£";
1380 s = "You have no books that you can read.";
1383 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
1385 /* Get the item (in the pack) */
1388 o_ptr = &inventory[item];
1391 /* Get the item (on the floor) */
1394 o_ptr = &o_list[0 - item];
1397 for (i = o_ptr->sval * 8; i < o_ptr->sval * 8 + 8; i++)
1399 if (spell_learned1 & (1L << i)) continue;
1400 if (technic_info[TECHNIC_HISSATSU][i].slevel > p_ptr->lev) continue;
1402 spell_learned1 |= (1L << i);
1403 spell_worked1 |= (1L << i);
1405 msg_format("%s¤Îµ»¤ò³Ð¤¨¤¿¡£", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1407 msg_format("You have learned the special attack of %s.", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1409 for (j = 0; j < 64; j++)
1411 /* Stop at the first empty space */
1412 if (spell_order[j] == 99) break;
1419 msg_print("²¿¤â³Ð¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
1421 msg_print("You were not able to learn any special attacks.");
1424 p_ptr->update |= (PU_SPELLS);