diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-14 15:54:57 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-14 16:56:30 +0100 |
commit | ead894c0109cf61ddd4830cc6b090efc7f70e595 (patch) | |
tree | 1a83b42609d6a077c04a3c4c515ed563d097e2ef /crawl-ref/source/mon-stuff.cc | |
parent | e3392e343f7de1eadb12f8080c96be6b65c432e7 (diff) | |
download | crawl-ref-ead894c0109cf61ddd4830cc6b090efc7f70e595.tar.gz crawl-ref-ead894c0109cf61ddd4830cc6b090efc7f70e595.zip |
Use monster::blink_to in monster_blink.
Diffstat (limited to 'crawl-ref/source/mon-stuff.cc')
-rw-r--r-- | crawl-ref/source/mon-stuff.cc | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/crawl-ref/source/mon-stuff.cc b/crawl-ref/source/mon-stuff.cc index e9d12cc846..0e0ae3489a 100644 --- a/crawl-ref/source/mon-stuff.cc +++ b/crawl-ref/source/mon-stuff.cc @@ -2609,29 +2609,8 @@ bool monster_blink(monsters *monster, bool quiet) { coord_def near = _random_monster_nearby_habitable_space(*monster, false, true); - if (near == monster->pos()) - return (false); - - if (!quiet) - simple_monster_message(monster, " blinks!"); - - if (!(monster->flags & MF_WAS_IN_VIEW)) - monster->seen_context = "thin air"; - - const coord_def oldplace = monster->pos(); - if (!monster->move_to_pos(near)) - return (false); - - // Leave a purple cloud. - place_cloud(CLOUD_TLOC_ENERGY, oldplace, 1 + random2(3), - monster->kill_alignment()); - - monster->check_redraw(oldplace); - monster->apply_location_effects(oldplace); - - mons_relocated(monster); - return (true); + return (monster->blink_to(near)); } bool mon_can_be_slimified(monsters *monster) |