Add Xiapi siege camp content

This commit is contained in:
2026-06-19 00:06:43 +09:00
parent 409a4c62d4
commit e2c4f9f360
3 changed files with 270 additions and 1 deletions

View File

@@ -30,6 +30,10 @@ 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 XIAPI_SCENARIO_ID := "009_xiapi_siege"
const XIAPI_SCENARIO_PATH := "res://data/scenarios/009_xiapi_siege.json"
const XIAPI_HELD_CONVERSATION_ID := "xiapi_wan_baggage_dressings"
const XIAPI_SWIFT_CONVERSATION_ID := "xiapi_forced_march_rations"
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"
@@ -48,6 +52,7 @@ func _init() -> void:
_check_dingtao_branch_camp_conversations(failures)
_check_xian_branch_camp_conversations(failures)
_check_wan_branch_camp_conversations(failures)
_check_xiapi_branch_camp_conversations(failures)
_check_manual_checkpoint_reverts_claim(failures)
_check_completed_replay_cannot_claim(failures)
_check_conditional_camp_conversations(failures)
@@ -499,6 +504,88 @@ func _check_wan_branch_camp_conversations(failures: Array[String]) -> void:
pursuit_scene.free()
func _check_xiapi_branch_camp_conversations(failures: Array[String]) -> void:
var base_scene = _new_prebattle_scene_for(failures, "Xiapi base camp", XIAPI_SCENARIO_ID, XIAPI_SCENARIO_PATH)
if base_scene != null:
if base_scene._camp_conversation_by_id("xiapi_floodgate_council").is_empty():
failures.append("Xiapi should expose the floodgate council conversation")
if base_scene._camp_conversation_by_id("xiapi_dian_wei_siege_road").is_empty():
failures.append("Xiapi should expose Dian Wei's siege road conversation")
if not base_scene._camp_conversation_by_id(XIAPI_HELD_CONVERSATION_ID).is_empty():
failures.append("Xiapi Wan baggage dressings should be hidden without held Wan gate flag")
if not base_scene._camp_conversation_by_id(XIAPI_SWIFT_CONVERSATION_ID).is_empty():
failures.append("Xiapi forced march rations should be hidden without swift Wan escape flag")
var merchant: Dictionary = base_scene.state.get_shop_merchant()
if str(merchant.get("name", "")) != "Xiapi Flood-Gate Sutler":
failures.append("Xiapi shop merchant name should be present")
var merchant_lines: Array = merchant.get("lines", [])
if merchant_lines.size() < 2:
failures.append("Xiapi shop merchant should expose flavor lines")
if base_scene._format_talk_status_text(base_scene._camp_conversation_entries()) != "Camp conversations | 2 topics":
failures.append("Xiapi base talk status should summarize two non-supply topics")
base_scene.free()
var held_scene = _new_prebattle_scene_for(
failures,
"Xiapi held Wan gate camp",
XIAPI_SCENARIO_ID,
XIAPI_SCENARIO_PATH,
{"held_wan_gate": true}
)
if held_scene != null:
var dressings: Dictionary = held_scene._camp_conversation_by_id(XIAPI_HELD_CONVERSATION_ID)
if dressings.is_empty():
failures.append("held Wan gate flag should expose Xiapi Wan baggage dressings")
if not held_scene._camp_conversation_by_id(XIAPI_SWIFT_CONVERSATION_ID).is_empty():
failures.append("held Wan gate flag should not expose Xiapi forced march rations")
if not dressings.is_empty():
if held_scene._format_talk_status_text(held_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Xiapi held Wan gate talk status should show one ready supply")
if not held_scene._format_camp_conversation_button_text(dressings).contains("Supply Panacea"):
failures.append("Xiapi Wan baggage dressings button should preview Panacea supply")
var before_panacea := int(held_scene.campaign_state.get_inventory_snapshot().get("panacea", 0))
held_scene._apply_camp_conversation_effects(dressings)
if int(held_scene.campaign_state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1:
failures.append("Xiapi Wan baggage dressings should add Panacea to campaign inventory")
if int(held_scene.state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1:
failures.append("Xiapi Wan baggage dressings should refresh battle Panacea inventory")
if not held_scene.campaign_state.has_claimed_camp_conversation_effects(XIAPI_SCENARIO_ID, XIAPI_HELD_CONVERSATION_ID):
failures.append("Xiapi Wan baggage dressings claim should be saved")
if held_scene._format_talk_status_text(held_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Xiapi held Wan gate talk status should show claimed supply after claim")
held_scene.free()
var swift_scene = _new_prebattle_scene_for(
failures,
"Xiapi swift Wan escape camp",
XIAPI_SCENARIO_ID,
XIAPI_SCENARIO_PATH,
{"swift_wan_escape": true}
)
if swift_scene != null:
var rations: Dictionary = swift_scene._camp_conversation_by_id(XIAPI_SWIFT_CONVERSATION_ID)
if rations.is_empty():
failures.append("swift Wan escape flag should expose Xiapi forced march rations")
if not swift_scene._camp_conversation_by_id(XIAPI_HELD_CONVERSATION_ID).is_empty():
failures.append("swift Wan escape flag should not expose Xiapi Wan baggage dressings")
if not rations.is_empty():
if swift_scene._format_talk_status_text(swift_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Xiapi swift Wan escape talk status should show one ready supply")
if not swift_scene._format_camp_conversation_button_text(rations).contains("Supply Bean"):
failures.append("Xiapi forced march rations button should preview Bean supply")
var before_bean := int(swift_scene.campaign_state.get_inventory_snapshot().get("bean", 0))
swift_scene._apply_camp_conversation_effects(rations)
if int(swift_scene.campaign_state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Xiapi forced march rations should add Bean to campaign inventory")
if int(swift_scene.state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Xiapi forced march rations should refresh battle Bean inventory")
if not swift_scene.campaign_state.has_claimed_camp_conversation_effects(XIAPI_SCENARIO_ID, XIAPI_SWIFT_CONVERSATION_ID):
failures.append("Xiapi forced march rations claim should be saved")
if swift_scene._format_talk_status_text(swift_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Xiapi swift Wan escape talk status should show claimed supply after claim")
swift_scene.free()
func _check_manual_checkpoint_reverts_claim(failures: Array[String]) -> void:
var scene = _new_prebattle_scene(failures, "manual checkpoint")
if scene == null: