(Fix 1825520).
Monsters will be held in nets longer. Doesn't influence time needed to destroy it, so ogres and such will still get out quickly. Needs more testing, I guess.
Intelligent friendlies will try to avoid traps you (the player) know about, and the chance for triggering known blade and net traps is much lower. Also, friendly casters are much less likely to spam you with "spells" if there are no enemies around.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2749 c06c8d41-db1a-0410-9941-cceddc491573
SJDOBXECX7F3ZPPVR7FPURE53D47PP2TFIF4SB6XPS456PZV3DQAC
3BJ2OOF4F524G6UKVGOZVT6W3FSTSHHTKRJADUBZCHDXZWV3KANQC
AVCMVFA3MKCXHO6H44UK5KJNIHTGQV7UA7GYXM26VI6TXXU5ZN6QC
WZNB427K3EUNV3FMVXLQTM4UIHER4FIKQXWLUUXRNQC3OQ33VQYAC
K2CS6TCX2NDVL2ASEHGP4J4K4IJ6FP3ANNKTSIWVG43HPYSBX6ZQC
QDTVLBRGHDTRUVT7I3O72K6TMOYAUSAJBZUHGOEFU2RKJNUPWZSQC
4UXFU3FZOCBSLDQ4S7MJKAE2H7VUHCNRDQMIY6NJ3PHYXWNGISDQC
SVY2PTCLXR3KNPQAWXVXTTGCC5DR334HOAKHYO3VDDRWM2BWMALAC
DDU4A3JGN5IUIPP5IASOODKPR2WBHSDSV4FITZ6HNXNSXXQACWAQC
T2AYVN57EFJQLFUFLAZDXKDAFDGTDLQIEQWQZNYFWJZBYSTYH4QQC
PFEJ4LMDNEKLMGRCMWQ7EIRVU4JMYGICI4G7X4WVWOROVXQCBZ7QC
RGY2525RQH7SSGM6ZVI7CZL4WMNFZK2WRABOSIWRKQYYOU2RWN4QC
J6APXOT4QOGQFONWB7G546VTVF6QG42HVOROMHF7YBDJPR4K26OAC
// permanent intelligent friendlies will try to avoid traps
// the player knows about (this could be annoying in a corridor)
if (grd[monster->x][monster->y] != DNGN_UNDISCOVERED_TRAP
&& trap_category(trap.type) != DNGN_TRAP_MAGICAL // magic doesn't matter
&& intelligent_ally(monster))
{
const int x = monster->x;
const int y = monster->y;
// test for corridor-like environment (simple hack)
if (!(grd[x-1][y] < DNGN_MINMOVE && grd[x+1][y] < DNGN_MINMOVE
|| grd[x][y-1] < DNGN_MINMOVE && grd[x][y+1] < DNGN_MINMOVE))
{
return (monster->hit_points == monster->max_hit_points);
}
}