Add Cangting camp content
This commit is contained in:
@@ -707,6 +707,88 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
).is_empty():
|
||||
failures.append("013 old Guandu flags should not expose reserve wagon supplies")
|
||||
|
||||
var cangting_state = BattleStateScript.new()
|
||||
if not cangting_state.load_battle("res://data/scenarios/014_cangting_pursuit.json"):
|
||||
failures.append("could not load Cangting Pursuit camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, cangting_state, "014 base")
|
||||
var cangting_conversations: Array = cangting_state.get_briefing().get("camp_conversations", [])
|
||||
if cangting_conversations.size() != 2:
|
||||
failures.append("014 base briefing should expose exactly two camp conversations")
|
||||
else:
|
||||
_check_camp_conversation(failures, cangting_conversations[0], "cangting_pursuit_council", "topic", "")
|
||||
_check_camp_conversation(failures, cangting_conversations[1], "cangting_guo_jia_rearguard", "officer", "guo_jia")
|
||||
var cangting_merchant := cangting_state.get_shop_merchant()
|
||||
if str(cangting_merchant.get("name", "")) != "Cangting Road Sutler":
|
||||
failures.append("014 shop should expose Cangting merchant name")
|
||||
if (cangting_merchant.get("lines", []) as Array).size() < 2:
|
||||
failures.append("014 shop should expose merchant flavor lines")
|
||||
_check_shop_item_visibility(failures, cangting_state, "war_drum", false, "014 base")
|
||||
_check_shop_item_visibility(failures, cangting_state, "imperial_seal", false, "014 base")
|
||||
_check_shop_item_visibility(failures, cangting_state, "dragon_spear", false, "014 base")
|
||||
|
||||
var cangting_pressed_state = BattleStateScript.new()
|
||||
if not cangting_pressed_state.load_battle("res://data/scenarios/014_cangting_pursuit.json", {}, {}, {"pressed_yuan_rout": true}):
|
||||
failures.append("could not load Cangting pressed rout camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, cangting_pressed_state, "014 pressed Yuan rout")
|
||||
var fast_rations: Dictionary = _find_camp_conversation(
|
||||
cangting_pressed_state.get_briefing().get("camp_conversations", []),
|
||||
"cangting_fast_pursuit_beans"
|
||||
)
|
||||
if fast_rations.is_empty():
|
||||
failures.append("014 pressed Yuan rout flag should expose fast pursuit rations")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, fast_rations, "bean", 1)
|
||||
if not _find_camp_conversation(
|
||||
cangting_pressed_state.get_briefing().get("camp_conversations", []),
|
||||
"cangting_wuchao_store_medicine"
|
||||
).is_empty():
|
||||
failures.append("014 pressed Yuan rout flag should not expose Wuchao store medicine")
|
||||
_check_shop_item_visibility(failures, cangting_pressed_state, "war_drum", true, "014 pressed Yuan rout")
|
||||
_check_shop_item_visibility(failures, cangting_pressed_state, "imperial_seal", false, "014 pressed Yuan rout")
|
||||
_check_shop_item_visibility(failures, cangting_pressed_state, "dragon_spear", false, "014 pressed Yuan rout")
|
||||
|
||||
var cangting_stores_state = BattleStateScript.new()
|
||||
if not cangting_stores_state.load_battle("res://data/scenarios/014_cangting_pursuit.json", {}, {}, {"secured_wuchao_stores": true}):
|
||||
failures.append("could not load Cangting secured Wuchao stores camp data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, cangting_stores_state, "014 secured Wuchao stores")
|
||||
var store_medicine: Dictionary = _find_camp_conversation(
|
||||
cangting_stores_state.get_briefing().get("camp_conversations", []),
|
||||
"cangting_wuchao_store_medicine"
|
||||
)
|
||||
if store_medicine.is_empty():
|
||||
failures.append("014 secured Wuchao stores flag should expose store medicine")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, store_medicine, "panacea", 1)
|
||||
if not _find_camp_conversation(
|
||||
cangting_stores_state.get_briefing().get("camp_conversations", []),
|
||||
"cangting_fast_pursuit_beans"
|
||||
).is_empty():
|
||||
failures.append("014 secured Wuchao stores flag should not expose fast pursuit rations")
|
||||
_check_shop_item_visibility(failures, cangting_stores_state, "war_drum", false, "014 secured Wuchao stores")
|
||||
_check_shop_item_visibility(failures, cangting_stores_state, "imperial_seal", true, "014 secured Wuchao stores")
|
||||
_check_shop_item_visibility(failures, cangting_stores_state, "dragon_spear", false, "014 secured Wuchao stores")
|
||||
|
||||
var cangting_old_flags_state = BattleStateScript.new()
|
||||
if not cangting_old_flags_state.load_battle("res://data/scenarios/014_cangting_pursuit.json", {}, {}, {"prepared_wuchao_raid": true, "strengthened_guandu_defense": true}):
|
||||
failures.append("could not load Cangting old Wuchao flag camp data")
|
||||
else:
|
||||
_check_shop_item_visibility(failures, cangting_old_flags_state, "war_drum", false, "014 old Wuchao flags")
|
||||
_check_shop_item_visibility(failures, cangting_old_flags_state, "imperial_seal", false, "014 old Wuchao flags")
|
||||
_check_shop_item_visibility(failures, cangting_old_flags_state, "dragon_spear", false, "014 old Wuchao flags")
|
||||
if not _find_camp_conversation(
|
||||
cangting_old_flags_state.get_briefing().get("camp_conversations", []),
|
||||
"cangting_fast_pursuit_beans"
|
||||
).is_empty():
|
||||
failures.append("014 old Wuchao flags should not expose fast pursuit rations")
|
||||
if not _find_camp_conversation(
|
||||
cangting_old_flags_state.get_briefing().get("camp_conversations", []),
|
||||
"cangting_wuchao_store_medicine"
|
||||
).is_empty():
|
||||
failures.append("014 old Wuchao flags should not expose Wuchao store 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