diff --git a/src/game/engine/src/modules/ai/simple_heuristic_ai.gd b/src/game/engine/src/modules/ai/simple_heuristic_ai.gd index d29915dd..c5015b43 100644 --- a/src/game/engine/src/modules/ai/simple_heuristic_ai.gd +++ b/src/game/engine/src/modules/ai/simple_heuristic_ai.gd @@ -291,7 +291,12 @@ static func _rush_buy_defenders(player: RefCounted, threat: Dictionary) -> void: maxi(2, int(threat.get("count", 0)) + 1) if imminent else maxi(2, int(threat.get("total_count", 0))) ) - var cap: int = player.cities.size() * 3 + # Cap: 3 per city baseline, but never below enemy count + 1 so rush-buy + # can still close a parity gap when we're out-produced (p0 was reaching + # mil=8 vs our cap=3 and seizing undefended capitals mid-T80s). + var cap: int = maxi( + player.cities.size() * 3, int(threat.get("total_count", 0)) + 1 + ) while player.gold >= 50 and mil < target and mil < cap: var nu: RefCounted = UnitScript.new( "warrior", player.index, spawn_city.position