summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/random.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2011-01-18 01:37:37 +0100
committerAdam Borowski <kilobyte@angband.pl>2011-10-31 12:54:20 +0100
commitc56cb9b32b1f15ec37cbdf79c9d0d4e16839ae09 (patch)
treec22b503e8667f882c13f49bac8538ad474b5b525 /crawl-ref/source/random.h
parentaacbd52137bd2f5668c1628c099a9fb1e366ceef (diff)
downloadcrawl-ref-c56cb9b32b1f15ec37cbdf79c9d0d4e16839ae09.tar.gz
crawl-ref-c56cb9b32b1f15ec37cbdf79c9d0d4e16839ae09.zip
Simplify use of random_choose() by using overloading.
Diffstat (limited to 'crawl-ref/source/random.h')
-rw-r--r--crawl-ref/source/random.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/random.h b/crawl-ref/source/random.h
index 6d7bf8fed4..e80a18b75c 100644
--- a/crawl-ref/source/random.h
+++ b/crawl-ref/source/random.h
@@ -22,6 +22,10 @@ int random_choose(int first, ...);
int random_choose_weighted(int weight, int first, ...);
double random_real();
+enum monster_type;
+monster_type random_choose(monster_type first, ...);
+monster_type random_choose_weighted(int weight, monster_type first, ...);
+
int random2avg(int max, int rolls);
int bestroll(int max, int rolls);
int random2limit(int max, int limit);