diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-11-02 12:38:55 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-11-02 13:15:42 +0100 |
commit | 0ba4567b4b44c9332bd978ef266f4af41c052779 (patch) | |
tree | fd801de0c1af7027cb51060b698fd6ff4fd01497 /crawl-ref/source/spells3.cc | |
parent | 33ae475ef22757e91ad11da1bf0878a04be818a2 (diff) | |
download | crawl-ref-0ba4567b4b44c9332bd978ef266f4af41c052779.tar.gz crawl-ref-0ba4567b4b44c9332bd978ef266f4af41c052779.zip |
Make same square teleport no-scatter no-fail and no-contamination.
We can have either this, making SIGHUP on teleport control prompt
make you randomly teleport, or forcing a teleport on reload.
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 3dc8033cd2..de848e0632 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -1445,7 +1445,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area) while (true) { - show_map(pos, false); + show_map(pos, false, true); redraw_screen(); #if defined(USE_UNIX_SIGNALS) && defined(SIGHUP_SAVE) && defined(USE_CURSES) @@ -1464,6 +1464,15 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area) mprf(MSGCH_DIAGNOSTICS, "Target square (%d,%d)", pos.x, pos.y ); #endif + if (pos == you.pos() || pos == coord_def(-1,-1)) + { + if (!yesno("Are you sure you want to cancel this teleport?", + true, 'n')) + continue; + you.turn_is_over = false; + return (false); + } + if (you.duration[DUR_MESMERISED]) { bool blocked_movement = false; |