OSDN Git Service

呪術で途中で解呪しても影のクロークの効果が消えないのを修正。解呪すると詠唱を中止する。
[hengband/hengband.git] / src / cmd2.c
index c6dd10a..11355bf 100644 (file)
@@ -2834,6 +2834,9 @@ void do_cmd_rest(void)
                stop_singing();
        }
 
+       /* Hex */
+       if (hex_spelling_any()) stop_hex_spell_all();
+
        /* Prompt for time if needed */
        if (command_arg <= 0)
        {
@@ -3381,6 +3384,8 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
 
        char o_name[MAX_NLEN];
 
+       u16b path_g[512];       /* For calcuration of path length */
+
        int msec = delay_factor * delay_factor * delay_factor;
 
        /* STICK TO */
@@ -3468,6 +3473,9 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                ty = target_row;
        }
 
+       /* Get projection path length */
+       tdis = project_path(path_g, project_length, py, px, ty, tx, PROJECT_PATH|PROJECT_THRU) - 1;
+
        project_length = 0; /* reset to default */
 
        /* Don't shoot at my feet */
@@ -3614,20 +3622,8 @@ void do_cmd_fire_aux(int item, object_type *j_ptr)
                /* Sniper */
                if (snipe_type == SP_KILL_TRAP)
                {
-                       if (is_trap(cave[ny][nx].feat))
-                       {
-                               if (player_can_see_bold(ny, nx))
-                               {
-#ifdef JP
-                                       msg_print("¤Þ¤Ð¤æ¤¤Á®¸÷¤¬Áö¤Ã¤¿¡ª");
-#else
-                                       msg_print("There is a bright flash of light!");
-#endif
-                                       cave[ny][nx].info &= ~(CAVE_UNSAFE);
-                               }
-
-                               cave_alter_feat(ny, nx, FF_DISARM);
-                       }
+                       project(0, 0, ny, nx, 0, GF_KILL_TRAP,
+                               (PROJECT_JUMP | PROJECT_HIDE | PROJECT_GRID | PROJECT_ITEM), -1);
                }
 
                /* Sniper */