#include "player-move.h"
#include "world.h"
#include "player-effects.h"
+#include "objectkind.h"
+#include "object-ego.h"
+#include "cmd-dump.h"
+#include "view-mainwindow.h"
static bool mon_invis;
static POSITION mon_fy, mon_fx;
/* Hack -- Memorize lit grids if allowed */
if (view_perma_grids) g_ptr->info |= (CAVE_MARK);
- /* Hack -- Notice spot */
note_spot(y, x);
}
}
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
}
/* Forget the normal floor grid */
g_ptr->info &= ~(CAVE_MARK);
- /* Hack -- Notice spot */
note_spot(y, x);
}
}
}
- /* Glow deep lava and building entrances */
glow_deep_lava_and_bldg();
}
}
if (p_ptr->special_defense & NINJA_S_STEALTH)
{
- if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
+ if (current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(p_ptr, FALSE);
}
}
* @brief 現在フロアに残っている敵モンスターの数を返す /
* @return 現在の敵モンスターの数
*/
-MONSTER_NUMBER count_all_hostile_monsters(void)
+MONSTER_NUMBER count_all_hostile_monsters(floor_type *floor_ptr)
{
POSITION x, y;
MONSTER_NUMBER number_mon = 0;
- for (x = 0; x < current_floor_ptr->width; ++x)
+ for (x = 0; x < floor_ptr->width; ++x)
{
- for (y = 0; y < current_floor_ptr->height; ++y)
+ for (y = 0; y < floor_ptr->height; ++y)
{
- MONSTER_IDX m_idx = current_floor_ptr->grid_array[y][x].m_idx;
+ MONSTER_IDX m_idx = floor_ptr->grid_array[y][x].m_idx;
- if (m_idx > 0 && is_hostile(¤t_floor_ptr->m_list[m_idx]))
+ if (m_idx > 0 && is_hostile(&floor_ptr->m_list[m_idx]))
{
++number_mon;
}
{
const int base = 10;
int rating = 0;
- IDX i;
+ MONSTER_IDX i;
/* Hack -- no feeling in the town */
if (!current_floor_ptr->dun_level) return 0;
object_kind *k_ptr = &k_info[o_ptr->k_idx];
int delta = 0;
- /* Skip dead objects */
- if (!o_ptr->k_idx) continue;
+ if (!OBJECT_IS_VALID(o_ptr)) continue;
/* Skip known objects */
if (object_is_known(o_ptr))
if (!current_floor_ptr->dun_level) return;
/* No feeling in the arena */
- if (p_ptr->inside_battle) return;
+ if (p_ptr->phase_out) return;
/* Extract delay time */
delay = MAX(10, 150 - p_ptr->skill_fos) * (150 - current_floor_ptr->dun_level) * TURNS_PER_TICK / 100;
p_ptr->feeling = new_feeling;
/* Announce feeling */
- do_cmd_feeling();
+ do_cmd_feeling(p_ptr);
select_floor_music();
if (!rad) continue;
else if (rad > 0)
{
- if (!(r_ptr->flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2)) && (MON_CSLEEP(m_ptr) || (!current_floor_ptr->dun_level && is_daytime()) || p_ptr->inside_battle)) continue;
+ if (!(r_ptr->flags7 & (RF7_SELF_LITE_1 | RF7_SELF_LITE_2)) && (MON_CSLEEP(m_ptr) || (!current_floor_ptr->dun_level && is_daytime()) || p_ptr->phase_out)) continue;
if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) rad = 1;
add_mon_lite = mon_lite_hack;
f_flag = FF_LOS;