#include "monster/monster-status-setter.h"
#include "monster/monster-status.h"
#include "monster/monster-update.h"
+#include "monster/monster-util.h"
#include "object/object-broken.h"
#include "object/object-info.h"
#include "object/object-mark-types.h"
if (snipe_type == SP_KILL_WALL) {
g_ptr = &floor_ptr->grid_array[ny][nx];
- if (g_ptr->cave_has_flag(TerrainCharacteristics::HURT_ROCK) && !g_ptr->m_idx) {
+ if (g_ptr->cave_has_flag(TerrainCharacteristics::HURT_ROCK) && !is_monster(g_ptr->m_idx)) {
if (any_bits(g_ptr->info, (CAVE_MARK))) {
msg_print(_("岩が砕け散った。", "Wall rocks were shattered."));
}
}
/* Stopped by walls/doors */
- if (!cave_has_flag_bold(floor_ptr, ny, nx, TerrainCharacteristics::PROJECT) && !floor_ptr->grid_array[ny][nx].m_idx) {
+ if (!cave_has_flag_bold(floor_ptr, ny, nx, TerrainCharacteristics::PROJECT) && !is_monster(floor_ptr->grid_array[ny][nx].m_idx)) {
break;
}
y = ny;
/* Monster here, Try to hit it */
- if (floor_ptr->grid_array[y][x].m_idx) {
+ if (is_monster(floor_ptr->grid_array[y][x].m_idx)) {
sound(SOUND_SHOOT_HIT);
Grid *c_mon_ptr = &floor_ptr->grid_array[y][x];