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

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