Another monster AI improvement, as suggested somewhere in one of the

many FRs on Sourceforge.

When standing at the end of a corridor, monsters of animal intelligence or higher may swarm out to semi-surround you rather than block the entrance for all monsters behind them.

Example:

####. .rgo@ ####.

will now within two turns change to

####g …r@ ####o

which is obviously much smarter. The same logic applies to friendly monsters who presumably form a semicircle around you to protect you.

Also, hostile monsters will even move out of the way if the next monster farther down the corridor has a ranged attack (think centaurs).

This does not yet work for diagonals (but I'm working on that one), and also does not handle monsters stepping out of a corridor to surround non-allied monsters (though this should be easy enough to add).

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

Created by  j-p-e-g  on November 14, 2008
IA6EPF5ZQE6276Q4JSUKBSXHX5ODRY5I5UK7LXH4MQEDG36P6PZAC
Change contents