Add Tong Pass camp and Ma Chao bridge

This commit is contained in:
2026-06-19 05:00:19 +09:00
parent 70563668a2
commit b08370cf45
4 changed files with 369 additions and 2 deletions

View File

@@ -2226,6 +2226,17 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
failures.append("could not load Tong Pass Vanguard data")
else:
_check_shop_items_unique(failures, tong_pass_state, "033 base")
var tong_pass_conversations: Array = tong_pass_state.get_briefing().get("camp_conversations", [])
if tong_pass_conversations.size() != 2:
failures.append("033 base briefing should expose exactly two camp conversations")
else:
_check_camp_conversation(failures, _find_camp_conversation(tong_pass_conversations, "tong_pass_vanguard_council"), "tong_pass_vanguard_council", "topic", "")
_check_camp_conversation(failures, _find_camp_conversation(tong_pass_conversations, "tong_pass_zhang_he_pass_road"), "tong_pass_zhang_he_pass_road", "officer", "zhang_he")
var tong_pass_merchant := tong_pass_state.get_shop_merchant()
if str(tong_pass_merchant.get("name", "")) != "Tong Pass Sutler":
failures.append("033 shop should expose Tong Pass merchant name")
if (tong_pass_merchant.get("lines", []) as Array).size() < 2:
failures.append("033 shop should expose merchant flavor lines")
if tong_pass_state.get_unit("zhang_he_ch33").is_empty() or not tong_pass_state.is_required_deployment("zhang_he_ch33"):
failures.append("033 should deploy Zhang He as a required officer")
_check_shop_item_visibility(failures, tong_pass_state, "war_drum", false, "033 base")
@@ -2236,6 +2247,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
failures.append("could not load Tong Pass stabilized Jiangling data")
else:
_check_shop_items_unique(failures, tong_pass_stabilized_state, "033 stabilized Jiangling rearguard")
var jiangling_supply_medicine: Dictionary = _find_camp_conversation(
tong_pass_stabilized_state.get_briefing().get("camp_conversations", []),
"tong_pass_jiangling_supply_medicine"
)
if jiangling_supply_medicine.is_empty():
failures.append("033 stabilized Jiangling rearguard should expose Jiangling supply medicine")
else:
_check_camp_conversation_effect(failures, jiangling_supply_medicine, "panacea", 1)
if not _find_camp_conversation(
tong_pass_stabilized_state.get_briefing().get("camp_conversations", []),
"tong_pass_vanguard_rations"
).is_empty():
failures.append("033 stabilized Jiangling rearguard should not expose vanguard rations")
_check_shop_item_visibility(failures, tong_pass_stabilized_state, "imperial_seal", true, "033 stabilized Jiangling rearguard")
_check_shop_item_visibility(failures, tong_pass_stabilized_state, "war_drum", false, "033 stabilized Jiangling rearguard")
@@ -2244,6 +2268,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
failures.append("could not load Tong Pass mobilized vanguard data")
else:
_check_shop_items_unique(failures, tong_pass_mobilized_state, "033 mobilized Tong Pass vanguard")
var vanguard_rations: Dictionary = _find_camp_conversation(
tong_pass_mobilized_state.get_briefing().get("camp_conversations", []),
"tong_pass_vanguard_rations"
)
if vanguard_rations.is_empty():
failures.append("033 mobilized Tong Pass vanguard should expose vanguard rations")
else:
_check_camp_conversation_effect(failures, vanguard_rations, "bean", 1)
if not _find_camp_conversation(
tong_pass_mobilized_state.get_briefing().get("camp_conversations", []),
"tong_pass_jiangling_supply_medicine"
).is_empty():
failures.append("033 mobilized Tong Pass vanguard should not expose Jiangling supply medicine")
_check_shop_item_visibility(failures, tong_pass_mobilized_state, "war_drum", true, "033 mobilized Tong Pass vanguard")
_check_shop_item_visibility(failures, tong_pass_mobilized_state, "imperial_seal", false, "033 mobilized Tong Pass vanguard")
@@ -2254,6 +2291,50 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
_check_shop_items_unique(failures, tong_pass_old_flags_state, "033 old Jiangling setup flags")
_check_shop_item_visibility(failures, tong_pass_old_flags_state, "war_drum", false, "033 old Jiangling setup flags")
_check_shop_item_visibility(failures, tong_pass_old_flags_state, "imperial_seal", false, "033 old Jiangling setup flags")
if not _find_camp_conversation(
tong_pass_old_flags_state.get_briefing().get("camp_conversations", []),
"tong_pass_jiangling_supply_medicine"
).is_empty():
failures.append("033 old Jiangling setup flags should not expose Jiangling supply medicine")
if not _find_camp_conversation(
tong_pass_old_flags_state.get_briefing().get("camp_conversations", []),
"tong_pass_vanguard_rations"
).is_empty():
failures.append("033 old Jiangling setup flags should not expose vanguard rations")
var ma_chao_counterstroke_state = BattleStateScript.new()
if not ma_chao_counterstroke_state.load_battle("res://data/scenarios/034_ma_chao_counterstroke.json", {}, {}, {}, ["zhang_he"]):
failures.append("could not load Ma Chao Counterstroke data")
else:
_check_shop_items_unique(failures, ma_chao_counterstroke_state, "034 base")
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")
_check_shop_item_visibility(failures, ma_chao_counterstroke_state, "imperial_seal", false, "034 base")
var ma_chao_fortified_state = BattleStateScript.new()
if not ma_chao_fortified_state.load_battle("res://data/scenarios/034_ma_chao_counterstroke.json", {}, {}, {"fortified_tong_pass": true}, ["zhang_he"]):
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")
_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")
var ma_chao_pressed_state = BattleStateScript.new()
if not ma_chao_pressed_state.load_battle("res://data/scenarios/034_ma_chao_counterstroke.json", {}, {}, {"pressed_ma_chao_vanguard": true}, ["zhang_he"]):
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")
_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")
var ma_chao_old_flags_state = BattleStateScript.new()
if not ma_chao_old_flags_state.load_battle("res://data/scenarios/034_ma_chao_counterstroke.json", {}, {}, {"stabilized_jiangling_rearguard": true, "mobilized_tong_pass_vanguard": true}, ["zhang_he"]):
failures.append("could not load Ma Chao Counterstroke old Tong Pass setup flag data")
else:
_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")
for item_id in ["bronze_sword", "training_spear", "short_bow", "hand_axe", "iron_armor", "panacea"]:
var item := state.get_item_def(item_id)