summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/xom.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/xom.cc')
-rw-r--r--crawl-ref/source/xom.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/xom.cc b/crawl-ref/source/xom.cc
index 78310ba4a3..6a1a389ac1 100644
--- a/crawl-ref/source/xom.cc
+++ b/crawl-ref/source/xom.cc
@@ -2246,6 +2246,14 @@ static bool _xom_chaos_upgrade_nearby_monster()
static bool _xom_player_confusion_effect(int sever)
{
+ if (!_xom_feels_nasty())
+ {
+ // Don't confuse the player if standing next to lava or deep water.
+ for (adjacent_iterator ai; ai; ++ai)
+ if (in_bounds(*ai) && is_grid_dangerous(grd(*ai)))
+ return (false);
+ }
+
bool rc = false;
// Looks like this will *always* succeed?