*/
bool monster_can_cross_terrain(byte feat, monster_race *r_ptr)
{
+ /* Pit */
+ if (feat == FEAT_DARK_PIT)
+ {
+ if (r_ptr->flags7 & RF7_CAN_FLY)
+ return TRUE;
+ else
+ return FALSE;
+ }
/* Deep water */
if (feat == FEAT_DEEP_WATER)
{
/* Require empty space (if not ghostly) */
if (!(!dun_level && (cave[y][x].feat == FEAT_MOUNTAIN) && ((r_ptr->flags8 & RF8_WILD_MOUNTAIN) || (r_ptr->flags7 & RF7_CAN_FLY))) &&
- !cave_empty_bold2(y, x) &&
+ !(cave_empty_bold2(y, x) || (mode | PM_IGNORE_TERRAIN)) &&
!((r_ptr->flags2 & RF2_PASS_WALL) &&
- !(cave_perma_bold(y, x) || cave[y][x].m_idx ||
- ((y == py) && (x == px))))) return (FALSE);
+ !(cave_perma_bold(y, x) || cave[y][x].m_idx ||
+ ((y == py) && (x == px))))) return (FALSE);
/* Paranoia */
if (!r_idx) return (FALSE);
else
{
/* Placing the new monster failed */
- place_monster_aux(0, y, x, old_r_idx, (mode | PM_NO_KAGE | PM_IGNORE_TERRAIN));
- m_list[hack_m_idx_ii] = back_m;
+ if (place_monster_aux(0, y, x, old_r_idx, (mode | PM_NO_KAGE | PM_IGNORE_TERRAIN)))
+ m_list[hack_m_idx_ii] = back_m;
}
if (targeted) target_who = hack_m_idx_ii;