summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/view.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-18 06:29:14 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-18 06:29:14 +0000
commit76cf7eda1e78548dcb3b3e417e8aeb92e2cf1b1e (patch)
tree5e84a9382857ac9a59eb7be71c5cfe909c20d888 /crawl-ref/source/view.cc
parentda651d3cf70da11fb5178027a4f2d58e7755648f (diff)
downloadcrawl-ref-76cf7eda1e78548dcb3b3e417e8aeb92e2cf1b1e.tar.gz
crawl-ref-76cf7eda1e78548dcb3b3e417e8aeb92e2cf1b1e.zip
Take good neutrals into account when checking if a monster's enemies are
around, and have a monster leaving the level cast spells like a fleeing monster, for the sake of getting out of the way. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5936 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/view.cc')
-rw-r--r--crawl-ref/source/view.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/view.cc b/crawl-ref/source/view.cc
index b55698383d..0eff2a9b85 100644
--- a/crawl-ref/source/view.cc
+++ b/crawl-ref/source/view.cc
@@ -3660,10 +3660,10 @@ bool mon_enemies_around(const monsters *monster)
if (monster->foe != MHITNOT && monster->foe != MHITYOU)
return (true);
- if (mons_friendly(monster))
+ if (mons_wont_attack(monster))
{
- // Additionally, if an ally is nearby and *you* have a foe, consider
- // it as the ally's enemy too.
+ // Additionally, if an ally is nearby and *you* have a foe,
+ // consider it as the ally's enemy too.
return (mons_near(monster) && !i_feel_safe());
}
else