summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-transloc.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2012-12-29 03:40:24 +0100
committerAdam Borowski <kilobyte@angband.pl>2012-12-29 03:40:24 +0100
commit758438fb9570afe569d1fc428d0c6dcbc71ec5f6 (patch)
tree06a1d36faf41b1ea8944b710b5ecebf4bd7f3fee /crawl-ref/source/spl-transloc.cc
parenta686ed9f01008e00904f6be2fedd1bff41e661c7 (diff)
downloadcrawl-ref-758438fb9570afe569d1fc428d0c6dcbc71ec5f6.tar.gz
crawl-ref-758438fb9570afe569d1fc428d0c6dcbc71ec5f6.zip
Handle non-item sources of -TELE.
Currently, that's only sprint, and not for blink. This fixes relevant spells and abilities being usable but then doing nothing.
Diffstat (limited to 'crawl-ref/source/spl-transloc.cc')
-rw-r--r--crawl-ref/source/spl-transloc.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/spl-transloc.cc b/crawl-ref/source/spl-transloc.cc
index a4e8eedf03..7402e3a59e 100644
--- a/crawl-ref/source/spl-transloc.cc
+++ b/crawl-ref/source/spl-transloc.cc
@@ -133,7 +133,7 @@ int blink(int pow, bool high_level_controlled_blink, bool wizard_blink,
}
// yes, there is a logic to this ordering {dlb}:
- if (item_blocks_teleport(true, true) && !wizard_blink)
+ if (you.no_tele(true, true, true) && !wizard_blink)
{
if (pre_msg)
mpr(pre_msg->c_str());
@@ -305,7 +305,7 @@ void random_blink(bool allow_partial_control, bool override_abyss, bool override
coord_def target;
- if (item_blocks_teleport(true, true) && !override_stasis)
+ if (you.no_tele(true, true, true) && !override_stasis)
canned_msg(MSG_STRANGE_STASIS);
else if (player_in_branch(BRANCH_ABYSS)
&& !override_abyss
@@ -371,7 +371,7 @@ void you_teleport(void)
{
// [Cha] here we block teleportation, which will save the player from
// death from read-id'ing scrolls (in sprint)
- if (crawl_state.game_is_sprint() || item_blocks_teleport(true, true))
+ if (you.no_tele(true, true))
canned_msg(MSG_STRANGE_STASIS);
else if (you.duration[DUR_TELEPORT])
{
@@ -471,7 +471,7 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area,
// Stasis can't block the Abyss from shifting.
if (!wizard_tele
- && (crawl_state.game_is_sprint() || item_blocks_teleport(true, true))
+ && (crawl_state.game_is_sprint() || you.no_tele(true, true))
&& !new_abyss_area)
{
canned_msg(MSG_STRANGE_STASIS);
@@ -703,7 +703,7 @@ bool you_teleport_to(const coord_def where_to, bool move_monsters, bool override
// then teleport the player there.
// 4. If not, give up and return false.
- if (item_blocks_teleport(true, true) && !override_stasis)
+ if (you.no_tele(true, true) && !override_stasis)
{
canned_msg(MSG_STRANGE_STASIS);
return false;