From 74c535b701b7642b74b45934e78cadd7ab67a0e4 Mon Sep 17 00:00:00 2001 From: Stefan O'Rear Date: Wed, 30 Dec 2009 03:27:21 -0800 Subject: Ignore obscured items in the UI I probably missed a few spots. --- crawl-ref/source/mon-act.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'crawl-ref/source/mon-act.cc') 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; -- cgit v1.2.3-54-g00ecf