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

@@ -11,6 +11,8 @@ const SISHUI_SCENARIO_PATH := "res://data/scenarios/002_sishui_gate.json"
const SISHUI_CONVERSATION_ID := "sishui_quartermaster_antidote"
const BRANCH_SCENARIO_ID := "003_xingyang_ambush"
const BRANCH_SCENARIO_PATH := "res://data/scenarios/003_xingyang_ambush.json"
const QINGZHOU_SCENARIO_ID := "004_qingzhou_campaign"
const QINGZHOU_SCENARIO_PATH := "res://data/scenarios/004_qingzhou_campaign.json"
const WUCHAO_SCENARIO_ID := "013_wuchao_raid"
const WUCHAO_SCENARIO_PATH := "res://data/scenarios/013_wuchao_raid.json"
const SAVE_PATH := "user://campaign_save.json"
@@ -28,6 +30,7 @@ func _init() -> void:
_check_manual_checkpoint_reverts_claim(failures)
_check_completed_replay_cannot_claim(failures)
_check_conditional_camp_conversations(failures)
_check_qingzhou_branch_camp_conversations(failures)
_check_wuchao_branch_camp_conversations(failures)
_check_talk_menu_closes_on_cancel_and_reload(failures)
@@ -227,6 +230,88 @@ func _check_conditional_camp_conversations(failures: Array[String]) -> void:
regroup_scene.free()
func _check_qingzhou_branch_camp_conversations(failures: Array[String]) -> void:
var base_scene = _new_prebattle_scene_for(failures, "Qingzhou base camp", QINGZHOU_SCENARIO_ID, QINGZHOU_SCENARIO_PATH)
if base_scene != null:
if base_scene._camp_conversation_by_id("qingzhou_settlement_council").is_empty():
failures.append("Qingzhou should expose lasting army officer conversation")
if base_scene._camp_conversation_by_id("qingzhou_village_screen").is_empty():
failures.append("Qingzhou should expose village screen officer conversation")
if not base_scene._camp_conversation_by_id("qingzhou_hardened_veterans").is_empty():
failures.append("Qingzhou pursuit supplies should be hidden without pursuit flag")
if not base_scene._camp_conversation_by_id("qingzhou_sishui_stores").is_empty():
failures.append("Qingzhou Sishui stores should be hidden without regroup flag")
var merchant: Dictionary = base_scene.state.get_shop_merchant()
if str(merchant.get("name", "")) != "Qingzhou Road Merchant":
failures.append("Qingzhou shop merchant name should be present")
var merchant_lines: Array = merchant.get("lines", [])
if merchant_lines.size() < 2:
failures.append("Qingzhou shop merchant should expose flavor lines")
if base_scene._format_talk_status_text(base_scene._camp_conversation_entries()) != "Camp conversations | 2 topics":
failures.append("Qingzhou base talk status should summarize two non-supply topics")
base_scene.free()
var pursuit_scene = _new_prebattle_scene_for(
failures,
"Qingzhou pursuit camp",
QINGZHOU_SCENARIO_ID,
QINGZHOU_SCENARIO_PATH,
{"pursued_dong_zhuo": true}
)
if pursuit_scene != null:
var veterans: Dictionary = pursuit_scene._camp_conversation_by_id("qingzhou_hardened_veterans")
if veterans.is_empty():
failures.append("pursuit flag should expose Qingzhou hardened veterans")
if not pursuit_scene._camp_conversation_by_id("qingzhou_sishui_stores").is_empty():
failures.append("pursuit flag should not expose Qingzhou Sishui stores")
if not veterans.is_empty():
if pursuit_scene._format_talk_status_text(pursuit_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Qingzhou pursuit talk status should show one ready supply")
if not pursuit_scene._format_camp_conversation_button_text(veterans).contains("Supply Wine"):
failures.append("Qingzhou hardened veterans button should show Wine supply")
var before_wine := int(pursuit_scene.campaign_state.get_inventory_snapshot().get("wine", 0))
pursuit_scene._apply_camp_conversation_effects(veterans)
if int(pursuit_scene.campaign_state.get_inventory_snapshot().get("wine", 0)) != before_wine + 1:
failures.append("Qingzhou hardened veterans should add Wine to campaign inventory")
if int(pursuit_scene.state.get_inventory_snapshot().get("wine", 0)) != before_wine + 1:
failures.append("Qingzhou hardened veterans should refresh battle Wine inventory")
if not pursuit_scene.campaign_state.has_claimed_camp_conversation_effects(QINGZHOU_SCENARIO_ID, "qingzhou_hardened_veterans"):
failures.append("Qingzhou hardened veterans claim should be saved")
if pursuit_scene._format_talk_status_text(pursuit_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Qingzhou pursuit talk status should show claimed supply after claim")
pursuit_scene.free()
var regroup_scene = _new_prebattle_scene_for(
failures,
"Qingzhou regroup camp",
QINGZHOU_SCENARIO_ID,
QINGZHOU_SCENARIO_PATH,
{"regrouped_after_sishui": true}
)
if regroup_scene != null:
var stores: Dictionary = regroup_scene._camp_conversation_by_id("qingzhou_sishui_stores")
if stores.is_empty():
failures.append("regroup flag should expose Qingzhou Sishui stores")
if not regroup_scene._camp_conversation_by_id("qingzhou_hardened_veterans").is_empty():
failures.append("regroup flag should not expose Qingzhou hardened veterans")
if not stores.is_empty():
if regroup_scene._format_talk_status_text(regroup_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Qingzhou regroup talk status should show one ready supply")
if not regroup_scene._format_camp_conversation_button_text(stores).contains("Supply Bean"):
failures.append("Qingzhou Sishui stores button should show Bean supply")
var before_bean := int(regroup_scene.campaign_state.get_inventory_snapshot().get("bean", 0))
regroup_scene._apply_camp_conversation_effects(stores)
if int(regroup_scene.campaign_state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Qingzhou Sishui stores should add Bean to campaign inventory")
if int(regroup_scene.state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Qingzhou Sishui stores should refresh battle Bean inventory")
if not regroup_scene.campaign_state.has_claimed_camp_conversation_effects(QINGZHOU_SCENARIO_ID, "qingzhou_sishui_stores"):
failures.append("Qingzhou Sishui stores claim should be saved")
if regroup_scene._format_talk_status_text(regroup_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Qingzhou regroup talk status should show claimed supply after claim")
regroup_scene.free()
func _check_wuchao_branch_camp_conversations(failures: Array[String]) -> void:
var base_scene = _new_prebattle_scene_for(failures, "Wuchao base camp", WUCHAO_SCENARIO_ID, WUCHAO_SCENARIO_PATH)
if base_scene != null: