From 70b49eb0667159b6a079e8decd5dc37ddfcef60f Mon Sep 17 00:00:00 2001 From: dolorous Date: Sun, 23 Mar 2008 01:32:57 +0000 Subject: Expand bless_follower() to allow explicitly picking the follower as well as picking one randomly, fix a potential problem with the display of the blessing message, and add a piety-dependent chance that followers will be specifically blessed when gaining levels. Hook the last of these up to Beogh for now (since the random chance on piety gain occurs less and less often as piety goes up). TSO should also get this eventually. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3821 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/monstuff.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/monstuff.cc') diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc index 9bcb773088..4b9058d11a 100644 --- a/crawl-ref/source/monstuff.cc +++ b/crawl-ref/source/monstuff.cc @@ -406,7 +406,16 @@ static void _give_monster_experience( monsters *victim, if ((!victim_was_born_friendly || !mons_friendly(mons)) && !mons_aligned(killer_index, monster_index(victim))) { - mons->gain_exp(experience); + if (mons->gain_exp(experience)) + { + // Blessings for followers. + if (you.religion == GOD_BEOGH + && you.piety >= piety_breakpoint(2) + && random2(you.piety) >= piety_breakpoint(0)) + { + bless_follower(GOD_BEOGH, is_orcish_follower, mons); + } + } } } -- cgit v1.2.3-54-g00ecf