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:
parent
08c09deddd
commit
f7566ff1d3
1 changed files with 2 additions and 1 deletions
|
|
@ -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
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue