diff options
author | blueDave <dshackspam@comcast.net> | 2011-11-23 16:29:58 -0700 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-12-22 00:40:09 +0100 |
commit | 926a279a912deef4992c89e53c451184dd0772db (patch) | |
tree | 3b4381f8648f527281766144618c31f7a1f76bce /crawl-ref/source/teleport.cc | |
parent | 452b982f5abe4ff0df063097558141360b08ad2e (diff) | |
download | crawl-ref-926a279a912deef4992c89e53c451184dd0772db.tar.gz crawl-ref-926a279a912deef4992c89e53c451184dd0772db.zip |
constriction -- teleport and blink effects
Diffstat (limited to 'crawl-ref/source/teleport.cc')
-rw-r--r-- | crawl-ref/source/teleport.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/crawl-ref/source/teleport.cc b/crawl-ref/source/teleport.cc index 68b277525b..4750f5cc31 100644 --- a/crawl-ref/source/teleport.cc +++ b/crawl-ref/source/teleport.cc @@ -69,6 +69,15 @@ bool monster::blink_to(const coord_def& dest, bool quiet) if (!move_to_pos(dest)) return (false); + // handle constriction, if any + if (is_constricted()) + { + if (constricted_by == MHITYOU) + player_teleport_to_monster(this, dest); + else + monster_teleport_to_player(constricted_by, dest); + } + // Leave a purple cloud. if (!jump) place_cloud(CLOUD_TLOC_ENERGY, oldplace, 1 + random2(3), this); @@ -302,3 +311,4 @@ bool random_near_space(const coord_def& origin, coord_def& target, return (false); } + |