Show recovery terrain and guard hints

This commit is contained in:
2026-06-19 19:13:27 +09:00
parent 8f1b6fb398
commit 9a9c677863
3 changed files with 64 additions and 1 deletions

View File

@@ -3055,6 +3055,19 @@ func _check_hud_focus_text(failures: Array[String]) -> void:
failures.append("Enemy archer HUD focus should describe enemy control: %s" % archer_text)
if not scene._unit_current_terrain_text(archer).contains("산지"):
failures.append("Archer terrain text should reflect its current hill tile")
var guard: Dictionary = scene.state.get_unit("yellow_turban_7")
var guard_text := scene._format_unit_focus_text(guard, "Hover")
if not guard_text.contains("수비: 거점 20,3 반경 3"):
failures.append("Guard HUD focus should describe the defended zone: %s" % guard_text)
if scene._recovery_marker_text(Vector2i(6, 5)) != "+6":
failures.append("Village recovery marker should show healing amount")
if scene._recovery_marker_text(Vector2i(20, 1)) != "+8":
failures.append("Castle recovery marker should show healing amount")
if not scene._recovery_marker_text(Vector2i(1, 6)).is_empty():
failures.append("Plain terrain should not show a recovery marker")
var marker_rect: Rect2 = scene._recovery_marker_rect(Vector2i(6, 5))
if not scene._rect_for_cell(Vector2i(6, 5)).encloses(marker_rect):
failures.append("Recovery terrain marker should stay inside its tile: %s" % str(marker_rect))
_check_unit_class_mark(failures, scene, "cao_cao", "tactic", "")
_check_unit_class_mark(failures, scene, "xiahou_dun", "cavalry", "")
_check_unit_class_mark(failures, scene, "yellow_turban_2", "infantry", "")