From e426b1b518bd6fded95d320aa188ed564861877f Mon Sep 17 00:00:00 2001 From: dolorous Date: Tue, 7 Oct 2008 19:55:50 +0000 Subject: Consolidate prayer-ending routines. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@7177 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/religion.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/religion.cc') 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); -- cgit v1.2.3-54-g00ecf