feat(scenes): ✨ Implement auto-play logic to prioritize early military units during selection and deployment
Co-Authored-By: Lilith Autocommit <noreply@atlilith.com>
This commit is contained in:
parent
2f97791391
commit
3d73ad76c2
1 changed files with 10 additions and 0 deletions
|
|
@ -744,6 +744,16 @@ func _next_building(city: Variant, player: Variant, city_count: int, has_settler
|
|||
# Forge FIRST — doubles production from 2 to 4, accelerates everything after
|
||||
if not city.has_building("forge"):
|
||||
return "forge"
|
||||
# Count military BEFORE economic buildings — ensures attacks start by ~turn 60
|
||||
# instead of ~turn 150. Prior build order (walls/marketplace/worker before any
|
||||
# warrior) pushed first warrior to turn 51 on seed 1; enemy expanded past us.
|
||||
var early_mil: int = 0
|
||||
if player != null:
|
||||
for u: Variant in player.units:
|
||||
if u.is_alive() and u.get("can_found_city") != true and u.get("can_build_improvements") != true:
|
||||
early_mil += 1
|
||||
if early_mil < 2:
|
||||
return "" # warrior — rush two before any defensive/economic building
|
||||
# Then walls for defense
|
||||
if not city.has_building("walls"):
|
||||
return "walls"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue