summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-17 00:09:27 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-17 00:09:27 +0000
commit23805e86071f29c889ca943dac0c0586fb5a9494 (patch)
tree6d91e6c2781ef5b268ec5db4a3533f43f32450dc
parent348e00452a94522ce603bfa492de1c6a55927654 (diff)
downloadcrawl-ref-23805e86071f29c889ca943dac0c0586fb5a9494.tar.gz
crawl-ref-23805e86071f29c889ca943dac0c0586fb5a9494.zip
Make pacified monsters sometimes change the exit they're traveling
towards even if it's reachable, as sometimes exits that are supposed to be reachable lead to monsters' standing in one place indefinitely. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9782 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/monstuff.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/crawl-ref/source/monstuff.cc b/crawl-ref/source/monstuff.cc
index 795c7304a7..7f8bedb703 100644
--- a/crawl-ref/source/monstuff.cc
+++ b/crawl-ref/source/monstuff.cc
@@ -4267,7 +4267,7 @@ static void _handle_behaviour(monsters *mon)
e_index = _mons_find_nearest_level_exit(mon, e);
- if (e_index == -1 && one_chance_in(20))
+ if (e_index == -1 || one_chance_in(20))
e_index = _mons_find_nearest_level_exit(mon, e, true);
if (e_index != -1)