I fixed the previous issue where units wouldn't attack at all if the player's units were beyond their attack range.
Now I've expanded the behavior—a frontal attack, where units attack the player directly in the center, breaking their formation and dealing increased damage. The second type is a frontal attack—units spread out along the perimeter of the player's formation and attack them. There's now a bug here when units are again outside attack range.