*/
#include "angband.h"
+#include "core.h"
+#include "util.h"
+
+#include "realm-song.h"
+#include "autopick.h"
+#include "dungeon.h"
#include "floor.h"
#include "melee.h"
#include "grid.h"
#include "artifact.h"
#include "player-move.h"
#include "player-status.h"
+#include "player-effects.h"
+#include "player-class.h"
#include "spells-floor.h"
#include "feature.h"
#include "warning.h"
#include "monster.h"
#include "monster-spell.h"
+#include "monster-status.h"
#include "object-hook.h"
#include "object-flavor.h"
#include "spells.h"
+#include "cmd-basic.h"
+#include "view-mainwindow.h"
+#include "world.h"
+#include "objectkind.h"
+#include "autopick.h"
+#include "targeting.h"
+#ifdef TRAVEL
+ /* for travel */
+travel_type travel;
+#endif
/*!
* @brief 地形やその上のアイテムの隠された要素を明かす /
* だが、違和感が\n
* あるという指摘をうけたので、「~を拾った、~を持っている」という表示\n
* にかえてある。そのための配列。\n
- * Add the given dungeon object to the character's inventory.\n
+ * Add the given dungeon object to the character's p_ptr->inventory_list.\n
* Delete the object afterwards.\n
*/
void py_pickup_aux(OBJECT_IDX o_idx)
slot = inven_carry(o_ptr);
/* Get the object again */
- o_ptr = &inventory[slot];
+ o_ptr = &p_ptr->inventory_list[slot];
delete_object_idx(o_idx);
}
}
-
-/*!
- * @brief プレイヤーが地形踏破可能かを返す
- * @param feature 判定したい地形ID
- * @param mode 移動に関するオプションフラグ
- * @return 移動可能ならばTRUEを返す
- */
-bool player_can_enter(FEAT_IDX feature, BIT_FLAGS16 mode)
-{
- feature_type *f_ptr = &f_info[feature];
-
- if (p_ptr->riding) return monster_can_cross_terrain(feature, &r_info[current_floor_ptr->m_list[p_ptr->riding].r_idx], mode | CEM_RIDING);
-
- if (have_flag(f_ptr->flags, FF_PATTERN))
- {
- if (!(mode & CEM_P_CAN_ENTER_PATTERN)) return FALSE;
- }
-
- if (have_flag(f_ptr->flags, FF_CAN_FLY) && p_ptr->levitation) return TRUE;
- if (have_flag(f_ptr->flags, FF_CAN_SWIM) && p_ptr->can_swim) return TRUE;
- if (have_flag(f_ptr->flags, FF_CAN_PASS) && p_ptr->pass_wall) return TRUE;
-
- if (!have_flag(f_ptr->flags, FF_MOVE)) return FALSE;
-
- return TRUE;
-}
-
-
/*!
* @brief 移動に伴うプレイヤーのステータス変化処理
* @param ny 移動先Y座標
m_ptr = ¤t_floor_ptr->m_list[g_ptr->m_idx];
- if (inventory[INVEN_RARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
- if (inventory[INVEN_LARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
+ if (p_ptr->inventory_list[INVEN_RARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
+ if (p_ptr->inventory_list[INVEN_LARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
/* Player can not walk through "walls"... */
/* unless in Shadow Form */
{
msg_format(_("空を飛ばないと%sの上には行けない。", "You need to fly to go through the %s."), f_name + f_info[get_feat_mimic(g_ptr)].name);
free_turn(p_ptr);
- running = 0;
+ p_ptr->running = 0;
oktomove = FALSE;
}
}
/* Decrease the run counter */
- if (--running <= 0) return;
+ if (--p_ptr->running <= 0) return;
/* Take time */
take_turn(p_ptr, 100);
}
/* Cancel running */
- if (running)
+ if (p_ptr->running)
{
/* Cancel */
- running = 0;
+ p_ptr->running = 0;
/* Check for new panel if appropriate */
if (center_player && !center_running) verify_panel();