Add Puyang raid camp content

This commit is contained in:
2026-06-18 23:38:09 +09:00
parent 684332c6d8
commit 201adb3bbc
3 changed files with 231 additions and 1 deletions

View File

@@ -13,6 +13,11 @@ 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 PUYANG_SCENARIO_ID := "005_puyang_raid"
const PUYANG_SCENARIO_PATH := "res://data/scenarios/005_puyang_raid.json"
const PUYANG_CONVERSATION_ID := "puyang_raider_stores"
const PUYANG_PURSUIT_CONVERSATION_ID := "puyang_hardened_vanguard"
const PUYANG_REGROUP_CONVERSATION_ID := "puyang_qingzhou_reserve_wagon"
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"
@@ -27,6 +32,7 @@ func _init() -> void:
_check_claim_updates_campaign_and_battle(failures)
_check_shop_and_armory_preserve_claim(failures)
_check_sishui_gate_camp_supplies(failures)
_check_puyang_raid_camp_supplies(failures)
_check_manual_checkpoint_reverts_claim(failures)
_check_completed_replay_cannot_claim(failures)
_check_conditional_camp_conversations(failures)
@@ -136,6 +142,102 @@ func _check_sishui_gate_camp_supplies(failures: Array[String]) -> void:
scene.free()
func _check_puyang_raid_camp_supplies(failures: Array[String]) -> void:
var scene = _new_prebattle_scene_for(failures, "Puyang raid camp supplies", PUYANG_SCENARIO_ID, PUYANG_SCENARIO_PATH)
if scene == null:
return
if scene._camp_conversation_by_id("puyang_night_raid_council").is_empty():
failures.append("Puyang should expose the night raid council conversation")
if scene._camp_conversation_by_id("puyang_dian_wei_shield").is_empty():
failures.append("Puyang should expose Dian Wei's officer conversation")
if not scene._camp_conversation_by_id(PUYANG_PURSUIT_CONVERSATION_ID).is_empty():
failures.append("Puyang pursuit supplies should be hidden without pursuit flag")
if not scene._camp_conversation_by_id(PUYANG_REGROUP_CONVERSATION_ID).is_empty():
failures.append("Puyang regroup supplies should be hidden without regroup flag")
var conversation: Dictionary = scene._camp_conversation_by_id(PUYANG_CONVERSATION_ID)
if conversation.is_empty():
failures.append("Puyang should expose raider stores conversation")
scene.free()
return
var merchant: Dictionary = scene.state.get_shop_merchant()
if str(merchant.get("name", "")) != "Puyang Night Trader":
failures.append("Puyang shop merchant name should be present")
var merchant_lines: Array = merchant.get("lines", [])
if merchant_lines.size() < 2:
failures.append("Puyang shop merchant should expose flavor lines")
if scene._format_talk_status_text(scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Puyang talk status should show one ready supply")
if not scene._format_camp_conversation_button_text(conversation).contains("Supply Bean"):
failures.append("Puyang raider stores button should preview Bean supply")
var before_bean := int(scene.campaign_state.get_inventory_snapshot().get("bean", 0))
scene._apply_camp_conversation_effects(conversation)
if int(scene.campaign_state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Puyang raider stores should add Bean to campaign inventory")
if int(scene.state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Puyang raider stores should refresh battle Bean inventory")
if not scene.campaign_state.has_claimed_camp_conversation_effects(PUYANG_SCENARIO_ID, PUYANG_CONVERSATION_ID):
failures.append("Puyang raider stores claim should be saved")
if scene._format_talk_status_text(scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Puyang talk status should show claimed supply after claim")
scene.free()
var pursuit_scene = _new_prebattle_scene_for(
failures,
"Puyang pursuit camp supplies",
PUYANG_SCENARIO_ID,
PUYANG_SCENARIO_PATH,
{"pursued_dong_zhuo": true}
)
if pursuit_scene != null:
var vanguard: Dictionary = pursuit_scene._camp_conversation_by_id(PUYANG_PURSUIT_CONVERSATION_ID)
if vanguard.is_empty():
failures.append("Puyang pursuit flag should expose hardened vanguard supplies")
if not pursuit_scene._camp_conversation_by_id(PUYANG_REGROUP_CONVERSATION_ID).is_empty():
failures.append("Puyang pursuit flag should not expose Qingzhou reserve wagon")
if not vanguard.is_empty():
if pursuit_scene._format_talk_status_text(pursuit_scene._camp_conversation_entries()) != "Camp conversations | 4 topics | 2 supplies ready":
failures.append("Puyang pursuit talk status should show two ready supplies")
if not pursuit_scene._format_camp_conversation_button_text(vanguard).contains("Supply Wine"):
failures.append("Puyang hardened vanguard 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(vanguard)
if int(pursuit_scene.campaign_state.get_inventory_snapshot().get("wine", 0)) != before_wine + 1:
failures.append("Puyang hardened vanguard should add Wine to campaign inventory")
if int(pursuit_scene.state.get_inventory_snapshot().get("wine", 0)) != before_wine + 1:
failures.append("Puyang hardened vanguard should refresh battle Wine inventory")
if not pursuit_scene.campaign_state.has_claimed_camp_conversation_effects(PUYANG_SCENARIO_ID, PUYANG_PURSUIT_CONVERSATION_ID):
failures.append("Puyang hardened vanguard claim should be saved")
pursuit_scene.free()
var regroup_scene = _new_prebattle_scene_for(
failures,
"Puyang regroup camp supplies",
PUYANG_SCENARIO_ID,
PUYANG_SCENARIO_PATH,
{"regrouped_after_sishui": true}
)
if regroup_scene != null:
var reserve: Dictionary = regroup_scene._camp_conversation_by_id(PUYANG_REGROUP_CONVERSATION_ID)
if reserve.is_empty():
failures.append("Puyang regroup flag should expose Qingzhou reserve wagon")
if not regroup_scene._camp_conversation_by_id(PUYANG_PURSUIT_CONVERSATION_ID).is_empty():
failures.append("Puyang regroup flag should not expose hardened vanguard")
if not reserve.is_empty():
if regroup_scene._format_talk_status_text(regroup_scene._camp_conversation_entries()) != "Camp conversations | 4 topics | 2 supplies ready":
failures.append("Puyang regroup talk status should show two ready supplies")
if not regroup_scene._format_camp_conversation_button_text(reserve).contains("Supply Panacea"):
failures.append("Puyang Qingzhou reserve button should preview Panacea supply")
var before_panacea := int(regroup_scene.campaign_state.get_inventory_snapshot().get("panacea", 0))
regroup_scene._apply_camp_conversation_effects(reserve)
if int(regroup_scene.campaign_state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1:
failures.append("Puyang Qingzhou reserve should add Panacea to campaign inventory")
if int(regroup_scene.state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1:
failures.append("Puyang Qingzhou reserve should refresh battle Panacea inventory")
if not regroup_scene.campaign_state.has_claimed_camp_conversation_effects(PUYANG_SCENARIO_ID, PUYANG_REGROUP_CONVERSATION_ID):
failures.append("Puyang Qingzhou reserve claim should be saved")
regroup_scene.free()
func _check_manual_checkpoint_reverts_claim(failures: Array[String]) -> void:
var scene = _new_prebattle_scene(failures, "manual checkpoint")
if scene == null: