From 08fe0f779080a55f59b07d4ab887495220b5fd69 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Mon, 19 Mar 2007 13:39:55 +0000 Subject: Alias < to > for Abyss exits. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1059 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/acr.cc | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'crawl-ref') 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; -- cgit v1.2.3-54-g00ecf