From 3d73ad76c2fa67632d7041382b884f1048d688df Mon Sep 17 00:00:00 2001 From: autocommit Date: Wed, 15 Apr 2026 17:54:42 -0700 Subject: [PATCH] =?UTF-8?q?feat(scenes):=20=E2=9C=A8=20Implement=20auto-pl?= =?UTF-8?q?ay=20logic=20to=20prioritize=20early=20military=20units=20durin?= =?UTF-8?q?g=20selection=20and=20deployment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/game/engine/scenes/tests/auto_play.gd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/game/engine/scenes/tests/auto_play.gd b/src/game/engine/scenes/tests/auto_play.gd index b292e9a6..ca62ed34 100644 --- a/src/game/engine/scenes/tests/auto_play.gd +++ b/src/game/engine/scenes/tests/auto_play.gd @@ -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"