feat(ai): ✨ Enhance military unit detection logic in SimpleHeuristicAI for improved strategic accuracy
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
85ae66b0a6
commit
eb22568828
1 changed files with 5 additions and 1 deletions
|
|
@ -56,7 +56,11 @@ static func process_player(player: RefCounted) -> Array:
|
|||
var action: Dictionary = {}
|
||||
if unit.can_found_city:
|
||||
action = _decide_founder_action(idx, unit, player, enemy_units)
|
||||
elif unit.unit_type in MILITARY_COMBAT_TYPES:
|
||||
elif unit.attack > 0 or unit.ranged_attack > 0:
|
||||
# Stat-based dispatch — `unit.unit_type` is read from a JSON field
|
||||
# (`combat_type`) that the current data files don't populate, so it
|
||||
# would always be empty here. Anything with combat stats and no
|
||||
# founder flag is treated as a military unit.
|
||||
action = _decide_military_action(
|
||||
idx,
|
||||
unit,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue