diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-01 17:44:09 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-10-01 17:44:09 +0000 |
commit | bb183e9257bd99caeab9776b3579acf68cb203b1 (patch) | |
tree | ca8904e3d8db4aa6db1991b0ffebdb5d932ea6fe /crawl-ref/source/terrain.cc | |
parent | e32c3272ea58ddf7bf596bbf0ec5c62ec6c42018 (diff) | |
download | crawl-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/terrain.cc')
-rw-r--r-- | crawl-ref/source/terrain.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/crawl-ref/source/terrain.cc b/crawl-ref/source/terrain.cc index 67a2fa84b6..ae538be8fb 100644 --- a/crawl-ref/source/terrain.cc +++ b/crawl-ref/source/terrain.cc @@ -181,10 +181,11 @@ bool grid_is_permarock(dungeon_feature_type grid) return (grid == DNGN_PERMAROCK_WALL || grid == DNGN_CLEAR_PERMAROCK_WALL); } -bool grid_is_trap(dungeon_feature_type grid) +bool grid_is_trap(dungeon_feature_type grid, bool undiscovered_too) { return (grid == DNGN_TRAP_MECHANICAL || grid == DNGN_TRAP_MAGICAL - || grid == DNGN_TRAP_NATURAL); + || grid == DNGN_TRAP_NATURAL + || (undiscovered_too && grid == DNGN_UNDISCOVERED_TRAP)); } bool grid_is_water(dungeon_feature_type grid) |