#include "object-hook.h"
#include "projection.h"
#include "spells-summon.h"
+#include "spells-status.h"
#include "monster-status.h"
+#include "quest.h"
+#include "artifact.h"
+#include "avatar.h"
+#include "player-status.h"
+#include "realm-hex.h"
/*!
* @brief フロア脱出時に出戻りが不可能だった場合に警告を加える処理
return FALSE;
}
+
+bool cmd_limit_confused(player_type *creature_ptr)
+{
+ if (p_ptr->confused)
+ {
+ msg_print(_("混乱していてできない!", "You are too confused!"));
+ return TRUE;
+ }
+ return FALSE;
+}
+
+bool cmd_limit_arena(player_type *creature_ptr)
+{
+ if (p_ptr->inside_arena)
+ {
+ msg_print(_("アリーナが魔法を吸収した!", "The arena absorbs all attempted magic!"));
+ msg_print(NULL);
+ return TRUE;
+ }
+ return FALSE;
+}
+
+bool cmd_limit_time_walk(player_type *creature_ptr)
+{
+ if (world_player)
+ {
+ if (flush_failure) flush();
+ msg_print(_("止まった時の中ではうまく働かないようだ。", "It shows no reaction."));
+ sound(SOUND_FAIL);
+ return TRUE;
+ }
+ return FALSE;
+}
+
/*!
* @brief 階段を使って階層を昇る処理 / Go up one level
* @return なし
}
/*!
- * @brief 地形は開くものであって、かつ開かれているかを返す /
- * Attempt to open the given chest at the given location
- * @param feat 地形ID
- * @return 開いた地形である場合TRUEを返す / Return TRUE if the given feature is an open door
- */
-static bool is_open(IDX feat)
-{
- return have_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(feat, FF_CLOSE));
-}
-
-
-/*!
* @brief プレイヤーの周辺9マスに該当する地形がいくつあるかを返す /
* Attempt to open the given chest at the given location
* @param y 該当する地形の中から1つのY座標を返す参照ポインタ
void do_cmd_run(void)
{
DIRECTION dir;
-
- /* Hack -- no running when confused */
- if (p_ptr->confused)
- {
- msg_print(_("混乱していて走れない!", "You are too confused!"));
- return;
- }
+ if (cmd_limit_confused(p_ptr)) return;
if (p_ptr->special_defense & KATA_MUSOU)
{
}
/* Fire the item */
- do_cmd_fire_aux(item, j_ptr);
+ exe_fire(item, j_ptr);
if (!is_fired || p_ptr->pclass != CLASS_SNIPER) return;
}
else if (boomerang)
{
- if (buki_motteruka(INVEN_RARM) && buki_motteruka(INVEN_LARM))
+ if (has_melee_weapon(INVEN_RARM) && has_melee_weapon(INVEN_LARM))
{
item_tester_hook = item_tester_hook_boomerang;
q = _("どの武器を投げますか? ", "Throw which item? ");
return FALSE;
}
}
- else if (buki_motteruka(INVEN_LARM))
+ else if (has_melee_weapon(INVEN_LARM))
{
item = INVEN_LARM;
o_ptr = &inventory[item];
if (shuriken) chance *= 2;
- /* Save the old location */
prev_y = y;
prev_x = x;
Term_xtra(TERM_XTRA_DELAY, msec);
}
- /* Save the old location */
prev_y = y;
prev_x = x;