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;
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 (!(spell_learned1 >> i)) break;
212 /* Access the spell */
213 if (spell.slevel > plev) continue;
214 if (!(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) || !(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();
317 p_ptr->window |= (PW_SPELL);
323 /* Abort if needed */
324 if (!flag) return (FALSE);
326 /* Save the choice */
329 #ifdef ALLOW_REPEAT /* TNB */
333 #endif /* ALLOW_REPEAT -- TNB */
341 * do_cmd_cast calls this function if the player's class
344 static bool cast_hissatsu_spell(int spell)
355 if (!get_aim_dir(&dir)) return FALSE;
356 project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL | PROJECT_NO_REF);
362 if (!get_rep_dir2(&dir)) return FALSE;
363 if (dir == 5) return FALSE;
364 for (cdir = 0;cdir < 8; cdir++)
366 if (cdd[cdir] == dir) break;
368 if (cdir == 8) return FALSE;
369 y = py + ddy_cdd[cdir];
370 x = px + ddx_cdd[cdir];
371 if (cave[y][x].m_idx)
375 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
377 msg_print("You attack the empty air.");
379 y = py + ddy_cdd[(cdir + 7) % 8];
380 x = px + ddx_cdd[(cdir + 7) % 8];
381 if (cave[y][x].m_idx)
385 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
387 msg_print("You attack the empty air.");
389 y = py + ddy_cdd[(cdir + 1) % 8];
390 x = px + ddx_cdd[(cdir + 1) % 8];
391 if (cave[y][x].m_idx)
395 msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
397 msg_print("You attack the empty air.");
404 if (!do_cmd_throw_aux(1, TRUE, 0)) return FALSE;
409 if (!get_rep_dir2(&dir)) return FALSE;
410 if (dir == 5) return FALSE;
413 if (cave[y][x].m_idx)
414 py_attack(y, x, HISSATSU_FIRE);
418 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
420 msg_print("There is no monster.");
428 detect_monsters_mind(DETECT_RAD_DEFAULT);
433 if (!get_rep_dir2(&dir)) return FALSE;
434 if (dir == 5) return FALSE;
437 if (cave[y][x].m_idx)
438 py_attack(y, x, HISSATSU_MINEUCHI);
442 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
444 msg_print("There is no monster.");
455 msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
457 msg_print("You cannot do it when riding.");
462 msg_print("Áê¼ê¤Î¹¶·â¤ËÂФ·¤Æ¿È¹½¤¨¤¿¡£");
464 msg_print("You prepare to counter blow.");
466 p_ptr->counter = TRUE;
474 msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
476 msg_print("You cannot do it when riding.");
481 if (!get_rep_dir2(&dir)) return FALSE;
483 if (dir == 5) return FALSE;
487 if (!cave[y][x].m_idx)
490 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
492 msg_print("There is no monster.");
499 if (!player_can_enter(cave[y][x].feat) || is_trap(cave[y][x].feat))
505 if (player_can_enter(cave[y][x].feat) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
511 /* Save the old location */
515 /* Move the player */
521 /* Redraw the old spot */
524 /* Redraw the new spot */
527 /* Check for new panel (redraw map) */
531 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW);
533 /* Update the monsters */
534 p_ptr->update |= (PU_DISTANCE);
537 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
539 /* Handle stuff XXX XXX XXX */
546 if (!get_rep_dir2(&dir)) return FALSE;
547 if (dir == 5) return FALSE;
550 if (cave[y][x].m_idx)
551 py_attack(y, x, HISSATSU_POISON);
555 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
557 msg_print("There is no monster.");
565 if (!get_rep_dir2(&dir)) return FALSE;
566 if (dir == 5) return FALSE;
569 if (cave[y][x].m_idx)
570 py_attack(y, x, HISSATSU_ZANMA);
574 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
576 msg_print("There is no monster.");
584 if (!get_rep_dir2(&dir)) return FALSE;
585 if (dir == 5) return FALSE;
588 if (cave[y][x].m_idx)
593 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
595 msg_print("There is no monster.");
599 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
603 if (cave[y][x].m_idx)
608 int m_idx = cave[y][x].m_idx;
609 monster_type *m_ptr = &m_list[m_idx];
612 monster_desc(m_name, m_ptr, 0);
614 for (i = 0; i < 5; i++)
618 if (cave_empty_bold(y, x))
625 if ((ty != oy) || (tx != ox))
628 msg_format("%s¤ò¿á¤Èô¤Ð¤·¤¿¡ª", m_name);
630 msg_format("You blow %s away!", m_name);
632 cave[oy][ox].m_idx = 0;
633 cave[ty][tx].m_idx = m_idx;
637 update_mon(m_idx, TRUE);
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[y][x].feat = floor_type[randint0(100)];
679 /* Update some things */
680 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
688 if (!get_rep_dir2(&dir)) return FALSE;
689 if (dir == 5) return FALSE;
692 if (cave[y][x].m_idx)
693 py_attack(y, x, HISSATSU_COLD);
697 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
699 msg_print("There is no monster.");
707 if (!get_rep_dir2(&dir)) return FALSE;
708 if (dir == 5) return FALSE;
711 if (cave[y][x].m_idx)
712 py_attack(y, x, HISSATSU_KYUSHO);
716 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
718 msg_print("There is no monster.");
726 if (!get_rep_dir2(&dir)) return FALSE;
727 if (dir == 5) return FALSE;
730 if (cave[y][x].m_idx)
731 py_attack(y, x, HISSATSU_MAJIN);
735 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
737 msg_print("There is no monster.");
745 if (!get_rep_dir2(&dir)) return FALSE;
746 if (dir == 5) return FALSE;
749 if (cave[y][x].m_idx)
750 py_attack(y, x, HISSATSU_SUTEMI);
754 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
756 msg_print("There is no monster.");
760 p_ptr->sutemi = TRUE;
765 if (!get_rep_dir2(&dir)) return FALSE;
766 if (dir == 5) return FALSE;
769 if (cave[y][x].m_idx)
770 py_attack(y, x, HISSATSU_ELEC);
774 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
776 msg_print("There is no monster.");
784 if (!get_aim_dir(&dir)) return FALSE;
785 project_hook(GF_ATTACK, dir, HISSATSU_NYUSIN, PROJECT_STOP | PROJECT_KILL | PROJECT_NO_REF);
788 case 19: /* Whirlwind Attack */
794 if (p_ptr->cut < 300)
795 set_cut(p_ptr->cut + 300);
797 set_cut(p_ptr->cut * 2);
799 for (dir = 0; dir < 8; dir++)
801 y = py + ddy_ddd[dir];
802 x = px + ddx_ddd[dir];
805 /* Get the monster */
806 m_ptr = &m_list[c_ptr->m_idx];
808 /* Hack -- attack monsters */
809 if (c_ptr->m_idx && (m_ptr->ml || cave_floor_bold(y, x)))
811 if (r_info[m_list[c_ptr->m_idx].r_idx].flags3 & (RF3_DEMON | RF3_UNDEAD | RF3_NONLIVING))
815 monster_desc(m_name, &m_list[c_ptr->m_idx], 0);
817 msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤¤¡ª", m_name);
819 msg_format("%s is unharmed!", m_name);
822 else py_attack(y, x, HISSATSU_SEKIRYUKA);
829 if (!get_rep_dir2(&dir)) return FALSE;
830 if (dir == 5) return FALSE;
833 if (cave[y][x].m_idx)
834 py_attack(y, x, HISSATSU_QUAKE);
837 earthquake(py, px, 10);
843 int total_damage = 0, basedam, i;
846 if (!get_aim_dir(&dir)) return FALSE;
848 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
850 msg_print("You swing your weapon downward.");
852 for (i = 0; i < 2; i++)
856 if (!buki_motteruka(INVEN_RARM+i)) break;
857 o_ptr = &inventory[INVEN_RARM+i];
858 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
859 damage = o_ptr->to_d * 100;
860 object_flags(o_ptr, &f1, &f2, &f3);
861 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
867 else if (object_known_p(o_ptr) && (f1 & TR1_VORPAL))
869 /* vorpal flag only */
874 damage *= p_ptr->num_blow[i];
875 total_damage += damage / 200;
876 if (i) total_damage = total_damage*7/10;
878 fire_beam(GF_FORCE, dir, total_damage);
884 msg_print("ͺ¶«¤Ó¤ò¤¢¤²¤¿¡ª");
886 msg_print("You roar out!");
888 project_hack(GF_SOUND, randint1(p_ptr->lev * 3));
889 aggravate_monsters(0);
895 if (!get_rep_dir2(&dir)) return FALSE;
896 if (dir == 5) return FALSE;
899 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.");
912 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
916 if (cave[y][x].m_idx)
919 int ny = y + ddy[dir];
920 int nx = x + ddx[dir];
921 int m_idx = cave[y][x].m_idx;
922 monster_type *m_ptr = &m_list[m_idx];
923 if (cave_empty_bold(ny, nx))
925 cave[y][x].m_idx = 0;
926 cave[ny][nx].m_idx = m_idx;
930 update_mon(m_idx, TRUE);
932 /* Save the old location */
936 /* Move the player */
943 tmp = cave[py][px].m_idx;
944 cave[py][px].m_idx = cave[oy][ox].m_idx;
945 cave[oy][ox].m_idx = tmp;
946 m_list[p_ptr->riding].fy = py;
947 m_list[p_ptr->riding].fx = px;
948 update_mon(cave[py][px].m_idx, TRUE);
953 /* Redraw the old spot */
956 /* Redraw the new spot */
959 /* Redraw the new spot */
962 /* Check for new panel (redraw map) */
966 p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW);
968 /* Update the monsters */
969 p_ptr->update |= (PU_DISTANCE);
972 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
974 /* Handle stuff XXX XXX XXX */
977 if (i < 2) msg_print(NULL);
988 if (!get_rep_dir2(&dir)) return FALSE;
989 if (dir == 5) return FALSE;
992 if (cave[y][x].m_idx)
993 py_attack(y, x, HISSATSU_DRAIN);
997 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
999 msg_print("There is no monster.");
1008 msg_print("Éð´ï¤òÉÔµ¬Â§¤ËÍɤ餷¤¿¡¥¡¥¡¥");
1010 msg_print("You irregularly wave your weapon...");
1012 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1013 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1014 project_hack(GF_ENGETSU, p_ptr->lev * 4);
1024 if (!get_aim_dir(&dir)) break;
1026 /* Reserve needed mana point */
1027 p_ptr->csp -= technic_info[TECHNIC_HISSATSU][26].smana;
1031 if (!project_hook(GF_ATTACK, dir, HISSATSU_NYUSIN, PROJECT_STOP | PROJECT_KILL | PROJECT_NO_REF)) break;
1034 p_ptr->redraw |= PR_MANA;
1036 } while (p_ptr->csp > 8);
1037 if (new) return FALSE;
1039 /* Restore reserved mana */
1040 p_ptr->csp += technic_info[TECHNIC_HISSATSU][26].smana;
1046 if (!tgt_pt(&x, &y)) return FALSE;
1047 if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
1048 (distance(y, x, py, px) > MAX_SIGHT / 2) ||
1049 !projectable(py, px, y, x))
1052 msg_print("¼ºÇÔ¡ª");
1054 msg_print("You cannot move to that place!");
1058 if (p_ptr->anti_tele)
1061 msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
1063 msg_print("A mysterious force prevents you from teleporting!");
1068 project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL | PROJECT_NO_REF, -1);
1069 teleport_player_to(y, x, TRUE);
1076 if (!get_rep_dir(&dir, FALSE)) return FALSE;
1079 if (cave[y][x].m_idx)
1082 if (cave[y][x].m_idx)
1091 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1093 msg_print("You don't see any monster in this direction");
1101 int total_damage = 0, basedam, i;
1106 if (!get_rep_dir2(&dir)) return FALSE;
1107 if (dir == 5) return FALSE;
1110 if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
1113 msg_print("¤Ê¤¼¤«¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤¤Ê¤¤¡£");
1115 msg_print("Something prevent you from attacking.");
1120 msg_print("Éð´ï¤òÂ礤¯¿¶¤ê²¼¤í¤·¤¿¡£");
1122 msg_print("You swing your weapon downward.");
1124 for (i = 0; i < 2; i++)
1127 if (!buki_motteruka(INVEN_RARM+i)) break;
1128 o_ptr = &inventory[INVEN_RARM+i];
1129 basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
1130 damage = o_ptr->to_d * 100;
1131 object_flags(o_ptr, &f1, &f2, &f3);
1132 if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
1138 else if (object_known_p(o_ptr) && (f1 & TR1_VORPAL))
1140 /* vorpal flag only */
1145 damage += p_ptr->to_d[i] * 100;
1146 damage *= p_ptr->num_blow[i];
1147 total_damage += (damage / 100);
1149 project(0, (cave_floor_bold(y, x) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
1154 if (!get_rep_dir2(&dir)) return FALSE;
1155 if (dir == 5) return FALSE;
1158 if (cave[y][x].m_idx)
1159 py_attack(y, x, HISSATSU_UNDEAD);
1163 msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
1165 msg_print("There is no monster.");
1170 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "·Ä±Àµ´Ç¦·õ¤ò»È¤Ã¤¿¾×·â", -1);
1172 take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "exhaustion on using Keiun-Kininken", -1);
1180 if (!get_check("ËÜÅö¤Ë¼«»¦¤·¤Þ¤¹¤«¡©")) return FALSE;
1182 if (!get_check("Do you really want to commit suicide? ")) return FALSE;
1184 /* Special Verification for suicide */
1186 prt("³Îǧ¤Î¤¿¤á '@' ¤ò²¡¤·¤Æ²¼¤µ¤¤¡£", 0, 0);
1188 prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
1194 if (i != '@') return FALSE;
1197 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1198 total_winner = TRUE;
1203 msg_print("Éð»ÎÆ»¤È¤Ï¡¢»à¤Ì¤³¤È¤È¸«¤Ä¤±¤¿¤ê¡£");
1204 take_hit(DAMAGE_FORCE, 9999, "ÀÚÊ¢", -1);
1206 msg_print("Meaning of Bushi-do is found in the death.");
1207 take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
1214 msg_print("¤Ê¤Ë¡©");
1226 * do_cmd_cast calls this function if the player's class
1229 void do_cmd_hissatsu(void)
1236 /* not if confused */
1237 if (p_ptr->confused)
1240 msg_print("º®Í𤷤Ƥ¤¤Æ½¸Ãæ¤Ç¤¤Ê¤¤¡ª");
1242 msg_print("You are too confused!");
1247 if (!buki_motteruka(INVEN_RARM))
1249 if (flush_failure) flush();
1251 msg_print("Éð´ï¤ò»ý¤¿¤Ê¤¤¤Èɬ»¦µ»¤Ï»È¤¨¤Ê¤¤¡ª");
1253 msg_print("You need to wield a weapon!");
1258 if (!spell_learned1)
1261 msg_print("²¿¤âµ»¤òÃΤé¤Ê¤¤¡£");
1263 msg_print("You don't know any martial arts.");
1269 if (p_ptr->special_defense & KATA_MASK)
1271 set_action(ACTION_NONE);
1275 if (!get_hissatsu_power(&n)) return;
1277 spell = technic_info[TECHNIC_HISSATSU][n];
1279 /* Verify "dangerous" spells */
1280 if (spell.smana > p_ptr->csp)
1282 if (flush_failure) flush();
1285 msg_print("£Í£Ð¤¬Â¤ê¤Þ¤»¤ó¡£");
1287 msg_print("You do not have enough mana to use this power.");
1295 /* Cast the spell */
1296 cast = cast_hissatsu_spell(n);
1304 p_ptr->csp -= spell.smana;
1307 if (p_ptr->csp < 0) p_ptr->csp = 0;
1310 p_ptr->redraw |= (PR_MANA);
1313 p_ptr->window |= (PW_PLAYER);
1314 p_ptr->window |= (PW_SPELL);
1318 void do_cmd_gain_hissatsu(void)
1327 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
1329 set_action(ACTION_NONE);
1332 if (p_ptr->blind || no_lite())
1335 msg_print("Ìܤ¬¸«¤¨¤Ê¤¤¡ª");
1337 msg_print("You cannot see!");
1343 if (p_ptr->confused)
1346 msg_print("º®Í𤷤Ƥ¤¤ÆÆɤá¤Ê¤¤¡ª");
1348 msg_print("You are too confused!");
1354 if (!(p_ptr->new_spells))
1357 msg_print("¿·¤·¤¤É¬»¦µ»¤ò³Ð¤¨¤ë¤³¤È¤Ï¤Ç¤¤Ê¤¤¡ª");
1359 msg_print("You cannot learn any new special attacks!");
1366 if( p_ptr->new_spells < 10 ){
1367 msg_format("¤¢¤È %d ¤Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1369 msg_format("¤¢¤È %d ¸Ä¤Îɬ»¦µ»¤ò³Ø¤Ù¤ë¡£", p_ptr->new_spells);
1372 msg_format("You can learn %d new special attack%s.", p_ptr->new_spells,
1373 (p_ptr->new_spells == 1?"":"s"));
1376 item_tester_tval = TV_HISSATSU_BOOK;
1380 q = "¤É¤Î½ñ¤«¤é³Ø¤Ó¤Þ¤¹¤«? ";
1382 q = "Study which book? ";
1386 s = "Æɤá¤ë½ñ¤¬¤Ê¤¤¡£";
1388 s = "You have no books that you can read.";
1391 if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR))) return;
1393 /* Get the item (in the pack) */
1396 o_ptr = &inventory[item];
1399 /* Get the item (on the floor) */
1402 o_ptr = &o_list[0 - item];
1405 for (i = o_ptr->sval * 8; i < o_ptr->sval * 8 + 8; i++)
1407 if (spell_learned1 & (1L << i)) continue;
1408 if (technic_info[TECHNIC_HISSATSU][i].slevel > p_ptr->lev) continue;
1410 spell_learned1 |= (1L << i);
1411 spell_worked1 |= (1L << i);
1413 msg_format("%s¤Îµ»¤ò³Ð¤¨¤¿¡£", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1415 msg_format("You have learned the special attack of %s.", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
1417 for (j = 0; j < 64; j++)
1419 /* Stop at the first empty space */
1420 if (spell_order[j] == 99) break;
1427 msg_print("²¿¤â³Ð¤¨¤é¤ì¤Ê¤«¤Ã¤¿¡£");
1429 msg_print("You were not able to learn any special attacks.");
1432 p_ptr->update |= (PU_SPELLS);