Polish post-move choice readability
This commit is contained in:
@@ -111,6 +111,18 @@ func _capture_viewport_set(spec: Dictionary, output_dir: String, captures: Array
|
||||
await _settle()
|
||||
await _capture_frame(scene, output_dir, label, "09_battle_threat_hint", captures, failures)
|
||||
|
||||
_prepare_post_move_action_frame(scene, "")
|
||||
await _settle()
|
||||
await _capture_frame(scene, output_dir, label, "10_post_move_actions", captures, failures)
|
||||
|
||||
_prepare_post_move_action_frame(scene, "tactic")
|
||||
await _settle()
|
||||
await _capture_frame(scene, output_dir, label, "11_post_move_tactic_picker", captures, failures)
|
||||
|
||||
_prepare_post_move_action_frame(scene, "item")
|
||||
await _settle()
|
||||
await _capture_frame(scene, output_dir, label, "12_post_move_item_picker", captures, failures)
|
||||
|
||||
scene.queue_free()
|
||||
await _settle()
|
||||
|
||||
@@ -143,6 +155,50 @@ func _prepare_auto_attack_hint_frame(scene) -> void:
|
||||
scene.queue_redraw()
|
||||
|
||||
|
||||
func _prepare_post_move_action_frame(scene, picker_mode: String) -> void:
|
||||
scene._hide_command_hint()
|
||||
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
|
||||
scene.state.set_inventory_snapshot({"bean": 2})
|
||||
var cao_cao: Dictionary = scene.state.get_unit("cao_cao")
|
||||
var enemy: Dictionary = scene.state.get_unit("yellow_turban_1")
|
||||
var xiahou_dun: Dictionary = scene.state.get_unit("xiahou_dun")
|
||||
if cao_cao.is_empty() or enemy.is_empty() or xiahou_dun.is_empty():
|
||||
return
|
||||
cao_cao["pos"] = Vector2i(1, 3)
|
||||
cao_cao["moved"] = false
|
||||
cao_cao["acted"] = false
|
||||
cao_cao["mp"] = maxi(10, int(cao_cao.get("mp", 0)))
|
||||
enemy["pos"] = Vector2i(3, 3)
|
||||
enemy["alive"] = true
|
||||
enemy["hp"] = maxi(18, int(enemy.get("hp", 0)))
|
||||
xiahou_dun["pos"] = Vector2i(2, 4)
|
||||
xiahou_dun["alive"] = true
|
||||
xiahou_dun["hp"] = 12
|
||||
scene.state.select_unit("cao_cao")
|
||||
scene._refresh_ranges()
|
||||
scene._focus_board_on_cell(Vector2i(2, 3))
|
||||
scene._handle_board_click(_screen_for_cell(scene, Vector2i(2, 3)))
|
||||
if picker_mode == "tactic":
|
||||
scene._on_post_move_tactic_pressed()
|
||||
elif picker_mode == "item":
|
||||
scene._on_post_move_item_pressed()
|
||||
scene._update_hud()
|
||||
scene.queue_redraw()
|
||||
|
||||
|
||||
func _screen_for_cell(scene, cell: Vector2i) -> Vector2:
|
||||
var rect: Rect2 = scene._rect_for_cell(cell)
|
||||
return rect.position + rect.size * 0.5
|
||||
|
||||
|
||||
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:
|
||||
|
||||
@@ -936,6 +936,9 @@ func _check_scene_post_move_tactic_picker_flow(failures: Array[String]) -> void:
|
||||
scene._handle_board_click(_screen_for_cell(Vector2i(2, 3)))
|
||||
if scene.post_move_tactic_button == null or scene.post_move_tactic_button.disabled:
|
||||
failures.append("post-move Tactic should be enabled when Spark has a valid target")
|
||||
scene.hover_cell = Vector2i(2, 3)
|
||||
if not scene._hover_info_badge().is_empty():
|
||||
failures.append("post-move action menu should suppress terrain hover badges over local commands")
|
||||
|
||||
scene._on_tactic_pressed()
|
||||
if scene.post_move_picker_panel == null or not scene.post_move_picker_panel.visible or scene.post_move_picker_mode != "tactic":
|
||||
@@ -944,6 +947,9 @@ func _check_scene_post_move_tactic_picker_flow(failures: Array[String]) -> void:
|
||||
failures.append("post-move action menu should hide while the tactic picker is open")
|
||||
if scene.tactic_menu != null and scene.tactic_menu.visible:
|
||||
failures.append("post-move tactic shortcut should not use the side tactic menu")
|
||||
scene.hover_cell = Vector2i(2, 3)
|
||||
if not scene._hover_info_badge().is_empty():
|
||||
failures.append("post-move tactic picker should suppress terrain hover badges over local choices")
|
||||
_check_post_move_picker_option_tooltips_present(failures, scene, "post-move tactic picker")
|
||||
_check_post_move_picker_option_visuals(failures, scene, "post-move tactic picker")
|
||||
|
||||
@@ -1050,6 +1056,9 @@ func _check_scene_post_move_item_picker_flow(failures: Array[String]) -> void:
|
||||
scene._handle_board_click(_screen_for_cell(Vector2i(2, 3)))
|
||||
if scene.post_move_item_button == null or scene.post_move_item_button.disabled:
|
||||
failures.append("post-move Item should be enabled when Bean can heal an adjacent ally")
|
||||
scene.hover_cell = Vector2i(2, 3)
|
||||
if not scene._hover_info_badge().is_empty():
|
||||
failures.append("post-move action menu should suppress terrain hover badges before item choices")
|
||||
|
||||
scene._on_item_pressed()
|
||||
if scene.post_move_picker_panel == null or not scene.post_move_picker_panel.visible or scene.post_move_picker_mode != "item":
|
||||
@@ -1058,6 +1067,9 @@ func _check_scene_post_move_item_picker_flow(failures: Array[String]) -> void:
|
||||
failures.append("post-move action menu should hide while the item picker is open")
|
||||
if scene.item_menu != null and scene.item_menu.visible:
|
||||
failures.append("post-move item shortcut should not use the side item menu")
|
||||
scene.hover_cell = Vector2i(2, 3)
|
||||
if not scene._hover_info_badge().is_empty():
|
||||
failures.append("post-move item picker should suppress terrain hover badges over local choices")
|
||||
_check_post_move_picker_option_tooltips_present(failures, scene, "post-move item picker")
|
||||
_check_post_move_picker_option_visuals(failures, scene, "post-move item picker")
|
||||
|
||||
@@ -1214,6 +1226,12 @@ func _check_post_move_picker_option_visuals(failures: Array[String], scene, labe
|
||||
failures.append("%s option should reserve stable visual row space: %s" % [label, str(button.custom_minimum_size)])
|
||||
if not button.text.contains("\n"):
|
||||
failures.append("%s option should use compact two-line visual text: %s" % [label, button.text])
|
||||
if button.text.contains("위력") or button.text.contains("사거리"):
|
||||
failures.append("%s option should keep dense combat detail in hover text: %s" % [label, button.text])
|
||||
if label.contains("tactic") and (not button.tooltip_text.contains("사거리") or button.tooltip_text.split("\n").size() < 2):
|
||||
failures.append("%s option tooltip should keep full tactic detail: %s" % [label, button.tooltip_text])
|
||||
if label.contains("item") and not button.tooltip_text.contains("잔량"):
|
||||
failures.append("%s option tooltip should keep item count detail: %s" % [label, button.tooltip_text])
|
||||
if button.get_theme_constant("icon_max_width") < BattleSceneScript.POST_MOVE_PICKER_OPTION_ICON_MAX_WIDTH:
|
||||
failures.append("%s option should reserve readable icon width" % label)
|
||||
if not saw_button:
|
||||
|
||||
Reference in New Issue
Block a user