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) */
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 != ' ')
120 if (menu_line > 32) menu_line -= 32;
121 } while(!(p_ptr->spell_learned1 & (1L << (menu_line-1))));
132 if (menu_line > 32) menu_line -= 32;
133 } while(!(p_ptr->spell_learned1 & (1L << (menu_line-1))));
144 bool reverse = FALSE;
145 if ((choice == '4') || (choice == 'h') || (choice == 'H')) reverse = TRUE;
152 while(!(p_ptr->spell_learned1 & (1L << (menu_line-1))))
157 if (menu_line < 2) reverse = FALSE;
162 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 (!(p_ptr->spell_learned1 >> i)) break;
211 /* Access the spell */
212 if (spell.slevel > plev) continue;
213 if (!(p_ptr->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) || !(p_ptr->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);
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 | PU_MON_LITE);
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_set_feat(y, x, floor_type[randint0(100)]);
678 /* Update some things */
679 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
685 if (!get_rep_dir2(&dir)) return FALSE;
686 if (dir == 5) return FALSE;
689 if (cave[y][x].m_idx)
690 py_attack(y, x, HISSATSU_COLD);
694 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
696 msg_print("There is no monster.");
704 if (!get_rep_dir2(&dir)) return FALSE;
705 if (dir == 5) return FALSE;
708 if (cave[y][x].m_idx)
709 py_attack(y, x, HISSATSU_KYUSHO);
713 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
715 msg_print("There is no monster.");
723 if (!get_rep_dir2(&dir)) return FALSE;
724 if (dir == 5) return FALSE;
727 if (cave[y][x].m_idx)
728 py_attack(y, x, HISSATSU_MAJIN);
732 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
734 msg_print("There is no monster.");
742 if (!get_rep_dir2(&dir)) return FALSE;
743 if (dir == 5) return FALSE;
746 if (cave[y][x].m_idx)
747 py_attack(y, x, HISSATSU_SUTEMI);
751 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
753 msg_print("There is no monster.");
757 p_ptr->sutemi = TRUE;
762 if (!get_rep_dir2(&dir)) return FALSE;
763 if (dir == 5) return FALSE;
766 if (cave[y][x].m_idx)
767 py_attack(y, x, HISSATSU_ELEC);
771 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
773 msg_print("There is no monster.");
780 return rush_attack(NULL);
781 case 19: /* Whirlwind Attack */
787 if (p_ptr->cut < 300)
788 set_cut(p_ptr->cut + 300);
790 set_cut(p_ptr->cut * 2);
792 for (dir = 0; dir < 8; dir++)
794 y = py + ddy_ddd[dir];
795 x = px + ddx_ddd[dir];
798 /* Get the monster */
799 m_ptr = &m_list[c_ptr->m_idx];
801 /* Hack -- attack monsters */
802 if (c_ptr->m_idx && (m_ptr->ml || cave_floor_bold(y, x)))
804 if (!monster_living(&r_info[m_ptr->r_idx]))
808 monster_desc(m_name, m_ptr, 0);
810 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤¤¡ª", m_name);
812 msg_format("%s is unharmed!", m_name);
815 else py_attack(y, x, HISSATSU_SEKIRYUKA);
822 if (!get_rep_dir2(&dir)) return FALSE;
823 if (dir == 5) return FALSE;
826 if (cave[y][x].m_idx)
827 py_attack(y, x, HISSATSU_QUAKE);
830 earthquake(py, px, 10);
836 int total_damage = 0, basedam, i;
837 u32b flgs[TR_FLAG_SIZE];
839 if (!get_aim_dir(&dir)) return FALSE;
841 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
843 msg_print("You swing your weapon downward.");
845 for (i = 0; i < 2; i++)
849 if (!buki_motteruka(INVEN_RARM+i)) break;
850 o_ptr = &inventory[INVEN_RARM+i];
851 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
852 damage = o_ptr->to_d * 100;
853 object_flags(o_ptr, flgs);
854 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
860 else if (have_flag(flgs, TR_VORPAL))
862 /* vorpal flag only */
867 damage *= p_ptr->num_blow[i];
868 total_damage += damage / 200;
869 if (i) total_damage = total_damage*7/10;
871 fire_beam(GF_FORCE, dir, total_damage);
877 msg_print("ͺ¶«¤Ó¤ò¤¢¤²¤¿¡ª");
879 msg_print("You roar out!");
881 project_hack(GF_SOUND, randint1(p_ptr->lev * 3));
882 aggravate_monsters(0);
888 if (!get_rep_dir2(&dir)) return FALSE;
889 if (dir == 5) return FALSE;
890 for (i = 0; i < 3; i++)
900 if (cave[y][x].m_idx)
901 py_attack(y, x, HISSATSU_3DAN);
905 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
907 msg_print("There is no monster.");
912 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
917 /* Monster is dead? */
918 if (!cave[y][x].m_idx) break;
922 m_idx = cave[y][x].m_idx;
923 m_ptr = &m_list[m_idx];
925 /* Monster cannot move back? */
926 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx])) continue;
928 cave[y][x].m_idx = 0;
929 cave[ny][nx].m_idx = m_idx;
933 update_mon(m_idx, TRUE);
935 /* Player can move forward? */
936 if (player_can_enter(cave[y][x].feat))
938 /* Save the old location */
942 /* Move the player */
949 tmp = cave[py][px].m_idx;
950 cave[py][px].m_idx = cave[oy][ox].m_idx;
951 cave[oy][ox].m_idx = tmp;
952 m_list[p_ptr->riding].fy = py;
953 m_list[p_ptr->riding].fx = px;
954 update_mon(cave[py][px].m_idx, TRUE);
959 /* Redraw the old spot */
962 /* Redraw the new spot */
966 /* Redraw the old spot */
969 /* Redraw the new spot */
972 /* Check for new panel (redraw map) */
976 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
978 /* Update the monsters */
979 p_ptr->update |= (PU_DISTANCE);
982 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
988 if (i < 2) msg_print(NULL);
994 if (!get_rep_dir2(&dir)) return FALSE;
995 if (dir == 5) return FALSE;
998 if (cave[y][x].m_idx)
999 py_attack(y, x, HISSATSU_DRAIN);
1003 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1005 msg_print("There is no monster.");
1014 msg_print("Éð´ï¤òÉÔµ¬Â§¤ËÍɤ餷¤¿¡¥¡¥¡¥");
1016 msg_print("You irregularly wave your weapon...");
1018 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1019 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1020 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1025 #define NEED_MANA_PER_MONSTER 8
1028 /* int count = 0; currently unused */
1031 if (!rush_attack(&mdeath)) break;
1034 /* Reserve needed mana point */
1035 p_ptr->csp -= technic_info[TECHNIC_HISSATSU][26].smana;
1039 p_ptr->csp -= NEED_MANA_PER_MONSTER;
1041 /* count++; currently unused */
1043 p_ptr->redraw |= PR_MANA;
1046 while (p_ptr->csp > NEED_MANA_PER_MONSTER);
1047 if (new) return FALSE;
1049 /* Restore reserved mana */
1050 p_ptr->csp += technic_info[TECHNIC_HISSATSU][26].smana;
1053 #undef NEED_MANA_PER_MONSTER
1057 if (!tgt_pt(&x, &y)) return FALSE;
1058 if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
1059 (distance(y, x, py, px) > MAX_SIGHT / 2) ||
1060 !projectable(py, px, y, x))
1063 msg_print("¼ºÇÔ¡ª");
1065 msg_print("You cannot move to that place!");
1069 if (p_ptr->anti_tele)
1072 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
1074 msg_print("A mysterious force prevents you from teleporting!");
1079 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
1080 teleport_player_to(y, x, TRUE);
1087 if (!get_rep_dir(&dir, FALSE)) return FALSE;
1090 if (cave[y][x].m_idx)
1093 if (cave[y][x].m_idx)
1102 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1104 msg_print("You don't see any monster in this direction");
1112 int total_damage = 0, basedam, i;
1114 u32b flgs[TR_FLAG_SIZE];
1117 if (!get_rep_dir2(&dir)) return FALSE;
1118 if (dir == 5) return FALSE;
1121 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
1124 msg_print("¤Ê¤¼¤«¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¡£");
1126 msg_print("Something prevent you from attacking.");
1131 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
1133 msg_print("You swing your weapon downward.");
1135 for (i = 0; i < 2; i++)
1138 if (!buki_motteruka(INVEN_RARM+i)) break;
1139 o_ptr = &inventory[INVEN_RARM+i];
1140 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
1141 damage = o_ptr->to_d * 100;
1142 object_flags(o_ptr, flgs);
1143 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
1149 else if (have_flag(flgs, TR_VORPAL))
1151 /* vorpal flag only */
1156 damage += p_ptr->to_d[i] * 100;
1157 damage *= p_ptr->num_blow[i];
1158 total_damage += (damage / 100);
1160 project(0, (cave_floor_bold(y, x) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
1165 if (!get_rep_dir2(&dir)) return FALSE;
1166 if (dir == 5) return FALSE;
1169 if (cave[y][x].m_idx)
1170 py_attack(y, x, HISSATSU_UNDEAD);
1174 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1176 msg_print("There is no monster.");
1181 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "·Ä±Àµ´Ç¦·õ¤ò»È¤Ã¤¿¾×·â", -1);
1183 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "exhaustion on using Keiun-Kininken", -1);
1191 if (!get_check("ËÜÅö¤Ë¼«»¦¤·¤Þ¤¹¤«¡©")) return FALSE;
1193 if (!get_check("Do you really want to commit suicide? ")) return FALSE;
1195 /* Special Verification for suicide */
1197 prt("³Îǧ¤Î¤¿¤á '@' ¤ò²¡¤·¤Æ²¼¤µ¤¤¡£", 0, 0);
1199 prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
1205 if (i != '@') return FALSE;
1206 if (p_ptr->total_winner)
1208 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1209 p_ptr->total_winner = TRUE;
1214 msg_print("Éð»ÎÆ»¤È¤Ï¡¢»à¤Ì¤³¤È¤È¸«¤Ä¤±¤¿¤ê¡£");
1215 take_hit(DAMAGE_FORCE, 9999, "ÀÚÊ¢", -1);
1217 msg_print("Meaning of Bushi-do is found in the death.");
1218 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1225 msg_print("¤Ê¤Ë¡©");
1237 * do_cmd_cast calls this function if the player's class
1240 void do_cmd_hissatsu(void)
1247 /* not if confused */
1248 if (p_ptr->confused)
1251 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1253 msg_print("You are too confused!");
1258 if (!buki_motteruka(INVEN_RARM))
1260 if (flush_failure) flush();
1262 msg_print("Éð´ï¤ò»ý¤¿¤Ê¤¤¤Èɬ»¦µ»¤Ï»È¤¨¤Ê¤¤¡ª");
1264 msg_print("You need to wield a weapon!");
1269 if (!p_ptr->spell_learned1)
1272 msg_print("²¿¤âµ»¤òÃΤé¤Ê¤¤¡£");
1274 msg_print("You don't know any special attacks.");
1280 if (p_ptr->special_defense & KATA_MASK)
1282 set_action(ACTION_NONE);
1286 if (!get_hissatsu_power(&n)) return;
1288 spell = technic_info[TECHNIC_HISSATSU][n];
1290 /* Verify "dangerous" spells */
1291 if (spell.smana > p_ptr->csp)
1293 if (flush_failure) flush();
1296 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
1298 msg_print("You do not have enough mana to use this power.");
1306 /* Cast the spell */
1307 cast = cast_hissatsu_spell(n);
1315 p_ptr->csp -= spell.smana;
1318 if (p_ptr->csp < 0) p_ptr->csp = 0;
1321 p_ptr->redraw |= (PR_MANA);
1324 p_ptr->window |= (PW_PLAYER);
1325 p_ptr->window |= (PW_SPELL);
1329 void do_cmd_gain_hissatsu(void)
1338 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
1340 set_action(ACTION_NONE);
1343 if (p_ptr->blind || no_lite())
1346 msg_print("Ìܤ¬¸«¤¨¤Ê¤¤¡ª");
1348 msg_print("You cannot see!");
1354 if (p_ptr->confused)
1357 msg_print("º®Í𤷤Ƥ¤¤ÆÆɤá¤Ê¤¤¡ª");
1359 msg_print("You are too confused!");
1365 if (!(p_ptr->new_spells))
1368 msg_print("¿·¤·¤¤É¬»¦µ»¤ò³Ð¤¨¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¡ª");
1370 msg_print("You cannot learn any new special attacks!");
1377 if( p_ptr->new_spells < 10 ){
1378 msg_format("¤¢¤È %d ¤Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1380 msg_format("¤¢¤È %d ¸Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1383 msg_format("You can learn %d new special attack%s.", p_ptr->new_spells,
1384 (p_ptr->new_spells == 1?"":"s"));
1387 item_tester_tval = TV_HISSATSU_BOOK;
1391 q = "¤É¤Î½ñ¤«¤é³Ø¤Ó¤Þ¤¹¤«? ";
1393 q = "Study which book? ";
1397 s = "Æɤá¤ë½ñ¤¬¤Ê¤¤¡£";
1399 s = "You have no books that you can read.";
1402 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
1404 /* Get the item (in the pack) */
1407 o_ptr = &inventory[item];
1410 /* Get the item (on the floor) */
1413 o_ptr = &o_list[0 - item];
1416 for (i = o_ptr->sval * 8; i < o_ptr->sval * 8 + 8; i++)
1418 if (p_ptr->spell_learned1 & (1L << i)) continue;
1419 if (technic_info[TECHNIC_HISSATSU][i].slevel > p_ptr->lev) continue;
1421 p_ptr->spell_learned1 |= (1L << i);
1422 p_ptr->spell_worked1 |= (1L << i);
1424 msg_format("%s¤Îµ»¤ò³Ð¤¨¤¿¡£", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1426 msg_format("You have learned the special attack of %s.", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1428 for (j = 0; j < 64; j++)
1430 /* Stop at the first empty space */
1431 if (p_ptr->spell_order[j] == 99) break;
1433 p_ptr->spell_order[j] = i;
1440 msg_print("²¿¤â³Ð¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
1442 msg_print("You were not able to learn any special attacks.");
1449 p_ptr->update |= (PU_SPELLS);