summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/effects.cc
diff options
context:
space:
mode:
authorChris Campbell <chriscampbell89@gmail.com>2014-07-12 10:39:58 +0100
committerChris Campbell <chriscampbell89@gmail.com>2014-07-13 01:22:30 +0100
commit49e75c23ea32823b21baba3dcc13465726877aa5 (patch)
treef85165b24d91d4749c25657dfb4df276848dc287 /crawl-ref/source/effects.cc
parent6bb86a03267bba0e7f269b566b14642d8f32da2c (diff)
downloadcrawl-ref-49e75c23ea32823b21baba3dcc13465726877aa5.tar.gz
crawl-ref-49e75c23ea32823b21baba3dcc13465726877aa5.zip
Simplify a check for monsters following orders
mons_is_conjured() covers all of these and some other monsters that shouldn't follow orders (like vortices if they weren't always confused anyway).
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r--crawl-ref/source/effects.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc
index af9017cec2..d57421d1ae 100644
--- a/crawl-ref/source/effects.cc
+++ b/crawl-ref/source/effects.cc
@@ -788,12 +788,8 @@ static bool _follows_orders(monster* mon)
{
return mon->friendly()
&& mon->type != MONS_GIANT_SPORE
- && mon->type != MONS_BALL_LIGHTNING
- && mon->type != MONS_BATTLESPHERE
- && mon->type != MONS_SPECTRAL_WEAPON
- && mon->type != MONS_GRAND_AVATAR
&& !mon->berserk_or_insane()
- && !mon->is_projectile()
+ && !mons_is_conjured(mon->type)
&& !mon->has_ench(ENCH_HAUNTING);
}