Add Xiapi siege camp content
This commit is contained in:
@@ -417,6 +417,85 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
_check_shop_item_visibility(failures, wan_pursuit_state, "imperial_seal", false, "008 hard pursuit")
|
||||
_check_shop_item_visibility(failures, wan_pursuit_state, "war_drum", true, "008 hard pursuit")
|
||||
|
||||
var xiapi_state = BattleStateScript.new()
|
||||
if not xiapi_state.load_battle("res://data/scenarios/009_xiapi_siege.json"):
|
||||
failures.append("could not load Xiapi Siege camp data")
|
||||
else:
|
||||
var xiapi_conversations: Array = xiapi_state.get_briefing().get("camp_conversations", [])
|
||||
if xiapi_conversations.size() != 2:
|
||||
failures.append("009 base briefing should expose exactly two camp conversations")
|
||||
else:
|
||||
_check_camp_conversation(failures, xiapi_conversations[0], "xiapi_floodgate_council", "officer", "cao_cao")
|
||||
_check_camp_conversation(failures, xiapi_conversations[1], "xiapi_dian_wei_siege_road", "officer", "dian_wei")
|
||||
var xiapi_merchant := xiapi_state.get_shop_merchant()
|
||||
if str(xiapi_merchant.get("name", "")) != "Xiapi Flood-Gate Sutler":
|
||||
failures.append("009 shop should expose Xiapi merchant name")
|
||||
if (xiapi_merchant.get("lines", []) as Array).size() < 2:
|
||||
failures.append("009 shop should expose merchant flavor lines")
|
||||
_check_shop_item_visibility(failures, xiapi_state, "war_drum", false, "009 base")
|
||||
_check_shop_item_visibility(failures, xiapi_state, "war_axe", false, "009 base")
|
||||
|
||||
var xiapi_held_state = BattleStateScript.new()
|
||||
if not xiapi_held_state.load_battle("res://data/scenarios/009_xiapi_siege.json", {}, {}, {"held_wan_gate": true}):
|
||||
failures.append("could not load Xiapi held Wan gate camp data")
|
||||
else:
|
||||
var medicine: Dictionary = _find_camp_conversation(
|
||||
xiapi_held_state.get_briefing().get("camp_conversations", []),
|
||||
"xiapi_wan_baggage_dressings"
|
||||
)
|
||||
if medicine.is_empty():
|
||||
failures.append("009 held Wan gate flag should expose Wan baggage dressings conversation")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, medicine, "panacea", 1)
|
||||
if not _find_camp_conversation(
|
||||
xiapi_held_state.get_briefing().get("camp_conversations", []),
|
||||
"xiapi_forced_march_rations"
|
||||
).is_empty():
|
||||
failures.append("009 held Wan gate flag should not expose forced march rations conversation")
|
||||
_check_shop_item_visibility(failures, xiapi_held_state, "war_drum", true, "009 held Wan gate")
|
||||
_check_shop_item_visibility(failures, xiapi_held_state, "war_axe", false, "009 held Wan gate")
|
||||
|
||||
var xiapi_swift_state = BattleStateScript.new()
|
||||
if not xiapi_swift_state.load_battle("res://data/scenarios/009_xiapi_siege.json", {}, {}, {"swift_wan_escape": true}):
|
||||
failures.append("could not load Xiapi swift Wan escape camp data")
|
||||
else:
|
||||
var canteens: Dictionary = _find_camp_conversation(
|
||||
xiapi_swift_state.get_briefing().get("camp_conversations", []),
|
||||
"xiapi_forced_march_rations"
|
||||
)
|
||||
if canteens.is_empty():
|
||||
failures.append("009 swift Wan escape flag should expose forced march rations conversation")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, canteens, "bean", 1)
|
||||
if not _find_camp_conversation(
|
||||
xiapi_swift_state.get_briefing().get("camp_conversations", []),
|
||||
"xiapi_wan_baggage_dressings"
|
||||
).is_empty():
|
||||
failures.append("009 swift Wan escape flag should not expose Wan baggage dressings conversation")
|
||||
_check_shop_item_visibility(failures, xiapi_swift_state, "war_drum", false, "009 swift Wan escape")
|
||||
_check_shop_item_visibility(failures, xiapi_swift_state, "war_axe", true, "009 swift Wan escape")
|
||||
|
||||
var white_horse_state = BattleStateScript.new()
|
||||
if not white_horse_state.load_battle("res://data/scenarios/010_white_horse_relief.json"):
|
||||
failures.append("could not load White Horse Relief shop data")
|
||||
else:
|
||||
_check_shop_item_visibility(failures, white_horse_state, "imperial_seal", false, "010 base")
|
||||
_check_shop_item_visibility(failures, white_horse_state, "war_drum", false, "010 base")
|
||||
|
||||
var white_horse_xu_state = BattleStateScript.new()
|
||||
if not white_horse_xu_state.load_battle("res://data/scenarios/010_white_horse_relief.json", {}, {}, {"integrated_xu_province": true}):
|
||||
failures.append("could not load White Horse integrated Xu shop data")
|
||||
else:
|
||||
_check_shop_item_visibility(failures, white_horse_xu_state, "imperial_seal", true, "010 integrated Xu")
|
||||
_check_shop_item_visibility(failures, white_horse_xu_state, "war_drum", false, "010 integrated Xu")
|
||||
|
||||
var white_horse_pressed_state = BattleStateScript.new()
|
||||
if not white_horse_pressed_state.load_battle("res://data/scenarios/010_white_horse_relief.json", {}, {}, {"pressed_northern_campaign": true}):
|
||||
failures.append("could not load White Horse pressed north shop data")
|
||||
else:
|
||||
_check_shop_item_visibility(failures, white_horse_pressed_state, "imperial_seal", false, "010 pressed north")
|
||||
_check_shop_item_visibility(failures, white_horse_pressed_state, "war_drum", true, "010 pressed north")
|
||||
|
||||
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