summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-07 17:06:48 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-07 17:06:48 +0000
commit9de07a95e21246a9aa4e037b6ecbe1730e03cb26 (patch)
tree7f1c2cbeae717d810ef9f9734e896e9ffe14cee4 /crawl-ref
parentba26ce50c02cb3fd6698874ab8f3308a9387afe7 (diff)
downloadcrawl-ref-9de07a95e21246a9aa4e037b6ecbe1730e03cb26.tar.gz
crawl-ref-9de07a95e21246a9aa4e037b6ecbe1730e03cb26.zip
[1768747] Altar prayer is no longer possible while levitating.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1980 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/player.cc4
-rw-r--r--crawl-ref/source/religion.cc28
2 files changed, 22 insertions, 10 deletions
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index fe6c3a2e76..5788486b63 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -5352,7 +5352,9 @@ flight_type player::flies() const
if ( !is_levitating() )
return (FL_NONE);
else
- return (you.duration[DUR_CONTROLLED_FLIGHT] ? FL_FLY : FL_LEVITATE);
+ return (you.duration[DUR_CONTROLLED_FLIGHT]
+ || wearing_amulet(AMU_CONTROLLED_FLIGHT)
+ ? FL_FLY : FL_LEVITATE);
}
bool player::light_flight() const
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc
index 5f59b99f05..5e4833204e 100644
--- a/crawl-ref/source/religion.cc
+++ b/crawl-ref/source/religion.cc
@@ -742,19 +742,29 @@ void pray()
}
const god_type altar_god = grid_altar_god(grd[you.x_pos][you.y_pos]);
- if (you.religion != GOD_NO_GOD && altar_god == you.religion)
+ if (altar_god != GOD_NO_GOD)
{
- altar_prayer();
- }
- else if (altar_god != GOD_NO_GOD)
- {
- if (you.species == SP_DEMIGOD)
+ if (player_is_levitating()
+ && !wearing_amulet(AMU_CONTROLLED_FLIGHT))
{
- mpr("Sorry, a being of your status cannot worship here.");
+ mpr("You are floating high above the altar.");
+ return;
+ }
+
+ if (you.religion != GOD_NO_GOD && altar_god == you.religion)
+ {
+ altar_prayer();
+ }
+ else if (altar_god != GOD_NO_GOD)
+ {
+ if (you.species == SP_DEMIGOD)
+ {
+ mpr("Sorry, a being of your status cannot worship here.");
+ return;
+ }
+ god_pitch( grid_altar_god(grd[you.x_pos][you.y_pos]) );
return;
}
- god_pitch( grid_altar_god(grd[you.x_pos][you.y_pos]) );
- return;
}
if (you.religion == GOD_NO_GOD)