summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/teleport.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2011-12-29 19:51:34 -0500
committerNeil Moore <neil@s-z.org>2011-12-29 19:53:44 -0500
commit0520eec6b591d8deda5b181a0cba387cb774faa8 (patch)
treead763378eb3c210dc7522a876140df07dd855fa6 /crawl-ref/source/teleport.cc
parentf2fc9fd1997770b411542685b4de1c13a6c71146 (diff)
downloadcrawl-ref-0520eec6b591d8deda5b181a0cba387cb774faa8.tar.gz
crawl-ref-0520eec6b591d8deda5b181a0cba387cb774faa8.zip
Don't use a turn trying to tele/blink when constricted.
Also, change the status information: when you would be prevented from teleporting, make the "Constr" status light red, add "-Tele", and add a note to @.
Diffstat (limited to 'crawl-ref/source/teleport.cc')
-rw-r--r--crawl-ref/source/teleport.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/crawl-ref/source/teleport.cc b/crawl-ref/source/teleport.cc
index 5a0ca7bd9e..e47dc65573 100644
--- a/crawl-ref/source/teleport.cc
+++ b/crawl-ref/source/teleport.cc
@@ -38,6 +38,15 @@ bool player::blink_to(const coord_def& dest, bool quiet)
canned_msg(MSG_STRANGE_STASIS);
return (false);
}
+ else if (you.is_constricted_larger())
+ {
+ if (!quiet)
+ {
+ mprf("%s prevents you from blinking.",
+ mindex_to_actor(you.constricted_by)->name(DESC_THE).c_str());
+ }
+ return (false);
+ }
if (!quiet)
canned_msg(MSG_YOU_BLINK);