summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/main.cc')
-rw-r--r--crawl-ref/source/main.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index 275c660f20..d84d27aac4 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -3188,7 +3188,10 @@ static bool _untrap_target(const coord_def move, bool check_confused)
mpr("You can't disarm traps in your present form.");
return (true);
}
- if (env.cgrid(target) != EMPTY_CLOUD)
+
+ const int cloud = env.cgrid(target);
+ if (cloud != EMPTY_CLOUD
+ && is_damaging_cloud(env.cloud[ cloud ].type, true))
{
mpr("You can't get to that trap right now.");
return (true);