Add an unfinished attempt at making pacified monsters leave the level.

BEH_LEAVE replaces BEH_INVESTIGATE, which wasn't being used.

Notes:

Since leaving the level is similar to fleeing in some ways, monsters leaving the level share some behaviors with fleeing monsters: they are less likely to shoot; they are more likely to use scrolls of blinking or teleportation; and leaving eyeballs won't paralyze you or drain your MP.

Leaving the level is also similar to lurking in some ways, so it won't be interrupted by noticing something, just as with lurking.

Getting far enough away from a monster will make it leave the level (i.e., die with KILL_DISMISSED and MF_HARD_RESET, so it takes its stuff with it), as will getting it into a grid it can submerge in, at which time it will submerge and leave the level. Neither of these apply to monsters that can't move, of course, except for mimics, since they can teleport.

Incomplete things (sorry for the mess):

I still haven't figured out how to make a monster target a dungeon feature (in this case, the nearest level exit, the nearest teleportation or shaft trap, or the nearest submersible grid), so, currently, a pacified monster will just go to where its last target was and stand there until/unless one of the aforementioned level exit scenarios occurs.

Pacified monsters can still cast summoning spells. Whatever they summon is neutral, just as they are, but such summons can still get in the way.
(Try pacifying an orc high priest, for example.) Maybe summoning should be disabled or have its chance lowered for neutral monsters in general, unless something's in their way?

Speaking of targeting, the leaving-by-submerging scenario should occur only if there's no other way to reach the target: all ways off the level are blocked, the monster's habitat is water and it's not amphibious, the monster's habitat is lava, or (possibly) the monster's habitat is rock.

There should be a message if the monster leaves the level, but what about the ones that do so out of the player's LOS?

git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5924 c06c8d41-db1a-0410-9941-cceddc491573

Created by  dolorous  on June 17, 2008
VEVPRVWGRHRKBBUTO64ELK3NPZANUQI3ZZ7F23YXJQLKIORUW3HQC
Change contents