diff --git a/data/scenarios/027_jiangling_chase.json b/data/scenarios/027_jiangling_chase.json index b988803..a286014 100644 --- a/data/scenarios/027_jiangling_chase.json +++ b/data/scenarios/027_jiangling_chase.json @@ -32,6 +32,59 @@ "Secured crossings behind the army keep the road open, letting Cao Cao approach Jiangling with ordered columns instead of scattered pursuit." ] } + ], + "camp_conversations": [ + { + "id": "jiangling_storehouse_council", + "group": "topic", + "label": "Storehouse Council", + "speaker": "Cao Cao", + "summary": "Set the army's purpose before Jiangling's grain and river roads decide the next campaign.", + "lines": [ + { "speaker": "Cao Cao", "side": "left", "text": "Jiangling is more than a gate. Grain, boats, ledgers, and officials all wait behind one frightened road." }, + { "speaker": "Guo Jia", "side": "right", "text": "Then we must take the storehouses whole. A burned granary feeds only rumor." }, + { "speaker": "Zhang He", "side": "right", "text": "Their defenders are guarding carts as if each cart were a banner. That tells us where their courage is tied." } + ] + }, + { + "id": "jiangling_zhang_he_granary_road", + "group": "officer", + "officer_id": "zhang_he", + "label": "Zhang He - Granary Road", + "summary": "Hear Zhang He's reading of Jiangling's storehouse defenders before the city line breaks.", + "lines": [ + { "speaker": "Zhang He", "side": "right", "text": "A soldier protecting grain fears two defeats: losing the battle and losing tomorrow's meal." }, + { "speaker": "Cao Cao", "side": "left", "text": "Then spare the grain and remove the soldier from it." } + ] + }, + { + "id": "jiangling_fast_column_beans", + "group": "topic", + "label": "Fast Column Beans", + "summary": "The cavalry chase from Changban leaves hard travel beans for the first column at Jiangling.", + "campaign_flags": { "pressed_jiangling_chase": true }, + "effects": [ + { "type": "grant_item", "item_id": "bean", "count": 1, "text": "The fast column beans add a Bean to the field supplies." } + ], + "lines": [ + { "speaker": "Xiahou Yuan", "side": "left", "text": "The fast column reached Jiangling with dust in its teeth and beans still dry enough to crack." }, + { "speaker": "Cao Cao", "side": "right", "text": "Give them to the men who can still run after eating." } + ] + }, + { + "id": "jiangling_crossing_medicine", + "group": "topic", + "label": "Crossing Medicine", + "summary": "Secured Changban crossings bring clean medicine into the Jiangling march.", + "campaign_flags": { "secured_changban_crossings": true }, + "effects": [ + { "type": "grant_item", "item_id": "panacea", "count": 1, "text": "The crossing medicine adds a Panacea to the field supplies." } + ], + "lines": [ + { "speaker": "Cao Ren", "side": "left", "text": "Because Changban's crossings stayed marked, the medicine wagons reached us without being pulled apart by stragglers." }, + { "speaker": "Cao Cao", "side": "right", "text": "A secured road heals men before the physician opens his box." } + ] + } ] }, "shop": { @@ -55,7 +108,14 @@ "campaign_flags": { "secured_changban_crossings": true }, "items": ["imperial_seal"] } - ] + ], + "merchant": { + "name": "Jiangling Storehouse Sutler", + "lines": [ + "Jiangling stores grain by the wall and fear by the basket, my lord. I trade in cleaner measures.", + "Buy before the river officials remember how quickly ledgers burn." + ] + } }, "roster": { "max_units": 7, diff --git a/data/scenarios/028_xiakou_pursuit.json b/data/scenarios/028_xiakou_pursuit.json index 648bfa8..c898295 100644 --- a/data/scenarios/028_xiakou_pursuit.json +++ b/data/scenarios/028_xiakou_pursuit.json @@ -59,7 +59,7 @@ }, "roster": { "max_units": 7, - "required_officers": ["cao_cao", "guo_jia"] + "required_officers": ["cao_cao", "guo_jia", "zhang_he"] }, "formation": { "cells": [[1, 3], [1, 4], [1, 5], [2, 2], [2, 3], [2, 4], [2, 5], [2, 6], [3, 2], [3, 3], [3, 4], [3, 5], [3, 6]] diff --git a/tools/smoke_camp_conversation_rewards.gd b/tools/smoke_camp_conversation_rewards.gd index 0d2b338..3426fb8 100644 --- a/tools/smoke_camp_conversation_rewards.gd +++ b/tools/smoke_camp_conversation_rewards.gd @@ -102,6 +102,10 @@ const CHANGBAN_VANGUARD_RATIONS_CONVERSATION_ID := "changban_vanguard_rations" const CHANGBAN_HAN_MEDICINE_CONVERSATION_ID := "changban_han_supply_medicine" const JIANGLING_SCENARIO_ID := "027_jiangling_chase" const JIANGLING_SCENARIO_PATH := "res://data/scenarios/027_jiangling_chase.json" +const JIANGLING_FAST_BEANS_CONVERSATION_ID := "jiangling_fast_column_beans" +const JIANGLING_CROSSING_MEDICINE_CONVERSATION_ID := "jiangling_crossing_medicine" +const XIAKOU_SCENARIO_ID := "028_xiakou_pursuit" +const XIAKOU_SCENARIO_PATH := "res://data/scenarios/028_xiakou_pursuit.json" const SAVE_PATH := "user://campaign_save.json" const MANUAL_SAVE_PATH := "user://campaign_manual_save.json" @@ -137,6 +141,7 @@ func _init() -> void: _check_liaodong_post_battle_choice_bridges_to_xinye(failures) _check_xinye_post_battle_choice_bridges_to_changban(failures) _check_changban_post_battle_choice_bridges_to_jiangling(failures) + _check_jiangling_post_battle_choice_bridges_to_xiakou(failures) _check_manual_checkpoint_reverts_claim(failures) _check_completed_replay_cannot_claim(failures) _check_conditional_camp_conversations(failures) @@ -155,6 +160,7 @@ func _init() -> void: _check_liaodong_branch_camp_conversations(failures) _check_xinye_branch_camp_conversations(failures) _check_changban_branch_camp_conversations(failures) + _check_jiangling_branch_camp_conversations(failures) _check_talk_menu_closes_on_cancel_and_reload(failures) if not _restore_user_file(SAVE_PATH, save_backup): @@ -1299,6 +1305,25 @@ func _check_changban_post_battle_choice_bridges_to_jiangling(failures: Array[Str ) +func _check_jiangling_post_battle_choice_bridges_to_xiakou(failures: Array[String]) -> void: + _check_jiangling_choice_branch_to_xiakou( + failures, + "press_xiakou_pursuit", + "pressed_xiakou_pursuit", + "secured_jiangling_storehouses", + "war_drum", + "imperial_seal" + ) + _check_jiangling_choice_branch_to_xiakou( + failures, + "secure_jiangling_storehouses", + "secured_jiangling_storehouses", + "pressed_xiakou_pursuit", + "imperial_seal", + "war_drum" + ) + + func _check_wuchao_choice_branch_to_cangting( failures: Array[String], choice_id: String, @@ -2321,6 +2346,79 @@ func _check_changban_choice_branch_to_jiangling( scene.free() +func _check_jiangling_choice_branch_to_xiakou( + failures: Array[String], + choice_id: String, + expected_flag: String, + cleared_flag: String, + expected_shop_item_id: String, + hidden_shop_item_id: String +) -> void: + var scene = _new_prebattle_scene_for(failures, "Jiangling choice bridge %s" % choice_id, JIANGLING_SCENARIO_ID, JIANGLING_SCENARIO_PATH) + if scene == null: + return + if not scene.campaign_state.joined_officers.has("zhang_he"): + scene.campaign_state.joined_officers.append("zhang_he") + if not scene.state.load_battle( + JIANGLING_SCENARIO_PATH, + scene.campaign_state.get_roster_overrides(), + scene.campaign_state.get_inventory_snapshot(), + scene.campaign_state.get_flags_snapshot(), + scene.campaign_state.get_joined_officers_snapshot() + ): + failures.append("Jiangling choice bridge %s could not reload Jiangling with Zhang He joined" % choice_id) + scene.free() + return + scene.state.battle_status = "victory" + var result: Dictionary = scene.campaign_state.apply_battle_result(scene.state) + if not bool(result.get("saved", false)): + failures.append("Jiangling choice bridge %s should save 027 victory" % choice_id) + scene.free() + return + if not scene.campaign_state.get_joined_officers_snapshot().has("zhang_he"): + failures.append("Jiangling choice bridge %s should keep Zhang He before Xiakou" % choice_id) + if bool(result.get("choice_applied", true)): + failures.append("Jiangling choice bridge %s should wait for a selected post-battle choice" % choice_id) + if scene.campaign_state.pending_post_battle_choice_scenario_id != JIANGLING_SCENARIO_ID: + failures.append("Jiangling choice bridge %s should mark Jiangling choice pending" % choice_id) + var choice := _find_choice_by_id(result.get("post_battle_choices", []), choice_id) + if choice.is_empty(): + failures.append("Jiangling choice bridge missing choice: %s" % choice_id) + scene.free() + return + if not scene.campaign_state.try_apply_post_battle_choice(choice, JIANGLING_SCENARIO_ID): + failures.append("Jiangling choice bridge %s should save selected choice" % choice_id) + scene.free() + return + var flags: Dictionary = scene.campaign_state.get_flags_snapshot() + if flags.get(expected_flag, false) != true: + failures.append("Jiangling choice bridge %s should set %s" % [choice_id, expected_flag]) + if flags.get(cleared_flag, true) != false: + failures.append("Jiangling choice bridge %s should clear %s" % [choice_id, cleared_flag]) + if scene.campaign_state.current_scenario_id != XIAKOU_SCENARIO_ID: + failures.append("Jiangling choice bridge %s should advance to Xiakou, got %s" % [choice_id, scene.campaign_state.current_scenario_id]) + if not scene.state.load_battle( + XIAKOU_SCENARIO_PATH, + scene.campaign_state.get_roster_overrides(), + scene.campaign_state.get_inventory_snapshot(), + flags, + scene.campaign_state.get_joined_officers_snapshot() + ): + failures.append("Jiangling choice bridge %s could not load Xiakou" % choice_id) + scene.free() + return + if scene.state.get_unit("zhang_he_ch28").is_empty(): + failures.append("Jiangling choice bridge %s should deploy Zhang He in Xiakou" % choice_id) + elif not scene.state.is_required_deployment("zhang_he_ch28"): + failures.append("Jiangling choice bridge %s should require Zhang He in Xiakou" % choice_id) + var shop_items: Array = scene.state.get_shop_item_ids() + if not shop_items.has(expected_shop_item_id): + failures.append("Jiangling choice bridge %s should expose shop item %s" % [choice_id, expected_shop_item_id]) + if shop_items.has(hidden_shop_item_id): + failures.append("Jiangling choice bridge %s should hide shop item %s" % [choice_id, hidden_shop_item_id]) + scene.free() + + func _find_choice_by_id(choices, choice_id: String) -> Dictionary: if typeof(choices) != TYPE_ARRAY: return {} @@ -3696,6 +3794,121 @@ func _check_changban_branch_camp_conversations(failures: Array[String]) -> void: supply_scene.free() +func _check_jiangling_branch_camp_conversations(failures: Array[String]) -> void: + var base_scene = _new_prebattle_scene_for(failures, "Jiangling base camp", JIANGLING_SCENARIO_ID, JIANGLING_SCENARIO_PATH) + if base_scene != null: + if not base_scene.campaign_state.joined_officers.has("zhang_he"): + base_scene.campaign_state.joined_officers.append("zhang_he") + if not base_scene.state.load_battle( + JIANGLING_SCENARIO_PATH, + base_scene.campaign_state.get_roster_overrides(), + base_scene.campaign_state.get_inventory_snapshot(), + base_scene.campaign_state.get_flags_snapshot(), + base_scene.campaign_state.get_joined_officers_snapshot() + ): + failures.append("Jiangling base camp should reload with Zhang He joined") + else: + if base_scene._camp_conversation_by_id("jiangling_storehouse_council").is_empty(): + failures.append("Jiangling should expose the storehouse council conversation") + if base_scene._camp_conversation_by_id("jiangling_zhang_he_granary_road").is_empty(): + failures.append("Jiangling should expose Zhang He's granary road conversation") + if not base_scene._camp_conversation_by_id(JIANGLING_FAST_BEANS_CONVERSATION_ID).is_empty(): + failures.append("Jiangling fast beans should be hidden without pressed Jiangling flag") + if not base_scene._camp_conversation_by_id(JIANGLING_CROSSING_MEDICINE_CONVERSATION_ID).is_empty(): + failures.append("Jiangling crossing medicine should be hidden without secured crossings flag") + var merchant: Dictionary = base_scene.state.get_shop_merchant() + if str(merchant.get("name", "")) != "Jiangling Storehouse Sutler": + failures.append("Jiangling shop merchant name should be present") + var merchant_lines: Array = merchant.get("lines", []) + if merchant_lines.size() < 2: + failures.append("Jiangling shop merchant should expose flavor lines") + if base_scene._format_talk_status_text(base_scene._camp_conversation_entries()) != "Camp conversations | 2 topics": + failures.append("Jiangling base talk status should summarize two non-supply topics") + base_scene.free() + + var chase_scene = _new_prebattle_scene_for( + failures, + "Jiangling pressed chase camp", + JIANGLING_SCENARIO_ID, + JIANGLING_SCENARIO_PATH, + {"pressed_jiangling_chase": true} + ) + if chase_scene != null: + if not chase_scene.campaign_state.joined_officers.has("zhang_he"): + chase_scene.campaign_state.joined_officers.append("zhang_he") + if not chase_scene.state.load_battle( + JIANGLING_SCENARIO_PATH, + chase_scene.campaign_state.get_roster_overrides(), + chase_scene.campaign_state.get_inventory_snapshot(), + chase_scene.campaign_state.get_flags_snapshot(), + chase_scene.campaign_state.get_joined_officers_snapshot() + ): + failures.append("Jiangling pressed chase camp should reload with Zhang He joined") + else: + var fast_beans: Dictionary = chase_scene._camp_conversation_by_id(JIANGLING_FAST_BEANS_CONVERSATION_ID) + if fast_beans.is_empty(): + failures.append("pressed Jiangling chase flag should expose Jiangling fast beans") + if not chase_scene._camp_conversation_by_id(JIANGLING_CROSSING_MEDICINE_CONVERSATION_ID).is_empty(): + failures.append("pressed Jiangling chase flag should not expose Jiangling crossing medicine") + if not fast_beans.is_empty(): + if chase_scene._format_talk_status_text(chase_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready": + failures.append("Jiangling chase talk status should show one ready supply") + if not chase_scene._format_camp_conversation_button_text(fast_beans).contains("Supply Bean"): + failures.append("Jiangling fast beans button should show Bean supply") + var before_bean := int(chase_scene.campaign_state.get_inventory_snapshot().get("bean", 0)) + chase_scene._apply_camp_conversation_effects(fast_beans) + if int(chase_scene.campaign_state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1: + failures.append("Jiangling fast beans should add Bean to campaign inventory") + if int(chase_scene.state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1: + failures.append("Jiangling fast beans should refresh battle Bean inventory") + if not chase_scene.campaign_state.has_claimed_camp_conversation_effects(JIANGLING_SCENARIO_ID, JIANGLING_FAST_BEANS_CONVERSATION_ID): + failures.append("Jiangling fast beans claim should be saved") + if chase_scene._format_talk_status_text(chase_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed": + failures.append("Jiangling chase talk status should show claimed supply after claim") + chase_scene.free() + + var crossings_scene = _new_prebattle_scene_for( + failures, + "Jiangling secured crossings camp", + JIANGLING_SCENARIO_ID, + JIANGLING_SCENARIO_PATH, + {"secured_changban_crossings": true} + ) + if crossings_scene != null: + if not crossings_scene.campaign_state.joined_officers.has("zhang_he"): + crossings_scene.campaign_state.joined_officers.append("zhang_he") + if not crossings_scene.state.load_battle( + JIANGLING_SCENARIO_PATH, + crossings_scene.campaign_state.get_roster_overrides(), + crossings_scene.campaign_state.get_inventory_snapshot(), + crossings_scene.campaign_state.get_flags_snapshot(), + crossings_scene.campaign_state.get_joined_officers_snapshot() + ): + failures.append("Jiangling secured crossings camp should reload with Zhang He joined") + else: + var crossing_medicine: Dictionary = crossings_scene._camp_conversation_by_id(JIANGLING_CROSSING_MEDICINE_CONVERSATION_ID) + if crossing_medicine.is_empty(): + failures.append("secured Changban crossings flag should expose Jiangling crossing medicine") + if not crossings_scene._camp_conversation_by_id(JIANGLING_FAST_BEANS_CONVERSATION_ID).is_empty(): + failures.append("secured Changban crossings flag should not expose Jiangling fast beans") + if not crossing_medicine.is_empty(): + if crossings_scene._format_talk_status_text(crossings_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready": + failures.append("Jiangling crossings talk status should show one ready supply") + if not crossings_scene._format_camp_conversation_button_text(crossing_medicine).contains("Supply Panacea"): + failures.append("Jiangling crossing medicine button should show Panacea supply") + var before_panacea := int(crossings_scene.campaign_state.get_inventory_snapshot().get("panacea", 0)) + crossings_scene._apply_camp_conversation_effects(crossing_medicine) + if int(crossings_scene.campaign_state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1: + failures.append("Jiangling crossing medicine should add Panacea to campaign inventory") + if int(crossings_scene.state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1: + failures.append("Jiangling crossing medicine should refresh battle Panacea inventory") + if not crossings_scene.campaign_state.has_claimed_camp_conversation_effects(JIANGLING_SCENARIO_ID, JIANGLING_CROSSING_MEDICINE_CONVERSATION_ID): + failures.append("Jiangling crossing medicine claim should be saved") + if crossings_scene._format_talk_status_text(crossings_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed": + failures.append("Jiangling crossings talk status should show claimed supply after claim") + crossings_scene.free() + + func _check_talk_menu_closes_on_cancel_and_reload(failures: Array[String]) -> void: var scene = _new_prebattle_scene(failures, "talk menu close guards") if scene == null: diff --git a/tools/smoke_visual_assets.gd b/tools/smoke_visual_assets.gd index 0e27a72..8f9341f 100644 --- a/tools/smoke_visual_assets.gd +++ b/tools/smoke_visual_assets.gd @@ -1750,6 +1750,17 @@ func _check_battle_visual_data(failures: Array[String]) -> void: failures.append("could not load Jiangling Chase data") else: _check_shop_items_unique(failures, jiangling_state, "027 base") + var jiangling_conversations: Array = jiangling_state.get_briefing().get("camp_conversations", []) + if jiangling_conversations.size() != 2: + failures.append("027 base briefing should expose exactly two camp conversations") + else: + _check_camp_conversation(failures, jiangling_conversations[0], "jiangling_storehouse_council", "topic", "") + _check_camp_conversation(failures, jiangling_conversations[1], "jiangling_zhang_he_granary_road", "officer", "zhang_he") + var jiangling_merchant := jiangling_state.get_shop_merchant() + if str(jiangling_merchant.get("name", "")) != "Jiangling Storehouse Sutler": + failures.append("027 shop should expose Jiangling Storehouse merchant name") + if (jiangling_merchant.get("lines", []) as Array).size() < 2: + failures.append("027 shop should expose merchant flavor lines") if jiangling_state.get_unit("zhang_he_ch27").is_empty() or not jiangling_state.is_required_deployment("zhang_he_ch27"): failures.append("027 should deploy Zhang He as a required officer") _check_shop_item_visibility(failures, jiangling_state, "war_drum", false, "027 base") @@ -1759,6 +1770,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void: if not jiangling_chase_state.load_battle("res://data/scenarios/027_jiangling_chase.json", {}, {}, {"pressed_jiangling_chase": true}, ["zhang_he"]): failures.append("could not load Jiangling pressed chase data") else: + var fast_beans: Dictionary = _find_camp_conversation( + jiangling_chase_state.get_briefing().get("camp_conversations", []), + "jiangling_fast_column_beans" + ) + if fast_beans.is_empty(): + failures.append("027 pressed Jiangling chase should expose fast column beans") + else: + _check_camp_conversation_effect(failures, fast_beans, "bean", 1) + if not _find_camp_conversation( + jiangling_chase_state.get_briefing().get("camp_conversations", []), + "jiangling_crossing_medicine" + ).is_empty(): + failures.append("027 pressed Jiangling chase should not expose crossing medicine") _check_shop_item_visibility(failures, jiangling_chase_state, "war_drum", true, "027 pressed Jiangling chase") _check_shop_item_visibility(failures, jiangling_chase_state, "imperial_seal", false, "027 pressed Jiangling chase") @@ -1766,6 +1790,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void: if not jiangling_crossings_state.load_battle("res://data/scenarios/027_jiangling_chase.json", {}, {}, {"secured_changban_crossings": true}, ["zhang_he"]): failures.append("could not load Jiangling secured crossings data") else: + var crossing_medicine: Dictionary = _find_camp_conversation( + jiangling_crossings_state.get_briefing().get("camp_conversations", []), + "jiangling_crossing_medicine" + ) + if crossing_medicine.is_empty(): + failures.append("027 secured Changban crossings should expose crossing medicine") + else: + _check_camp_conversation_effect(failures, crossing_medicine, "panacea", 1) + if not _find_camp_conversation( + jiangling_crossings_state.get_briefing().get("camp_conversations", []), + "jiangling_fast_column_beans" + ).is_empty(): + failures.append("027 secured Changban crossings should not expose fast column beans") _check_shop_item_visibility(failures, jiangling_crossings_state, "imperial_seal", true, "027 secured Changban crossings") _check_shop_item_visibility(failures, jiangling_crossings_state, "war_drum", false, "027 secured Changban crossings") @@ -1776,6 +1813,48 @@ func _check_battle_visual_data(failures: Array[String]) -> void: _check_shop_items_unique(failures, jiangling_old_flags_state, "027 old Changban setup flags") _check_shop_item_visibility(failures, jiangling_old_flags_state, "war_drum", false, "027 old Changban setup flags") _check_shop_item_visibility(failures, jiangling_old_flags_state, "imperial_seal", false, "027 old Changban setup flags") + if not _find_camp_conversation( + jiangling_old_flags_state.get_briefing().get("camp_conversations", []), + "jiangling_fast_column_beans" + ).is_empty(): + failures.append("027 old Changban setup flags should not expose fast column beans") + if not _find_camp_conversation( + jiangling_old_flags_state.get_briefing().get("camp_conversations", []), + "jiangling_crossing_medicine" + ).is_empty(): + failures.append("027 old Changban setup flags should not expose crossing medicine") + + var xiakou_state = BattleStateScript.new() + if not xiakou_state.load_battle("res://data/scenarios/028_xiakou_pursuit.json", {}, {}, {}, ["zhang_he"]): + failures.append("could not load Xiakou Pursuit data") + else: + _check_shop_items_unique(failures, xiakou_state, "028 base") + if xiakou_state.get_unit("zhang_he_ch28").is_empty() or not xiakou_state.is_required_deployment("zhang_he_ch28"): + failures.append("028 should deploy Zhang He as a required officer") + _check_shop_item_visibility(failures, xiakou_state, "war_drum", false, "028 base") + _check_shop_item_visibility(failures, xiakou_state, "imperial_seal", false, "028 base") + + var xiakou_pursuit_state = BattleStateScript.new() + if not xiakou_pursuit_state.load_battle("res://data/scenarios/028_xiakou_pursuit.json", {}, {}, {"pressed_xiakou_pursuit": true}, ["zhang_he"]): + failures.append("could not load Xiakou pressed pursuit data") + else: + _check_shop_item_visibility(failures, xiakou_pursuit_state, "war_drum", true, "028 pressed Xiakou pursuit") + _check_shop_item_visibility(failures, xiakou_pursuit_state, "imperial_seal", false, "028 pressed Xiakou pursuit") + + var xiakou_store_state = BattleStateScript.new() + if not xiakou_store_state.load_battle("res://data/scenarios/028_xiakou_pursuit.json", {}, {}, {"secured_jiangling_storehouses": true}, ["zhang_he"]): + failures.append("could not load Xiakou secured Jiangling stores data") + else: + _check_shop_item_visibility(failures, xiakou_store_state, "imperial_seal", true, "028 secured Jiangling stores") + _check_shop_item_visibility(failures, xiakou_store_state, "war_drum", false, "028 secured Jiangling stores") + + var xiakou_old_flags_state = BattleStateScript.new() + if not xiakou_old_flags_state.load_battle("res://data/scenarios/028_xiakou_pursuit.json", {}, {}, {"pressed_jiangling_chase": true, "secured_changban_crossings": true}, ["zhang_he"]): + failures.append("could not load Xiakou old Jiangling setup flag data") + else: + _check_shop_items_unique(failures, xiakou_old_flags_state, "028 old Jiangling setup flags") + _check_shop_item_visibility(failures, xiakou_old_flags_state, "war_drum", false, "028 old Jiangling setup flags") + _check_shop_item_visibility(failures, xiakou_old_flags_state, "imperial_seal", false, "028 old Jiangling setup flags") for item_id in ["bronze_sword", "training_spear", "short_bow", "hand_axe", "iron_armor", "panacea"]: var item := state.get_item_def(item_id)