3 /* Purpose: Mindcrafter code */
6 * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
8 * This software may be copied and distributed for educational, research,
9 * and not for profit purposes provided that this copyright and statement
10 * are included in all such copies. Other copyrights may also apply.
15 #define TECHNIC_HISSATSU (REALM_HISSATSU - MIN_TECHNIC)
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) */
86 (void) strnfmt(out_val, 78,
88 "(%^s %c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò»È¤¤¤Þ¤¹¤«¡©",
90 "(%^ss %c-%c, *=List, ESC=exit) Use which %s? ",
92 p, I2A(0), "abcdefghijklmnopqrstuvwxyz012345"[num-1], p);
94 if (use_menu) screen_save();
96 /* Get a spell from the user */
98 choice= always_show_list ? ESCAPE:1 ;
101 if(choice==ESCAPE) choice = ' ';
102 else if( !get_com(out_val, &choice, FALSE) )break;
104 if (use_menu && choice != ' ')
121 if (menu_line > 32) menu_line -= 32;
122 } while(!(p_ptr->spell_learned1 & (1L << (menu_line-1))));
133 if (menu_line > 32) menu_line -= 32;
134 } while(!(p_ptr->spell_learned1 & (1L << (menu_line-1))));
145 bool reverse = FALSE;
146 if ((choice == '4') || (choice == 'h') || (choice == 'H')) reverse = TRUE;
153 while(!(p_ptr->spell_learned1 & (1L << (menu_line-1))))
158 if (menu_line < 2) reverse = FALSE;
163 if (menu_line > 31) reverse = TRUE;
181 if ((choice == ' ') || (choice == '*') || (choice == '?') || (use_menu && ask))
184 if (!redraw || use_menu)
192 /* Save the screen */
193 if (!use_menu) screen_save();
195 /* Display a list of spells */
198 put_str("̾Á° Lv MP ̾Á° Lv MP ", y, x + 5);
200 put_str("name Lv SP name Lv SP ", y, x + 5);
203 /* Dump the spells */
204 for (i = 0, line = 0; i < 32; i++)
206 spell = technic_info[TECHNIC_HISSATSU][i];
208 if (spell.slevel > PY_MAX_LEVEL) continue;
210 if (!(p_ptr->spell_learned1 >> i)) break;
212 /* Access the spell */
213 if (spell.slevel > plev) continue;
214 if (!(p_ptr->spell_learned1 & (1L << i))) continue;
217 if (i == (menu_line-1))
219 strcpy(psi_desc, " ¡Õ");
221 strcpy(psi_desc, " > ");
223 else strcpy(psi_desc, " ");
230 letter = I2A(line-1);
232 letter = '0' + line - 27;
233 sprintf(psi_desc, " %c)",letter);
236 /* Dump the spell --(-- */
237 strcat(psi_desc, format(" %-18s%2d %3d",
238 spell_names[technic2magic(REALM_HISSATSU)-1][i],
239 spell.slevel, spell.smana));
240 prt(psi_desc, y + (line%17) + (line >= 17), x+(line/17)*30);
241 prt("", y + (line%17) + (line >= 17) + 1, x+(line/17)*30);
251 /* Restore the screen */
264 ask = (isupper(choice));
267 if (ask) choice = tolower(choice);
269 /* Extract request */
270 i = (islower(choice) ? A2I(choice) : -1);
274 ask = FALSE; /* Can't uppercase digits */
276 i = choice - '0' + 26;
280 /* Totally Illegal */
281 if ((i < 0) || (i >= 32) || !(p_ptr->spell_learned1 & (1 << sentaku[i])))
296 (void) strnfmt(tmp_val, 78, "%s¤ò»È¤¤¤Þ¤¹¤«¡©", spell_names[technic2magic(REALM_HISSATSU)-1][j]);
298 (void)strnfmt(tmp_val, 78, "Use %s? ", spell_names[technic2magic(REALM_HISSATSU)-1][j]);
302 /* Belay that order */
303 if (!get_check(tmp_val)) continue;
310 /* Restore the screen */
311 if (redraw) screen_load();
314 p_ptr->window |= (PW_SPELL);
320 /* Abort if needed */
321 if (!flag) return (FALSE);
323 /* Save the choice */
326 #ifdef ALLOW_REPEAT /* TNB */
330 #endif /* ALLOW_REPEAT -- TNB */
338 * do_cmd_cast calls this function if the player's class
341 static bool cast_hissatsu_spell(int spell)
352 if (!get_aim_dir(&dir)) return FALSE;
353 project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL);
359 if (!get_rep_dir2(&dir)) return FALSE;
360 if (dir == 5) return FALSE;
361 for (cdir = 0;cdir < 8; cdir++)
363 if (cdd[cdir] == dir) break;
365 if (cdir == 8) return FALSE;
366 y = py + ddy_cdd[cdir];
367 x = px + ddx_cdd[cdir];
368 if (cave[y][x].m_idx)
372 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
374 msg_print("You attack the empty air.");
376 y = py + ddy_cdd[(cdir + 7) % 8];
377 x = px + ddx_cdd[(cdir + 7) % 8];
378 if (cave[y][x].m_idx)
382 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
384 msg_print("You attack the empty air.");
386 y = py + ddy_cdd[(cdir + 1) % 8];
387 x = px + ddx_cdd[(cdir + 1) % 8];
388 if (cave[y][x].m_idx)
392 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
394 msg_print("You attack the empty air.");
401 if (!do_cmd_throw_aux(1, TRUE, 0)) return FALSE;
406 if (!get_rep_dir2(&dir)) return FALSE;
407 if (dir == 5) return FALSE;
410 if (cave[y][x].m_idx)
411 py_attack(y, x, HISSATSU_FIRE);
415 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
417 msg_print("There is no monster.");
425 detect_monsters_mind(DETECT_RAD_DEFAULT);
430 if (!get_rep_dir2(&dir)) return FALSE;
431 if (dir == 5) return FALSE;
434 if (cave[y][x].m_idx)
435 py_attack(y, x, HISSATSU_MINEUCHI);
439 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
441 msg_print("There is no monster.");
452 msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
454 msg_print("You cannot do it when riding.");
459 msg_print("Áê¼ê¤Î¹¶·â¤ËÂФ·¤Æ¿È¹½¤¨¤¿¡£");
461 msg_print("You prepare to counter blow.");
463 p_ptr->counter = TRUE;
471 msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
473 msg_print("You cannot do it when riding.");
478 if (!get_rep_dir2(&dir)) return FALSE;
480 if (dir == 5) return FALSE;
484 if (!cave[y][x].m_idx)
487 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
489 msg_print("There is no monster.");
496 if (!player_can_enter(cave[y][x].feat) || is_trap(cave[y][x].feat))
502 if (player_can_enter(cave[y][x].feat) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
508 /* Save the old location */
512 /* Move the player */
518 /* Redraw the old spot */
521 /* Redraw the new spot */
524 /* Check for new panel (redraw map) */
528 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
530 /* Update the monsters */
531 p_ptr->update |= (PU_DISTANCE);
534 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
536 /* Handle stuff XXX XXX XXX */
543 if (!get_rep_dir2(&dir)) return FALSE;
544 if (dir == 5) return FALSE;
547 if (cave[y][x].m_idx)
548 py_attack(y, x, HISSATSU_POISON);
552 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
554 msg_print("There is no monster.");
562 if (!get_rep_dir2(&dir)) return FALSE;
563 if (dir == 5) return FALSE;
566 if (cave[y][x].m_idx)
567 py_attack(y, x, HISSATSU_ZANMA);
571 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
573 msg_print("There is no monster.");
581 if (!get_rep_dir2(&dir)) return FALSE;
582 if (dir == 5) return FALSE;
585 if (cave[y][x].m_idx)
590 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
592 msg_print("There is no monster.");
596 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
600 if (cave[y][x].m_idx)
605 int m_idx = cave[y][x].m_idx;
606 monster_type *m_ptr = &m_list[m_idx];
609 monster_desc(m_name, m_ptr, 0);
611 for (i = 0; i < 5; i++)
615 if (cave_empty_bold(y, x))
622 if ((ty != oy) || (tx != ox))
625 msg_format("%s¤ò¿á¤Èô¤Ð¤·¤¿¡ª", m_name);
627 msg_format("You blow %s away!", m_name);
629 cave[oy][ox].m_idx = 0;
630 cave[ty][tx].m_idx = m_idx;
634 update_mon(m_idx, TRUE);
638 if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
639 p_ptr->update |= (PU_MON_LITE);
648 if (!identify_fully(TRUE)) return FALSE;
652 if (!ident_spell(TRUE)) return FALSE;
658 if (!get_rep_dir2(&dir)) return FALSE;
659 if (dir == 5) return FALSE;
662 if (cave[y][x].m_idx)
663 py_attack(y, x, HISSATSU_HAGAN);
665 /* Non-walls (etc) */
666 if (cave_floor_bold(y, x)) break;
668 /* Permanent walls */
669 if (cave[y][x].feat >= FEAT_PERM_EXTRA) break;
671 if (cave[y][x].feat < FEAT_DOOR_HEAD) break;
673 /* Forget the wall */
674 cave[y][x].info &= ~(CAVE_MARK);
676 /* Destroy the feature */
677 cave_set_feat(y, x, floor_type[randint0(100)]);
679 /* Update some things */
680 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
686 if (!get_rep_dir2(&dir)) return FALSE;
687 if (dir == 5) return FALSE;
690 if (cave[y][x].m_idx)
691 py_attack(y, x, HISSATSU_COLD);
695 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
697 msg_print("There is no monster.");
705 if (!get_rep_dir2(&dir)) return FALSE;
706 if (dir == 5) return FALSE;
709 if (cave[y][x].m_idx)
710 py_attack(y, x, HISSATSU_KYUSHO);
714 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
716 msg_print("There is no monster.");
724 if (!get_rep_dir2(&dir)) return FALSE;
725 if (dir == 5) return FALSE;
728 if (cave[y][x].m_idx)
729 py_attack(y, x, HISSATSU_MAJIN);
733 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
735 msg_print("There is no monster.");
743 if (!get_rep_dir2(&dir)) return FALSE;
744 if (dir == 5) return FALSE;
747 if (cave[y][x].m_idx)
748 py_attack(y, x, HISSATSU_SUTEMI);
752 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
754 msg_print("There is no monster.");
758 p_ptr->sutemi = TRUE;
763 if (!get_rep_dir2(&dir)) return FALSE;
764 if (dir == 5) return FALSE;
767 if (cave[y][x].m_idx)
768 py_attack(y, x, HISSATSU_ELEC);
772 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
774 msg_print("There is no monster.");
781 return rush_attack(NULL);
782 case 19: /* Whirlwind Attack */
788 if (p_ptr->cut < 300)
789 set_cut(p_ptr->cut + 300);
791 set_cut(p_ptr->cut * 2);
793 for (dir = 0; dir < 8; dir++)
795 y = py + ddy_ddd[dir];
796 x = px + ddx_ddd[dir];
799 /* Get the monster */
800 m_ptr = &m_list[c_ptr->m_idx];
802 /* Hack -- attack monsters */
803 if (c_ptr->m_idx && (m_ptr->ml || cave_floor_bold(y, x)))
805 if (!monster_living(&r_info[m_ptr->r_idx]))
809 monster_desc(m_name, m_ptr, 0);
811 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤¤¡ª", m_name);
813 msg_format("%s is unharmed!", m_name);
816 else py_attack(y, x, HISSATSU_SEKIRYUKA);
823 if (!get_rep_dir2(&dir)) return FALSE;
824 if (dir == 5) return FALSE;
827 if (cave[y][x].m_idx)
828 py_attack(y, x, HISSATSU_QUAKE);
831 earthquake(py, px, 10);
837 int total_damage = 0, basedam, i;
838 u32b flgs[TR_FLAG_SIZE];
840 if (!get_aim_dir(&dir)) return FALSE;
842 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
844 msg_print("You swing your weapon downward.");
846 for (i = 0; i < 2; i++)
850 if (!buki_motteruka(INVEN_RARM+i)) break;
851 o_ptr = &inventory[INVEN_RARM+i];
852 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
853 damage = o_ptr->to_d * 100;
854 object_flags(o_ptr, flgs);
855 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
861 else if (have_flag(flgs, TR_VORPAL))
863 /* vorpal flag only */
868 damage *= p_ptr->num_blow[i];
869 total_damage += damage / 200;
870 if (i) total_damage = total_damage*7/10;
872 fire_beam(GF_FORCE, dir, total_damage);
878 msg_print("ͺ¶«¤Ó¤ò¤¢¤²¤¿¡ª");
880 msg_print("You roar out!");
882 project_hack(GF_SOUND, randint1(p_ptr->lev * 3));
883 aggravate_monsters(0);
889 if (!get_rep_dir2(&dir)) return FALSE;
890 if (dir == 5) return FALSE;
891 for (i = 0; i < 3; i++)
901 if (cave[y][x].m_idx)
902 py_attack(y, x, HISSATSU_3DAN);
906 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
908 msg_print("There is no monster.");
913 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
918 /* Monster is dead? */
919 if (!cave[y][x].m_idx) break;
923 m_idx = cave[y][x].m_idx;
924 m_ptr = &m_list[m_idx];
926 /* Monster cannot move back? */
927 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx])) continue;
929 cave[y][x].m_idx = 0;
930 cave[ny][nx].m_idx = m_idx;
934 update_mon(m_idx, TRUE);
936 /* Player can move forward? */
937 if (player_can_enter(cave[y][x].feat))
939 /* Save the old location */
943 /* Move the player */
949 cave[oy][ox].m_idx = cave[py][px].m_idx;
950 cave[py][px].m_idx = p_ptr->riding;
951 m_list[p_ptr->riding].fy = py;
952 m_list[p_ptr->riding].fx = px;
953 update_mon(p_ptr->riding, TRUE);
958 /* Redraw the old spot */
961 /* Redraw the new spot */
965 /* Redraw the old spot */
968 /* Redraw the new spot */
971 /* Check for new panel (redraw map) */
975 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
977 /* Update the monsters */
978 p_ptr->update |= (PU_DISTANCE);
981 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
987 if (i < 2) msg_print(NULL);
993 if (!get_rep_dir2(&dir)) return FALSE;
994 if (dir == 5) return FALSE;
997 if (cave[y][x].m_idx)
998 py_attack(y, x, HISSATSU_DRAIN);
1002 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1004 msg_print("There is no monster.");
1013 msg_print("Éð´ï¤òÉÔµ¬Â§¤ËÍɤ餷¤¿¡¥¡¥¡¥");
1015 msg_print("You irregularly wave your weapon...");
1017 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1018 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1019 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1024 #define NEED_MANA_PER_MONSTER 8
1027 /* int count = 0; currently unused */
1030 if (!rush_attack(&mdeath)) break;
1033 /* Reserve needed mana point */
1034 p_ptr->csp -= technic_info[TECHNIC_HISSATSU][26].smana;
1038 p_ptr->csp -= NEED_MANA_PER_MONSTER;
1040 /* count++; currently unused */
1042 p_ptr->redraw |= PR_MANA;
1045 while (p_ptr->csp > NEED_MANA_PER_MONSTER);
1046 if (new) return FALSE;
1048 /* Restore reserved mana */
1049 p_ptr->csp += technic_info[TECHNIC_HISSATSU][26].smana;
1052 #undef NEED_MANA_PER_MONSTER
1056 if (!tgt_pt(&x, &y)) return FALSE;
1057 if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
1058 (distance(y, x, py, px) > MAX_SIGHT / 2) ||
1059 !projectable(py, px, y, x))
1062 msg_print("¼ºÇÔ¡ª");
1064 msg_print("You cannot move to that place!");
1068 if (p_ptr->anti_tele)
1071 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
1073 msg_print("A mysterious force prevents you from teleporting!");
1078 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
1079 teleport_player_to(y, x, TRUE);
1086 if (!get_rep_dir(&dir, FALSE)) return FALSE;
1089 if (cave[y][x].m_idx)
1092 if (cave[y][x].m_idx)
1101 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1103 msg_print("You don't see any monster in this direction");
1111 int total_damage = 0, basedam, i;
1113 u32b flgs[TR_FLAG_SIZE];
1116 if (!get_rep_dir2(&dir)) return FALSE;
1117 if (dir == 5) return FALSE;
1120 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
1123 msg_print("¤Ê¤¼¤«¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¡£");
1125 msg_print("Something prevent you from attacking.");
1130 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
1132 msg_print("You swing your weapon downward.");
1134 for (i = 0; i < 2; i++)
1137 if (!buki_motteruka(INVEN_RARM+i)) break;
1138 o_ptr = &inventory[INVEN_RARM+i];
1139 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
1140 damage = o_ptr->to_d * 100;
1141 object_flags(o_ptr, flgs);
1142 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
1148 else if (have_flag(flgs, TR_VORPAL))
1150 /* vorpal flag only */
1155 damage += p_ptr->to_d[i] * 100;
1156 damage *= p_ptr->num_blow[i];
1157 total_damage += (damage / 100);
1159 project(0, (cave_floor_bold(y, x) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
1164 if (!get_rep_dir2(&dir)) return FALSE;
1165 if (dir == 5) return FALSE;
1168 if (cave[y][x].m_idx)
1169 py_attack(y, x, HISSATSU_UNDEAD);
1173 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1175 msg_print("There is no monster.");
1180 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "·Ä±Àµ´Ç¦·õ¤ò»È¤Ã¤¿¾×·â", -1);
1182 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "exhaustion on using Keiun-Kininken", -1);
1190 if (!get_check("ËÜÅö¤Ë¼«»¦¤·¤Þ¤¹¤«¡©")) return FALSE;
1192 if (!get_check("Do you really want to commit suicide? ")) return FALSE;
1194 /* Special Verification for suicide */
1196 prt("³Îǧ¤Î¤¿¤á '@' ¤ò²¡¤·¤Æ²¼¤µ¤¤¡£", 0, 0);
1198 prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
1204 if (i != '@') return FALSE;
1205 if (p_ptr->total_winner)
1207 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1208 p_ptr->total_winner = TRUE;
1213 msg_print("Éð»ÎÆ»¤È¤Ï¡¢»à¤Ì¤³¤È¤È¸«¤Ä¤±¤¿¤ê¡£");
1214 take_hit(DAMAGE_FORCE, 9999, "ÀÚÊ¢", -1);
1216 msg_print("Meaning of Bushi-do is found in the death.");
1217 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1224 msg_print("¤Ê¤Ë¡©");
1236 * do_cmd_cast calls this function if the player's class
1239 void do_cmd_hissatsu(void)
1246 /* not if confused */
1247 if (p_ptr->confused)
1250 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1252 msg_print("You are too confused!");
1257 if (!buki_motteruka(INVEN_RARM))
1259 if (flush_failure) flush();
1261 msg_print("Éð´ï¤ò»ý¤¿¤Ê¤¤¤Èɬ»¦µ»¤Ï»È¤¨¤Ê¤¤¡ª");
1263 msg_print("You need to wield a weapon!");
1268 if (!p_ptr->spell_learned1)
1271 msg_print("²¿¤âµ»¤òÃΤé¤Ê¤¤¡£");
1273 msg_print("You don't know any special attacks.");
1279 if (p_ptr->special_defense & KATA_MASK)
1281 set_action(ACTION_NONE);
1285 if (!get_hissatsu_power(&n)) return;
1287 spell = technic_info[TECHNIC_HISSATSU][n];
1289 /* Verify "dangerous" spells */
1290 if (spell.smana > p_ptr->csp)
1292 if (flush_failure) flush();
1295 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
1297 msg_print("You do not have enough mana to use this power.");
1305 /* Cast the spell */
1306 cast = cast_hissatsu_spell(n);
1314 p_ptr->csp -= spell.smana;
1317 if (p_ptr->csp < 0) p_ptr->csp = 0;
1320 p_ptr->redraw |= (PR_MANA);
1323 p_ptr->window |= (PW_PLAYER);
1324 p_ptr->window |= (PW_SPELL);
1328 void do_cmd_gain_hissatsu(void)
1337 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
1339 set_action(ACTION_NONE);
1342 if (p_ptr->blind || no_lite())
1345 msg_print("Ìܤ¬¸«¤¨¤Ê¤¤¡ª");
1347 msg_print("You cannot see!");
1353 if (p_ptr->confused)
1356 msg_print("º®Í𤷤Ƥ¤¤ÆÆɤá¤Ê¤¤¡ª");
1358 msg_print("You are too confused!");
1364 if (!(p_ptr->new_spells))
1367 msg_print("¿·¤·¤¤É¬»¦µ»¤ò³Ð¤¨¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¡ª");
1369 msg_print("You cannot learn any new special attacks!");
1376 if( p_ptr->new_spells < 10 ){
1377 msg_format("¤¢¤È %d ¤Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1379 msg_format("¤¢¤È %d ¸Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1382 msg_format("You can learn %d new special attack%s.", p_ptr->new_spells,
1383 (p_ptr->new_spells == 1?"":"s"));
1386 item_tester_tval = TV_HISSATSU_BOOK;
1390 q = "¤É¤Î½ñ¤«¤é³Ø¤Ó¤Þ¤¹¤«? ";
1392 q = "Study which book? ";
1396 s = "Æɤá¤ë½ñ¤¬¤Ê¤¤¡£";
1398 s = "You have no books that you can read.";
1401 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
1403 /* Get the item (in the pack) */
1406 o_ptr = &inventory[item];
1409 /* Get the item (on the floor) */
1412 o_ptr = &o_list[0 - item];
1415 for (i = o_ptr->sval * 8; i < o_ptr->sval * 8 + 8; i++)
1417 if (p_ptr->spell_learned1 & (1L << i)) continue;
1418 if (technic_info[TECHNIC_HISSATSU][i].slevel > p_ptr->lev) continue;
1420 p_ptr->spell_learned1 |= (1L << i);
1421 p_ptr->spell_worked1 |= (1L << i);
1423 msg_format("%s¤Îµ»¤ò³Ð¤¨¤¿¡£", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1425 msg_format("You have learned the special attack of %s.", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1427 for (j = 0; j < 64; j++)
1429 /* Stop at the first empty space */
1430 if (p_ptr->spell_order[j] == 99) break;
1432 p_ptr->spell_order[j] = i;
1439 msg_print("²¿¤â³Ð¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
1441 msg_print("You were not able to learn any special attacks.");
1448 p_ptr->update |= (PU_SPELLS);