Add Bohai remnant camp flow

This commit is contained in:
2026-06-19 02:37:29 +09:00
parent 4087180f72
commit f26952e39e
4 changed files with 321 additions and 1 deletions

View File

@@ -1265,6 +1265,85 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
).is_empty():
failures.append("020 old Nanpi Pressure flags should not expose admin medicine")
var bohai_state = BattleStateScript.new()
if not bohai_state.load_battle("res://data/scenarios/021_bohai_remnants.json"):
failures.append("could not load Bohai camp data")
else:
_check_shop_items_unique(failures, bohai_state, "021 base")
var bohai_conversations: Array = bohai_state.get_briefing().get("camp_conversations", [])
if bohai_conversations.size() != 2:
failures.append("021 base briefing should expose exactly two camp conversations")
else:
_check_camp_conversation(failures, bohai_conversations[0], "bohai_remnants_exile_council", "topic", "")
_check_camp_conversation(failures, bohai_conversations[1], "bohai_remnants_zhang_he_escape_road", "officer", "zhang_he")
var bohai_merchant := bohai_state.get_shop_merchant()
if str(bohai_merchant.get("name", "")) != "Bohai Road Sutler":
failures.append("021 shop should expose Bohai Road merchant name")
if (bohai_merchant.get("lines", []) as Array).size() < 2:
failures.append("021 shop should expose merchant flavor lines")
_check_shop_item_visibility(failures, bohai_state, "war_drum", false, "021 base")
_check_shop_item_visibility(failures, bohai_state, "imperial_seal", false, "021 base")
_check_shop_item_visibility(failures, bohai_state, "iron_armor", true, "021 base")
var bohai_pursued_state = BattleStateScript.new()
if not bohai_pursued_state.load_battle("res://data/scenarios/021_bohai_remnants.json", {}, {}, {"pursued_yuan_brothers": true}):
failures.append("could not load Bohai pursued Yuan brothers camp data")
else:
_check_shop_items_unique(failures, bohai_pursued_state, "021 pursued Yuan brothers")
var fast_wine: Dictionary = _find_camp_conversation(
bohai_pursued_state.get_briefing().get("camp_conversations", []),
"bohai_remnants_fast_column_wine"
)
if fast_wine.is_empty():
failures.append("021 pursued Yuan brothers flag should expose fast column wine")
else:
_check_camp_conversation_effect(failures, fast_wine, "wine", 1)
if not _find_camp_conversation(
bohai_pursued_state.get_briefing().get("camp_conversations", []),
"bohai_remnants_commandery_medicine"
).is_empty():
failures.append("021 pursued Yuan brothers flag should not expose commandery medicine")
_check_shop_item_visibility(failures, bohai_pursued_state, "war_drum", true, "021 pursued Yuan brothers")
_check_shop_item_visibility(failures, bohai_pursued_state, "imperial_seal", false, "021 pursued Yuan brothers")
var bohai_secured_state = BattleStateScript.new()
if not bohai_secured_state.load_battle("res://data/scenarios/021_bohai_remnants.json", {}, {}, {"secured_bohai_commandery": true}):
failures.append("could not load Bohai secured commandery camp data")
else:
_check_shop_items_unique(failures, bohai_secured_state, "021 secured Bohai")
var commandery_medicine: Dictionary = _find_camp_conversation(
bohai_secured_state.get_briefing().get("camp_conversations", []),
"bohai_remnants_commandery_medicine"
)
if commandery_medicine.is_empty():
failures.append("021 secured Bohai flag should expose commandery medicine")
else:
_check_camp_conversation_effect(failures, commandery_medicine, "panacea", 1)
if not _find_camp_conversation(
bohai_secured_state.get_briefing().get("camp_conversations", []),
"bohai_remnants_fast_column_wine"
).is_empty():
failures.append("021 secured Bohai flag should not expose fast column wine")
_check_shop_item_visibility(failures, bohai_secured_state, "war_drum", false, "021 secured Bohai")
_check_shop_item_visibility(failures, bohai_secured_state, "imperial_seal", true, "021 secured Bohai")
var bohai_old_flags_state = BattleStateScript.new()
if not bohai_old_flags_state.load_battle("res://data/scenarios/021_bohai_remnants.json", {}, {}, {"pressed_yuan_tan_surrender": true, "secured_nanpi_admin": true}):
failures.append("could not load Bohai old Nanpi Surrender flag camp data")
else:
_check_shop_item_visibility(failures, bohai_old_flags_state, "war_drum", false, "021 old Nanpi Surrender flags")
_check_shop_item_visibility(failures, bohai_old_flags_state, "imperial_seal", false, "021 old Nanpi Surrender flags")
if not _find_camp_conversation(
bohai_old_flags_state.get_briefing().get("camp_conversations", []),
"bohai_remnants_fast_column_wine"
).is_empty():
failures.append("021 old Nanpi Surrender flags should not expose fast column wine")
if not _find_camp_conversation(
bohai_old_flags_state.get_briefing().get("camp_conversations", []),
"bohai_remnants_commandery_medicine"
).is_empty():
failures.append("021 old Nanpi Surrender flags should not expose commandery medicine")
for item_id in ["bronze_sword", "training_spear", "short_bow", "hand_axe", "iron_armor", "panacea"]:
var item := state.get_item_def(item_id)
if item.is_empty():