summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.h
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-24 23:05:09 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-04-24 23:05:09 +0000
commit86878386c072b70e0e54c7176cdfae250564ddae (patch)
tree4b4ceaffa08a376a601c3579a295ce1fd9f7b923 /crawl-ref/source/monstuff.h
parent6388931826b0bced2cd7f185b85e2f3d299b2f71 (diff)
downloadcrawl-ref-86878386c072b70e0e54c7176cdfae250564ddae.tar.gz
crawl-ref-86878386c072b70e0e54c7176cdfae250564ddae.zip
Fix blessing routine -- oops!
Fix choose_random_nearby_monster() to really pick a random monster rather than the first one that fits, and allow named monsters to get higher chances. Use this when deciding which monster to bless (only happens if the one doing the kill, usually the player, is not eligible for blessing). At high xp levels allow reinforcement (if there are no orcs nearby) to send in high xp orcs: orc warrior, orc knight, or orc warlord, rather than the normal ones (orc, orc wizard, orc priest). At xl 27 the probability for this happening is about 31%. Problem: From the code, it appears that scumming for large armies is possible by deliberately losing your followers somewhere and then killing monsters until you get the reinforcement effect. This will have to be controlled somehow, while still allowing for genuinely lost allies somewhere on the level. Maybe use recall instead or something like that. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@4598 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.h')
-rw-r--r--crawl-ref/source/monstuff.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/crawl-ref/source/monstuff.h b/crawl-ref/source/monstuff.h
index 44e78cfdea..988a793496 100644
--- a/crawl-ref/source/monstuff.h
+++ b/crawl-ref/source/monstuff.h
@@ -125,7 +125,8 @@ bool simple_monster_message(const monsters *monster, const char *event,
bool choose_any_monster(const monsters* mon);
int choose_random_nearby_monster(int weight,
bool (*suitable)(const monsters* mon) =
- choose_any_monster);
+ choose_any_monster,
+ bool prefer_named = false);
/* ***********************************************************************
* called from: acr