#include "realm-hex.h"
#include "object-hook.h"
#include "wild.h"
+#include "monster-status.h"
static bool load = TRUE; /*!<ロード処理中の分岐フラグ*/
/* Skip dead monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
/* Allow regeneration (if needed) */
if (m_ptr->hp < m_ptr->maxhp)
monster_race *r_ptr = &r_info[m_ptr->r_idx];
/* Paranoia -- Skip dead monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
if (r_ptr->level >= p_ptr->lev)
{
int delta = 0;
/* Skip dead monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
/* Ignore pet */
if (is_pet(m_ptr)) continue;
{
monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx];
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
m_ptr->mflag2 |= (MFLAG2_MARK | MFLAG2_SHOW);
update_monster(m_idx, FALSE);
}
}
- /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */
handle_stuff();
}
process_command();
}
-
/* Hack -- Pack Overflow */
pack_overflow();
-
/*** Clean up ***/
/* Significant */
monster_type *m_ptr;
monster_race *r_ptr;
- /* Access monster */
m_ptr = ¤t_floor_ptr->m_list[m_idx];
/* Skip dead monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
/* Skip unseen monsters */
if (!m_ptr->ml) continue;
for (m_idx = 1; m_idx < m_max; m_idx++)
{
monster_type *m_ptr;
-
- /* Access monster */
m_ptr = ¤t_floor_ptr->m_list[m_idx];
/* Skip dead monsters */
- if (!m_ptr->r_idx) continue;
+ if (!monster_is_valid(m_ptr)) continue;
/* Nice monsters get mean */
if (m_ptr->mflag & MFLAG_NICE)
p_ptr->redraw |= (PR_MAP);
p_ptr->update |= (PU_MONSTERS);
-
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
msg_print(_("「時は動きだす…」", "You feel time flowing around you once more."));
p_ptr->timewalk = FALSE;
p_ptr->energy_need = ENERGY_NEED();
- /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */
handle_stuff();
}
}
character_xtra = TRUE;
p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_SPELL | PW_PLAYER | PW_MONSTER | PW_OVERHEAD | PW_DUNGEON);
+ p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_EQUIPPY | PR_MAP);
+ p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS | PU_VIEW | PU_LITE | PU_MON_LITE | PU_TORCH | PU_MONSTERS | PU_DISTANCE | PU_FLOW);
- /* Redraw dungeon */
- p_ptr->redraw |= (PR_WIPE | PR_BASIC | PR_EXTRA | PR_EQUIPPY);
-
- p_ptr->redraw |= (PR_MAP);
-
- p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-
- /* Update lite/view */
- p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE | PU_TORCH);
- p_ptr->update |= (PU_MONSTERS | PU_DISTANCE | PU_FLOW);
-
- /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */
handle_stuff();
/* Leave "xtra" mode */
process_player();
process_upkeep_with_speed();
- /* Handle "p_ptr->update" and "p_ptr->redraw" and "p_ptr->window" */
handle_stuff();
/* Hack -- Hilite the player */