summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/acr.cc5
-rw-r--r--crawl-ref/source/religion.cc12
-rw-r--r--crawl-ref/source/religion.h1
3 files changed, 9 insertions, 9 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index 2b4355621a..01dfd41993 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2577,10 +2577,7 @@ static void _decrement_durations()
if (you.duration[DUR_PRAYER] > 1)
you.duration[DUR_PRAYER]--;
else if (you.duration[DUR_PRAYER] == 1)
- {
- mpr("Your prayer is over.", MSGCH_PRAY, you.religion);
- you.duration[DUR_PRAYER] = 0;
- }
+ end_prayer();
if (you.duration[DUR_DIVINE_SHIELD])
{
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);
diff --git a/crawl-ref/source/religion.h b/crawl-ref/source/religion.h
index 1276501f85..011a85d752 100644
--- a/crawl-ref/source/religion.h
+++ b/crawl-ref/source/religion.h
@@ -77,6 +77,7 @@ void lose_piety(int pgn);
void offer_corpse(int corpse);
std::string god_prayer_reaction();
void pray();
+void end_prayer();
void handle_god_time(void);
int god_colour(god_type god);
void god_pitch(god_type which_god);