summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mon-pick.h
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2013-03-17 18:36:42 +0100
committerAdam Borowski <kilobyte@angband.pl>2013-03-18 08:34:35 +0100
commitad6c3632dbaffdf5aff048114b6f20348471372c (patch)
tree9c343f9faa476915b4d62a5a275054ab644a213a /crawl-ref/source/mon-pick.h
parentea243feced8f317da5d449aeb8a1a10fc0ded164 (diff)
downloadcrawl-ref-ad6c3632dbaffdf5aff048114b6f20348471372c.tar.gz
crawl-ref-ad6c3632dbaffdf5aff048114b6f20348471372c.zip
The main workhorse for mon-pick.
Unlike the old code, it doesn't need to retry over and over, there is just one roll. It also accepts and arbitrary vetoer function.
Diffstat (limited to 'crawl-ref/source/mon-pick.h')
-rw-r--r--crawl-ref/source/mon-pick.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/crawl-ref/source/mon-pick.h b/crawl-ref/source/mon-pick.h
index d7998a89fd..6f0217dae7 100644
--- a/crawl-ref/source/mon-pick.h
+++ b/crawl-ref/source/mon-pick.h
@@ -11,9 +11,12 @@
#define DEPTH_NOWHERE 999
+typedef bool (*mon_pick_vetoer)(monster_type);
+
int mons_rarity(monster_type mcls, branch_type branch);
int mons_depth(monster_type mcls, branch_type branch);
+monster_type pick_monster(level_id place, mon_pick_vetoer veto = nullptr);
monster_type pick_monster_no_rarity(branch_type branch);
monster_type pick_monster_by_hash(branch_type branch, uint32_t hash);
bool branch_has_monsters(branch_type branch);