summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-03 15:43:45 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-11-03 15:43:45 +0000
commit441c4e03e269bfe9a999f5b41f303ad2653c0f69 (patch)
tree7773fb1133e00f5bba3447197031753df54efd8b
parent7d0774d9432e4e739b3e94b0cb1c3ceda37d9127 (diff)
downloadcrawl-ref-441c4e03e269bfe9a999f5b41f303ad2653c0f69.tar.gz
crawl-ref-441c4e03e269bfe9a999f5b41f303ad2653c0f69.zip
Trunk->0.3 merge (2718-2720): Prayer was losing turns when it shouldn't, fixed spellbook spell order.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup-0.3@2734 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/religion.cc15
-rw-r--r--crawl-ref/source/spl-book.cc6
2 files changed, 14 insertions, 7 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 9b8a28aad6..beb12e7f6b 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -804,12 +804,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')
{
@@ -820,6 +821,7 @@ void pray()
if ( tmp != 'r' && tmp != 'R')
{
+ you.turn_is_over = false;
mesclr();
return;
}
@@ -830,6 +832,7 @@ void pray()
{
if (you.flight_mode() == FL_LEVITATE)
{
+ you.turn_is_over = false;
mpr("You are floating high above the altar.");
return;
}
@@ -842,6 +845,7 @@ void pray()
{
if (you.species == SP_DEMIGOD)
{
+ you.turn_is_over = false;
mpr("Sorry, a being of your status cannot worship here.");
return;
}
@@ -870,7 +874,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));
diff --git a/crawl-ref/source/spl-book.cc b/crawl-ref/source/spl-book.cc
index 8c8d671160..55340541a5 100644
--- a/crawl-ref/source/spl-book.cc
+++ b/crawl-ref/source/spl-book.cc
@@ -164,8 +164,8 @@ static spell_type spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_BLINK,
SPELL_RECALL,
SPELL_TELEPORT_OTHER,
- SPELL_TELEPORT_SELF,
SPELL_CONTROL_TELEPORT,
+ SPELL_TELEPORT_SELF,
SPELL_NO_SPELL,
},
// 12 - Book of Enchantments (fourth one)
@@ -428,11 +428,11 @@ static spell_type spellbook_template_array[NUMBER_SPELLBOOKS][SPELLBOOK_SIZE] =
SPELL_NO_SPELL,
},
// 36 - Book of Control
- {SPELL_ENSLAVEMENT,
+ {SPELL_CONTROL_TELEPORT,
+ SPELL_ENSLAVEMENT,
SPELL_TAME_BEASTS,
SPELL_MASS_CONFUSION,
SPELL_CONTROL_UNDEAD,
- SPELL_CONTROL_TELEPORT,
SPELL_MASS_SLEEP,
SPELL_NO_SPELL,
SPELL_NO_SPELL,