OSDN Git Service

分解属性でOBJECT地形を壊す処理を鏡に限定してしまっており, 回避の彫像
[hengband/hengband.git] / src / hissatsu.c
index ce814a1..00220c0 100644 (file)
@@ -83,12 +83,13 @@ cptr            p = "ɬ
        }
 
        /* Build a prompt (accept all spells) */
+       (void) strnfmt(out_val, 78, 
 #ifdef JP
-(void) strnfmt(out_val, 78, "(%^s %c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò»È¤¤¤Þ¤¹¤«¡©",
+                      "(%^s %c-%c, '*'¤Ç°ìÍ÷, ESC) ¤É¤Î%s¤ò»È¤¤¤Þ¤¹¤«¡©",
 #else
-       (void)strnfmt(out_val, 78, "(%^ss %c-%c, *=List, ESC=exit) Use which %s? ",
+                      "(%^ss %c-%c, *=List, ESC=exit) Use which %s? ",
 #endif
-       p, I2A(0), "abcdefghijklmnopqrstuvwxyz012345"[num-1], p);
+                      p, I2A(0), "abcdefghijklmnopqrstuvwxyz012345"[num-1], p);
 
        if (use_menu) screen_save();
 
@@ -234,7 +235,7 @@ put_str("name              Lv  SP      name              Lv  SP ", y, x + 5);
 
                                        /* Dump the spell --(-- */
                                        strcat(psi_desc, format(" %-18s%2d %3d",
-                                               spell_names[technic2magic(REALM_HISSATSU)-1][i],
+                                               do_spell(REALM_HISSATSU, i, SPELL_NAME),
                                                spell.slevel, spell.smana));
                                        prt(psi_desc, y + (line%17) + (line >= 17), x+(line/17)*30);
                                        prt("", y + (line%17) + (line >= 17) + 1, x+(line/17)*30);
@@ -292,9 +293,9 @@ put_str("name              Lv  SP      name              Lv  SP ", y, x + 5);
 
                        /* Prompt */
 #ifdef JP
-(void) strnfmt(tmp_val, 78, "%s¤ò»È¤¤¤Þ¤¹¤«¡©", spell_names[technic2magic(REALM_HISSATSU)-1][j]);
+                       (void) strnfmt(tmp_val, 78, "%s¤ò»È¤¤¤Þ¤¹¤«¡©", do_spell(REALM_HISSATSU, j, SPELL_NAME));
 #else
-                       (void)strnfmt(tmp_val, 78, "Use %s? ", spell_names[technic2magic(REALM_HISSATSU)-1][j]);
+                       (void)strnfmt(tmp_val, 78, "Use %s? ", do_spell(REALM_HISSATSU, j, SPELL_NAME));
 #endif
 
 
@@ -310,14 +311,11 @@ put_str("name              Lv  SP      name              Lv  SP ", y, x + 5);
        if (redraw) screen_load();
 
        /* Show choices */
-       if (show_choices)
-       {
-               /* Update */
-               p_ptr->window |= (PW_SPELL);
+       p_ptr->window |= (PW_SPELL);
+
+       /* Window stuff */
+       window_stuff();
 
-               /* Window stuff */
-               window_stuff();
-       }
 
        /* Abort if needed */
        if (!flag) return (FALSE);
@@ -340,908 +338,10 @@ put_str("name              Lv  SP      name              Lv  SP ", y, x + 5);
  * do_cmd_cast calls this function if the player's class
  * is 'mindcrafter'.
  */
-static bool cast_hissatsu_spell(int spell)
-{
-       int             y, x;
-       int             dir;
-
-
-       /* spell code */
-       switch (spell)
-       {
-       case 0:
-               project_length = 2;
-               if (!get_aim_dir(&dir)) return FALSE;
-               project_hook(GF_ATTACK, dir, HISSATSU_2, PROJECT_STOP | PROJECT_KILL);
-
-               break;
-       case 1:
-       {
-               int cdir;
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               for (cdir = 0;cdir < 8; cdir++)
-               {
-                       if (cdd[cdir] == dir) break;
-               }
-               if (cdir == 8) return FALSE;
-               y = py + ddy_cdd[cdir];
-               x = px + ddx_cdd[cdir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, 0);
-               else
-#ifdef JP
-                       msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
-#else
-                       msg_print("You attack the empty air.");
-#endif
-               y = py + ddy_cdd[(cdir + 7) % 8];
-               x = px + ddx_cdd[(cdir + 7) % 8];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, 0);
-               else
-#ifdef JP
-                       msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
-#else
-                       msg_print("You attack the empty air.");
-#endif
-               y = py + ddy_cdd[(cdir + 1) % 8];
-               x = px + ddx_cdd[(cdir + 1) % 8];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, 0);
-               else
-#ifdef JP
-                       msg_print("¹¶·â¤Ï¶õ¤òÀڤä¿¡£");
-#else
-                       msg_print("You attack the empty air.");
-#endif
-
-               break;
-       }
-       case 2:
-       {
-               if (!do_cmd_throw_aux(1, TRUE, 0)) return FALSE;
-               break;
-       }
-       case 3:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_FIRE);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 4:
-       {
-               detect_monsters_mind(DETECT_RAD_DEFAULT);
-               break;
-       }
-       case 5:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_MINEUCHI);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 6:
-       {
-               if (p_ptr->riding)
-               {
-#ifdef JP
-                       msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
-#else
-                       msg_print("You cannot do it when riding.");
-#endif
-                       return FALSE;
-               }
-#ifdef JP
-               msg_print("Áê¼ê¤Î¹¶·â¤ËÂФ·¤Æ¿È¹½¤¨¤¿¡£");
-#else
-               msg_print("You prepare to counter blow.");
-#endif
-               p_ptr->counter = TRUE;
-               break;
-       }
-       case 7:
-       {
-               if (p_ptr->riding)
-               {
-#ifdef JP
-                       msg_print("¾èÇÏÃæ¤Ë¤Ï̵Íý¤À¡£");
-#else
-                       msg_print("You cannot do it when riding.");
-#endif
-                       return FALSE;
-               }
-
-               if (!get_rep_dir2(&dir)) return FALSE;
-
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-
-               if (!cave[y][x].m_idx)
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-
-               py_attack(y, x, 0);
-
-               if (!player_can_enter(cave[y][x].feat) || is_trap(cave[y][x].feat))
-                       break;
-
-               y += ddy[dir];
-               x += ddx[dir];
-
-               if (player_can_enter(cave[y][x].feat) && !is_trap(cave[y][x].feat) && !cave[y][x].m_idx)
-               {
-                       int oy, ox;
-
-                       msg_print(NULL);
-
-                       /* Save the old location */
-                       oy = py;
-                       ox = px;
-
-                       /* Move the player */
-                       py = y;
-                       px = x;
-
-                       forget_flow();
-
-                       /* Redraw the old spot */
-                       lite_spot(oy, ox);
-
-                       /* Redraw the new spot */
-                       lite_spot(py, px);
-
-                       /* Check for new panel (redraw map) */
-                       verify_panel();
-
-                       /* Update stuff */
-                       p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
-
-                       /* Update the monsters */
-                       p_ptr->update |= (PU_DISTANCE);
-
-                       /* Window stuff */
-                       p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
-                       /* Handle stuff XXX XXX XXX */
-                       handle_stuff();
-               }
-               break;
-       }
-       case 8:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_POISON);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 9:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_ZANMA);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 10:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, 0);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
-               {
-                       return TRUE;
-               }
-               if (cave[y][x].m_idx)
-               {
-                       int i;
-                       int ty = y, tx = x;
-                       int oy = y, ox = x;
-                       int m_idx = cave[y][x].m_idx;
-                       monster_type *m_ptr = &m_list[m_idx];
-                       char m_name[80];
-
-                       monster_desc(m_name, m_ptr, 0);
-
-                       for (i = 0; i < 5; i++)
-                       {
-                               y += ddy[dir];
-                               x += ddx[dir];
-                               if (cave_empty_bold(y, x))
-                               {
-                                       ty = y;
-                                       tx = x;
-                               }
-                               else break;
-                       }
-                       if ((ty != oy) || (tx != ox))
-                       {
-#ifdef JP
-                               msg_format("%s¤ò¿á¤­Èô¤Ð¤·¤¿¡ª", m_name);
-#else
-                               msg_format("You blow %s away!", m_name);
-#endif
-                               cave[oy][ox].m_idx = 0;
-                               cave[ty][tx].m_idx = m_idx;
-                               m_ptr->fy = ty;
-                               m_ptr->fx = tx;
-
-                               update_mon(m_idx, TRUE);
-                               lite_spot(oy, ox);
-                               lite_spot(ty, tx);
-                       }
-               }
-               break;
-       }
-       case 11:
-       {
-               if (p_ptr->lev > 44)
-               {
-                       if (!identify_fully(TRUE)) return FALSE;
-               }
-               else
-               {
-                       if (!ident_spell(TRUE)) return FALSE;
-               }
-               break;
-       }
-       case 12:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_HAGAN);
-
-               /* Non-walls (etc) */
-               if (cave_floor_bold(y, x)) break;
-
-               /* Permanent walls */
-               if (cave[y][x].feat >= FEAT_PERM_EXTRA) break;
-
-               if (cave[y][x].feat < FEAT_DOOR_HEAD) break;
-
-               /* Forget the wall */
-               cave[y][x].info &= ~(CAVE_MARK);
-
-               /* Destroy the feature */
-               cave_set_feat(y, x, floor_type[randint0(100)]);
-
-               /* Update some things */
-               p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
-
-               break;
-       }
-       case 13:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_COLD);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 14:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_KYUSHO);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 15:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_MAJIN);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 16:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_SUTEMI);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               p_ptr->sutemi = TRUE;
-               break;
-       }
-       case 17:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_ELEC);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 18:
-               return rush_attack(NULL);
-       case 19: /* Whirlwind Attack */
-       {
-               int y = 0, x = 0;
-               cave_type       *c_ptr;
-               monster_type    *m_ptr;
-
-               if (p_ptr->cut < 300)
-                       set_cut(p_ptr->cut + 300);
-               else
-                       set_cut(p_ptr->cut * 2);
-
-               for (dir = 0; dir < 8; dir++)
-               {
-                       y = py + ddy_ddd[dir];
-                       x = px + ddx_ddd[dir];
-                       c_ptr = &cave[y][x];
-
-                       /* Get the monster */
-                       m_ptr = &m_list[c_ptr->m_idx];
-
-                       /* Hack -- attack monsters */
-                       if (c_ptr->m_idx && (m_ptr->ml || cave_floor_bold(y, x)))
-                       {
-                               if (!monster_living(&r_info[m_ptr->r_idx]))
-                               {
-                                       char m_name[80];
-
-                                       monster_desc(m_name, m_ptr, 0);
-#ifdef JP
-                                       msg_format("%s¤Ë¤Ï¸ú²Ì¤¬¤Ê¤¤¡ª", m_name);
-#else
-                                       msg_format("%s is unharmed!", m_name);
-#endif
-                               }
-                               else py_attack(y, x, HISSATSU_SEKIRYUKA);
-                       }
-               }
-               break;
-       }
-       case 20:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_QUAKE);
-               else
-               {
-                       earthquake(py, px, 10);
-               }
-               break;
-       }
-       case 21:
-       {
-               int total_damage = 0, basedam, i;
-               u32b flgs[TR_FLAG_SIZE];
-               object_type *o_ptr;
-               if (!get_aim_dir(&dir)) return FALSE;
-#ifdef JP
-               msg_print("Éð´ï¤òÂ礭¤¯¿¶¤ê²¼¤í¤·¤¿¡£");
-#else
-               msg_print("You swing your weapon downward.");
-#endif
-               for (i = 0; i < 2; i++)
-               {
-                       int damage;
-
-                       if (!buki_motteruka(INVEN_RARM+i)) break;
-                       o_ptr = &inventory[INVEN_RARM+i];
-                       basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
-                       damage = o_ptr->to_d * 100;
-                       object_flags(o_ptr, flgs);
-                       if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
-                       {
-                               /* vorpal blade */
-                               basedam *= 5;
-                               basedam /= 3;
-                       }
-                       else if (object_known_p(o_ptr) && (have_flag(flgs, TR_VORPAL)))
-                       {
-                               /* vorpal flag only */
-                               basedam *= 11;
-                               basedam /= 9;
-                       }
-                       damage += basedam;
-                       damage *= p_ptr->num_blow[i];
-                       total_damage += damage / 200;
-                       if (i) total_damage = total_damage*7/10;
-               }
-               fire_beam(GF_FORCE, dir, total_damage);
-               break;
-       }
-       case 22:
-       {
-#ifdef JP
-               msg_print("ͺ¶«¤Ó¤ò¤¢¤²¤¿¡ª");
-#else
-               msg_print("You roar out!");
-#endif
-               project_hack(GF_SOUND, randint1(p_ptr->lev * 3));
-               aggravate_monsters(0);
-               break;
-       }
-       case 23:
-       {
-               int i;
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               for (i = 0; i < 3; i++)
-               {
-                       int oy, ox;
-                       int ny, nx;
-                       int m_idx;
-                       monster_type *m_ptr;
-
-                       y = py + ddy[dir];
-                       x = px + ddx[dir];
-
-                       if (cave[y][x].m_idx)
-                               py_attack(y, x, HISSATSU_3DAN);
-                       else
-                       {
-#ifdef JP
-                               msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                               msg_print("There is no monster.");
-#endif
-                               return FALSE;
-                       }
-
-                       if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
-                       {
-                               return TRUE;
-                       }
-
-                       /* Monster is dead? */
-                       if (!cave[y][x].m_idx) break;
-
-                       ny = y + ddy[dir];
-                       nx = x + ddx[dir];
-                       m_idx = cave[y][x].m_idx;
-                       m_ptr = &m_list[m_idx];
-
-                       /* Monster cannot move back? */
-                       if (!monster_can_enter(ny, nx, &r_info[m_ptr->r_idx])) continue;
-
-                       cave[y][x].m_idx = 0;
-                       cave[ny][nx].m_idx = m_idx;
-                       m_ptr->fy = ny;
-                       m_ptr->fx = nx;
-
-                       update_mon(m_idx, TRUE);
-
-                       /* Player can move forward? */
-                       if (player_can_enter(cave[y][x].feat))
-                       {
-                               /* Save the old location */
-                               oy = py;
-                               ox = px;
-
-                               /* Move the player */
-                               py = y;
-                               px = x;
-
-                               if (p_ptr->riding)
-                               {
-                                       int tmp;
-                                       tmp = cave[py][px].m_idx;
-                                       cave[py][px].m_idx = cave[oy][ox].m_idx;
-                                       cave[oy][ox].m_idx = tmp;
-                                       m_list[p_ptr->riding].fy = py;
-                                       m_list[p_ptr->riding].fx = px;
-                                       update_mon(cave[py][px].m_idx, TRUE);
-                               }
-
-                               forget_flow();
-
-                               /* Redraw the old spot */
-                               lite_spot(oy, ox);
-
-                               /* Redraw the new spot */
-                               lite_spot(py, px);
-                       }
-
-                       /* Redraw the old spot */
-                       lite_spot(y, x);
-
-                       /* Redraw the new spot */
-                       lite_spot(ny, nx);
-
-                       /* Check for new panel (redraw map) */
-                       verify_panel();
-
-                       /* Update stuff */
-                       p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE);
-
-                       /* Update the monsters */
-                       p_ptr->update |= (PU_DISTANCE);
-
-                       /* Window stuff */
-                       p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
-                       /* Handle stuff */
-                       handle_stuff();
-
-                       /* -more- */
-                       if (i < 2) msg_print(NULL);
-               }
-               break;
-       }
-       case 24:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_DRAIN);
-               else
-               {
-#ifdef JP
-                               msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                               msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 25:
-       {
-#ifdef JP
-               msg_print("Éð´ï¤òÉÔµ¬Â§¤ËÍɤ餷¤¿¡¥¡¥¡¥");
-#else
-               msg_print("You irregularly wave your weapon...");
-#endif
-               project_hack(GF_ENGETSU, p_ptr->lev * 4);
-               project_hack(GF_ENGETSU, p_ptr->lev * 4);
-               project_hack(GF_ENGETSU, p_ptr->lev * 4);
-               break;
-       }
-       case 26:
-       {
-#define NEED_MANA_PER_MONSTER 8
-               bool new = TRUE;
-               bool mdeath;
-               /* int count = 0; currently unused */
-               do
-               {
-                       if (!rush_attack(&mdeath)) break;
-                       if (new)
-                       {
-                               /* Reserve needed mana point */
-                               p_ptr->csp -= technic_info[TECHNIC_HISSATSU][26].smana;
-                               new = FALSE;
-                       }
-                       else
-                               p_ptr->csp -= NEED_MANA_PER_MONSTER;
-                       if (!mdeath) break;
-                       /* count++; currently unused */
-                       command_dir = 0;
-                       p_ptr->redraw |= PR_MANA;
-                       handle_stuff();
-               }
-               while (p_ptr->csp > NEED_MANA_PER_MONSTER);
-               if (new) return FALSE;
-
-               /* Restore reserved mana */
-               p_ptr->csp += technic_info[TECHNIC_HISSATSU][26].smana;
-               break;
-
-#undef NEED_MANA_PER_MONSTER
-       }
-       case 27:
-       {
-               if (!tgt_pt(&x, &y)) return FALSE;
-               if (!cave_empty_bold(y, x) || (cave[y][x].info & CAVE_ICKY) ||
-                       (distance(y, x, py, px) > MAX_SIGHT / 2) ||
-                   !projectable(py, px, y, x))
-               {
-#ifdef JP
-                       msg_print("¼ºÇÔ¡ª");
-#else
-                       msg_print("You cannot move to that place!");
-#endif
-                       break;
-               }
-               if (p_ptr->anti_tele)
-               {
-#ifdef JP
-msg_print("ÉԻ׵ĤÊÎϤ¬¥Æ¥ì¥Ý¡¼¥È¤òËɤ¤¤À¡ª");
-#else
-                       msg_print("A mysterious force prevents you from teleporting!");
-#endif
-
-                       break;
-               }
-               project(0, 0, y, x, HISSATSU_ISSEN, GF_ATTACK, PROJECT_BEAM | PROJECT_KILL, -1);
-               teleport_player_to(y, x, TRUE);
-               break;
-       }
-       case 28:
-       {
-               int x, y;
-
-               if (!get_rep_dir(&dir, FALSE)) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-               {
-                       py_attack(y, x, 0);
-                       if (cave[y][x].m_idx)
-                       {
-                               handle_stuff();
-                               py_attack(y, x, 0);
-                       }
-               }
-               else
-               {
-#ifdef JP
-msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("You don't see any monster in this direction");
-#endif
-                       return FALSE;
-               }
-               break;
-       }
-       case 29:
-       {
-               int total_damage = 0, basedam, i;
-               int y, x;
-               u32b flgs[TR_FLAG_SIZE];
-               object_type *o_ptr;
-
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (d_info[dungeon_type].flags1 & DF1_NO_MELEE)
-               {
-#ifdef JP
-                       msg_print("¤Ê¤¼¤«¹¶·â¤¹¤ë¤³¤È¤¬¤Ç¤­¤Ê¤¤¡£");
-#else
-                       msg_print("Something prevent you from attacking.");
-#endif
-                       return TRUE;
-               }
-#ifdef JP
-               msg_print("Éð´ï¤òÂ礭¤¯¿¶¤ê²¼¤í¤·¤¿¡£");
-#else
-               msg_print("You swing your weapon downward.");
-#endif
-               for (i = 0; i < 2; i++)
-               {
-                       int damage;
-                       if (!buki_motteruka(INVEN_RARM+i)) break;
-                       o_ptr = &inventory[INVEN_RARM+i];
-                       basedam = (o_ptr->dd * (o_ptr->ds + 1)) * 50;
-                       damage = o_ptr->to_d * 100;
-                       object_flags(o_ptr, flgs);
-                       if ((o_ptr->name1 == ART_VORPAL_BLADE) || (o_ptr->name1 == ART_CHAINSWORD))
-                       {
-                               /* vorpal blade */
-                               basedam *= 5;
-                               basedam /= 3;
-                       }
-                       else if (object_known_p(o_ptr) && (have_flag(flgs, TR_VORPAL)))
-                       {
-                               /* vorpal flag only */
-                               basedam *= 11;
-                               basedam /= 9;
-                       }
-                       damage += basedam;
-                       damage += p_ptr->to_d[i] * 100;
-                       damage *= p_ptr->num_blow[i];
-                       total_damage += (damage / 100);
-               }
-               project(0, (cave_floor_bold(y, x) ? 5 : 0), y, x, total_damage * 3 / 2, GF_METEOR, PROJECT_KILL | PROJECT_JUMP | PROJECT_ITEM, -1);
-               break;
-       }
-       case 30:
-       {
-               if (!get_rep_dir2(&dir)) return FALSE;
-               if (dir == 5) return FALSE;
-               y = py + ddy[dir];
-               x = px + ddx[dir];
-               if (cave[y][x].m_idx)
-                       py_attack(y, x, HISSATSU_UNDEAD);
-               else
-               {
-#ifdef JP
-                       msg_print("¤½¤ÎÊý¸þ¤Ë¤Ï¥â¥ó¥¹¥¿¡¼¤Ï¤¤¤Þ¤»¤ó¡£");
-#else
-                       msg_print("There is no monster.");
-#endif
-                       return FALSE;
-               }
-#ifdef JP
-               take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "·Ä±Àµ´Ç¦·õ¤ò»È¤Ã¤¿¾×·â", -1);
-#else
-               take_hit(DAMAGE_NOESCAPE, 100 + randint1(100), "exhaustion on using Keiun-Kininken", -1);
-#endif
-               break;
-       }
-       case 31:
-       {
-               int i;
-#ifdef JP
-if (!get_check("ËÜÅö¤Ë¼«»¦¤·¤Þ¤¹¤«¡©")) return FALSE;
-#else
-               if (!get_check("Do you really want to commit suicide? ")) return FALSE;
-#endif
-                       /* Special Verification for suicide */
-#ifdef JP
-prt("³Îǧ¤Î¤¿¤á '@' ¤ò²¡¤·¤Æ²¼¤µ¤¤¡£", 0, 0);
-#else
-               prt("Please verify SUICIDE by typing the '@' sign: ", 0, 0);
-#endif
-
-               flush();
-               i = inkey();
-               prt("", 0, 0);
-               if (i != '@') return FALSE;
-               if (p_ptr->total_winner)
-               {
-                       take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
-                       p_ptr->total_winner = TRUE;
-               }
-               else
-               {
-#ifdef JP
-                       msg_print("Éð»ÎÆ»¤È¤Ï¡¢»à¤Ì¤³¤È¤È¸«¤Ä¤±¤¿¤ê¡£");
-                       take_hit(DAMAGE_FORCE, 9999, "ÀÚÊ¢", -1);
-#else
-                       msg_print("Meaning of Bushi-do is found in the death.");
-                       take_hit(DAMAGE_FORCE, 9999, "Seppuku", -1);
-#endif
-               }
-               break;
-       }
-       default:
-#ifdef JP
-msg_print("¤Ê¤Ë¡©");
-#else
-               msg_print("Zap?");
-#endif
-
-       }
-
-       return TRUE;
-}
-
-
-/*
- * do_cmd_cast calls this function if the player's class
- * is 'mindcrafter'.
- */
 void do_cmd_hissatsu(void)
 {
        int             n = 0;
        magic_type      spell;
-       bool            cast;
 
 
        /* not if confused */
@@ -1255,7 +355,7 @@ msg_print("
 
                return;
        }
-       if (!buki_motteruka(INVEN_RARM))
+       if (!buki_motteruka(INVEN_RARM) && !buki_motteruka(INVEN_LARM))
        {
                if (flush_failure) flush();
 #ifdef JP
@@ -1304,9 +404,7 @@ msg_print("
        sound(SOUND_ZAP);
 
        /* Cast the spell */
-       cast = cast_hissatsu_spell(n);
-
-       if (!cast) return;
+       if (!do_spell(REALM_HISSATSU, n, SPELL_CAST)) return;
 
        /* Take a turn */
        energy_use = 100;
@@ -1421,9 +519,9 @@ s = "
                p_ptr->spell_learned1 |= (1L << i);
                p_ptr->spell_worked1 |= (1L << i);
 #ifdef JP
-               msg_format("%s¤Îµ»¤ò³Ð¤¨¤¿¡£", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
+               msg_format("%s¤Îµ»¤ò³Ð¤¨¤¿¡£", do_spell(REALM_HISSATSU, i, SPELL_NAME));
 #else
-               msg_format("You have learned the special attack of %s.", spell_names[technic2magic(REALM_HISSATSU)-1][i]);
+               msg_format("You have learned the special attack of %s.", do_spell(REALM_HISSATSU, i, SPELL_NAME));
 #endif
                for (j = 0; j < 64; j++)
                {