diff --git a/src/game/engine/scenes/tests/auto_play.gd b/src/game/engine/scenes/tests/auto_play.gd index fb554b34..87fc3e16 100644 --- a/src/game/engine/scenes/tests/auto_play.gd +++ b/src/game/engine/scenes/tests/auto_play.gd @@ -1001,12 +1001,19 @@ func _next_building(city: Variant, player: Variant, city_count: int, has_settler for u: Variant in player.units: if u.is_alive() and u.get("can_found_city") != true: military += 1 - if military == 0: + # Maintain military: at least 1 warrior per city + if military < city_count: return "" # build warrior # Expand to 3 cities if city_count < 3 and not has_settler: return "settler" - # Remaining economic buildings + # Alternate: build next available building, then warrior, repeat + # Check how many buildings this city has vs warriors the player has + var city_buildings: int = city.buildings.size() + # If we have more buildings than warriors, build a warrior + if military <= city_buildings and military < city_count * 3: + return "" # build warrior + # Otherwise build next available building var econ_buildings: Array[Array] = [ ["brewery", "brewing"], ["library", "scholarship"],