Add Red Cliffs fire camp and Huarong bridge

This commit is contained in:
2026-06-19 04:14:02 +09:00
parent af7e41eafd
commit bbf613b2c3
4 changed files with 354 additions and 2 deletions

View File

@@ -32,6 +32,59 @@
"The night raid has unsettled the coalition, yet scattered torches on the river suggest their fire plan survived the blow."
]
}
],
"camp_conversations": [
{
"id": "red_cliffs_fire_smoke_council",
"group": "topic",
"label": "Smoke Council",
"speaker": "Cao Cao",
"summary": "Set the army's mind before Red Cliffs' fire turns fleet order into retreat.",
"lines": [
{ "speaker": "Cao Cao", "side": "left", "text": "The river has shown its teeth. Fire, wind, and fear now pull at the same chain." },
{ "speaker": "Guo Jia", "side": "right", "text": "Then we must cut the plan, not only the fire ships. A burned fleet can still retreat; a burned mind cannot." },
{ "speaker": "Zhang He", "side": "right", "text": "Their flames are aimed at order. If we keep formation through smoke, their fire loses half its blade." }
]
},
{
"id": "red_cliffs_zhang_he_fire_boats",
"group": "officer",
"officer_id": "zhang_he",
"label": "Zhang He - Fire Boats",
"summary": "Hear Zhang He's reading of the fire boats before Red Cliffs breaks into smoke.",
"lines": [
{ "speaker": "Zhang He", "side": "right", "text": "Those boats approach like men already paid for death. Stop the hulls, not the shouting." },
{ "speaker": "Cao Cao", "side": "left", "text": "Then make the river carry their courage back in pieces." }
]
},
{
"id": "red_cliffs_reinforced_chain_medicine",
"group": "topic",
"label": "Chain Medicine",
"summary": "Reinforced chain crews keep medicine ready for burns and broken deck lines.",
"campaign_flags": { "reinforced_chain_line": true },
"effects": [
{ "type": "grant_item", "item_id": "panacea", "count": 1, "text": "The reinforced chain medicine adds a Panacea to the field supplies." }
],
"lines": [
{ "speaker": "Cao Ren", "side": "left", "text": "The chain crews set medicine beside the spare links. Burns, cuts, river fever: all counted before the flames arrived." },
{ "speaker": "Cao Cao", "side": "right", "text": "Good. A line that expects wounds breaks less easily." }
]
},
{
"id": "red_cliffs_night_raid_beans",
"group": "topic",
"label": "Night Raid Beans",
"summary": "The night raid leaves hard beans for crews still moving through smoke and sparks.",
"campaign_flags": { "ordered_night_raid": true },
"effects": [
{ "type": "grant_item", "item_id": "bean", "count": 1, "text": "The night raid beans add a Bean to the field supplies." }
],
"lines": [
{ "speaker": "Xiahou Dun", "side": "left", "text": "The raiders came back with scorched sleeves and dry beans. They lost sleep, not their appetite." },
{ "speaker": "Cao Cao", "side": "right", "text": "Feed the men who still know how to move in darkness." }
]
}
]
},
"shop": {
@@ -55,7 +108,14 @@
"campaign_flags": { "ordered_night_raid": true },
"items": ["war_drum"]
}
]
],
"merchant": {
"name": "Red Cliffs Fire Sutler",
"lines": [
"Smoke makes every coin smell the same, my lord. I still know which ones are real.",
"Buy before the wind changes its mind and the river asks a higher price."
]
}
},
"roster": {
"max_units": 7,

View File

@@ -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]]

View File

@@ -114,6 +114,10 @@ const RED_CLIFFS_FORWARD_BEANS_CONVERSATION_ID := "red_cliffs_forward_deck_beans
const RED_CLIFFS_HARBOR_MEDICINE_CONVERSATION_ID := "red_cliffs_harbor_medicine"
const RED_CLIFFS_FIRE_SCENARIO_ID := "030_red_cliffs_fire"
const RED_CLIFFS_FIRE_SCENARIO_PATH := "res://data/scenarios/030_red_cliffs_fire.json"
const RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID := "red_cliffs_reinforced_chain_medicine"
const RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID := "red_cliffs_night_raid_beans"
const HUARONG_SCENARIO_ID := "031_huarong_retreat"
const HUARONG_SCENARIO_PATH := "res://data/scenarios/031_huarong_retreat.json"
const SAVE_PATH := "user://campaign_save.json"
const MANUAL_SAVE_PATH := "user://campaign_manual_save.json"
@@ -152,6 +156,7 @@ func _init() -> void:
_check_jiangling_post_battle_choice_bridges_to_xiakou(failures)
_check_xiakou_post_battle_choice_bridges_to_red_cliffs(failures)
_check_red_cliffs_post_battle_choice_bridges_to_fire(failures)
_check_red_cliffs_fire_post_battle_choice_bridges_to_huarong(failures)
_check_manual_checkpoint_reverts_claim(failures)
_check_completed_replay_cannot_claim(failures)
_check_conditional_camp_conversations(failures)
@@ -173,6 +178,7 @@ func _init() -> void:
_check_jiangling_branch_camp_conversations(failures)
_check_xiakou_branch_camp_conversations(failures)
_check_red_cliffs_branch_camp_conversations(failures)
_check_red_cliffs_fire_branch_camp_conversations(failures)
_check_talk_menu_closes_on_cancel_and_reload(failures)
if not _restore_user_file(SAVE_PATH, save_backup):
@@ -1374,6 +1380,25 @@ func _check_red_cliffs_post_battle_choice_bridges_to_fire(failures: Array[String
)
func _check_red_cliffs_fire_post_battle_choice_bridges_to_huarong(failures: Array[String]) -> void:
_check_red_cliffs_fire_choice_branch_to_huarong(
failures,
"hold_red_cliffs_line",
"held_red_cliffs_line",
"opened_huarong_retreat",
"imperial_seal",
"war_drum"
)
_check_red_cliffs_fire_choice_branch_to_huarong(
failures,
"open_huarong_retreat",
"opened_huarong_retreat",
"held_red_cliffs_line",
"war_drum",
"imperial_seal"
)
func _check_wuchao_choice_branch_to_cangting(
failures: Array[String],
choice_id: String,
@@ -2615,6 +2640,79 @@ func _check_red_cliffs_choice_branch_to_fire(
scene.free()
func _check_red_cliffs_fire_choice_branch_to_huarong(
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, "Red Cliffs Fire choice bridge %s" % choice_id, RED_CLIFFS_FIRE_SCENARIO_ID, RED_CLIFFS_FIRE_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(
RED_CLIFFS_FIRE_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("Red Cliffs Fire choice bridge %s could not reload Red Cliffs Fire 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("Red Cliffs Fire choice bridge %s should save 030 victory" % choice_id)
scene.free()
return
if not scene.campaign_state.get_joined_officers_snapshot().has("zhang_he"):
failures.append("Red Cliffs Fire choice bridge %s should keep Zhang He before Huarong" % choice_id)
if bool(result.get("choice_applied", true)):
failures.append("Red Cliffs Fire choice bridge %s should wait for a selected post-battle choice" % choice_id)
if scene.campaign_state.pending_post_battle_choice_scenario_id != RED_CLIFFS_FIRE_SCENARIO_ID:
failures.append("Red Cliffs Fire choice bridge %s should mark Red Cliffs Fire choice pending" % choice_id)
var choice := _find_choice_by_id(result.get("post_battle_choices", []), choice_id)
if choice.is_empty():
failures.append("Red Cliffs Fire choice bridge missing choice: %s" % choice_id)
scene.free()
return
if not scene.campaign_state.try_apply_post_battle_choice(choice, RED_CLIFFS_FIRE_SCENARIO_ID):
failures.append("Red Cliffs Fire 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("Red Cliffs Fire choice bridge %s should set %s" % [choice_id, expected_flag])
if flags.get(cleared_flag, true) != false:
failures.append("Red Cliffs Fire choice bridge %s should clear %s" % [choice_id, cleared_flag])
if scene.campaign_state.current_scenario_id != HUARONG_SCENARIO_ID:
failures.append("Red Cliffs Fire choice bridge %s should advance to Huarong, got %s" % [choice_id, scene.campaign_state.current_scenario_id])
if not scene.state.load_battle(
HUARONG_SCENARIO_PATH,
scene.campaign_state.get_roster_overrides(),
scene.campaign_state.get_inventory_snapshot(),
flags,
scene.campaign_state.get_joined_officers_snapshot()
):
failures.append("Red Cliffs Fire choice bridge %s could not load Huarong" % choice_id)
scene.free()
return
if scene.state.get_unit("zhang_he_ch31").is_empty():
failures.append("Red Cliffs Fire choice bridge %s should deploy Zhang He in Huarong" % choice_id)
elif not scene.state.is_required_deployment("zhang_he_ch31"):
failures.append("Red Cliffs Fire choice bridge %s should require Zhang He in Huarong" % choice_id)
var shop_items: Array = scene.state.get_shop_item_ids()
if not shop_items.has(expected_shop_item_id):
failures.append("Red Cliffs Fire choice bridge %s should expose shop item %s" % [choice_id, expected_shop_item_id])
if shop_items.has(hidden_shop_item_id):
failures.append("Red Cliffs Fire 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 {}
@@ -4335,6 +4433,121 @@ func _check_red_cliffs_branch_camp_conversations(failures: Array[String]) -> voi
harbor_scene.free()
func _check_red_cliffs_fire_branch_camp_conversations(failures: Array[String]) -> void:
var base_scene = _new_prebattle_scene_for(failures, "Red Cliffs Fire base camp", RED_CLIFFS_FIRE_SCENARIO_ID, RED_CLIFFS_FIRE_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(
RED_CLIFFS_FIRE_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("Red Cliffs Fire base camp should reload with Zhang He joined")
else:
if base_scene._camp_conversation_by_id("red_cliffs_fire_smoke_council").is_empty():
failures.append("Red Cliffs Fire should expose the smoke council conversation")
if base_scene._camp_conversation_by_id("red_cliffs_zhang_he_fire_boats").is_empty():
failures.append("Red Cliffs Fire should expose Zhang He's fire boats conversation")
if not base_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID).is_empty():
failures.append("Red Cliffs Fire chain medicine should be hidden without reinforced chain flag")
if not base_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID).is_empty():
failures.append("Red Cliffs Fire night beans should be hidden without night raid flag")
var merchant: Dictionary = base_scene.state.get_shop_merchant()
if str(merchant.get("name", "")) != "Red Cliffs Fire Sutler":
failures.append("Red Cliffs Fire shop merchant name should be present")
var merchant_lines: Array = merchant.get("lines", [])
if merchant_lines.size() < 2:
failures.append("Red Cliffs Fire shop merchant should expose flavor lines")
if base_scene._format_talk_status_text(base_scene._camp_conversation_entries()) != "Camp conversations | 2 topics":
failures.append("Red Cliffs Fire base talk status should summarize two non-supply topics")
base_scene.free()
var chain_scene = _new_prebattle_scene_for(
failures,
"Red Cliffs Fire reinforced chain camp",
RED_CLIFFS_FIRE_SCENARIO_ID,
RED_CLIFFS_FIRE_SCENARIO_PATH,
{"reinforced_chain_line": true}
)
if chain_scene != null:
if not chain_scene.campaign_state.joined_officers.has("zhang_he"):
chain_scene.campaign_state.joined_officers.append("zhang_he")
if not chain_scene.state.load_battle(
RED_CLIFFS_FIRE_SCENARIO_PATH,
chain_scene.campaign_state.get_roster_overrides(),
chain_scene.campaign_state.get_inventory_snapshot(),
chain_scene.campaign_state.get_flags_snapshot(),
chain_scene.campaign_state.get_joined_officers_snapshot()
):
failures.append("Red Cliffs Fire reinforced chain camp should reload with Zhang He joined")
else:
var chain_medicine: Dictionary = chain_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID)
if chain_medicine.is_empty():
failures.append("reinforced chain flag should expose Red Cliffs Fire chain medicine")
if not chain_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID).is_empty():
failures.append("reinforced chain flag should not expose Red Cliffs Fire night beans")
if not chain_medicine.is_empty():
if chain_scene._format_talk_status_text(chain_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Red Cliffs Fire chain talk status should show one ready supply")
if not chain_scene._format_camp_conversation_button_text(chain_medicine).contains("Supply Panacea"):
failures.append("Red Cliffs Fire chain medicine button should show Panacea supply")
var before_panacea := int(chain_scene.campaign_state.get_inventory_snapshot().get("panacea", 0))
chain_scene._apply_camp_conversation_effects(chain_medicine)
if int(chain_scene.campaign_state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1:
failures.append("Red Cliffs Fire chain medicine should add Panacea to campaign inventory")
if int(chain_scene.state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1:
failures.append("Red Cliffs Fire chain medicine should refresh battle Panacea inventory")
if not chain_scene.campaign_state.has_claimed_camp_conversation_effects(RED_CLIFFS_FIRE_SCENARIO_ID, RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID):
failures.append("Red Cliffs Fire chain medicine claim should be saved")
if chain_scene._format_talk_status_text(chain_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Red Cliffs Fire chain talk status should show claimed supply after claim")
chain_scene.free()
var raid_scene = _new_prebattle_scene_for(
failures,
"Red Cliffs Fire night raid camp",
RED_CLIFFS_FIRE_SCENARIO_ID,
RED_CLIFFS_FIRE_SCENARIO_PATH,
{"ordered_night_raid": true}
)
if raid_scene != null:
if not raid_scene.campaign_state.joined_officers.has("zhang_he"):
raid_scene.campaign_state.joined_officers.append("zhang_he")
if not raid_scene.state.load_battle(
RED_CLIFFS_FIRE_SCENARIO_PATH,
raid_scene.campaign_state.get_roster_overrides(),
raid_scene.campaign_state.get_inventory_snapshot(),
raid_scene.campaign_state.get_flags_snapshot(),
raid_scene.campaign_state.get_joined_officers_snapshot()
):
failures.append("Red Cliffs Fire night raid camp should reload with Zhang He joined")
else:
var night_beans: Dictionary = raid_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID)
if night_beans.is_empty():
failures.append("night raid flag should expose Red Cliffs Fire night beans")
if not raid_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID).is_empty():
failures.append("night raid flag should not expose Red Cliffs Fire chain medicine")
if not night_beans.is_empty():
if raid_scene._format_talk_status_text(raid_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
failures.append("Red Cliffs Fire night raid talk status should show one ready supply")
if not raid_scene._format_camp_conversation_button_text(night_beans).contains("Supply Bean"):
failures.append("Red Cliffs Fire night beans button should show Bean supply")
var before_bean := int(raid_scene.campaign_state.get_inventory_snapshot().get("bean", 0))
raid_scene._apply_camp_conversation_effects(night_beans)
if int(raid_scene.campaign_state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Red Cliffs Fire night beans should add Bean to campaign inventory")
if int(raid_scene.state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
failures.append("Red Cliffs Fire night beans should refresh battle Bean inventory")
if not raid_scene.campaign_state.has_claimed_camp_conversation_effects(RED_CLIFFS_FIRE_SCENARIO_ID, RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID):
failures.append("Red Cliffs Fire night beans claim should be saved")
if raid_scene._format_talk_status_text(raid_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
failures.append("Red Cliffs Fire night raid talk status should show claimed supply after claim")
raid_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:

View File

@@ -1987,6 +1987,17 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
failures.append("could not load Red Cliffs Fire data")
else:
_check_shop_items_unique(failures, red_fire_state, "030 base")
var red_fire_conversations: Array = red_fire_state.get_briefing().get("camp_conversations", [])
if red_fire_conversations.size() != 2:
failures.append("030 base briefing should expose exactly two camp conversations")
else:
_check_camp_conversation(failures, red_fire_conversations[0], "red_cliffs_fire_smoke_council", "topic", "")
_check_camp_conversation(failures, red_fire_conversations[1], "red_cliffs_zhang_he_fire_boats", "officer", "zhang_he")
var red_fire_merchant := red_fire_state.get_shop_merchant()
if str(red_fire_merchant.get("name", "")) != "Red Cliffs Fire Sutler":
failures.append("030 shop should expose Red Cliffs Fire merchant name")
if (red_fire_merchant.get("lines", []) as Array).size() < 2:
failures.append("030 shop should expose merchant flavor lines")
if red_fire_state.get_unit("zhang_he_ch30").is_empty() or not red_fire_state.is_required_deployment("zhang_he_ch30"):
failures.append("030 should deploy Zhang He as a required officer")
_check_shop_item_visibility(failures, red_fire_state, "war_drum", false, "030 base")
@@ -1996,6 +2007,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
if not red_fire_chain_state.load_battle("res://data/scenarios/030_red_cliffs_fire.json", {}, {}, {"reinforced_chain_line": true}, ["zhang_he"]):
failures.append("could not load Red Cliffs Fire reinforced chain data")
else:
var chain_medicine: Dictionary = _find_camp_conversation(
red_fire_chain_state.get_briefing().get("camp_conversations", []),
"red_cliffs_reinforced_chain_medicine"
)
if chain_medicine.is_empty():
failures.append("030 reinforced chain should expose chain medicine")
else:
_check_camp_conversation_effect(failures, chain_medicine, "panacea", 1)
if not _find_camp_conversation(
red_fire_chain_state.get_briefing().get("camp_conversations", []),
"red_cliffs_night_raid_beans"
).is_empty():
failures.append("030 reinforced chain should not expose night raid beans")
_check_shop_item_visibility(failures, red_fire_chain_state, "imperial_seal", true, "030 reinforced chain")
_check_shop_item_visibility(failures, red_fire_chain_state, "war_drum", false, "030 reinforced chain")
@@ -2003,6 +2027,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
if not red_fire_raid_state.load_battle("res://data/scenarios/030_red_cliffs_fire.json", {}, {}, {"ordered_night_raid": true}, ["zhang_he"]):
failures.append("could not load Red Cliffs Fire night raid data")
else:
var night_beans: Dictionary = _find_camp_conversation(
red_fire_raid_state.get_briefing().get("camp_conversations", []),
"red_cliffs_night_raid_beans"
)
if night_beans.is_empty():
failures.append("030 ordered night raid should expose night raid beans")
else:
_check_camp_conversation_effect(failures, night_beans, "bean", 1)
if not _find_camp_conversation(
red_fire_raid_state.get_briefing().get("camp_conversations", []),
"red_cliffs_reinforced_chain_medicine"
).is_empty():
failures.append("030 ordered night raid should not expose chain medicine")
_check_shop_item_visibility(failures, red_fire_raid_state, "war_drum", true, "030 ordered night raid")
_check_shop_item_visibility(failures, red_fire_raid_state, "imperial_seal", false, "030 ordered night raid")
@@ -2013,6 +2050,48 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
_check_shop_items_unique(failures, red_fire_old_flags_state, "030 old Red Cliffs setup flags")
_check_shop_item_visibility(failures, red_fire_old_flags_state, "war_drum", false, "030 old Red Cliffs setup flags")
_check_shop_item_visibility(failures, red_fire_old_flags_state, "imperial_seal", false, "030 old Red Cliffs setup flags")
if not _find_camp_conversation(
red_fire_old_flags_state.get_briefing().get("camp_conversations", []),
"red_cliffs_reinforced_chain_medicine"
).is_empty():
failures.append("030 old Red Cliffs setup flags should not expose chain medicine")
if not _find_camp_conversation(
red_fire_old_flags_state.get_briefing().get("camp_conversations", []),
"red_cliffs_night_raid_beans"
).is_empty():
failures.append("030 old Red Cliffs setup flags should not expose night raid beans")
var huarong_state = BattleStateScript.new()
if not huarong_state.load_battle("res://data/scenarios/031_huarong_retreat.json", {}, {}, {}, ["zhang_he"]):
failures.append("could not load Huarong Retreat data")
else:
_check_shop_items_unique(failures, huarong_state, "031 base")
if huarong_state.get_unit("zhang_he_ch31").is_empty() or not huarong_state.is_required_deployment("zhang_he_ch31"):
failures.append("031 should deploy Zhang He as a required officer")
_check_shop_item_visibility(failures, huarong_state, "war_drum", false, "031 base")
_check_shop_item_visibility(failures, huarong_state, "imperial_seal", false, "031 base")
var huarong_held_state = BattleStateScript.new()
if not huarong_held_state.load_battle("res://data/scenarios/031_huarong_retreat.json", {}, {}, {"held_red_cliffs_line": true}, ["zhang_he"]):
failures.append("could not load Huarong held Red Cliffs line data")
else:
_check_shop_item_visibility(failures, huarong_held_state, "imperial_seal", true, "031 held Red Cliffs line")
_check_shop_item_visibility(failures, huarong_held_state, "war_drum", false, "031 held Red Cliffs line")
var huarong_opened_state = BattleStateScript.new()
if not huarong_opened_state.load_battle("res://data/scenarios/031_huarong_retreat.json", {}, {}, {"opened_huarong_retreat": true}, ["zhang_he"]):
failures.append("could not load Huarong opened retreat data")
else:
_check_shop_item_visibility(failures, huarong_opened_state, "war_drum", true, "031 opened Huarong retreat")
_check_shop_item_visibility(failures, huarong_opened_state, "imperial_seal", false, "031 opened Huarong retreat")
var huarong_old_flags_state = BattleStateScript.new()
if not huarong_old_flags_state.load_battle("res://data/scenarios/031_huarong_retreat.json", {}, {}, {"reinforced_chain_line": true, "ordered_night_raid": true}, ["zhang_he"]):
failures.append("could not load Huarong old Red Cliffs Fire setup flag data")
else:
_check_shop_items_unique(failures, huarong_old_flags_state, "031 old Red Cliffs Fire setup flags")
_check_shop_item_visibility(failures, huarong_old_flags_state, "war_drum", false, "031 old Red Cliffs Fire setup flags")
_check_shop_item_visibility(failures, huarong_old_flags_state, "imperial_seal", false, "031 old Red Cliffs Fire 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)