summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mapdef.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-19 18:02:31 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2008-11-19 18:02:31 +0000
commit6e304ee422e24338bde6ca84c420702d7d719993 (patch)
tree08bee3585e67a17a8b946df063185136cd95d148 /crawl-ref/source/mapdef.h
parentdb54671af1f255d5f886ff79ffe8b2232585f1c3 (diff)
downloadcrawl-ref-6e304ee422e24338bde6ca84c420702d7d719993.tar.gz
crawl-ref-6e304ee422e24338bde6ca84c420702d7d719993.zip
Separate CHANCE and WEIGHT. CHANCE is a probability, WEIGHT is a raw number used as a generation weight (i.e. WEIGHT is what the old CHANCE used to be).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7501 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mapdef.h')
-rw-r--r--crawl-ref/source/mapdef.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h
index 83098d2b5a..ca9da9c113 100644
--- a/crawl-ref/source/mapdef.h
+++ b/crawl-ref/source/mapdef.h
@@ -618,7 +618,10 @@ public:
depth_ranges depths;
map_section_type orient;
+
+ int chance_priority;
int chance;
+ int weight;
std::vector<std::string> welcome_messages;
@@ -711,6 +714,7 @@ public:
bool has_tag(const std::string &tag) const;
bool has_tag_prefix(const std::string &tag) const;
bool has_tag_suffix(const std::string &suffix) const;
+ std::vector<std::string> get_tags() const;
std::vector<std::string> get_shuffle_strings() const;
std::vector<std::string> get_subst_strings() const;
@@ -753,6 +757,8 @@ private:
const std::string &s, bool fixed));
};
+const int CHANCE_ROLL = 10000;
+
std::string escape_string(std::string in, const std::string &toesc,
const std::string &escapewith);