summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/misc.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-10-29 18:36:53 -0700
committerMatthew Cline <zelgadis@sourceforge.net>2009-10-29 18:36:53 -0700
commit2386094200a314bee252ca9cb6a229ee42953f5a (patch)
tree6b0e01aaa42532fb04b8fbb5d4dc128032f18e2c /crawl-ref/source/misc.cc
parenta7aeeaec768095f1feabe9474f0febf54feb1814 (diff)
downloadcrawl-ref-2386094200a314bee252ca9cb6a229ee42953f5a.tar.gz
crawl-ref-2386094200a314bee252ca9cb6a229ee42953f5a.zip
FR 2017276: '<' and '>' both work for portal/shop
Up and down ('<' and '>') now both work for entering shops and portals.
Diffstat (limited to 'crawl-ref/source/misc.cc')
-rw-r--r--crawl-ref/source/misc.cc29
1 files changed, 27 insertions, 2 deletions
diff --git a/crawl-ref/source/misc.cc b/crawl-ref/source/misc.cc
index c70c8e5ec8..8df9415332 100644
--- a/crawl-ref/source/misc.cc
+++ b/crawl-ref/source/misc.cc
@@ -1731,14 +1731,23 @@ void up_stairs(dungeon_feature_type force_stair,
const branch_type old_where = you.where_are_you;
const level_area_type old_level_type = you.level_type;
+ // Up and down both work for shops.
if (stair_find == DNGN_ENTER_SHOP)
{
shop();
return;
}
+ // Up and down both work for portals.
+ if (get_feature_dchar(stair_find) == DCHAR_ARCH
+ && feat_stair_direction(stair_find) != CMD_NO_CMD
+ && stair_find != DNGN_ENTER_ZOT)
+ {
+ down_stairs(you.your_level, force_stair, entry_cause);
+ return;
+ }
// Probably still need this check here (teleportation) -- bwr
- if (feat_stair_direction(stair_find) != CMD_GO_UPSTAIRS)
+ else if (feat_stair_direction(stair_find) != CMD_GO_UPSTAIRS)
{
if (stair_find == DNGN_STONE_ARCH)
mpr("There is nothing on the other side of the stone arch.");
@@ -2063,11 +2072,27 @@ void down_stairs( int old_level, dungeon_feature_type force_stair,
level_id shaft_dest;
int shaft_level = -1;
+ // Up and down both work for shops.
+ if (stair_find == DNGN_ENTER_SHOP)
+ {
+ shop();
+ return;
+ }
+
+ // Up and down both work for portals.
+ if (get_feature_dchar(stair_find) == DCHAR_ARCH
+ && feat_stair_direction(stair_find) != CMD_NO_CMD
+ && stair_find != DNGN_ENTER_ZOT)
+ {
+ ;
+ }
// Probably still need this check here (teleportation) -- bwr
- if (feat_stair_direction(stair_find) != CMD_GO_DOWNSTAIRS && !shaft)
+ else if (feat_stair_direction(stair_find) != CMD_GO_DOWNSTAIRS && !shaft)
{
if (stair_find == DNGN_STONE_ARCH)
mpr("There is nothing on the other side of the stone arch.");
+ else if (stair_find == DNGN_ABANDONED_SHOP)
+ mpr("This shop appears to be closed.");
else
mpr( "You can't go down here!" );
return;