summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-act.cc
diff options
context:
space:
mode:
authorStefan O'Rear <stefanor@cox.net>2009-12-30 03:27:21 -0800
committerStefan O'Rear <stefanor@cox.net>2009-12-30 03:27:57 -0800
commit74c535b701b7642b74b45934e78cadd7ab67a0e4 (patch)
treed80cb308cfc2ccc45a9e7b47f085a0abe24369c0 /crawl-ref/source/mon-act.cc
parenta144abbba078cf5ec99f570f7b81da564577636a (diff)
downloadcrawl-ref-74c535b701b7642b74b45934e78cadd7ab67a0e4.tar.gz
crawl-ref-74c535b701b7642b74b45934e78cadd7ab67a0e4.zip
Ignore obscured items in the UI
I probably missed a few spots.
Diffstat (limited to 'crawl-ref/source/mon-act.cc')
-rw-r--r--crawl-ref/source/mon-act.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-act.cc b/crawl-ref/source/mon-act.cc
index 18ad9a1b01..6aca56ffa8 100644
--- a/crawl-ref/source/mon-act.cc
+++ b/crawl-ref/source/mon-act.cc
@@ -2183,6 +2183,7 @@ static bool _monster_eat_item(monsters *monster, bool nearby)
bool death_ooze_ate_good = false;
bool death_ooze_ate_corpse = false;
+ // Jellies can swim, so don't check water
for (stack_iterator si(monster->pos());
si && eaten < max_eat && hps_changed < 50; ++si)
{
@@ -2466,6 +2467,14 @@ static bool _handle_pickup(monsters *monster)
if (monster->asleep() || monster->submerged())
return (false);
+ // Hack - Harpies fly over water, but we don't have a general
+ // system for monster igrd yet. Flying intelligent monsters
+ // (kenku!) would also count here.
+ dungeon_feature_type feat = grd(monster->pos());
+
+ if ((feat == DNGN_LAVA || feat == DNGN_DEEP_WATER) && !monster->flight_mode())
+ return (false);
+
const bool nearby = mons_near(monster);
int count_pickup = 0;