summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-07 19:55:50 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-10-07 19:55:50 +0000
commite426b1b518bd6fded95d320aa188ed564861877f (patch)
tree0d5f81bea93705d7d7420e81e4210d43b8800b7d /crawl-ref/source/religion.cc
parent172890e12641f850a171ff0e4206f6bca5e50e34 (diff)
downloadcrawl-ref-e426b1b518bd6fded95d320aa188ed564861877f.tar.gz
crawl-ref-e426b1b518bd6fded95d320aa188ed564861877f.zip
Consolidate prayer-ending routines.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7177 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index d097267b68..6c6cc5978c 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -2129,8 +2129,13 @@ void pray()
#if DEBUG_DIAGNOSTICS
mprf(MSGCH_DIAGNOSTICS, "piety: %d (-%d)", you.piety, you.piety_hysteresis );
#endif
+}
-} // end pray()
+void end_prayer(void)
+{
+ mpr("Your prayer is over.", MSGCH_PRAY, you.religion);
+ you.duration[DUR_PRAYER] = 0;
+}
std::string god_name( god_type which_god, bool long_name )
{
@@ -3481,10 +3486,7 @@ void lose_piety(int pgn)
}
if (!_god_accepts_prayer(you.religion))
- {
- mpr("Your prayer is over.", MSGCH_PRAY, you.religion);
- you.duration[DUR_PRAYER] = 0;
- }
+ end_prayer();
if (you.piety > 0 && you.piety <= 5)
learned_something_new(TUT_GOD_DISPLEASED);