summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/monstuff.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-01 10:05:32 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-01 10:05:32 +0000
commitf74a7316f97532e8a819a40335e9b868fe42277b (patch)
tree23681b8b71132502ee967a87255c66505ad7cb60 /crawl-ref/source/monstuff.cc
parent3e4e26b227d45f1a3f33a3adf1ff25f3b02a79dc (diff)
downloadcrawl-ref-f74a7316f97532e8a819a40335e9b868fe42277b.tar.gz
crawl-ref-f74a7316f97532e8a819a40335e9b868fe42277b.zip
Stationary monsters can't flee, even from sanctuary.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6285 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/monstuff.cc')
-rw-r--r--crawl-ref/source/monstuff.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 5c98a7f347..902cad17ff 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -2056,6 +2056,10 @@ void behaviour_event(monsters *mon, int event, int src,
const bool flee_sanct = !mons_wont_attack(mon)
&& is_sanctuary(mon->x, mon->y);
+ // Stationary monsters can't flee, even from sanctuary.
+ if (mons_is_stationary(mon))
+ break;
+
// Berserking monsters don't flee, unless it's from sanctuary.
if (mon->has_ench(ENCH_BERSERK) && !flee_sanct)
break;