Add Ye siege camp content
This commit is contained in:
@@ -870,6 +870,85 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
).is_empty():
|
||||
failures.append("015 old Cangting flags should not expose crossing medicine")
|
||||
|
||||
var ye_siege_state = BattleStateScript.new()
|
||||
if not ye_siege_state.load_battle("res://data/scenarios/016_ye_siege.json"):
|
||||
failures.append("could not load Ye Siege camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, ye_siege_state, "016 base")
|
||||
var ye_siege_conversations: Array = ye_siege_state.get_briefing().get("camp_conversations", [])
|
||||
if ye_siege_conversations.size() != 2:
|
||||
failures.append("016 base briefing should expose exactly two camp conversations")
|
||||
else:
|
||||
_check_camp_conversation(failures, ye_siege_conversations[0], "ye_siege_inner_gate_council", "topic", "")
|
||||
_check_camp_conversation(failures, ye_siege_conversations[1], "ye_siege_zhang_he_streets", "officer", "zhang_he")
|
||||
var ye_siege_merchant := ye_siege_state.get_shop_merchant()
|
||||
if str(ye_siege_merchant.get("name", "")) != "Ye Gate Sutler":
|
||||
failures.append("016 shop should expose Ye Gate merchant name")
|
||||
if (ye_siege_merchant.get("lines", []) as Array).size() < 2:
|
||||
failures.append("016 shop should expose merchant flavor lines")
|
||||
_check_shop_item_visibility(failures, ye_siege_state, "war_drum", false, "016 base")
|
||||
_check_shop_item_visibility(failures, ye_siege_state, "imperial_seal", false, "016 base")
|
||||
_check_shop_item_visibility(failures, ye_siege_state, "iron_armor", true, "016 base")
|
||||
|
||||
var ye_siege_pressed_state = BattleStateScript.new()
|
||||
if not ye_siege_pressed_state.load_battle("res://data/scenarios/016_ye_siege.json", {}, {}, {"pressed_ye_siege": true}):
|
||||
failures.append("could not load Ye Siege pressed camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, ye_siege_pressed_state, "016 pressed Ye siege")
|
||||
var ladder_rations: Dictionary = _find_camp_conversation(
|
||||
ye_siege_pressed_state.get_briefing().get("camp_conversations", []),
|
||||
"ye_siege_ladder_rations"
|
||||
)
|
||||
if ladder_rations.is_empty():
|
||||
failures.append("016 pressed Ye siege flag should expose ladder rations")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, ladder_rations, "bean", 1)
|
||||
if not _find_camp_conversation(
|
||||
ye_siege_pressed_state.get_briefing().get("camp_conversations", []),
|
||||
"ye_siege_defector_medicine"
|
||||
).is_empty():
|
||||
failures.append("016 pressed Ye siege flag should not expose defector medicine")
|
||||
_check_shop_item_visibility(failures, ye_siege_pressed_state, "war_drum", true, "016 pressed Ye siege")
|
||||
_check_shop_item_visibility(failures, ye_siege_pressed_state, "imperial_seal", false, "016 pressed Ye siege")
|
||||
|
||||
var ye_siege_split_state = BattleStateScript.new()
|
||||
if not ye_siege_split_state.load_battle("res://data/scenarios/016_ye_siege.json", {}, {}, {"split_yuan_heirs": true}):
|
||||
failures.append("could not load Ye Siege split heirs camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, ye_siege_split_state, "016 split Yuan heirs")
|
||||
var defector_medicine: Dictionary = _find_camp_conversation(
|
||||
ye_siege_split_state.get_briefing().get("camp_conversations", []),
|
||||
"ye_siege_defector_medicine"
|
||||
)
|
||||
if defector_medicine.is_empty():
|
||||
failures.append("016 split Yuan heirs flag should expose defector medicine")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, defector_medicine, "panacea", 1)
|
||||
if not _find_camp_conversation(
|
||||
ye_siege_split_state.get_briefing().get("camp_conversations", []),
|
||||
"ye_siege_ladder_rations"
|
||||
).is_empty():
|
||||
failures.append("016 split Yuan heirs flag should not expose ladder rations")
|
||||
_check_shop_item_visibility(failures, ye_siege_split_state, "war_drum", false, "016 split Yuan heirs")
|
||||
_check_shop_item_visibility(failures, ye_siege_split_state, "imperial_seal", true, "016 split Yuan heirs")
|
||||
|
||||
var ye_siege_old_flags_state = BattleStateScript.new()
|
||||
if not ye_siege_old_flags_state.load_battle("res://data/scenarios/016_ye_siege.json", {}, {}, {"advanced_to_ye": true, "secured_hebei_crossings": true}):
|
||||
failures.append("could not load Ye Siege old Ye flag camp data")
|
||||
else:
|
||||
_check_shop_item_visibility(failures, ye_siege_old_flags_state, "war_drum", false, "016 old Ye flags")
|
||||
_check_shop_item_visibility(failures, ye_siege_old_flags_state, "imperial_seal", false, "016 old Ye flags")
|
||||
if not _find_camp_conversation(
|
||||
ye_siege_old_flags_state.get_briefing().get("camp_conversations", []),
|
||||
"ye_siege_ladder_rations"
|
||||
).is_empty():
|
||||
failures.append("016 old Ye flags should not expose ladder rations")
|
||||
if not _find_camp_conversation(
|
||||
ye_siege_old_flags_state.get_briefing().get("camp_conversations", []),
|
||||
"ye_siege_defector_medicine"
|
||||
).is_empty():
|
||||
failures.append("016 old Ye flags should not expose defector 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():
|
||||
|
||||
Reference in New Issue
Block a user