diff --git a/public/resources/ecology/fauna/land.json b/public/resources/ecology/fauna/land.json index 3cd1ee09..e102f2b3 100644 --- a/public/resources/ecology/fauna/land.json +++ b/public/resources/ecology/fauna/land.json @@ -3,7 +3,7 @@ "canopy_weight": 0.2, "fungi_weight": 0.2, "habitat_abandon_threshold": 0.3, - "habitat_abandon_turns": 60, + "habitat_abandon_turns": 200, "habitat_thriving_threshold": 0.7, "capacity_per_10_tiles": 20.0, "maturity_age_base": 5, diff --git a/src/game/engine/scenes/tests/auto_play.gd b/src/game/engine/scenes/tests/auto_play.gd index 7305e0ee..572064e2 100644 --- a/src/game/engine/scenes/tests/auto_play.gd +++ b/src/game/engine/scenes/tests/auto_play.gd @@ -929,18 +929,20 @@ func _play_turn() -> void: continue if u.get("can_found_city") == true or u.get("can_build_improvements") == true: continue - # Scouts redirect to lair-clearing — they're weak fighters, not siege assets - if u.type_id == "dwarf_scout": - var s_max_hp: int = u.get_max_hp() - var s_hp_ok: bool = s_max_hp <= 0 or u.hp >= int(s_max_hp * 0.25) - if s_hp_ok: - var s_lair: Vector2i = _find_nearest_low_lair(u.position, 2) - if s_lair != Vector2i(-1, -1): - u.is_fortified = false - u.fortified_turns = 0 - _move_toward(u, s_lair, game_map) - _try_attack_adjacent_lair(u, game_map) - continue + # Scouts always redirect to lair-clearing; warriors redirect when far from target + var dist_to_target: int = HexUtilsScript.hex_distance(u.position, target) + var u_max_hp: int = u.get_max_hp() + var w_hp_ok: bool = u_max_hp <= 0 or u.hp >= int(u_max_hp * 0.25) + var is_scout: bool = u.type_id == "dwarf_scout" + var lair_tier_cap: int = 2 if is_scout else 3 + if w_hp_ok and (is_scout or dist_to_target > 12): + var w_lair: Vector2i = _find_nearest_low_lair(u.position, lair_tier_cap) + if w_lair != Vector2i(-1, -1): + u.is_fortified = false + u.fortified_turns = 0 + _move_toward(u, w_lair, game_map) + _try_attack_adjacent_lair(u, game_map) + continue # Un-fortify before moving u.is_fortified = false u.fortified_turns = 0