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
2YK255CF5YJ3LZTKOI633NJSVM63HFB3MAIYDV7ZJDCC5SWQIO6AC
ZUV76RGZDBOY745YXVMGFUOWEH2B47J74BCT5MDKHIDHC4URGMKAC
H7AOW4T4Q7AKOXREMK6ZXN3GK6A4I24ICE6VTROMJ5Y3LX47TSDAC
ASH5CK6CPBKMLGGIRJ5GKTWMS5W3OBVHTL66RTYZIPFM6KFBYA3QC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
EJYK3CKIEMP4NMZUCMUYLHIBE7A3LPZOU7DUON5V7CPHY7QEKLEAC
LFBNFE3PZBXTR2ROPKYPARUWLJAYWAKGTS7VBWADZWVVSJ5CLX6AC
SJDOBXECX7F3ZPPVR7FPURE53D47PP2TFIF4SB6XPS456PZV3DQAC
WQIEW3O4MANA2KKYRUWEZP44KHVJ4RRHEZTDXSF4EDELX66LO26QC
NVSFIV2ZKP44XHCSCXG6OZVGL67OIFINC34J2EMKTA4KULCERUEAC
// If nothing found by now, safe friendlies will rarely cast.
if (mons_friendly(monster) && !mon_enemies_around(monster)
// If nothing found by now, safe friendlies and good
// neutrals will rarely cast.
if (mons_wont_attack(monster) && !mon_enemies_around(monster)
// Setup spell - fleeing monsters will always try to
// choose their emergency spell.
if (mons_is_fleeing(monster))
// Setup spell - monsters that are fleeing or leaving
// the level will always try to choose their emergency
// spell.
if (mons_is_fleeing(monster) || mons_is_leaving(monster))