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
INWKDE6QMV7PUWMZ65IZTUF4WB2G2OR2Q2NPTNID4Y3NVD7JWN3AC
G5ESYQWVRXOKGS56PCOWCJLAW4HCLVUJB5CWBWAZPG4ZVFSE2VZQC
2EPIGP4UVXPQVMQTEUQ2ZEZW65AXBSJWWQ6AKDIYVPTEFHWMH3RQC
CRU7JBTVJWTTVQ5JTRA2B3X2FPKPJ2RRR33IK2OG536VMOEZJYJAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
2TFYJ7D72JY4DYQW3GSPEONA2WYIVHAJXTIQ2QRDIWF65XN2QFGAC
K27R6ZMYMKVNXIV7K3QU2NXRVOGQRLMR6TI6ZQQSVKXVKS76NLSQC
YYIBXE7VFJTRT73QDNFL3MQ3LP3OK4KML5YMEMRKQUQZJVAWORWAC
N6AB4D7CBK3YG43GL5MZIHKGYXSQWQ3MRKXGEX3QAADLGNDIKL7AC
M2EUGZPKR6XTZSLQYDO7CDBBR2WPPMCBIBKJSZW5P7KYUOUPZSZQC
47NSOFQMBZCDIBHEAZSENFUGDSQCX3GJHFBUZ65ARDKCYIZ435LAC
6PP4GO7DFTZ26H564BRDMMYRANI7QISGOB3MDTVUMOX6STWFONLQC
J77VWSSEGMKS4S3HUAKROJYFL3H5FQSO4MCEPXBFJDMYBU36VRLAC
OVYC2AOOLEVUE4SSF65W46J4QLLZKRXB4DQY7F6S767XJLPQUU6AC
O6EVISSX36HYR7FNQ74LAJIFTUGZ3SAHPW2YC3AHMW4CRBQRNLSAC
XAKHV2E3U5KQ5LV77HI7XFKNCKGYXT2LPBOHZP2VOH4Y67QBH4SQC
P2OYYNPHIBGOLT4CRLNTTIXDN34EU2QCMFQJNLAMUAHQXZTEDPXQC
RIIO4BI64ECFXSRLBP3RA24QOPYXJVWMSFHLNTKUZS5YCLISLVJQC
AZ2RCXNVULJUSCBDBK3VARTUCTPEJXHTA7ALP73S4EXLJB6YYB5QC
GXXYPBFEWKRZQ6OBGYNS2EXZN52NGNV3UU3WM6S5R74CMJBAKGTAC
WZNB427K3EUNV3FMVXLQTM4UIHER4FIKQXWLUUXRNQC3OQ33VQYAC
6PAG7GHXHIYXJPPTEK4KZQZT4CL2SJDAGTVIUDB4KK66PVSTWUMAC
NC7EZH4YRVHK635D4KT6JAQWPQH4DUSXZTBR7NDLAMFFDIQSU3ZAC
KAOE5HB3THUKVGFZRO5EZESHEB3Q34WUO5DFMLWIKOBF47LZTIYAC
NDCVITU5R7TBEUC4FILNFRKWQGUNCJUGW5HA5KW3CQTU6AYRLYWQC
RPOZZWKG5GLPHVZZ7ZKMKS64ZMV2LDCQSARBJFJ6FZOTOKCQO7FAC
UIRWVLX5LDNWURTZOG7EFLXE5OOEL4XBPSLSUHUQSKHC4A7WCVLQC
PMCHUVWMCDXOWGXB4SWMBXFGHJYZG7KZ34SE33HFUGHPQYP3LYEAC
EJKHYV2Z6UPRVYUAL4WRW33GBNHYBFPMPA57HMBX2LQKXHIUO5VQC
case GOD_BEOGH:
{
// If no follower was chosen, either send
// reinforcement or get out.
bool reinforced = _beogh_blessing_reinforcement();
if (!reinforced || coinflip())
{
// Try again, or possibly send more
// reinforcement.
if (_beogh_blessing_reinforcement())
reinforced = true;
}
// If no follower was chosen, either send
// reinforcement or get out.
bool reinforced = _beogh_blessing_reinforcement();
if (reinforced)
{
pronoun = "";
blessed = "you";
result = "reinforcement";
goto blessing_done;
}
break;
}
if (!reinforced || coinflip())
{
// Try again, or possibly send more reinforcement.
if (_beogh_blessing_reinforcement())
reinforced = true;
}
result = mgrd[x][y];
if ( suitable(&menv[result]) && one_chance_in(++mons_count) )
break;
result = NON_MONSTER;
mon = mgrd[x][y];
if (suitable(&menv[mon]))
{
if (prefer_named
&& !get_unique_monster_name(&menv[mon]).empty())
{
mons_count += 2;
// named monsters have doubled chances
if (random2(mons_count) < 2)
result = mon;
}
else if (one_chance_in(++mons_count))
result = mon;
}