Add Liaoxi camp and White Wolf bridge
This commit is contained in:
@@ -1344,6 +1344,94 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
).is_empty():
|
||||
failures.append("021 old Nanpi Surrender flags should not expose commandery medicine")
|
||||
|
||||
var liaoxi_state = BattleStateScript.new()
|
||||
if not liaoxi_state.load_battle("res://data/scenarios/022_liaoxi_pursuit.json", {}, {}, {}, ["zhang_he"]):
|
||||
failures.append("could not load Liaoxi Pursuit camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, liaoxi_state, "022 base")
|
||||
var liaoxi_conversations: Array = liaoxi_state.get_briefing().get("camp_conversations", [])
|
||||
if liaoxi_conversations.size() != 2:
|
||||
failures.append("022 base briefing should expose exactly two camp conversations")
|
||||
else:
|
||||
_check_camp_conversation(failures, liaoxi_conversations[0], "liaoxi_frontier_council", "topic", "")
|
||||
_check_camp_conversation(failures, liaoxi_conversations[1], "liaoxi_zhang_he_hill_roads", "officer", "zhang_he")
|
||||
var liaoxi_merchant := liaoxi_state.get_shop_merchant()
|
||||
if str(liaoxi_merchant.get("name", "")) != "Liaoxi Frontier Sutler":
|
||||
failures.append("022 shop should expose Liaoxi Frontier merchant name")
|
||||
if (liaoxi_merchant.get("lines", []) as Array).size() < 2:
|
||||
failures.append("022 shop should expose merchant flavor lines")
|
||||
if liaoxi_state.get_unit("zhang_he_ch22").is_empty() or not liaoxi_state.is_required_deployment("zhang_he_ch22"):
|
||||
failures.append("022 should deploy Zhang He as a required officer")
|
||||
_check_shop_item_visibility(failures, liaoxi_state, "war_drum", false, "022 base")
|
||||
_check_shop_item_visibility(failures, liaoxi_state, "imperial_seal", false, "022 base")
|
||||
_check_shop_item_visibility(failures, liaoxi_state, "iron_armor", true, "022 base")
|
||||
|
||||
var liaoxi_pressed_state = BattleStateScript.new()
|
||||
if not liaoxi_pressed_state.load_battle("res://data/scenarios/022_liaoxi_pursuit.json", {}, {}, {"pressed_liaoxi_pursuit": true}, ["zhang_he"]):
|
||||
failures.append("could not load Liaoxi pressed pursuit camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, liaoxi_pressed_state, "022 pressed Liaoxi")
|
||||
var fast_drums: Dictionary = _find_camp_conversation(
|
||||
liaoxi_pressed_state.get_briefing().get("camp_conversations", []),
|
||||
"liaoxi_fast_pursuit_drums"
|
||||
)
|
||||
if fast_drums.is_empty():
|
||||
failures.append("022 pressed Liaoxi flag should expose fast pursuit drums")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, fast_drums, "war_drum", 1)
|
||||
if not _find_camp_conversation(
|
||||
liaoxi_pressed_state.get_briefing().get("camp_conversations", []),
|
||||
"liaoxi_approach_medicine"
|
||||
).is_empty():
|
||||
failures.append("022 pressed Liaoxi flag should not expose approach medicine")
|
||||
_check_shop_item_visibility(failures, liaoxi_pressed_state, "war_drum", true, "022 pressed Liaoxi")
|
||||
_check_shop_item_visibility(failures, liaoxi_pressed_state, "imperial_seal", false, "022 pressed Liaoxi")
|
||||
|
||||
var liaoxi_secured_state = BattleStateScript.new()
|
||||
if not liaoxi_secured_state.load_battle("res://data/scenarios/022_liaoxi_pursuit.json", {}, {}, {"secured_liaoxi_approaches": true}, ["zhang_he"]):
|
||||
failures.append("could not load Liaoxi secured approaches camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, liaoxi_secured_state, "022 secured Liaoxi")
|
||||
var approach_medicine: Dictionary = _find_camp_conversation(
|
||||
liaoxi_secured_state.get_briefing().get("camp_conversations", []),
|
||||
"liaoxi_approach_medicine"
|
||||
)
|
||||
if approach_medicine.is_empty():
|
||||
failures.append("022 secured Liaoxi flag should expose approach medicine")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, approach_medicine, "panacea", 1)
|
||||
if not _find_camp_conversation(
|
||||
liaoxi_secured_state.get_briefing().get("camp_conversations", []),
|
||||
"liaoxi_fast_pursuit_drums"
|
||||
).is_empty():
|
||||
failures.append("022 secured Liaoxi flag should not expose fast pursuit drums")
|
||||
_check_shop_item_visibility(failures, liaoxi_secured_state, "war_drum", false, "022 secured Liaoxi")
|
||||
_check_shop_item_visibility(failures, liaoxi_secured_state, "imperial_seal", true, "022 secured Liaoxi")
|
||||
|
||||
var liaoxi_old_flags_state = BattleStateScript.new()
|
||||
if not liaoxi_old_flags_state.load_battle("res://data/scenarios/022_liaoxi_pursuit.json", {}, {}, {"pursued_yuan_brothers": true, "secured_bohai_commandery": true}, ["zhang_he"]):
|
||||
failures.append("could not load Liaoxi old Bohai flag camp data")
|
||||
else:
|
||||
_check_shop_item_visibility(failures, liaoxi_old_flags_state, "war_drum", false, "022 old Bohai flags")
|
||||
_check_shop_item_visibility(failures, liaoxi_old_flags_state, "imperial_seal", false, "022 old Bohai flags")
|
||||
if not _find_camp_conversation(
|
||||
liaoxi_old_flags_state.get_briefing().get("camp_conversations", []),
|
||||
"liaoxi_fast_pursuit_drums"
|
||||
).is_empty():
|
||||
failures.append("022 old Bohai flags should not expose fast pursuit drums")
|
||||
if not _find_camp_conversation(
|
||||
liaoxi_old_flags_state.get_briefing().get("camp_conversations", []),
|
||||
"liaoxi_approach_medicine"
|
||||
).is_empty():
|
||||
failures.append("022 old Bohai flags should not expose approach medicine")
|
||||
|
||||
var white_wolf_state = BattleStateScript.new()
|
||||
if not white_wolf_state.load_battle("res://data/scenarios/023_white_wolf_mountain.json", {}, {}, {}, ["zhang_he"]):
|
||||
failures.append("could not load White Wolf Mountain data")
|
||||
else:
|
||||
if white_wolf_state.get_unit("zhang_he_ch23").is_empty() or not white_wolf_state.is_required_deployment("zhang_he_ch23"):
|
||||
failures.append("023 should deploy Zhang He as a required officer")
|
||||
|
||||
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