Clarify auto move attack badge
This commit is contained in:
@@ -102,15 +102,47 @@ func _capture_viewport_set(spec: Dictionary, output_dir: String, captures: Array
|
||||
await _settle()
|
||||
await _capture_frame(scene, output_dir, label, "07_battle_idle", captures, failures)
|
||||
|
||||
_prepare_auto_attack_hint_frame(scene)
|
||||
await _settle()
|
||||
await _capture_frame(scene, output_dir, label, "08_battle_auto_attack_hint", captures, failures)
|
||||
|
||||
scene._update_threat_button()
|
||||
scene._on_command_hint_button_mouse_entered(scene.threat_button)
|
||||
await _settle()
|
||||
await _capture_frame(scene, output_dir, label, "08_battle_threat_hint", captures, failures)
|
||||
await _capture_frame(scene, output_dir, label, "09_battle_threat_hint", captures, failures)
|
||||
|
||||
scene.queue_free()
|
||||
await _settle()
|
||||
|
||||
|
||||
func _prepare_auto_attack_hint_frame(scene) -> void:
|
||||
scene._hide_post_move_menu()
|
||||
scene._hide_post_move_picker()
|
||||
scene._hide_tactic_menu()
|
||||
scene._hide_item_menu()
|
||||
scene._hide_equip_menu()
|
||||
scene._clear_pending_move_state()
|
||||
scene.selected_skill_id = ""
|
||||
scene.selected_item_id = ""
|
||||
scene.basic_attack_targeting = false
|
||||
var cao_cao: Dictionary = scene.state.get_unit("cao_cao")
|
||||
var enemy: Dictionary = scene.state.get_unit("yellow_turban_1")
|
||||
if cao_cao.is_empty() or enemy.is_empty():
|
||||
return
|
||||
cao_cao["pos"] = Vector2i(1, 3)
|
||||
cao_cao["moved"] = false
|
||||
cao_cao["acted"] = false
|
||||
enemy["pos"] = Vector2i(4, 3)
|
||||
enemy["alive"] = true
|
||||
enemy["hp"] = maxi(1, int(enemy.get("hp", 24)))
|
||||
scene.state.select_unit("cao_cao")
|
||||
scene.hover_cell = Vector2i(4, 3)
|
||||
scene._refresh_ranges()
|
||||
scene._focus_board_on_cell(Vector2i(4, 3))
|
||||
scene._update_hud()
|
||||
scene.queue_redraw()
|
||||
|
||||
|
||||
func _capture_frame(_scene, output_dir: String, viewport_label: String, frame_label: String, captures: Array[Dictionary], failures: Array[String]) -> void:
|
||||
var texture := get_root().get_texture()
|
||||
if texture == null:
|
||||
|
||||
@@ -238,6 +238,8 @@ func _check_scene_directional_attack_badges(failures: Array[String]) -> void:
|
||||
var auto_badge: Dictionary = scene._target_preview_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("이동"):
|
||||
failures.append("auto-move attack hover badge should visibly show that movement is included: %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))
|
||||
if not str(auto_badge.get("tooltip", "")).contains("후방 공격 +%d 피해" % BattleStateScript.DIRECTIONAL_BACK_DAMAGE_BONUS):
|
||||
|
||||
@@ -689,6 +689,8 @@ func _check_scene_enemy_click_auto_attack(failures: Array[String]) -> void:
|
||||
var auto_badge := scene._target_preview_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 str(auto_badge.get("text", "")).contains("이동"):
|
||||
failures.append("move+attack hover badge should visibly say that movement is included: %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():
|
||||
|
||||
Reference in New Issue
Block a user