summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-05 09:05:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-05 09:05:35 +0000
commit9966b0d518c0d1d7f816c425799e86480423e07c (patch)
tree30dc8a8d510fd3ab6f7a2dfb6355e2fe99367dbf /crawl-ref/source/monstuff.cc
parente0b4a955a0e39faa83d9e717a03b99bfd4567828 (diff)
downloadcrawl-ref-9966b0d518c0d1d7f816c425799e86480423e07c.tar.gz
crawl-ref-9966b0d518c0d1d7f816c425799e86480423e07c.zip
latest net fixes (Nemelex prayer, swapping with friendlies) for trunk
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2764 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 627bfe0643..5376801ed2 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1452,7 +1452,7 @@ static bool habitat_okay( const monsters *monster, int targ )
// This doesn't really swap places, it just sets the monster's
// position equal to the player (the player has to be moved afterwards).
-// It also has a slight problem with the fact the if the player is
+// It also has a slight problem with the fact that if the player is
// levitating over an inhospitable habitat for the monster the monster
// will be put in a place it normally couldn't go (this could be a
// feature because it prevents insta-killing). In order to prevent
@@ -1473,6 +1473,12 @@ bool swap_places(monsters *monster)
int loc_y = you.y_pos;
const int mgrid = grd[monster->x][monster->y];
+
+ if (monster->has_ench(ENCH_HELD))
+ {
+ simple_monster_message(monster, " is held in a net!");
+ return (false);
+ }
const bool mon_dest_okay = habitat_okay( monster, grd[loc_x][loc_y] );
const bool you_dest_okay =