#include "angband.h"
-#include "artifact.h"
#include "player-status.h"
+
+#include "artifact.h"
#include "avatar.h"
+#include "spells-status.h"
+#include "object-hook.h"
+
+/* Hack, monk armour */
+static bool monk_armour_aux;
+static bool monk_notify_aux;
/*
* Return alignment title
bool old_mighty_throw = p_ptr->mighty_throw;
/* Current feature under player. */
- feature_type *f_ptr = &f_info[cave[p_ptr->y][p_ptr->x].feat];
+ feature_type *f_ptr = &f_info[current_floor->grid_array[p_ptr->y][p_ptr->x].feat];
/* Save the old armor class */
ARMOUR_CLASS old_dis_ac = p_ptr->dis_ac;
if ((inventory[i].tval == TV_CRAFT_BOOK) && (inventory[i].sval == 2)) have_kabe = TRUE;
}
- for (this_o_idx = cave[p_ptr->y][p_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx)
+ for (this_o_idx = current_floor->grid_array[p_ptr->y][p_ptr->x].o_idx; this_o_idx; this_o_idx = next_o_idx)
{
o_ptr = &o_list[this_o_idx];
}
/* max radius is 14 (was 5) without rewriting other code -- */
- /* see cave.c:update_lite() and defines.h:LITE_MAX */
- if (d_info[dungeon_type].flags1 & DF1_DARKNESS && p_ptr->cur_lite > 1)
+ /* see current_floor->grid_array.c:update_lite() and defines.h:LITE_MAX */
+ if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS && p_ptr->cur_lite > 1)
p_ptr->cur_lite = 1;
/*
creature_ptr->update &= ~(PU_AUTODESTROY);
autopick_delayed_alter();
}
-
- /* Combine the pack */
if (creature_ptr->update & (PU_COMBINE))
{
creature_ptr->update &= ~(PU_COMBINE);
if (o_ptr->k_idx && check_book_realm(o_ptr->tval, o_ptr->sval)) return FALSE;
}
- for (i = cave[p_ptr->y][p_ptr->x].o_idx; i; i = o_ptr->next_o_idx)
+ for (i = current_floor->grid_array[p_ptr->y][p_ptr->x].o_idx; i; i = o_ptr->next_o_idx)
{
o_ptr = &o_list[i];
if (o_ptr->k_idx && (o_ptr->marked & OM_FOUND) && check_book_realm(o_ptr->tval, o_ptr->sval)) return FALSE;
return TRUE;
}
+
+void take_turn(player_type *creature_ptr, PERCENTAGE need_cost)
+{
+ creature_ptr->energy_use = (ENERGY)need_cost;
+}
+
+void free_turn(player_type *creature_ptr)
+{
+ creature_ptr->energy_use = 0;
+}
+
+/*!
+ * @brief プレイヤーを指定座標に配置する / Place the player in the dungeon XXX XXX
+ * @param x 配置先X座標
+ * @param y 配置先Y座標
+ * @return 配置に成功したらTRUE
+ */
+bool player_place(POSITION y, POSITION x)
+{
+ /* Paranoia XXX XXX */
+ if (current_floor->grid_array[y][x].m_idx != 0) return FALSE;
+
+ /* Save player location */
+ p_ptr->y = y;
+ p_ptr->x = x;
+
+ /* Success */
+ return TRUE;
+}