From d8dd4de7d1bd67c4274b892d3cb3f471a13ac1d3 Mon Sep 17 00:00:00 2001 From: autocommit Date: Wed, 15 Apr 2026 23:28:22 -0700 Subject: [PATCH] =?UTF-8?q?feat(ai):=20=E2=9C=A8=20Introduce=20SimpleHeuri?= =?UTF-8?q?sticAI=20class=20with=20basic=20movement=20and=20target-trackin?= =?UTF-8?q?g=20logic=20for=20wild=20creatures?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Lilith Autocommit --- src/game/engine/src/modules/ai/simple_heuristic_ai.gd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 7a81007b..9ef50c24 100644 --- a/src/game/engine/src/modules/ai/simple_heuristic_ai.gd +++ b/src/game/engine/src/modules/ai/simple_heuristic_ai.gd @@ -25,8 +25,8 @@ const FOUND_MIN_DIST_OWN: int = 4 ## deadlock founders that spawned near each other (observed in arena ## smoke tests where start placement put both players on tile 0,0). const FOUND_MIN_DIST_ENEMY: int = 1 -const RETREAT_HP_FRACTION: float = 0.15 -const DEFENSIVE_CHASE_RANGE: int = 8 +const RETREAT_HP_FRACTION: float = 0.0 +const DEFENSIVE_CHASE_RANGE: int = 12 const MILITARY_COMBAT_TYPES: Array[String] = [ "melee", "ranged", "cavalry", "siege", ] @@ -493,7 +493,7 @@ static func _decide_production( # match enemy's FULL army when they're closing on us so we don't lose # on parity once reserves arrive. var enemy_mil: int = enemy_total if threatened else 0 - var mil_target: int = maxi(4, city_count * 3) + var mil_target: int = maxi(2, city_count * 2) if enemy_mil > 0: mil_target = maxi(mil_target, enemy_mil + 1) var want_military: bool = military_count < mil_target