summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-19 13:39:55 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-03-19 13:39:55 +0000
commit08fe0f779080a55f59b07d4ab887495220b5fd69 (patch)
treee1860753f549da8bcc0de2e5d22ee105d885a17b
parentd12bf8d524b832a148ffb9e9184eab8cfa34df17 (diff)
downloadcrawl-ref-08fe0f779080a55f59b07d4ab887495220b5fd69.tar.gz
crawl-ref-08fe0f779080a55f59b07d4ab887495220b5fd69.zip
Alias < to > for Abyss exits.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1059 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/acr.cc20
1 files changed, 15 insertions, 5 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index a3a1bebe24..7c45aa60a3 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -927,9 +927,19 @@ static int toggle_flag( bool* flag, const char* flagname )
return *flag;
}
+static void go_downstairs();
static void go_upstairs()
{
- if (grd[you.x_pos][you.y_pos] == DNGN_ENTER_SHOP)
+ const int ygrd = grd(you.pos());
+
+ // Allow both < and > to work for Abyss exits.
+ if (ygrd == DNGN_EXIT_ABYSS)
+ {
+ go_downstairs();
+ return;
+ }
+
+ if (ygrd == DNGN_ENTER_SHOP)
{
if ( you.berserker )
canned_msg(MSG_TOO_BERSERK);
@@ -937,10 +947,10 @@ static void go_upstairs()
shop();
return;
}
- else if ((grd[you.x_pos][you.y_pos] < DNGN_STONE_STAIRS_UP_I
- || grd[you.x_pos][you.y_pos] > DNGN_ROCK_STAIRS_UP)
- && (grd[you.x_pos][you.y_pos] < DNGN_RETURN_FROM_ORCISH_MINES
- || grd[you.x_pos][you.y_pos] >= 150))
+ else if ((ygrd < DNGN_STONE_STAIRS_UP_I
+ || ygrd > DNGN_ROCK_STAIRS_UP)
+ && (ygrd < DNGN_RETURN_FROM_ORCISH_MINES
+ || ygrd >= 150))
{
mpr( "You can't go up here!" );
return;