Polish post-move choice readability

This commit is contained in:
2026-06-20 22:13:19 +09:00
parent 64bcfd2b7d
commit 63b42db379
3 changed files with 87 additions and 14 deletions

View File

@@ -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: