summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-05 08:54:09 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-05 08:54:09 +0000
commit1505951176f5b1e73c70cca45bb8c9fc95472c4c (patch)
treee2817ad46a0f917d2399833e5b0c870b2661ccd8
parenta3e982beb0d1e6d0c420b05bd17e4cef9ba76593 (diff)
downloadcrawl-ref-1505951176f5b1e73c70cca45bb8c9fc95472c4c.tar.gz
crawl-ref-1505951176f5b1e73c70cca45bb8c9fc95472c4c.zip
Fix two net bugs: Nemelex prayer sacrificing holding nets, and swapping
getting friendlies out of nets git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2763 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/monstuff.cc8
-rw-r--r--crawl-ref/source/religion.cc2
2 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 01d3cb959d..79bbab27f1 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -1352,7 +1352,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
@@ -1373,6 +1373,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 =
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 0541984f4d..092960941b 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2965,7 +2965,7 @@ void offer_items()
const int value = item_value( item, true );
- if (!god_likes_item(you.religion, mitm[i]))
+ if (item_is_stationary(item) || !god_likes_item(you.religion, mitm[i]))
{
i = next;
continue;