Simplify auto attack hover text

This commit is contained in:
2026-06-20 10:19:32 +09:00
parent ea49df2629
commit 428b91b59d
3 changed files with 55 additions and 18 deletions

View File

@@ -216,8 +216,8 @@ func _check_scene_directional_attack_badges(failures: Array[String]) -> void:
scene._refresh_ranges()
scene.hover_cell = Vector2i(5, 9)
var auto_badge: Dictionary = scene._target_preview_badge()
if not str(auto_badge.get("text", "")).contains("행공"):
failures.append("auto-move attack hover badge should be used for reachable distant enemy: %s" % str(auto_badge))
if str(auto_badge.get("text", "")).contains("행공") or not str(auto_badge.get("tooltip", "")).contains("이동 후 공격"):
failures.append("auto-move attack hover badge should use a clear hint instead of jargon: %s" % str(auto_badge))
if not str(auto_badge.get("text", "")).contains("후+%d" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
failures.append("auto-move attack hover badge should expose compact rear bonus: %s" % str(auto_badge))

View File

@@ -616,8 +616,10 @@ func _check_scene_enemy_click_auto_attack(failures: Array[String]) -> void:
found_auto_marker = true
if marker.get("target_id", "") != "yellow_turban_1":
failures.append("move+attack marker should keep the clicked target id: %s" % str(marker))
if marker.get("text", "") != "행공":
failures.append("move+attack marker should use compact battlefield text: %s" % str(marker))
if marker.get("text", "") != "진격":
failures.append("move+attack marker should use clear compact battlefield text: %s" % str(marker))
if not str(marker.get("tooltip", "")).contains("이동 후 공격"):
failures.append("move+attack marker should keep route detail in hover metadata: %s" % str(marker))
if marker.get("origin", Vector2i.ZERO) != Vector2i(3, 3):
failures.append("move+attack marker should expose the chosen attack origin: %s" % str(marker))
if marker.get("origin", Vector2i.ZERO) == Vector2i(1, 3):
@@ -634,8 +636,8 @@ func _check_scene_enemy_click_auto_attack(failures: Array[String]) -> void:
failures.append("selected unit should mark enemies reachable by move+attack: %s" % str(auto_markers))
scene.hover_cell = Vector2i(4, 3)
var auto_badge := scene._target_preview_badge()
if not str(auto_badge.get("text", "")).contains("행공"):
failures.append("hovering a move+attack target should explain the combined action: %s" % str(auto_badge))
if str(auto_badge.get("text", "")).contains("행공") or not str(auto_badge.get("tooltip", "")).contains("이동 후 공격"):
failures.append("hovering a move+attack target should use metadata instead of jargon text: %s" % str(auto_badge))
if not ["advance", "counter", "danger"].has(str(auto_badge.get("kind", ""))):
failures.append("move+attack hover badge should use an attack-risk color kind: %s" % str(auto_badge))
if str(auto_badge.get("icon", "")).strip_edges().is_empty():
@@ -653,7 +655,7 @@ func _check_scene_enemy_click_auto_attack(failures: Array[String]) -> void:
failures.append("attack-locked units should not mark move+attack targets: %s" % str(marker))
scene.hover_cell = Vector2i(4, 3)
var locked_badge := scene._target_preview_badge()
if str(locked_badge.get("text", "")).contains("행공"):
if str(locked_badge.get("text", "")).contains("진격") or str(locked_badge.get("text", "")).contains("행공"):
failures.append("attack-locked hover badge should not offer move+attack: %s" % str(locked_badge))
scene._handle_board_click(_screen_for_cell(Vector2i(4, 3)))
if cao_cao.get("pos", Vector2i.ZERO) != Vector2i(1, 3) or int(enemy.get("hp", 0)) != 24:
@@ -756,7 +758,7 @@ func _check_scene_auto_attack_safe_origin_and_counter_preview(failures: Array[St
failures.append("formal attack targeting should not show move+attack origin routes: %s" % str(marker))
scene.hover_cell = Vector2i(5, 3)
scene._update_forecast()
if scene.forecast_label.text.contains("행공"):
if scene.forecast_label.text.contains("진격 공격") or scene.forecast_label.text.contains("행공"):
failures.append("formal attack targeting forecast should not describe auto move+attack: %s" % scene.forecast_label.text)
scene.basic_attack_targeting = false
scene._refresh_ranges()
@@ -767,8 +769,11 @@ func _check_scene_auto_attack_safe_origin_and_counter_preview(failures: Array[St
failures.append("safe auto attack hover should not show counter risk: %s" % str(safe_badge))
scene._update_forecast()
var safe_forecast: String = scene.forecast_label.text
if not safe_forecast.contains("행공") or not safe_forecast.contains("진 4,4") or safe_forecast.contains("사거리 밖"):
failures.append("safe auto attack forecast should describe the chosen advance origin: %s" % safe_forecast)
var safe_detail := str(scene.forecast_label.tooltip_text)
if not safe_forecast.contains("진격 공격") or safe_forecast.contains("4,4") or safe_forecast.contains("사거리 밖"):
failures.append("safe auto attack forecast should summarize without raw origin coordinates: %s" % safe_forecast)
if not safe_detail.contains("진입 위치 4,4"):
failures.append("safe auto attack tooltip should keep the chosen advance origin: %s" % safe_detail)
scene._handle_board_click(_screen_for_cell(Vector2i(5, 3)))
cao_cao = scene.state.get_unit("cao_cao")
@@ -826,7 +831,7 @@ func _check_scene_auto_attack_safe_origin_and_counter_preview(failures: Array[St
risky_scene._update_forecast()
var risky_forecast: String = risky_scene.forecast_label.text
var risky_detail := str(risky_scene.forecast_label.tooltip_text)
if not risky_forecast.contains("행공") or not risky_detail.contains("반격"):
if not risky_forecast.contains("진격 공격") or not risky_detail.contains("반격"):
failures.append("risky auto attack forecast should summarize on the label and keep counter risk in the tooltip: %s / %s" % [risky_forecast, risky_detail])
risky_enemy["controllable"] = false
var escort_preview := risky_scene._auto_attack_preview_for_origin(risky_attacker, risky_enemy, Vector2i(4, 3))