diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-28 20:12:19 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-28 20:12:19 +0000 |
commit | f05e54a08b3a192cb16ebe3c593c6f97d70226b4 (patch) | |
tree | afb6518c04e073003c142eaabded9cfe635ddc3d /crawl-ref/source/effects.cc | |
parent | fd053dba7a45ba11a5238fb207ee939bfef14391 (diff) | |
download | crawl-ref-f05e54a08b3a192cb16ebe3c593c6f97d70226b4.tar.gz crawl-ref-f05e54a08b3a192cb16ebe3c593c6f97d70226b4.zip |
After some pointers from jpeg, rework the routine for monsters' leaving
the level to use the pathfinding routines for patrolling. The monsters
still sometimes disappear when near the exit instead of on it, which
needs to be fixed, but it's vastly closer to working properly.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6186 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/effects.cc')
-rw-r--r-- | crawl-ref/source/effects.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crawl-ref/source/effects.cc b/crawl-ref/source/effects.cc index cb370633a8..dc7ed52ea4 100644 --- a/crawl-ref/source/effects.cc +++ b/crawl-ref/source/effects.cc @@ -2854,8 +2854,8 @@ void update_level(double elapsedTime) mons_total++; #endif - // Monsters that are leaving the level often do so now. - if (mons_is_leaving(mon) && turns > random2(40) + 21) + // Pacified monsters often leave the level now. + if (mons_is_pacified(mon) && turns > random2(40) + 21) { make_mons_leave_level(mon); continue; |