diff options
author | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-23 10:12:03 +1000 |
---|---|---|
committer | Jude Brown <bookofjude@users.sourceforge.net> | 2009-11-23 10:12:03 +1000 |
commit | 7b22a3c233602f96171f5fc0555102c8608d4d8e (patch) | |
tree | 641eb5682566462cdf9bf465129bde1b97af80bf /crawl-ref/source/spells3.cc | |
parent | 2fc79a6d0d709878025fa1f06cf2a5344098f333 (diff) | |
download | crawl-ref-7b22a3c233602f96171f5fc0555102c8608d4d8e.tar.gz crawl-ref-7b22a3c233602f96171f5fc0555102c8608d4d8e.zip |
Counterpart fprop for NO_RTELE_INTO: NO_CTELE_INTO.
NO_CTELE_INTO causes grid-cells marked as such to reject controlled
teleport into them, with the message: "A strong magical force throws you
back!".
NO_TELE_INTO combines both of these flags (NO_RTELE_INTO and
NO_CTELE_INTO) to prevent both controlled and random teleports into a
specific cell.
Also document both of these.
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index 08e6243fb3..4969da954f 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -1532,6 +1532,12 @@ static bool _teleport_player(bool allow_control, bool new_abyss_area) is_controlled = false; large_change = false; } + else if (testbits(env.pgrid(pos), FPROP_NO_CTELE_INTO)) + { + is_controlled = false; + large_change = false; + mpr("A strong magical force throws you back!", MSGCH_WARN); + } else { // Leave a purple cloud. |