summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/religion.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-01 22:52:52 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-01 22:52:52 +0000
commit044a177398ab80ce82bc63d6e10dfab0942570f1 (patch)
tree8d19859ad5318799f4e7dc27df5df101936fea43 /crawl-ref/source/religion.cc
parent1e1e7331cbc02c836b8502dd22583584ec3cce93 (diff)
downloadcrawl-ref-044a177398ab80ce82bc63d6e10dfab0942570f1.tar.gz
crawl-ref-044a177398ab80ce82bc63d6e10dfab0942570f1.zip
Some prayer cases which shouldn't have taken time were taking time.
[1824174] git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2718 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/religion.cc')
-rw-r--r--crawl-ref/source/religion.cc15
1 files changed, 11 insertions, 4 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index e924109a87..57217e8218 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -953,12 +953,13 @@ void pray()
// almost all prayers take time
you.turn_is_over = true;
- const bool was_praying = you.duration[DUR_PRAYER];
- if (you.duration[DUR_PRAYER])
+ const bool was_praying = !!you.duration[DUR_PRAYER];
+ if (was_praying)
{
- mpr("Stop praying? ('y' ends prayer, 'r' will renew prayer)", MSGCH_PROMPT);
+ mpr("Stop praying? ('y' ends prayer, 'r' will renew prayer)",
+ MSGCH_PROMPT);
- int tmp = get_ch();
+ const int tmp = getch();
if ( tmp == 'y' || tmp == 'Y')
{
@@ -969,6 +970,7 @@ void pray()
if ( tmp != 'r' && tmp != 'R')
{
+ you.turn_is_over = false;
mesclr();
return;
}
@@ -979,6 +981,7 @@ void pray()
{
if (you.flight_mode() == FL_LEVITATE)
{
+ you.turn_is_over = false;
mpr("You are floating high above the altar.");
return;
}
@@ -991,6 +994,7 @@ void pray()
{
if (you.species == SP_DEMIGOD)
{
+ you.turn_is_over = false;
mpr("Sorry, a being of your status cannot worship here.");
return;
}
@@ -1019,7 +1023,10 @@ void pray()
// they don't want to lose
if ( you.religion == GOD_NEMELEX_XOBEH && altar_god == GOD_NO_GOD &&
!confirm_pray_sacrifice() )
+ {
+ you.turn_is_over = false;
return;
+ }
mprf(MSGCH_PRAY, "You offer a prayer to %s.", god_name(you.religion));