Add Wan Castle escape camp content

This commit is contained in:
2026-06-18 23:59:14 +09:00
parent 5e9ab7afec
commit 409a4c62d4
3 changed files with 249 additions and 1 deletions

View File

@@ -26,6 +26,10 @@ const XIAN_SCENARIO_ID := "007_xian_emperor_escort"
const XIAN_SCENARIO_PATH := "res://data/scenarios/007_xian_emperor_escort.json"
const XIAN_FORTIFIED_CONVERSATION_ID := "xian_fortified_road_supplies"
const XIAN_PRESSED_CONVERSATION_ID := "xian_forced_march_canteens"
const WAN_SCENARIO_ID := "008_wan_castle_escape"
const WAN_SCENARIO_PATH := "res://data/scenarios/008_wan_castle_escape.json"
const WAN_COURT_CONVERSATION_ID := "wan_court_seal_postern"
const WAN_PURSUIT_CONVERSATION_ID := "wan_hard_pursuit_drums"
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"
@@ -43,6 +47,7 @@ func _init() -> void:
_check_puyang_raid_camp_supplies(failures)
_check_dingtao_branch_camp_conversations(failures)
_check_xian_branch_camp_conversations(failures)
_check_wan_branch_camp_conversations(failures)
_check_manual_checkpoint_reverts_claim(failures)
_check_completed_replay_cannot_claim(failures)
_check_conditional_camp_conversations(failures)
@@ -412,6 +417,88 @@ func _check_xian_branch_camp_conversations(failures: Array[String]) -> void:
pressed_scene.free()
func _check_wan_branch_camp_conversations(failures: Array[String]) -> void:
var base_scene = _new_prebattle_scene_for(failures, "Wan Castle base camp", WAN_SCENARIO_ID, WAN_SCENARIO_PATH)
if base_scene != null:
if base_scene._camp_conversation_by_id("wan_escape_route_council").is_empty():
failures.append("Wan Castle should expose the escape route council conversation")
if base_scene._camp_conversation_by_id("wan_dian_wei_rear_guard").is_empty():
failures.append("Wan Castle should expose Dian Wei's rear guard conversation")
if not base_scene._camp_conversation_by_id(WAN_COURT_CONVERSATION_ID).is_empty():
failures.append("Wan court seal supplies should be hidden without court flag")
if not base_scene._camp_conversation_by_id(WAN_PURSUIT_CONVERSATION_ID).is_empty():
failures.append("Wan hard pursuit supplies should be hidden without pursuit flag")
var merchant: Dictionary = base_scene.state.get_shop_merchant()
if str(merchant.get("name", "")) != "Wan Castle Sutler":
failures.append("Wan Castle shop merchant name should be present")
var merchant_lines: Array = merchant.get("lines", [])
if merchant_lines.size() < 2:
failures.append("Wan Castle shop merchant should expose flavor lines")
if base_scene._format_talk_status_text(base_scene._camp_conversation_entries()) != "Camp conversations | 2 topics":
failures.append("Wan Castle base talk status should summarize two non-supply topics")
base_scene.free()
var court_scene = _new_prebattle_scene_for(
failures,
"Wan Castle court seal camp",
WAN_SCENARIO_ID,
WAN_SCENARIO_PATH,
{"secured_imperial_court": true}
)
if court_scene != null:
var postern: Dictionary = court_scene._camp_conversation_by_id(WAN_COURT_CONVERSATION_ID)
if postern.is_empty():
failures.append("court seal flag should expose Wan postern supplies")
if not court_scene._camp_conversation_by_id(WAN_PURSUIT_CONVERSATION_ID).is_empty():
failures.append("court seal flag should not expose Wan hard pursuit drums")
if not postern.is_empty():
if court_scene._format_talk_status_text(court_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Wan court seal talk status should show one ready supply")
if not court_scene._format_camp_conversation_button_text(postern).contains("Supply Bean"):
failures.append("Wan court seal postern button should preview Bean supply")
var before_bean := int(court_scene.campaign_state.get_inventory_snapshot().get("bean", 0))
court_scene._apply_camp_conversation_effects(postern)
if int(court_scene.campaign_state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Wan court seal postern should add Bean to campaign inventory")
if int(court_scene.state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Wan court seal postern should refresh battle Bean inventory")
if not court_scene.campaign_state.has_claimed_camp_conversation_effects(WAN_SCENARIO_ID, WAN_COURT_CONVERSATION_ID):
failures.append("Wan court seal postern claim should be saved")
if court_scene._format_talk_status_text(court_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Wan court seal talk status should show claimed supply after claim")
court_scene.free()
var pursuit_scene = _new_prebattle_scene_for(
failures,
"Wan Castle hard pursuit camp",
WAN_SCENARIO_ID,
WAN_SCENARIO_PATH,
{"pursued_li_jue_remnants": true}
)
if pursuit_scene != null:
var drums: Dictionary = pursuit_scene._camp_conversation_by_id(WAN_PURSUIT_CONVERSATION_ID)
if drums.is_empty():
failures.append("hard pursuit flag should expose Wan hard pursuit drums")
if not pursuit_scene._camp_conversation_by_id(WAN_COURT_CONVERSATION_ID).is_empty():
failures.append("hard pursuit flag should not expose Wan postern supplies")
if not drums.is_empty():
if pursuit_scene._format_talk_status_text(pursuit_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Wan hard pursuit talk status should show one ready supply")
if not pursuit_scene._format_camp_conversation_button_text(drums).contains("Supply Wine"):
failures.append("Wan hard pursuit drums button should preview Wine supply")
var before_wine := int(pursuit_scene.campaign_state.get_inventory_snapshot().get("wine", 0))
pursuit_scene._apply_camp_conversation_effects(drums)
if int(pursuit_scene.campaign_state.get_inventory_snapshot().get("wine", 0)) != before_wine + 1:
failures.append("Wan hard pursuit drums should add Wine to campaign inventory")
if int(pursuit_scene.state.get_inventory_snapshot().get("wine", 0)) != before_wine + 1:
failures.append("Wan hard pursuit drums should refresh battle Wine inventory")
if not pursuit_scene.campaign_state.has_claimed_camp_conversation_effects(WAN_SCENARIO_ID, WAN_PURSUIT_CONVERSATION_ID):
failures.append("Wan hard pursuit drums claim should be saved")
if pursuit_scene._format_talk_status_text(pursuit_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Wan hard pursuit talk status should show claimed supply after claim")
pursuit_scene.free()
func _check_manual_checkpoint_reverts_claim(failures: Array[String]) -> void:
var scene = _new_prebattle_scene(failures, "manual checkpoint")
if scene == null: