diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2011-08-18 01:41:03 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2011-09-05 23:20:15 +0200 |
commit | 5f32674c87b37df0f12d2b17c617ed0274e0541c (patch) | |
tree | ebf09d66a60cd6376762c2dfb0559c2c28fdf7a4 /crawl-ref/source/branch.cc | |
parent | 659a44c6003b4ffc0dc33ea30538e76d383b387f (diff) | |
download | crawl-ref-5f32674c87b37df0f12d2b17c617ed0274e0541c.tar.gz crawl-ref-5f32674c87b37df0f12d2b17c617ed0274e0541c.zip |
Apply the new feature mimic implementation to all types.
Starting from D:10, any door, stairs, escape hatch, shop fountain and
portal has one chance in 100 of being a mimic.
Branch entry vaults can be placed with a branch entry mimic.
No mimics in the temple and the vestibule. For now, those are the only
excluded places.
Diffstat (limited to 'crawl-ref/source/branch.cc')
-rw-r--r-- | crawl-ref/source/branch.cc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crawl-ref/source/branch.cc b/crawl-ref/source/branch.cc index 59140dc445..376d862b97 100644 --- a/crawl-ref/source/branch.cc +++ b/crawl-ref/source/branch.cc @@ -2,6 +2,7 @@ #include "branch.h" #include "externs.h" +#include "files.h" #include "place.h" #include "player.h" #include "spl-transloc.h" @@ -211,3 +212,14 @@ uint32_t get_branch_flags(branch_type branch) return branches[branch].branch_flags; } + +branch_type get_branch_at(const coord_def& pos) +{ + return level_id::current().get_next_level_id(pos).branch; +} + +bool branch_is_unfinished(branch_type branch) +{ + return branch == BRANCH_SPIDER_NEST || branch == BRANCH_FOREST + || branch == BRANCH_DWARVEN_HALL; +} |