summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc19
1 files changed, 9 insertions, 10 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 161f7269a0..e5d404d7f4 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1892,23 +1892,22 @@ bool swap_places(monsters *monster, const coord_def &loc)
bool swap_check(monsters *monster, coord_def &loc)
{
loc = you.pos();
- const dungeon_feature_type mgrid = grd(monster->pos());
- if (mons_is_caught(monster))
+ // Don't move onto dangerous terrain.
+ if (is_grid_dangerous(grd(monster->pos())))
{
- simple_monster_message(monster, " is held in a net!");
+ canned_msg(MSG_UNTHINKING_ACT);
return (false);
}
- const bool mon_dest_okay = _habitat_okay( monster, grd(you.pos()) );
- const bool you_dest_okay =
- !is_grid_dangerous(mgrid)
- || yesno("Do you really want to step there?", false, 'n');
-
- if (!you_dest_okay)
+ if (mons_is_caught(monster))
+ {
+ simple_monster_message(monster, " is held in a net!");
return (false);
+ }
- bool swap = mon_dest_okay;
+ // First try: move monster onto your position.
+ bool swap = _habitat_okay( monster, grd(loc) );
// Choose an appropriate habitat square at random around the target.
if (!swap)