Auto Range Attack(自动远程攻击与攻城)

If you liked this item, please rate it up on Steam Workshop page.

Author: RUIVO(洗库存的你妈死了)

Last revision: 18 Jul, 2025 at 06:19 UTC

File size: 13.85 KB

On Steam Workshop

Description:
At the start of the human player’s turn, all units with a ranged attack capability will automatically perform up to one ranged attack against hostile units within range.
Note: Cities and encampments are also valid auto-attack targets.
Conditions:
Human player only
Units with a range greater than 1
This mod includes a custom ring-based tile traversal function using breadth-first search. Modders are welcome to reuse it freely.
Target prioritization and auto-target selection are not implemented, as they would require an additional loop to find the optimal target, which could impact performance. Theoretically, the attack order follows a clockwise spiral starting from the upper-right direction.