By asking multiple units to 'glue' themselves together the way you suggest you're actually asking for worse ai than the computer already uses. A group of five hoplite units being stopped by one unit of whatever is utterly pointless. It would cause all five of those units to sit and do nothing as you flanked or wrapped around and charged them from the rear, this is easy enough to do now the way it is, but you're asking for a free, resistanceless shot to the back.
Bookmarks