Add Qingzhou branch camp content

This commit is contained in:
2026-06-18 23:23:19 +09:00
parent 28053dc8c9
commit 3495ae55da
3 changed files with 206 additions and 1 deletions

View File

@@ -137,6 +137,58 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
if (gate_merchant.get("lines", []) as Array).size() < 2:
failures.append("002 shop should expose merchant flavor lines")
var qingzhou_state = BattleStateScript.new()
if not qingzhou_state.load_battle("res://data/scenarios/004_qingzhou_campaign.json"):
failures.append("could not load Qingzhou Campaign camp data")
else:
var qingzhou_conversations: Array = qingzhou_state.get_briefing().get("camp_conversations", [])
if qingzhou_conversations.size() != 2:
failures.append("004 base briefing should expose exactly two camp conversations")
else:
_check_camp_conversation(failures, qingzhou_conversations[0], "qingzhou_settlement_council", "officer", "cao_cao")
_check_camp_conversation(failures, qingzhou_conversations[1], "qingzhou_village_screen", "officer", "cao_ren")
var qingzhou_merchant := qingzhou_state.get_shop_merchant()
if str(qingzhou_merchant.get("name", "")) != "Qingzhou Road Merchant":
failures.append("004 shop should expose Qingzhou merchant name")
if (qingzhou_merchant.get("lines", []) as Array).size() < 2:
failures.append("004 shop should expose merchant flavor lines")
var qingzhou_pursuit_state = BattleStateScript.new()
if not qingzhou_pursuit_state.load_battle("res://data/scenarios/004_qingzhou_campaign.json", {}, {}, {"pursued_dong_zhuo": true}):
failures.append("could not load Qingzhou pursuit camp data")
else:
var veterans: Dictionary = _find_camp_conversation(
qingzhou_pursuit_state.get_briefing().get("camp_conversations", []),
"qingzhou_hardened_veterans"
)
if veterans.is_empty():
failures.append("004 pursuit flag should expose hardened veterans conversation")
else:
_check_camp_conversation_effect(failures, veterans, "wine", 1)
if not _find_camp_conversation(
qingzhou_pursuit_state.get_briefing().get("camp_conversations", []),
"qingzhou_sishui_stores"
).is_empty():
failures.append("004 pursuit flag should not expose Sishui stores conversation")
var qingzhou_regroup_state = BattleStateScript.new()
if not qingzhou_regroup_state.load_battle("res://data/scenarios/004_qingzhou_campaign.json", {}, {}, {"regrouped_after_sishui": true}):
failures.append("could not load Qingzhou regroup camp data")
else:
var stores: Dictionary = _find_camp_conversation(
qingzhou_regroup_state.get_briefing().get("camp_conversations", []),
"qingzhou_sishui_stores"
)
if stores.is_empty():
failures.append("004 regroup flag should expose Sishui stores conversation")
else:
_check_camp_conversation_effect(failures, stores, "bean", 1)
if not _find_camp_conversation(
qingzhou_regroup_state.get_briefing().get("camp_conversations", []),
"qingzhou_hardened_veterans"
).is_empty():
failures.append("004 regroup flag should not expose hardened veterans conversation")
for item_id in ["bronze_sword", "training_spear", "short_bow", "hand_axe", "iron_armor", "panacea"]:
var item := state.get_item_def(item_id)
if item.is_empty():
@@ -722,6 +774,13 @@ func _check_skill_motion_signal(failures: Array[String], skill_id: String, expec
failures.append("%s motion signal missing `%s`: %s" % [skill_id, expected, str(motions)])
func _find_camp_conversation(conversations: Array, conversation_id: String) -> Dictionary:
for conversation in conversations:
if typeof(conversation) == TYPE_DICTIONARY and str(conversation.get("id", "")) == conversation_id:
return conversation
return {}
func _check_camp_conversation_effect(failures: Array[String], conversation: Dictionary, expected_item_id: String, expected_count: int) -> void:
var effects: Array = conversation.get("effects", [])
if effects.is_empty():