summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/abyss.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-01 17:44:09 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-01 17:44:09 +0000
commitbb183e9257bd99caeab9776b3579acf68cb203b1 (patch)
treeca8904e3d8db4aa6db1991b0ffebdb5d932ea6fe /crawl-ref/source/abyss.cc
parente32c3272ea58ddf7bf596bbf0ec5c62ec6c42018 (diff)
downloadcrawl-ref-bb183e9257bd99caeab9776b3579acf68cb203b1.tar.gz
crawl-ref-bb183e9257bd99caeab9776b3579acf68cb203b1.zip
Reworked traps: much much cleaner now. There might be bugs, though.
Traps now remember how much ammo they have. The ammo quantities (from David) are rather tentative. Breaks savefiles. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7076 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/abyss.cc')
-rw-r--r--crawl-ref/source/abyss.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/abyss.cc b/crawl-ref/source/abyss.cc
index 3ab081c559..34a44c16ad 100644
--- a/crawl-ref/source/abyss.cc
+++ b/crawl-ref/source/abyss.cc
@@ -811,8 +811,11 @@ static void _corrupt_square(const crawl_environment &oenv, const coord_def &c)
else
feat = oenv.grid(c);
- if (is_trap_square(feat) || feat == DNGN_SECRET_DOOR || feat == DNGN_UNSEEN)
+ if (grid_is_trap(feat, true)
+ || feat == DNGN_SECRET_DOOR || feat == DNGN_UNSEEN)
+ {
return;
+ }
if (is_traversable(grd(c)) && !is_traversable(feat)
&& _is_crowded_square(c))