OSDN Git Service

#38768 [Fix] Oopsもろとも置換で消してしまった重要処理を差し戻し。
[hengband/hengband.git] / src / cmd2.c
index 7baf966..85af3b8 100644 (file)
@@ -503,9 +503,6 @@ static bool do_cmd_open_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
        return (more);
 }
 
-
-#if defined(ALLOW_EASY_OPEN) || defined(ALLOW_EASY_DISARM) /* TNB */
-
 /*!
  * @brief 地形は開くものであって、かつ開かれているかを返す /
  * Attempt to open the given chest at the given location
@@ -648,9 +645,6 @@ static DIRECTION coords_to_dir(POSITION y, POSITION x)
        return d[dx + 1][dy + 1];
 }
 
-#endif /* defined(ALLOW_EASY_OPEN) || defined(ALLOW_EASY_DISARM) -- TNB */
-
-
 /*!
  * @brief 「開ける」動作コマンドのサブルーチン /
  * Perform the basic "open" command on doors
@@ -695,7 +689,7 @@ static bool do_cmd_open_aux(POSITION y, POSITION x)
                /* Extract the lock power */
                j = f_ptr->power;
 
-               /* Extract the difficulty XXX XXX XXX */
+               /* Extract the difficulty */
                j = i - (j * 4);
 
                /* Always have a small chance of success */
@@ -761,8 +755,6 @@ void do_cmd_open(void)
                set_action(ACTION_NONE);
        }
 
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
        /* Option: Pick a direction */
        if (easy_open)
        {
@@ -783,8 +775,6 @@ void do_cmd_open(void)
                }
        }
 
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
        /* Allow repeated command */
        if (command_arg)
        {
@@ -850,7 +840,7 @@ void do_cmd_open(void)
        }
 
        /* Cancel repeat unless we may continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -929,8 +919,6 @@ void do_cmd_close(void)
                set_action(ACTION_NONE);
        }
 
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
        /* Option: Pick a direction */
        if (easy_open)
        {
@@ -941,8 +929,6 @@ void do_cmd_close(void)
                }
        }
 
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
        /* Allow repeated command */
        if (command_arg)
        {
@@ -957,7 +943,7 @@ void do_cmd_close(void)
        }
 
        /* Get a "repeated" direction */
-       if (get_rep_dir(&dir,FALSE))
+       if (get_rep_dir(&dir, FALSE))
        {
                cave_type *c_ptr;
                FEAT_IDX feat;
@@ -998,7 +984,7 @@ void do_cmd_close(void)
        }
 
        /* Cancel repeat unless we may continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -1018,7 +1004,6 @@ static bool do_cmd_tunnel_test(POSITION y, POSITION x)
        {
                msg_print(_("そこには何も見当たらない。", "You see nothing there."));
 
-               /* Nope */
                return (FALSE);
        }
 
@@ -1027,11 +1012,9 @@ static bool do_cmd_tunnel_test(POSITION y, POSITION x)
        {
                msg_print(_("そこには掘るものが見当たらない。", "You see nothing there to tunnel."));
 
-               /* Nope */
                return (FALSE);
        }
 
-       /* Okay */
        return (TRUE);
 }
 
@@ -1250,12 +1233,9 @@ void do_cmd_tunnel(void)
        }
 
        /* Cancel repetition unless we can continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
-
-#ifdef ALLOW_EASY_OPEN /* TNB */
-
 /*!
  * @brief 移動処理による簡易な「開く」処理 /
  * easy_open_door --
@@ -1280,7 +1260,6 @@ bool easy_open_door(POSITION y, POSITION x)
        /* Must be a closed door */
        if (!is_closed_door(c_ptr->feat))
        {
-               /* Nope */
                return (FALSE);
        }
 
@@ -1305,7 +1284,7 @@ bool easy_open_door(POSITION y, POSITION x)
                /* Extract the lock power */
                j = f_ptr->power;
 
-               /* Extract the difficulty XXX XXX XXX */
+               /* Extract the difficulty */
                j = i - (j * 4);
 
                /* Always have a small chance of success */
@@ -1349,9 +1328,6 @@ bool easy_open_door(POSITION y, POSITION x)
        return (TRUE);
 }
 
-#endif /* ALLOW_EASY_OPEN -- TNB */
-
-
 /*!
  * @brief 箱のトラップを解除するコマンドのメインルーチン /
  * Perform the basic "disarm" command
@@ -1450,15 +1426,8 @@ static bool do_cmd_disarm_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
  * Returns TRUE if repeated commands may continue
  * </pre>
  */
-#ifdef ALLOW_EASY_DISARM /* TNB */
 
 bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
-static bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
 {
        /* Get grid and contents */
        cave_type *c_ptr = &cave[y][x];
@@ -1500,17 +1469,8 @@ static bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
                /* Remove the trap */
                cave_alter_feat(y, x, FF_DISARM);
 
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
                /* Move the player onto the trap */
                move_player(dir, easy_disarm, FALSE);
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
-               /* move the player onto the trap grid */
-               move_player(dir, FALSE, FALSE);
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
        }
 
        /* Failure -- Keep trying */
@@ -1529,18 +1489,8 @@ static bool do_cmd_disarm_aux(POSITION y, POSITION x, DIRECTION dir)
        else
        {
                msg_format(_("%sを作動させてしまった!", "You set off the %s!"), name);
-
-#ifdef ALLOW_EASY_DISARM /* TNB */
-
                /* Move the player onto the trap */
                move_player(dir, easy_disarm, FALSE);
-
-#else /* ALLOW_EASY_DISARM -- TNB */
-
-               /* Move the player onto the trap */
-               move_player(dir, FALSE, FALSE);
-
-#endif /* ALLOW_EASY_DISARM -- TNB */
        }
 
        /* Result */
@@ -1566,7 +1516,6 @@ void do_cmd_disarm(void)
                set_action(ACTION_NONE);
        }
 
-#ifdef ALLOW_EASY_DISARM /* TNB */
 
        /* Option: Pick a direction */
        if (easy_disarm)
@@ -1587,7 +1536,6 @@ void do_cmd_disarm(void)
                }
        }
 
-#endif /* ALLOW_EASY_DISARM -- TNB */
 
        /* Allow repeated command */
        if (command_arg)
@@ -1652,7 +1600,7 @@ void do_cmd_disarm(void)
        }
 
        /* Cancel repeat unless told not to */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -1693,7 +1641,7 @@ static bool do_cmd_bash_aux(POSITION y, POSITION x, DIRECTION dir)
 
        msg_format(_("%sに体当たりをした!", "You smash into the %s!"), name);
 
-       /* Compare bash power to door power XXX XXX XXX */
+       /* Compare bash power to door power */
        temp = (bash - (temp * 10));
 
        if (p_ptr->pclass == CLASS_BERSERKER) temp *= 2;
@@ -1834,7 +1782,7 @@ void do_cmd_bash(void)
        }
 
        /* Unless valid action taken, cancel bash */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -1847,7 +1795,7 @@ void do_cmd_bash(void)
  *
  * Attack monsters, tunnel through walls, disarm traps, open doors.
  *
- * Consider confusion XXX XXX XXX
+ * Consider confusion 
  *
  * This command must always take a turn, to prevent free detection
  * of invisible monsters.
@@ -1936,16 +1884,14 @@ void do_cmd_alter(void)
                        more = do_cmd_disarm_aux(y, x, dir);
                }
 
-               /* Oops */
                else
                {
-                       /* Oops */
                        msg_print(_("何もない空中を攻撃した。", "You attack the empty air."));
                }
        }
 
        /* Cancel repetition unless we can continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -1957,7 +1903,7 @@ void do_cmd_alter(void)
  * @return オブジェクトがある場合TRUEを返す
  * @details
  * <pre>
- * XXX XXX XXX Let user choose a pile of spikes, perhaps?
+ * Let user choose a pile of spikes, perhaps?
  * </pre>
  */
 static bool get_spike(INVENTORY_IDX *ip)
@@ -1983,7 +1929,6 @@ static bool get_spike(INVENTORY_IDX *ip)
                }
        }
 
-       /* Oops */
        return (FALSE);
 }
 
@@ -2138,7 +2083,7 @@ void do_cmd_walk(bool pickup)
        }
 
        /* Cancel repeat unless we may continue */
-       if (!more) disturb(0, 0);
+       if (!more) disturb(FALSE, FALSE);
 }
 
 
@@ -2265,7 +2210,7 @@ void do_cmd_rest(void)
 
        if (p_ptr->special_defense & NINJA_S_STEALTH) set_superstealth(FALSE);
 
-       /* Take a turn XXX XXX XXX (?) */
+       /* Take a turn (?) */
        p_ptr->energy_use = 100;
 
        /* The sin of sloth */
@@ -2985,7 +2930,6 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
                {
                        cave[ny][nx].info |= (CAVE_GLOW);
 
-                       /* Notice */
                        note_spot(ny, nx);
 
                        /* Redraw */
@@ -3026,7 +2970,6 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
                {
                        cave[ny][nx].info &= ~(CAVE_GLOW | CAVE_MARK);
 
-                       /* Notice */
                        note_spot(ny, nx);
 
                        /* Redraw */
@@ -3141,7 +3084,7 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
                                }
                                else
                                {
-                                       /* Apply special damage XXX XXX XXX */
+                                       /* Apply special damage */
                                        tdam = tot_dam_aux_shot(q_ptr, tdam, m_ptr);
                                        tdam = critical_shot(q_ptr->weight, q_ptr->to_h, j_ptr->to_h, tdam);
 
@@ -3171,7 +3114,6 @@ void do_cmd_fire_aux(INVENTORY_IDX item, object_type *j_ptr)
                                {
                                        cave[ny][nx].info |= (CAVE_GLOW);
 
-                                       /* Notice */
                                        note_spot(ny, nx);
 
                                        /* Redraw */
@@ -3382,7 +3324,6 @@ void do_cmd_fire(void)
        /* Require proper missile */
        item_tester_tval = p_ptr->tval_ammo;
 
-       /* Get an item */
        q = _("どれを撃ちますか? ", "Fire which item? ");
        s = _("発射されるアイテムがありません。", "You have nothing to fire.");
        if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR)))
@@ -3485,7 +3426,6 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
        }
        else
        {
-               /* Get an item */
                q = _("どのアイテムを投げますか? ", "Throw which item? ");
                s = _("投げるアイテムがない。", "You have nothing to throw.");
                if (!get_item(&item, q, s, (USE_INVEN | USE_FLOOR | USE_EQUIP)))
@@ -3505,14 +3445,11 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
                o_ptr = &o_list[0 - item];
        }
 
-
        /* Item is cursed */
        if (object_is_cursed(o_ptr) && (item >= INVEN_RARM))
        {
-               /* Oops */
                msg_print(_("ふーむ、どうやら呪われているようだ。", "Hmmm, it seems to be cursed."));
 
-               /* Nope */
                return FALSE;
        }
 
@@ -3523,7 +3460,6 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
                        msg_print(_("アリーナではアイテムを使えない!", "You're in the arena now. This is hand-to-hand!"));
                        msg_print(NULL);
 
-                       /* Nope */
                        return FALSE;
                }
 
@@ -3743,7 +3679,7 @@ bool do_cmd_throw(int mult, bool boomerang, OBJECT_IDX shuriken)
                                ds = q_ptr->ds;
                                torch_dice(q_ptr, &dd, &ds); /* throwing a torch */
                                tdam = damroll(dd, ds);
-                               /* Apply special damage XXX XXX XXX */
+                               /* Apply special damage */
                                tdam = tot_dam_aux(q_ptr, tdam, m_ptr, 0, TRUE);
                                tdam = critical_shot(q_ptr->weight, q_ptr->to_h, 0, tdam);
                                if (q_ptr->to_d > 0)