*/
#include "angband.h"
+#include "util.h"
+
#include "floor.h"
+#include "object-boost.h"
+#include "object-flavor.h"
#include "object-hook.h"
#include "melee.h"
+#include "player-move.h"
#include "player-status.h"
-#include "projection.h"
#include "spells-summon.h"
#include "quest.h"
#include "artifact.h"
#include "avatar.h"
+#include "spells.h"
#include "spells-floor.h"
+#include "grid.h"
+#include "monster-process.h"
+#include "monster-status.h"
+#include "monster-spell.h"
+#include "cmd-spell.h"
+#include "snipe.h"
+#include "floor-save.h"
+#include "files.h"
+#include "player-effects.h"
+#include "view-mainwindow.h"
+#include "mind.h"
/*! テレポート先探索の試行数 / Maximum number of tries for teleporting */
bool look = TRUE;
monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx];
-
- /* Paranoia */
- if (!m_ptr->r_idx) return (FALSE);
+ if (!monster_is_valid(m_ptr)) return (FALSE);
oy = m_ptr->fy;
ox = m_ptr->fx;
POSITION dis = 2;
bool look = TRUE;
monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx];
-
- /* Paranoia */
if(!m_ptr->r_idx) return;
/* "Skill" test */
{
monster_type *m_ptr = ¤t_floor_ptr->m_list[m_idx];
- /* Check for quest completion */
check_quest_completion(m_ptr);
if (record_named_pet && is_pet(m_ptr) && m_ptr->nickname)
{
/* Extract request */
dummy = atoi(tmp_val);
-
- /* Paranoia */
if (dummy < 1) dummy = 1;
-
- /* Paranoia */
if (dummy > max_dlv[select_dungeon]) dummy = max_dlv[select_dungeon];
if (dummy < d_info[select_dungeon].mindepth) dummy = d_info[select_dungeon].mindepth;
/* Awake monster */
if (g_ptr->m_idx && MON_CSLEEP(m_ptr))
{
- /* Reset sleep counter */
(void)set_monster_csleep(g_ptr->m_idx, 0);
/* Notice the "waking up" */
/* All staffs, unstacked wands. */
else recharge_strength = (100 + power - lev - (8 * o_ptr->pval)) / 15;
-
- /* Paranoia */
if (recharge_strength < 0) recharge_strength = 0;
/* Back-fire */
(p_ptr->pclass == CLASS_MIRROR_MASTER) ||
(p_ptr->pclass == CLASS_FORCETRAINER))
{
- int minfail = 0;
+ PERCENTAGE minfail = 0;
PLAYER_LEVEL plev = p_ptr->lev;
- int chance = 0;
+ PERCENTAGE chance = 0;
mind_type spell;
char comment[80];
char psi_desc[80];
{
/* All staffs, wands. */
recharge_strength = (100 + power - lev) / 15;
-
- /* Paranoia */
if (recharge_strength < 0) recharge_strength = 0;
/* Back-fire */