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, 0) || is_trap(cave[y][x].feat))
502 if (player_can_enter(cave[y][x].feat, 0) && !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 if (!have_flag(f_flags_bold(y, x), FF_HURT_ROCK)) break;
667 /* Destroy the feature */
668 cave_alter_feat(y, x, FF_HURT_ROCK);
670 /* Update some things */
671 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
677 if (!get_rep_dir2(&dir)) return FALSE;
678 if (dir == 5) return FALSE;
681 if (cave[y][x].m_idx)
682 py_attack(y, x, HISSATSU_COLD);
686 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
688 msg_print("There is no monster.");
696 if (!get_rep_dir2(&dir)) return FALSE;
697 if (dir == 5) return FALSE;
700 if (cave[y][x].m_idx)
701 py_attack(y, x, HISSATSU_KYUSHO);
705 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
707 msg_print("There is no monster.");
715 if (!get_rep_dir2(&dir)) return FALSE;
716 if (dir == 5) return FALSE;
719 if (cave[y][x].m_idx)
720 py_attack(y, x, HISSATSU_MAJIN);
724 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
726 msg_print("There is no monster.");
734 if (!get_rep_dir2(&dir)) return FALSE;
735 if (dir == 5) return FALSE;
738 if (cave[y][x].m_idx)
739 py_attack(y, x, HISSATSU_SUTEMI);
743 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
745 msg_print("There is no monster.");
749 p_ptr->sutemi = TRUE;
754 if (!get_rep_dir2(&dir)) return FALSE;
755 if (dir == 5) return FALSE;
758 if (cave[y][x].m_idx)
759 py_attack(y, x, HISSATSU_ELEC);
763 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
765 msg_print("There is no monster.");
772 return rush_attack(NULL);
773 case 19: /* Whirlwind Attack */
779 if (p_ptr->cut < 300)
780 set_cut(p_ptr->cut + 300);
782 set_cut(p_ptr->cut * 2);
784 for (dir = 0; dir < 8; dir++)
786 y = py + ddy_ddd[dir];
787 x = px + ddx_ddd[dir];
790 /* Get the monster */
791 m_ptr = &m_list[c_ptr->m_idx];
793 /* Hack -- attack monsters */
794 if (c_ptr->m_idx && (m_ptr->ml || have_flag(f_flags_bold(y, x), FF_PROJECT)))
796 if (!monster_living(&r_info[m_ptr->r_idx]))
800 monster_desc(m_name, m_ptr, 0);
802 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤¤¡ª", m_name);
804 msg_format("%s is unharmed!", m_name);
807 else py_attack(y, x, HISSATSU_SEKIRYUKA);
814 if (!get_rep_dir2(&dir)) return FALSE;
815 if (dir == 5) return FALSE;
818 if (cave[y][x].m_idx)
819 py_attack(y, x, HISSATSU_QUAKE);
822 earthquake(py, px, 10);
828 int total_damage = 0, basedam, i;
829 u32b flgs[TR_FLAG_SIZE];
831 if (!get_aim_dir(&dir)) return FALSE;
833 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
835 msg_print("You swing your weapon downward.");
837 for (i = 0; i < 2; i++)
841 if (!buki_motteruka(INVEN_RARM+i)) break;
842 o_ptr = &inventory[INVEN_RARM+i];
843 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
844 damage = o_ptr->to_d * 100;
845 object_flags(o_ptr, flgs);
846 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
852 else if (have_flag(flgs, TR_VORPAL))
854 /* vorpal flag only */
859 damage *= p_ptr->num_blow[i];
860 total_damage += damage / 200;
861 if (i) total_damage = total_damage*7/10;
863 fire_beam(GF_FORCE, dir, total_damage);
869 msg_print("ͺ¶«¤Ó¤ò¤¢¤²¤¿¡ª");
871 msg_print("You roar out!");
873 project_hack(GF_SOUND, randint1(p_ptr->lev * 3));
874 aggravate_monsters(0);
880 if (!get_rep_dir2(&dir)) return FALSE;
881 if (dir == 5) return FALSE;
882 for (i = 0; i < 3; i++)
892 if (cave[y][x].m_idx)
893 py_attack(y, x, HISSATSU_3DAN);
897 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
899 msg_print("There is no monster.");
904 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
909 /* Monster is dead? */
910 if (!cave[y][x].m_idx) break;
914 m_idx = cave[y][x].m_idx;
915 m_ptr = &m_list[m_idx];
917 /* Monster cannot move back? */
918 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx], 0)) continue;
920 cave[y][x].m_idx = 0;
921 cave[ny][nx].m_idx = m_idx;
925 update_mon(m_idx, TRUE);
927 /* Player can move forward? */
928 if (player_can_enter(cave[y][x].feat, 0))
930 /* Save the old location */
934 /* Move the player */
940 cave[oy][ox].m_idx = cave[py][px].m_idx;
941 cave[py][px].m_idx = p_ptr->riding;
942 m_list[p_ptr->riding].fy = py;
943 m_list[p_ptr->riding].fx = px;
944 update_mon(p_ptr->riding, TRUE);
949 /* Redraw the old spot */
952 /* Redraw the new spot */
956 /* Redraw the old spot */
959 /* Redraw the new spot */
962 /* Check for new panel (redraw map) */
966 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
968 /* Update the monsters */
969 p_ptr->update |= (PU_DISTANCE);
972 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
978 if (i < 2) msg_print(NULL);
984 if (!get_rep_dir2(&dir)) return FALSE;
985 if (dir == 5) return FALSE;
988 if (cave[y][x].m_idx)
989 py_attack(y, x, HISSATSU_DRAIN);
993 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
995 msg_print("There is no monster.");
1004 msg_print("Éð´ï¤òÉÔµ¬Â§¤ËÍɤ餷¤¿¡¥¡¥¡¥");
1006 msg_print("You irregularly wave your weapon...");
1008 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1009 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1010 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1015 #define NEED_MANA_PER_MONSTER 8
1018 /* int count = 0; currently unused */
1021 if (!rush_attack(&mdeath)) break;
1024 /* Reserve needed mana point */
1025 p_ptr->csp -= technic_info[TECHNIC_HISSATSU][26].smana;
1029 p_ptr->csp -= NEED_MANA_PER_MONSTER;
1031 /* count++; currently unused */
1033 p_ptr->redraw |= PR_MANA;
1036 while (p_ptr->csp > NEED_MANA_PER_MONSTER);
1037 if (new) return FALSE;
1039 /* Restore reserved mana */
1040 p_ptr->csp += technic_info[TECHNIC_HISSATSU][26].smana;
1043 #undef NEED_MANA_PER_MONSTER
1047 if (!tgt_pt(&x, &y)) return FALSE;
1048 if (!cave_teleportable_bold(y, x) ||
1049 (distance(y, x, py, px) > MAX_SIGHT / 2) ||
1050 !projectable(py, px, y, x))
1053 msg_print("¼ºÇÔ¡ª");
1055 msg_print("You cannot move to that place!");
1059 if (p_ptr->anti_tele)
1062 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
1064 msg_print("A mysterious force prevents you from teleporting!");
1069 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
1070 teleport_player_to(y, x, TRUE);
1077 if (!get_rep_dir(&dir, FALSE)) return FALSE;
1080 if (cave[y][x].m_idx)
1083 if (cave[y][x].m_idx)
1092 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1094 msg_print("You don't see any monster in this direction");
1102 int total_damage = 0, basedam, i;
1104 u32b flgs[TR_FLAG_SIZE];
1107 if (!get_rep_dir2(&dir)) return FALSE;
1108 if (dir == 5) return FALSE;
1111 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
1114 msg_print("¤Ê¤¼¤«¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¡£");
1116 msg_print("Something prevent you from attacking.");
1121 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
1123 msg_print("You swing your weapon downward.");
1125 for (i = 0; i < 2; i++)
1128 if (!buki_motteruka(INVEN_RARM+i)) break;
1129 o_ptr = &inventory[INVEN_RARM+i];
1130 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
1131 damage = o_ptr->to_d * 100;
1132 object_flags(o_ptr, flgs);
1133 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
1139 else if (have_flag(flgs, TR_VORPAL))
1141 /* vorpal flag only */
1146 damage += p_ptr->to_d[i] * 100;
1147 damage *= p_ptr->num_blow[i];
1148 total_damage += (damage / 100);
1150 project(0, (have_flag(f_flags_bold(y, x), FF_PROJECT) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
1155 if (!get_rep_dir2(&dir)) return FALSE;
1156 if (dir == 5) return FALSE;
1159 if (cave[y][x].m_idx)
1160 py_attack(y, x, HISSATSU_UNDEAD);
1164 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1166 msg_print("There is no monster.");
1171 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "·Ä±Àµ´Ç¦·õ¤ò»È¤Ã¤¿¾×·â", -1);
1173 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "exhaustion on using Keiun-Kininken", -1);
1181 if (!get_check("ËÜÅö¤Ë¼«»¦¤·¤Þ¤¹¤«¡©")) return FALSE;
1183 if (!get_check("Do you really want to commit suicide? ")) return FALSE;
1185 /* Special Verification for suicide */
1187 prt("³Îǧ¤Î¤¿¤á '@' ¤ò²¡¤·¤Æ²¼¤µ¤¤¡£", 0, 0);
1189 prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
1195 if (i != '@') return FALSE;
1196 if (p_ptr->total_winner)
1198 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1199 p_ptr->total_winner = TRUE;
1204 msg_print("Éð»ÎÆ»¤È¤Ï¡¢»à¤Ì¤³¤È¤È¸«¤Ä¤±¤¿¤ê¡£");
1205 take_hit(DAMAGE_FORCE, 9999, "ÀÚÊ¢", -1);
1207 msg_print("Meaning of Bushi-do is found in the death.");
1208 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1215 msg_print("¤Ê¤Ë¡©");
1227 * do_cmd_cast calls this function if the player's class
1230 void do_cmd_hissatsu(void)
1237 /* not if confused */
1238 if (p_ptr->confused)
1241 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1243 msg_print("You are too confused!");
1248 if (!buki_motteruka(INVEN_RARM))
1250 if (flush_failure) flush();
1252 msg_print("Éð´ï¤ò»ý¤¿¤Ê¤¤¤Èɬ»¦µ»¤Ï»È¤¨¤Ê¤¤¡ª");
1254 msg_print("You need to wield a weapon!");
1259 if (!p_ptr->spell_learned1)
1262 msg_print("²¿¤âµ»¤òÃΤé¤Ê¤¤¡£");
1264 msg_print("You don't know any special attacks.");
1270 if (p_ptr->special_defense & KATA_MASK)
1272 set_action(ACTION_NONE);
1276 if (!get_hissatsu_power(&n)) return;
1278 spell = technic_info[TECHNIC_HISSATSU][n];
1280 /* Verify "dangerous" spells */
1281 if (spell.smana > p_ptr->csp)
1283 if (flush_failure) flush();
1286 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
1288 msg_print("You do not have enough mana to use this power.");
1296 /* Cast the spell */
1297 cast = cast_hissatsu_spell(n);
1305 p_ptr->csp -= spell.smana;
1308 if (p_ptr->csp < 0) p_ptr->csp = 0;
1311 p_ptr->redraw |= (PR_MANA);
1314 p_ptr->window |= (PW_PLAYER);
1315 p_ptr->window |= (PW_SPELL);
1319 void do_cmd_gain_hissatsu(void)
1328 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
1330 set_action(ACTION_NONE);
1333 if (p_ptr->blind || no_lite())
1336 msg_print("Ìܤ¬¸«¤¨¤Ê¤¤¡ª");
1338 msg_print("You cannot see!");
1344 if (p_ptr->confused)
1347 msg_print("º®Í𤷤Ƥ¤¤ÆÆɤá¤Ê¤¤¡ª");
1349 msg_print("You are too confused!");
1355 if (!(p_ptr->new_spells))
1358 msg_print("¿·¤·¤¤É¬»¦µ»¤ò³Ð¤¨¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¡ª");
1360 msg_print("You cannot learn any new special attacks!");
1367 if( p_ptr->new_spells < 10 ){
1368 msg_format("¤¢¤È %d ¤Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1370 msg_format("¤¢¤È %d ¸Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1373 msg_format("You can learn %d new special attack%s.", p_ptr->new_spells,
1374 (p_ptr->new_spells == 1?"":"s"));
1377 item_tester_tval = TV_HISSATSU_BOOK;
1381 q = "¤É¤Î½ñ¤«¤é³Ø¤Ó¤Þ¤¹¤«? ";
1383 q = "Study which book? ";
1387 s = "Æɤá¤ë½ñ¤¬¤Ê¤¤¡£";
1389 s = "You have no books that you can read.";
1392 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
1394 /* Get the item (in the pack) */
1397 o_ptr = &inventory[item];
1400 /* Get the item (on the floor) */
1403 o_ptr = &o_list[0 - item];
1406 for (i = o_ptr->sval * 8; i < o_ptr->sval * 8 + 8; i++)
1408 if (p_ptr->spell_learned1 & (1L << i)) continue;
1409 if (technic_info[TECHNIC_HISSATSU][i].slevel > p_ptr->lev) continue;
1411 p_ptr->spell_learned1 |= (1L << i);
1412 p_ptr->spell_worked1 |= (1L << i);
1414 msg_format("%s¤Îµ»¤ò³Ð¤¨¤¿¡£", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1416 msg_format("You have learned the special attack of %s.", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1418 for (j = 0; j < 64; j++)
1420 /* Stop at the first empty space */
1421 if (p_ptr->spell_order[j] == 99) break;
1423 p_ptr->spell_order[j] = i;
1430 msg_print("²¿¤â³Ð¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
1432 msg_print("You were not able to learn any special attacks.");
1439 p_ptr->update |= (PU_SPELLS);