#include "quest.h"
#include "wild.h"
#include "spells-floor.h"
+#include "monster-status.h"
static FLOOR_IDX new_floor_id; /*!<次のフロアのID / floor_id of the destination */
static void kill_saved_floor(saved_floor_type *sf_ptr)
{
char floor_savefile[1024];
-
- /* Paranoia */
if (!sf_ptr) return;
/* Already empty */
{
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
if (!is_pet(m_ptr)) continue;
if (i == p_ptr->riding) continue;
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
GAME_TEXT m_name[MAX_NLEN];
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
if (!is_pet(m_ptr)) continue;
if (!m_ptr->nickname) continue;
if (p_ptr->riding == i) continue;
m_ptr = &party_mon[i];
/* Skip empty monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
/* Hack -- Increase the racial counter */
real_r_ptr(m_ptr)->cur_num++;
m_ptr->fx = cx;
m_ptr->ml = TRUE;
m_ptr->mtimed[MTIMED_CSLEEP] = 0;
-
- /* Paranoia */
m_ptr->hold_o_idx = 0;
m_ptr->target_y = 0;
monster_race *r_ptr;
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
- /* Skip dead monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
/* Extract real monster race */
r_ptr = real_r_ptr(m_ptr);
monster_race *r_ptr;
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
- /* Skip dead monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
/* Only maintain quest monsters */
if (quest_r_idx != m_ptr->r_idx) continue;
panel_col_max = 0;
/* Mega-Hack -- not ambushed on the wildness? */
- ambush_flag = FALSE;
+ p_ptr->ambush_flag = FALSE;
/* No saved floors (On the surface etc.) */
if (!(change_floor_mode & CFM_SAVE_FLOORS) &&
monster_race *r_ptr;
monster_type *m_ptr = ¤t_floor_ptr->m_list[i];
- /* Skip dead monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
if (!is_pet(m_ptr))
{
/* Extract current floor data */
sf_ptr = get_sf_ptr(p_ptr->floor_id);
-
- /* Paranoia */
if (!sf_ptr)
{
/* No floor id? -- Create now! */