Add Weishui bridge and antique battle UI

This commit is contained in:
2026-06-19 05:18:54 +09:00
parent b08370cf45
commit dc3dc06eb0
5 changed files with 717 additions and 76 deletions

View File

@@ -2307,6 +2307,17 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
failures.append("could not load Ma Chao Counterstroke data")
else:
_check_shop_items_unique(failures, ma_chao_counterstroke_state, "034 base")
var ma_chao_conversations: Array = ma_chao_counterstroke_state.get_briefing().get("camp_conversations", [])
if ma_chao_conversations.size() != 2:
failures.append("034 base briefing should expose exactly two camp conversations")
else:
_check_camp_conversation(failures, _find_camp_conversation(ma_chao_conversations, "ma_chao_counterstroke_council"), "ma_chao_counterstroke_council", "topic", "")
_check_camp_conversation(failures, _find_camp_conversation(ma_chao_conversations, "ma_chao_zhang_he_charge_line"), "ma_chao_zhang_he_charge_line", "officer", "zhang_he")
var ma_chao_merchant := ma_chao_counterstroke_state.get_shop_merchant()
if str(ma_chao_merchant.get("name", "")) != "Counterstroke Sutler":
failures.append("034 shop should expose counterstroke merchant name")
if (ma_chao_merchant.get("lines", []) as Array).size() < 2:
failures.append("034 shop should expose merchant flavor lines")
if ma_chao_counterstroke_state.get_unit("zhang_he_ch34").is_empty() or not ma_chao_counterstroke_state.is_required_deployment("zhang_he_ch34"):
failures.append("034 should deploy Zhang He as a required officer")
_check_shop_item_visibility(failures, ma_chao_counterstroke_state, "war_drum", false, "034 base")
@@ -2317,6 +2328,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
failures.append("could not load Ma Chao Counterstroke fortified Tong Pass data")
else:
_check_shop_items_unique(failures, ma_chao_fortified_state, "034 fortified Tong Pass")
var fortified_medicine: Dictionary = _find_camp_conversation(
ma_chao_fortified_state.get_briefing().get("camp_conversations", []),
"ma_chao_counterstroke_fortified_medicine"
)
if fortified_medicine.is_empty():
failures.append("034 fortified Tong Pass should expose fortified medicine")
else:
_check_camp_conversation_effect(failures, fortified_medicine, "panacea", 1)
if not _find_camp_conversation(
ma_chao_fortified_state.get_briefing().get("camp_conversations", []),
"ma_chao_counterstroke_pressed_beans"
).is_empty():
failures.append("034 fortified Tong Pass should not expose pressed beans")
_check_shop_item_visibility(failures, ma_chao_fortified_state, "imperial_seal", true, "034 fortified Tong Pass")
_check_shop_item_visibility(failures, ma_chao_fortified_state, "war_drum", false, "034 fortified Tong Pass")
@@ -2325,6 +2349,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
failures.append("could not load Ma Chao Counterstroke pressed vanguard data")
else:
_check_shop_items_unique(failures, ma_chao_pressed_state, "034 pressed Ma Chao vanguard")
var pressed_beans: Dictionary = _find_camp_conversation(
ma_chao_pressed_state.get_briefing().get("camp_conversations", []),
"ma_chao_counterstroke_pressed_beans"
)
if pressed_beans.is_empty():
failures.append("034 pressed Ma Chao vanguard should expose pressed beans")
else:
_check_camp_conversation_effect(failures, pressed_beans, "bean", 1)
if not _find_camp_conversation(
ma_chao_pressed_state.get_briefing().get("camp_conversations", []),
"ma_chao_counterstroke_fortified_medicine"
).is_empty():
failures.append("034 pressed Ma Chao vanguard should not expose fortified medicine")
_check_shop_item_visibility(failures, ma_chao_pressed_state, "war_drum", true, "034 pressed Ma Chao vanguard")
_check_shop_item_visibility(failures, ma_chao_pressed_state, "imperial_seal", false, "034 pressed Ma Chao vanguard")
@@ -2335,6 +2372,97 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
_check_shop_items_unique(failures, ma_chao_old_flags_state, "034 old Tong Pass setup flags")
_check_shop_item_visibility(failures, ma_chao_old_flags_state, "war_drum", false, "034 old Tong Pass setup flags")
_check_shop_item_visibility(failures, ma_chao_old_flags_state, "imperial_seal", false, "034 old Tong Pass setup flags")
if not _find_camp_conversation(
ma_chao_old_flags_state.get_briefing().get("camp_conversations", []),
"ma_chao_counterstroke_fortified_medicine"
).is_empty():
failures.append("034 old Tong Pass setup flags should not expose fortified medicine")
if not _find_camp_conversation(
ma_chao_old_flags_state.get_briefing().get("camp_conversations", []),
"ma_chao_counterstroke_pressed_beans"
).is_empty():
failures.append("034 old Tong Pass setup flags should not expose pressed beans")
var weishui_camps_state = BattleStateScript.new()
if not weishui_camps_state.load_battle("res://data/scenarios/035_weishui_camps.json", {}, {}, {}, ["zhang_he"]):
failures.append("could not load Weishui Camps data")
else:
_check_shop_items_unique(failures, weishui_camps_state, "035 base")
var weishui_conversations: Array = weishui_camps_state.get_briefing().get("camp_conversations", [])
if weishui_conversations.size() != 2:
failures.append("035 base briefing should expose exactly two camp conversations")
else:
_check_camp_conversation(failures, _find_camp_conversation(weishui_conversations, "weishui_camps_council"), "weishui_camps_council", "topic", "")
_check_camp_conversation(failures, _find_camp_conversation(weishui_conversations, "weishui_zhang_he_river_line"), "weishui_zhang_he_river_line", "officer", "zhang_he")
var weishui_merchant := weishui_camps_state.get_shop_merchant()
if str(weishui_merchant.get("name", "")) != "Weishui Camp Sutler":
failures.append("035 shop should expose Weishui Camp merchant name")
if (weishui_merchant.get("lines", []) as Array).size() < 2:
failures.append("035 shop should expose merchant flavor lines")
if weishui_camps_state.get_unit("zhang_he_ch35").is_empty() or not weishui_camps_state.is_required_deployment("zhang_he_ch35"):
failures.append("035 should deploy Zhang He as a required officer")
_check_shop_item_visibility(failures, weishui_camps_state, "war_drum", false, "035 base")
_check_shop_item_visibility(failures, weishui_camps_state, "imperial_seal", false, "035 base")
var weishui_anchored_state = BattleStateScript.new()
if not weishui_anchored_state.load_battle("res://data/scenarios/035_weishui_camps.json", {}, {}, {"anchored_weishui_camps": true}, ["zhang_he"]):
failures.append("could not load Weishui Camps anchored data")
else:
_check_shop_items_unique(failures, weishui_anchored_state, "035 anchored Weishui camps")
var anchor_medicine: Dictionary = _find_camp_conversation(
weishui_anchored_state.get_briefing().get("camp_conversations", []),
"weishui_anchor_medicine"
)
if anchor_medicine.is_empty():
failures.append("035 anchored Weishui camps should expose anchor medicine")
else:
_check_camp_conversation_effect(failures, anchor_medicine, "panacea", 1)
if not _find_camp_conversation(
weishui_anchored_state.get_briefing().get("camp_conversations", []),
"weishui_doubt_rations"
).is_empty():
failures.append("035 anchored Weishui camps should not expose doubt rations")
_check_shop_item_visibility(failures, weishui_anchored_state, "imperial_seal", true, "035 anchored Weishui camps")
_check_shop_item_visibility(failures, weishui_anchored_state, "war_drum", false, "035 anchored Weishui camps")
var weishui_doubt_state = BattleStateScript.new()
if not weishui_doubt_state.load_battle("res://data/scenarios/035_weishui_camps.json", {}, {}, {"sowed_han_sui_doubt": true}, ["zhang_he"]):
failures.append("could not load Weishui Camps Han Sui doubt data")
else:
_check_shop_items_unique(failures, weishui_doubt_state, "035 sowed Han Sui doubt")
var doubt_rations: Dictionary = _find_camp_conversation(
weishui_doubt_state.get_briefing().get("camp_conversations", []),
"weishui_doubt_rations"
)
if doubt_rations.is_empty():
failures.append("035 sowed Han Sui doubt should expose doubt rations")
else:
_check_camp_conversation_effect(failures, doubt_rations, "bean", 1)
if not _find_camp_conversation(
weishui_doubt_state.get_briefing().get("camp_conversations", []),
"weishui_anchor_medicine"
).is_empty():
failures.append("035 sowed Han Sui doubt should not expose anchor medicine")
_check_shop_item_visibility(failures, weishui_doubt_state, "war_drum", true, "035 sowed Han Sui doubt")
_check_shop_item_visibility(failures, weishui_doubt_state, "imperial_seal", false, "035 sowed Han Sui doubt")
var weishui_old_flags_state = BattleStateScript.new()
if not weishui_old_flags_state.load_battle("res://data/scenarios/035_weishui_camps.json", {}, {}, {"fortified_tong_pass": true, "pressed_ma_chao_vanguard": true}, ["zhang_he"]):
failures.append("could not load Weishui Camps old Counterstroke setup flag data")
else:
_check_shop_items_unique(failures, weishui_old_flags_state, "035 old Counterstroke setup flags")
_check_shop_item_visibility(failures, weishui_old_flags_state, "war_drum", false, "035 old Counterstroke setup flags")
_check_shop_item_visibility(failures, weishui_old_flags_state, "imperial_seal", false, "035 old Counterstroke setup flags")
if not _find_camp_conversation(
weishui_old_flags_state.get_briefing().get("camp_conversations", []),
"weishui_anchor_medicine"
).is_empty():
failures.append("035 old Counterstroke setup flags should not expose anchor medicine")
if not _find_camp_conversation(
weishui_old_flags_state.get_briefing().get("camp_conversations", []),
"weishui_doubt_rations"
).is_empty():
failures.append("035 old Counterstroke setup flags should not expose doubt rations")
for item_id in ["bronze_sword", "training_spear", "short_bow", "hand_axe", "iron_armor", "panacea"]:
var item := state.get_item_def(item_id)
@@ -2518,18 +2646,20 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
for expected in ["승리 조서", "패배 흉조", "전공 죽간", "흉조 징후"]:
if not mission_text.contains(expected):
failures.append("mission panel should use old campaign wording `%s`: %s" % [expected, mission_text])
_check_panel_style_fill(failures, scene.briefing_panel, "briefing panel", Color(0.72, 0.60, 0.39, 0.995))
_check_panel_style_frame(failures, scene.briefing_panel, "briefing panel", Color(0.035, 0.018, 0.012, 1.0), 6)
_check_panel_style_fill(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.76, 0.63, 0.40, 0.995))
_check_panel_style_frame(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.28, 0.020, 0.014, 1.0), 4)
_check_panel_style_fill(failures, scene.dialogue_panel, "dialogue panel", Color(0.052, 0.022, 0.014, 0.995))
_check_panel_style_frame(failures, scene.dialogue_panel, "dialogue panel", Color(0.12, 0.36, 0.25, 1.0), 6)
_check_panel_style_fill(failures, scene.dialogue_portrait_panel, "dialogue portrait panel", Color(0.055, 0.025, 0.016, 1.0))
_check_panel_style_fill(failures, scene.briefing_panel, "briefing panel", Color(0.74, 0.58, 0.32, 0.996))
_check_panel_style_frame(failures, scene.briefing_panel, "briefing panel", Color(0.045, 0.026, 0.016, 1.0), 8)
_check_panel_style_fill(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.55, 0.36, 0.15, 0.995))
_check_panel_style_frame(failures, scene.briefing_objective_panel, "briefing objective edict panel", Color(0.10, 0.065, 0.040, 1.0), 5)
_check_panel_style_fill(failures, scene.dialogue_panel, "dialogue panel", Color(0.036, 0.012, 0.006, 0.996))
_check_panel_style_frame(failures, scene.dialogue_panel, "dialogue panel", Color(0.28, 0.020, 0.014, 1.0), 8)
_check_panel_style_fill(failures, scene.dialogue_portrait_panel, "dialogue portrait panel", Color(0.035, 0.014, 0.008, 1.0))
_check_panel_style_fill(failures, scene.dialogue_speaker_panel, "dialogue speaker seal panel", Color(0.28, 0.020, 0.014, 1.0))
_check_panel_style_fill(failures, scene.dialogue_text_panel, "dialogue text scroll panel", Color(0.75, 0.62, 0.39, 0.995))
_check_panel_style_fill(failures, scene.dialogue_text_panel, "dialogue text scroll panel", Color(0.67, 0.50, 0.27, 0.996))
_check_seal_ribbon(failures, scene.briefing_seal_ribbon, "briefing seal ribbon")
_check_seal_ribbon(failures, scene.dialogue_seal_ribbon, "dialogue seal ribbon")
_check_seal_ribbon(failures, scene.result_seal_ribbon, "result seal ribbon")
_check_bamboo_gutter_row(failures, scene.briefing_objective_panel, "briefing objective bamboo gutters")
_check_bamboo_gutter_row(failures, scene.dialogue_text_panel, "dialogue scroll bamboo gutters")
_check_dialogue_column_budget(failures, scene)
if scene.dialogue_continue_button == null or scene.dialogue_continue_button.text != "다음 죽간":
failures.append("dialogue continue button should use ancient slip text")
@@ -2570,7 +2700,7 @@ func _check_ancient_ui_theme(failures: Array[String]) -> void:
scene._update_briefing_camp_overview(scene.state.get_briefing(), false)
if scene.briefing_camp_overview_fallback_label == null or scene.briefing_camp_overview_fallback_label.text != "비단 전장도":
failures.append("briefing map fallback should read as an old campaign map")
_check_panel_style_fill(failures, scene.result_panel, "result panel", Color(0.54, 0.43, 0.27, 0.992))
_check_panel_style_fill(failures, scene.result_panel, "result panel", Color(0.48, 0.34, 0.17, 0.994))
if not scene._format_victory_result_text().contains("승전 조서"):
failures.append("victory result should read like a bronze proclamation")
if not scene._format_defeat_result_text().contains("패전 비문"):
@@ -2597,6 +2727,27 @@ func _check_seal_ribbon(failures: Array[String], ribbon: HBoxContainer, label: S
failures.append("%s should include a three-seal center cluster" % label)
func _check_bamboo_gutter_row(failures: Array[String], panel: PanelContainer, label: String) -> void:
if panel == null or panel.get_child_count() <= 0:
failures.append("%s missing row" % label)
return
var row := panel.get_child(0) as HBoxContainer
if row == null or row.get_child_count() < 3:
failures.append("%s should use a row with bamboo side gutters" % label)
return
_check_bamboo_gutter(failures, row.get_child(0), "%s left gutter" % label)
_check_bamboo_gutter(failures, row.get_child(row.get_child_count() - 1), "%s right gutter" % label)
func _check_bamboo_gutter(failures: Array[String], node: Node, label: String) -> void:
var gutter := node as HBoxContainer
if gutter == null:
failures.append("%s should be a bamboo gutter container" % label)
return
if gutter.get_child_count() != 3:
failures.append("%s should use three bamboo slips" % label)
func _check_dialogue_column_budget(failures: Array[String], scene) -> void:
if scene.dialogue_column == null:
failures.append("dialogue column missing")