summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-23 14:56:55 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-03-23 14:56:55 +0000
commitdddff423ecbec638f69423eb6c1dd935a485aba9 (patch)
tree2b20938ea2ef1f8f1712e8ea687ad944e61ec934 /crawl-ref/source/monstuff.cc
parent0af59f5d233f429a70df12e87993f7bda7de30a7 (diff)
downloadcrawl-ref-dddff423ecbec638f69423eb6c1dd935a485aba9.tar.gz
crawl-ref-dddff423ecbec638f69423eb6c1dd935a485aba9.zip
Add more blessing adjustments.
For Beogh, have a random chance of doing them directly upon living kills, instead of on piety gain. First, TSO should be doing this eventually too, so the framework should be in place. Second, piety gain is slower at high piety levels, which makes blessings granted in do_god_gift() occur less often as you become more messianic, which seems wrong. Make random blessings also occur a bit less often, so you don't get a long string of them, and make them occur randomly on experience level gain again; if you're pious enough, the latter should still occur often. A random follower can be blessed when you kill, but when a follower kills, it can be specifically blessed. Also, messages for blessings of out-of-view followers now just refer to "your follower." git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@3831 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc28
1 files changed, 25 insertions, 3 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index ed10f4ddce..aa4f6de317 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -408,10 +408,10 @@ static void _give_monster_experience( monsters *victim,
{
if (mons->gain_exp(experience))
{
- // Consistent blessings for followers.
+ // Randomly bless the follower who gained experience.
if (you.religion == GOD_BEOGH
&& !player_under_penance()
- && you.piety >= piety_breakpoint(2))
+ && random2(you.piety) >= piety_breakpoint(2))
{
bless_follower(GOD_BEOGH, is_orcish_follower, mons);
}
@@ -875,6 +875,16 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
}
}
+ // Randomly bless a follower.
+ if (!created_friendly && gives_xp
+ && (you.religion == GOD_BEOGH
+ && mons_holiness(monster) == MH_NATURAL)
+ && (!player_under_penance()
+ && random2(you.piety) >= piety_breakpoint(2)))
+ {
+ bless_follower(GOD_BEOGH, is_orcish_follower);
+ }
+
if (you.duration[DUR_DEATH_CHANNEL]
&& gives_xp
&& mons_holiness(monster) == MH_NATURAL
@@ -985,7 +995,7 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
}
if (you.religion == GOD_SHINING_ONE
- && mons_is_evil_or_unholy(monster)
+ && mons_is_evil_or_unholy(monster)
&& (!player_under_penance()
&& random2(you.piety) >= piety_breakpoint(0))
&& !invalid_monster_index(i))
@@ -998,6 +1008,18 @@ void monster_die(monsters *monster, killer_type killer, int i, bool silent)
false );
}
}
+
+ // Randomly bless the follower who killed.
+ if (you.religion == GOD_BEOGH
+ && mons_holiness(monster) == MH_NATURAL
+ && (!player_under_penance()
+ && random2(you.piety) >= piety_breakpoint(2))
+ && !invalid_monster_index(i))
+ {
+ monsters *mon = &menv[i];
+ bless_follower(GOD_BEOGH, is_orcish_follower, mon);
+ }
+
}
break;