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/branch.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/branch.h')
-rw-r--r-- | crawl-ref/source/branch.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/crawl-ref/source/branch.h b/crawl-ref/source/branch.h index 404c40d6b9..0598f31247 100644 --- a/crawl-ref/source/branch.h +++ b/crawl-ref/source/branch.h @@ -12,6 +12,8 @@ #include "enum.h" +struct fog_machine_data; + enum branch_flag_type { BFLAG_NONE = 0, @@ -41,8 +43,12 @@ struct Branch bool has_uniques; char floor_colour; // Zot needs special handling char rock_colour; - int (*mons_rarity_function)(int); - int (*mons_level_function)(int); + int (*mons_rarity_function)(int); + int (*mons_level_function)(int); + int (*num_traps_function)(int); + trap_type (*rand_trap_function)(int); + int (*num_fogs_function)(int); + void (*rand_fog_function)(int,fog_machine_data&); int altar_chance; // in percent int travel_shortcut; // which key to press for travel bool any_upstair_exits; // any upstair exits the branch (Hell branches) |