summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/acr.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-01 16:25:09 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-01 16:25:09 +0000
commitcdbcf13cc94de05ccd764d6e42f95e265a36b656 (patch)
tree1f76da61acf30180bacad47ae31f3b18d771945c /crawl-ref/source/acr.cc
parent100ad033f246c6ae2ef37d8804614eacc1356827 (diff)
downloadcrawl-ref-cdbcf13cc94de05ccd764d6e42f95e265a36b656.tar.gz
crawl-ref-cdbcf13cc94de05ccd764d6e42f95e265a36b656.zip
Modify the intertravel prompt to not even ask for Pandemonium (since you
cannot leave the level) and just start travelling to your last travel target (if you had one). This solves BR 1843746, but there's no feedback when trying to travel to a target that cannot be reached. (No "I don't know how to get there.") Still, definitely an improvement. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5405 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/acr.cc')
-rw-r--r--crawl-ref/source/acr.cc21
1 files changed, 18 insertions, 3 deletions
diff --git a/crawl-ref/source/acr.cc b/crawl-ref/source/acr.cc
index eccf7272c0..a873ddc5c9 100644
--- a/crawl-ref/source/acr.cc
+++ b/crawl-ref/source/acr.cc
@@ -2153,12 +2153,27 @@ void process_command( command_type cmd )
case CMD_INTERLEVEL_TRAVEL:
if (Options.tut_travel)
Options.tut_travel = 0;
+
if (!can_travel_interlevel())
{
- mpr("Sorry, you can't auto-travel out of here.");
- break;
+ if (you.running.x == you.x_pos && you.running.y == you.running.y)
+ {
+ mpr("You're already here.");
+ break;
+ }
+ else if (!you.running.x || !you.running.y)
+ {
+ mpr("Sorry, you can't auto-travel out of here.");
+ break;
+ }
+
+ // Don't ask for a destination if you can only travel
+ // within level anyway.
+ start_travel(you.running.x, you.running.y);
}
- start_translevel_travel();
+ else
+ start_translevel_travel();
+
if (you.running)
mesclr();
break;