feat(ai): Add tactical decision-making functions and update formation logic for smarter AI behavior

Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
Claude Code 2026-04-07 21:13:54 -07:00
parent 08c09deddd
commit f7566ff1d3

View file

@ -255,7 +255,8 @@ func _step_toward(
var unit_type: String = "flying" if unit.is_flying() else "land"
# Use a large path budget so the full route to a distant target is found;
# the movement loop below caps actual steps to unit.movement_remaining.
var path_budget: int = maxi(unit.movement_remaining, HexUtilsScript.hex_distance(unit.position, target))
var dist: int = HexUtilsScript.hex_distance(unit.position, target)
var path_budget: int = maxi(unit.movement_remaining, dist)
var path: Array[Vector2i] = PathfinderScript.find_path(
game_map, unit.position, target, path_budget, unit_type
)