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);
645 if (!identify_fully(TRUE)) return FALSE;
649 if (!ident_spell(TRUE)) return FALSE;
655 if (!get_rep_dir2(&dir)) return FALSE;
656 if (dir == 5) return FALSE;
659 if (cave[y][x].m_idx)
660 py_attack(y, x, HISSATSU_HAGAN);
662 /* Non-walls (etc) */
663 if (cave_floor_bold(y, x)) break;
665 /* Permanent walls */
666 if (cave[y][x].feat >= FEAT_PERM_EXTRA) break;
668 if (cave[y][x].feat < FEAT_DOOR_HEAD) break;
670 /* Forget the wall */
671 cave[y][x].info &= ~(CAVE_MARK);
673 /* Destroy the feature */
674 cave_set_feat(y, x, floor_type[randint0(100)]);
676 /* Update some things */
677 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
683 if (!get_rep_dir2(&dir)) return FALSE;
684 if (dir == 5) return FALSE;
687 if (cave[y][x].m_idx)
688 py_attack(y, x, HISSATSU_COLD);
692 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
694 msg_print("There is no monster.");
702 if (!get_rep_dir2(&dir)) return FALSE;
703 if (dir == 5) return FALSE;
706 if (cave[y][x].m_idx)
707 py_attack(y, x, HISSATSU_KYUSHO);
711 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
713 msg_print("There is no monster.");
721 if (!get_rep_dir2(&dir)) return FALSE;
722 if (dir == 5) return FALSE;
725 if (cave[y][x].m_idx)
726 py_attack(y, x, HISSATSU_MAJIN);
730 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
732 msg_print("There is no monster.");
740 if (!get_rep_dir2(&dir)) return FALSE;
741 if (dir == 5) return FALSE;
744 if (cave[y][x].m_idx)
745 py_attack(y, x, HISSATSU_SUTEMI);
749 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
751 msg_print("There is no monster.");
755 p_ptr->sutemi = TRUE;
760 if (!get_rep_dir2(&dir)) return FALSE;
761 if (dir == 5) return FALSE;
764 if (cave[y][x].m_idx)
765 py_attack(y, x, HISSATSU_ELEC);
769 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
771 msg_print("There is no monster.");
778 return rush_attack(NULL);
779 case 19: /* Whirlwind Attack */
785 if (p_ptr->cut < 300)
786 set_cut(p_ptr->cut + 300);
788 set_cut(p_ptr->cut * 2);
790 for (dir = 0; dir < 8; dir++)
792 y = py + ddy_ddd[dir];
793 x = px + ddx_ddd[dir];
796 /* Get the monster */
797 m_ptr = &m_list[c_ptr->m_idx];
799 /* Hack -- attack monsters */
800 if (c_ptr->m_idx && (m_ptr->ml || cave_floor_bold(y, x)))
802 if (!monster_living(&r_info[m_ptr->r_idx]))
806 monster_desc(m_name, m_ptr, 0);
808 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤¤¡ª", m_name);
810 msg_format("%s is unharmed!", m_name);
813 else py_attack(y, x, HISSATSU_SEKIRYUKA);
820 if (!get_rep_dir2(&dir)) return FALSE;
821 if (dir == 5) return FALSE;
824 if (cave[y][x].m_idx)
825 py_attack(y, x, HISSATSU_QUAKE);
828 earthquake(py, px, 10);
834 int total_damage = 0, basedam, i;
835 u32b flgs[TR_FLAG_SIZE];
837 if (!get_aim_dir(&dir)) return FALSE;
839 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
841 msg_print("You swing your weapon downward.");
843 for (i = 0; i < 2; i++)
847 if (!buki_motteruka(INVEN_RARM+i)) break;
848 o_ptr = &inventory[INVEN_RARM+i];
849 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
850 damage = o_ptr->to_d * 100;
851 object_flags(o_ptr, flgs);
852 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
858 else if (have_flag(flgs, TR_VORPAL))
860 /* vorpal flag only */
865 damage *= p_ptr->num_blow[i];
866 total_damage += damage / 200;
867 if (i) total_damage = total_damage*7/10;
869 fire_beam(GF_FORCE, dir, total_damage);
875 msg_print("ͺ¶«¤Ó¤ò¤¢¤²¤¿¡ª");
877 msg_print("You roar out!");
879 project_hack(GF_SOUND, randint1(p_ptr->lev * 3));
880 aggravate_monsters(0);
886 if (!get_rep_dir2(&dir)) return FALSE;
887 if (dir == 5) return FALSE;
888 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.");
910 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
915 /* Monster is dead? */
916 if (!cave[y][x].m_idx) break;
920 m_idx = cave[y][x].m_idx;
921 m_ptr = &m_list[m_idx];
923 /* Monster cannot move back? */
924 if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx])) continue;
926 cave[y][x].m_idx = 0;
927 cave[ny][nx].m_idx = m_idx;
931 update_mon(m_idx, TRUE);
933 /* Player can move forward? */
934 if (player_can_enter(cave[y][x].feat))
936 /* Save the old location */
940 /* Move the player */
947 tmp = cave[py][px].m_idx;
948 cave[py][px].m_idx = cave[oy][ox].m_idx;
949 cave[oy][ox].m_idx = tmp;
950 m_list[p_ptr->riding].fy = py;
951 m_list[p_ptr->riding].fx = px;
952 update_mon(cave[py][px].m_idx, TRUE);
957 /* Redraw the old spot */
960 /* Redraw the new spot */
964 /* Redraw the old spot */
967 /* Redraw the new spot */
970 /* Check for new panel (redraw map) */
974 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
976 /* Update the monsters */
977 p_ptr->update |= (PU_DISTANCE);
980 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
986 if (i < 2) msg_print(NULL);
992 if (!get_rep_dir2(&dir)) return FALSE;
993 if (dir == 5) return FALSE;
996 if (cave[y][x].m_idx)
997 py_attack(y, x, HISSATSU_DRAIN);
1001 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1003 msg_print("There is no monster.");
1012 msg_print("Éð´ï¤òÉÔµ¬Â§¤ËÍɤ餷¤¿¡¥¡¥¡¥");
1014 msg_print("You irregularly wave your weapon...");
1016 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1017 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1018 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1023 #define NEED_MANA_PER_MONSTER 8
1026 /* int count = 0; currently unused */
1029 if (!rush_attack(&mdeath)) break;
1032 /* Reserve needed mana point */
1033 p_ptr->csp -= technic_info[TECHNIC_HISSATSU][26].smana;
1037 p_ptr->csp -= NEED_MANA_PER_MONSTER;
1039 /* count++; currently unused */
1041 p_ptr->redraw |= PR_MANA;
1044 while (p_ptr->csp > NEED_MANA_PER_MONSTER);
1045 if (new) return FALSE;
1047 /* Restore reserved mana */
1048 p_ptr->csp += technic_info[TECHNIC_HISSATSU][26].smana;
1051 #undef NEED_MANA_PER_MONSTER
1055 if (!tgt_pt(&x, &y)) return FALSE;
1056 if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
1057 (distance(y, x, py, px) > MAX_SIGHT / 2) ||
1058 !projectable(py, px, y, x))
1061 msg_print("¼ºÇÔ¡ª");
1063 msg_print("You cannot move to that place!");
1067 if (p_ptr->anti_tele)
1070 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
1072 msg_print("A mysterious force prevents you from teleporting!");
1077 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
1078 teleport_player_to(y, x, TRUE);
1085 if (!get_rep_dir(&dir, FALSE)) return FALSE;
1088 if (cave[y][x].m_idx)
1091 if (cave[y][x].m_idx)
1100 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1102 msg_print("You don't see any monster in this direction");
1110 int total_damage = 0, basedam, i;
1112 u32b flgs[TR_FLAG_SIZE];
1115 if (!get_rep_dir2(&dir)) return FALSE;
1116 if (dir == 5) return FALSE;
1119 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
1122 msg_print("¤Ê¤¼¤«¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¡£");
1124 msg_print("Something prevent you from attacking.");
1129 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
1131 msg_print("You swing your weapon downward.");
1133 for (i = 0; i < 2; i++)
1136 if (!buki_motteruka(INVEN_RARM+i)) break;
1137 o_ptr = &inventory[INVEN_RARM+i];
1138 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
1139 damage = o_ptr->to_d * 100;
1140 object_flags(o_ptr, flgs);
1141 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
1147 else if (have_flag(flgs, TR_VORPAL))
1149 /* vorpal flag only */
1154 damage += p_ptr->to_d[i] * 100;
1155 damage *= p_ptr->num_blow[i];
1156 total_damage += (damage / 100);
1158 project(0, (cave_floor_bold(y, x) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
1163 if (!get_rep_dir2(&dir)) return FALSE;
1164 if (dir == 5) return FALSE;
1167 if (cave[y][x].m_idx)
1168 py_attack(y, x, HISSATSU_UNDEAD);
1172 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1174 msg_print("There is no monster.");
1179 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "·Ä±Àµ´Ç¦·õ¤ò»È¤Ã¤¿¾×·â", -1);
1181 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "exhaustion on using Keiun-Kininken", -1);
1189 if (!get_check("ËÜÅö¤Ë¼«»¦¤·¤Þ¤¹¤«¡©")) return FALSE;
1191 if (!get_check("Do you really want to commit suicide? ")) return FALSE;
1193 /* Special Verification for suicide */
1195 prt("³Îǧ¤Î¤¿¤á '@' ¤ò²¡¤·¤Æ²¼¤µ¤¤¡£", 0, 0);
1197 prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
1203 if (i != '@') return FALSE;
1204 if (p_ptr->total_winner)
1206 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1207 p_ptr->total_winner = TRUE;
1212 msg_print("Éð»ÎÆ»¤È¤Ï¡¢»à¤Ì¤³¤È¤È¸«¤Ä¤±¤¿¤ê¡£");
1213 take_hit(DAMAGE_FORCE, 9999, "ÀÚÊ¢", -1);
1215 msg_print("Meaning of Bushi-do is found in the death.");
1216 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1223 msg_print("¤Ê¤Ë¡©");
1235 * do_cmd_cast calls this function if the player's class
1238 void do_cmd_hissatsu(void)
1245 /* not if confused */
1246 if (p_ptr->confused)
1249 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1251 msg_print("You are too confused!");
1256 if (!buki_motteruka(INVEN_RARM))
1258 if (flush_failure) flush();
1260 msg_print("Éð´ï¤ò»ý¤¿¤Ê¤¤¤Èɬ»¦µ»¤Ï»È¤¨¤Ê¤¤¡ª");
1262 msg_print("You need to wield a weapon!");
1267 if (!p_ptr->spell_learned1)
1270 msg_print("²¿¤âµ»¤òÃΤé¤Ê¤¤¡£");
1272 msg_print("You don't know any special attacks.");
1278 if (p_ptr->special_defense & KATA_MASK)
1280 set_action(ACTION_NONE);
1284 if (!get_hissatsu_power(&n)) return;
1286 spell = technic_info[TECHNIC_HISSATSU][n];
1288 /* Verify "dangerous" spells */
1289 if (spell.smana > p_ptr->csp)
1291 if (flush_failure) flush();
1294 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
1296 msg_print("You do not have enough mana to use this power.");
1304 /* Cast the spell */
1305 cast = cast_hissatsu_spell(n);
1313 p_ptr->csp -= spell.smana;
1316 if (p_ptr->csp < 0) p_ptr->csp = 0;
1319 p_ptr->redraw |= (PR_MANA);
1322 p_ptr->window |= (PW_PLAYER);
1323 p_ptr->window |= (PW_SPELL);
1327 void do_cmd_gain_hissatsu(void)
1336 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
1338 set_action(ACTION_NONE);
1341 if (p_ptr->blind || no_lite())
1344 msg_print("Ìܤ¬¸«¤¨¤Ê¤¤¡ª");
1346 msg_print("You cannot see!");
1352 if (p_ptr->confused)
1355 msg_print("º®Í𤷤Ƥ¤¤ÆÆɤá¤Ê¤¤¡ª");
1357 msg_print("You are too confused!");
1363 if (!(p_ptr->new_spells))
1366 msg_print("¿·¤·¤¤É¬»¦µ»¤ò³Ð¤¨¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¡ª");
1368 msg_print("You cannot learn any new special attacks!");
1375 if( p_ptr->new_spells < 10 ){
1376 msg_format("¤¢¤È %d ¤Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1378 msg_format("¤¢¤È %d ¸Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1381 msg_format("You can learn %d new special attack%s.", p_ptr->new_spells,
1382 (p_ptr->new_spells == 1?"":"s"));
1385 item_tester_tval = TV_HISSATSU_BOOK;
1389 q = "¤É¤Î½ñ¤«¤é³Ø¤Ó¤Þ¤¹¤«? ";
1391 q = "Study which book? ";
1395 s = "Æɤá¤ë½ñ¤¬¤Ê¤¤¡£";
1397 s = "You have no books that you can read.";
1400 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
1402 /* Get the item (in the pack) */
1405 o_ptr = &inventory[item];
1408 /* Get the item (on the floor) */
1411 o_ptr = &o_list[0 - item];
1414 for (i = o_ptr->sval * 8; i < o_ptr->sval * 8 + 8; i++)
1416 if (p_ptr->spell_learned1 & (1L << i)) continue;
1417 if (technic_info[TECHNIC_HISSATSU][i].slevel > p_ptr->lev) continue;
1419 p_ptr->spell_learned1 |= (1L << i);
1420 p_ptr->spell_worked1 |= (1L << i);
1422 msg_format("%s¤Îµ»¤ò³Ð¤¨¤¿¡£", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1424 msg_format("You have learned the special attack of %s.", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1426 for (j = 0; j < 64; j++)
1428 /* Stop at the first empty space */
1429 if (p_ptr->spell_order[j] == 99) break;
1431 p_ptr->spell_order[j] = i;
1438 msg_print("²¿¤â³Ð¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
1440 msg_print("You were not able to learn any special attacks.");
1447 p_ptr->update |= (PU_SPELLS);