diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-13 12:33:41 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-11-13 12:33:41 +0000 |
commit | f19ffb0cf2b7db6897674d73191525cb54831723 (patch) | |
tree | eb83c1180bd1f6137e4566b45d5d414def477e7d /crawl-ref/source/traps.h | |
parent | 2ce8ccfa9ec7125c1519f2b9efbe1fe25aa5ad48 (diff) | |
download | crawl-ref-f19ffb0cf2b7db6897674d73191525cb54831723.tar.gz crawl-ref-f19ffb0cf2b7db6897674d73191525cb54831723.zip |
The number of traps randomly generated on a level, and which types of
traps are randomly selected, can now easily be controlled on a branch by
branch basis (and for Pan and the Abyss), similar to how monster level
and rarity is controlled (via function pointers in the Branch data
structure). The same can be done for fog machines (though this feature
isn't being used as of yet).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2846 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/traps.h')
-rw-r--r-- | crawl-ref/source/traps.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crawl-ref/source/traps.h b/crawl-ref/source/traps.h index c86041840e..1853cf5313 100644 --- a/crawl-ref/source/traps.h +++ b/crawl-ref/source/traps.h @@ -14,6 +14,7 @@ #define TRAPS_H #include "enum.h" +#include "travel.h" struct dist; struct bolt; @@ -63,4 +64,22 @@ dungeon_feature_type trap_category(trap_type type); int trap_at_xy(int x, int y); trap_type trap_type_at_xy(int x, int y); +bool is_valid_shaft_level(const level_id &place = level_id::current()); + +int num_traps_for_place(int level_number = -1, + const level_id &place = level_id::current()); +trap_type random_trap_for_place(int level_number = -1, + const level_id &place = level_id::current()); + +int traps_zero_number(int level_number = -1); + +int traps_pan_number(int level_number = -1); +trap_type traps_pan_type(int level_number = -1); + +int traps_abyss_number(int level_number = -1); +trap_type traps_abyss_type(int level_number = -1); + +int traps_lab_number(int level_number = -1); +trap_type traps_lab_type(int level_number = -1); + #endif |