summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/main.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2009-12-13 19:56:17 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2009-12-13 19:56:17 +0100
commit4c86a4c178ac599a17f865b6dcce84d2631eae8f (patch)
treeefd5c917743f4066e111d4903b39a8a3f4395697 /crawl-ref/source/main.cc
parent0eada15f56f13e944b221d0ae5fe8f93dcbce575 (diff)
downloadcrawl-ref-4c86a4c178ac599a17f865b6dcce84d2631eae8f.tar.gz
crawl-ref-4c86a4c178ac599a17f865b6dcce84d2631eae8f.zip
Don't disallow trap disarming if there's a harmless cloud in the way.
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);