Add Red Cliffs fire camp and Huarong bridge
This commit is contained in:
@@ -114,6 +114,10 @@ const RED_CLIFFS_FORWARD_BEANS_CONVERSATION_ID := "red_cliffs_forward_deck_beans
|
||||
const RED_CLIFFS_HARBOR_MEDICINE_CONVERSATION_ID := "red_cliffs_harbor_medicine"
|
||||
const RED_CLIFFS_FIRE_SCENARIO_ID := "030_red_cliffs_fire"
|
||||
const RED_CLIFFS_FIRE_SCENARIO_PATH := "res://data/scenarios/030_red_cliffs_fire.json"
|
||||
const RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID := "red_cliffs_reinforced_chain_medicine"
|
||||
const RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID := "red_cliffs_night_raid_beans"
|
||||
const HUARONG_SCENARIO_ID := "031_huarong_retreat"
|
||||
const HUARONG_SCENARIO_PATH := "res://data/scenarios/031_huarong_retreat.json"
|
||||
const SAVE_PATH := "user://campaign_save.json"
|
||||
const MANUAL_SAVE_PATH := "user://campaign_manual_save.json"
|
||||
|
||||
@@ -152,6 +156,7 @@ func _init() -> void:
|
||||
_check_jiangling_post_battle_choice_bridges_to_xiakou(failures)
|
||||
_check_xiakou_post_battle_choice_bridges_to_red_cliffs(failures)
|
||||
_check_red_cliffs_post_battle_choice_bridges_to_fire(failures)
|
||||
_check_red_cliffs_fire_post_battle_choice_bridges_to_huarong(failures)
|
||||
_check_manual_checkpoint_reverts_claim(failures)
|
||||
_check_completed_replay_cannot_claim(failures)
|
||||
_check_conditional_camp_conversations(failures)
|
||||
@@ -173,6 +178,7 @@ func _init() -> void:
|
||||
_check_jiangling_branch_camp_conversations(failures)
|
||||
_check_xiakou_branch_camp_conversations(failures)
|
||||
_check_red_cliffs_branch_camp_conversations(failures)
|
||||
_check_red_cliffs_fire_branch_camp_conversations(failures)
|
||||
_check_talk_menu_closes_on_cancel_and_reload(failures)
|
||||
|
||||
if not _restore_user_file(SAVE_PATH, save_backup):
|
||||
@@ -1374,6 +1380,25 @@ func _check_red_cliffs_post_battle_choice_bridges_to_fire(failures: Array[String
|
||||
)
|
||||
|
||||
|
||||
func _check_red_cliffs_fire_post_battle_choice_bridges_to_huarong(failures: Array[String]) -> void:
|
||||
_check_red_cliffs_fire_choice_branch_to_huarong(
|
||||
failures,
|
||||
"hold_red_cliffs_line",
|
||||
"held_red_cliffs_line",
|
||||
"opened_huarong_retreat",
|
||||
"imperial_seal",
|
||||
"war_drum"
|
||||
)
|
||||
_check_red_cliffs_fire_choice_branch_to_huarong(
|
||||
failures,
|
||||
"open_huarong_retreat",
|
||||
"opened_huarong_retreat",
|
||||
"held_red_cliffs_line",
|
||||
"war_drum",
|
||||
"imperial_seal"
|
||||
)
|
||||
|
||||
|
||||
func _check_wuchao_choice_branch_to_cangting(
|
||||
failures: Array[String],
|
||||
choice_id: String,
|
||||
@@ -2615,6 +2640,79 @@ func _check_red_cliffs_choice_branch_to_fire(
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_red_cliffs_fire_choice_branch_to_huarong(
|
||||
failures: Array[String],
|
||||
choice_id: String,
|
||||
expected_flag: String,
|
||||
cleared_flag: String,
|
||||
expected_shop_item_id: String,
|
||||
hidden_shop_item_id: String
|
||||
) -> void:
|
||||
var scene = _new_prebattle_scene_for(failures, "Red Cliffs Fire choice bridge %s" % choice_id, RED_CLIFFS_FIRE_SCENARIO_ID, RED_CLIFFS_FIRE_SCENARIO_PATH)
|
||||
if scene == null:
|
||||
return
|
||||
if not scene.campaign_state.joined_officers.has("zhang_he"):
|
||||
scene.campaign_state.joined_officers.append("zhang_he")
|
||||
if not scene.state.load_battle(
|
||||
RED_CLIFFS_FIRE_SCENARIO_PATH,
|
||||
scene.campaign_state.get_roster_overrides(),
|
||||
scene.campaign_state.get_inventory_snapshot(),
|
||||
scene.campaign_state.get_flags_snapshot(),
|
||||
scene.campaign_state.get_joined_officers_snapshot()
|
||||
):
|
||||
failures.append("Red Cliffs Fire choice bridge %s could not reload Red Cliffs Fire with Zhang He joined" % choice_id)
|
||||
scene.free()
|
||||
return
|
||||
scene.state.battle_status = "victory"
|
||||
var result: Dictionary = scene.campaign_state.apply_battle_result(scene.state)
|
||||
if not bool(result.get("saved", false)):
|
||||
failures.append("Red Cliffs Fire choice bridge %s should save 030 victory" % choice_id)
|
||||
scene.free()
|
||||
return
|
||||
if not scene.campaign_state.get_joined_officers_snapshot().has("zhang_he"):
|
||||
failures.append("Red Cliffs Fire choice bridge %s should keep Zhang He before Huarong" % choice_id)
|
||||
if bool(result.get("choice_applied", true)):
|
||||
failures.append("Red Cliffs Fire choice bridge %s should wait for a selected post-battle choice" % choice_id)
|
||||
if scene.campaign_state.pending_post_battle_choice_scenario_id != RED_CLIFFS_FIRE_SCENARIO_ID:
|
||||
failures.append("Red Cliffs Fire choice bridge %s should mark Red Cliffs Fire choice pending" % choice_id)
|
||||
var choice := _find_choice_by_id(result.get("post_battle_choices", []), choice_id)
|
||||
if choice.is_empty():
|
||||
failures.append("Red Cliffs Fire choice bridge missing choice: %s" % choice_id)
|
||||
scene.free()
|
||||
return
|
||||
if not scene.campaign_state.try_apply_post_battle_choice(choice, RED_CLIFFS_FIRE_SCENARIO_ID):
|
||||
failures.append("Red Cliffs Fire choice bridge %s should save selected choice" % choice_id)
|
||||
scene.free()
|
||||
return
|
||||
var flags: Dictionary = scene.campaign_state.get_flags_snapshot()
|
||||
if flags.get(expected_flag, false) != true:
|
||||
failures.append("Red Cliffs Fire choice bridge %s should set %s" % [choice_id, expected_flag])
|
||||
if flags.get(cleared_flag, true) != false:
|
||||
failures.append("Red Cliffs Fire choice bridge %s should clear %s" % [choice_id, cleared_flag])
|
||||
if scene.campaign_state.current_scenario_id != HUARONG_SCENARIO_ID:
|
||||
failures.append("Red Cliffs Fire choice bridge %s should advance to Huarong, got %s" % [choice_id, scene.campaign_state.current_scenario_id])
|
||||
if not scene.state.load_battle(
|
||||
HUARONG_SCENARIO_PATH,
|
||||
scene.campaign_state.get_roster_overrides(),
|
||||
scene.campaign_state.get_inventory_snapshot(),
|
||||
flags,
|
||||
scene.campaign_state.get_joined_officers_snapshot()
|
||||
):
|
||||
failures.append("Red Cliffs Fire choice bridge %s could not load Huarong" % choice_id)
|
||||
scene.free()
|
||||
return
|
||||
if scene.state.get_unit("zhang_he_ch31").is_empty():
|
||||
failures.append("Red Cliffs Fire choice bridge %s should deploy Zhang He in Huarong" % choice_id)
|
||||
elif not scene.state.is_required_deployment("zhang_he_ch31"):
|
||||
failures.append("Red Cliffs Fire choice bridge %s should require Zhang He in Huarong" % choice_id)
|
||||
var shop_items: Array = scene.state.get_shop_item_ids()
|
||||
if not shop_items.has(expected_shop_item_id):
|
||||
failures.append("Red Cliffs Fire choice bridge %s should expose shop item %s" % [choice_id, expected_shop_item_id])
|
||||
if shop_items.has(hidden_shop_item_id):
|
||||
failures.append("Red Cliffs Fire choice bridge %s should hide shop item %s" % [choice_id, hidden_shop_item_id])
|
||||
scene.free()
|
||||
|
||||
|
||||
func _find_choice_by_id(choices, choice_id: String) -> Dictionary:
|
||||
if typeof(choices) != TYPE_ARRAY:
|
||||
return {}
|
||||
@@ -4335,6 +4433,121 @@ func _check_red_cliffs_branch_camp_conversations(failures: Array[String]) -> voi
|
||||
harbor_scene.free()
|
||||
|
||||
|
||||
func _check_red_cliffs_fire_branch_camp_conversations(failures: Array[String]) -> void:
|
||||
var base_scene = _new_prebattle_scene_for(failures, "Red Cliffs Fire base camp", RED_CLIFFS_FIRE_SCENARIO_ID, RED_CLIFFS_FIRE_SCENARIO_PATH)
|
||||
if base_scene != null:
|
||||
if not base_scene.campaign_state.joined_officers.has("zhang_he"):
|
||||
base_scene.campaign_state.joined_officers.append("zhang_he")
|
||||
if not base_scene.state.load_battle(
|
||||
RED_CLIFFS_FIRE_SCENARIO_PATH,
|
||||
base_scene.campaign_state.get_roster_overrides(),
|
||||
base_scene.campaign_state.get_inventory_snapshot(),
|
||||
base_scene.campaign_state.get_flags_snapshot(),
|
||||
base_scene.campaign_state.get_joined_officers_snapshot()
|
||||
):
|
||||
failures.append("Red Cliffs Fire base camp should reload with Zhang He joined")
|
||||
else:
|
||||
if base_scene._camp_conversation_by_id("red_cliffs_fire_smoke_council").is_empty():
|
||||
failures.append("Red Cliffs Fire should expose the smoke council conversation")
|
||||
if base_scene._camp_conversation_by_id("red_cliffs_zhang_he_fire_boats").is_empty():
|
||||
failures.append("Red Cliffs Fire should expose Zhang He's fire boats conversation")
|
||||
if not base_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID).is_empty():
|
||||
failures.append("Red Cliffs Fire chain medicine should be hidden without reinforced chain flag")
|
||||
if not base_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID).is_empty():
|
||||
failures.append("Red Cliffs Fire night beans should be hidden without night raid flag")
|
||||
var merchant: Dictionary = base_scene.state.get_shop_merchant()
|
||||
if str(merchant.get("name", "")) != "Red Cliffs Fire Sutler":
|
||||
failures.append("Red Cliffs Fire shop merchant name should be present")
|
||||
var merchant_lines: Array = merchant.get("lines", [])
|
||||
if merchant_lines.size() < 2:
|
||||
failures.append("Red Cliffs Fire shop merchant should expose flavor lines")
|
||||
if base_scene._format_talk_status_text(base_scene._camp_conversation_entries()) != "Camp conversations | 2 topics":
|
||||
failures.append("Red Cliffs Fire base talk status should summarize two non-supply topics")
|
||||
base_scene.free()
|
||||
|
||||
var chain_scene = _new_prebattle_scene_for(
|
||||
failures,
|
||||
"Red Cliffs Fire reinforced chain camp",
|
||||
RED_CLIFFS_FIRE_SCENARIO_ID,
|
||||
RED_CLIFFS_FIRE_SCENARIO_PATH,
|
||||
{"reinforced_chain_line": true}
|
||||
)
|
||||
if chain_scene != null:
|
||||
if not chain_scene.campaign_state.joined_officers.has("zhang_he"):
|
||||
chain_scene.campaign_state.joined_officers.append("zhang_he")
|
||||
if not chain_scene.state.load_battle(
|
||||
RED_CLIFFS_FIRE_SCENARIO_PATH,
|
||||
chain_scene.campaign_state.get_roster_overrides(),
|
||||
chain_scene.campaign_state.get_inventory_snapshot(),
|
||||
chain_scene.campaign_state.get_flags_snapshot(),
|
||||
chain_scene.campaign_state.get_joined_officers_snapshot()
|
||||
):
|
||||
failures.append("Red Cliffs Fire reinforced chain camp should reload with Zhang He joined")
|
||||
else:
|
||||
var chain_medicine: Dictionary = chain_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID)
|
||||
if chain_medicine.is_empty():
|
||||
failures.append("reinforced chain flag should expose Red Cliffs Fire chain medicine")
|
||||
if not chain_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID).is_empty():
|
||||
failures.append("reinforced chain flag should not expose Red Cliffs Fire night beans")
|
||||
if not chain_medicine.is_empty():
|
||||
if chain_scene._format_talk_status_text(chain_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
|
||||
failures.append("Red Cliffs Fire chain talk status should show one ready supply")
|
||||
if not chain_scene._format_camp_conversation_button_text(chain_medicine).contains("Supply Panacea"):
|
||||
failures.append("Red Cliffs Fire chain medicine button should show Panacea supply")
|
||||
var before_panacea := int(chain_scene.campaign_state.get_inventory_snapshot().get("panacea", 0))
|
||||
chain_scene._apply_camp_conversation_effects(chain_medicine)
|
||||
if int(chain_scene.campaign_state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1:
|
||||
failures.append("Red Cliffs Fire chain medicine should add Panacea to campaign inventory")
|
||||
if int(chain_scene.state.get_inventory_snapshot().get("panacea", 0)) != before_panacea + 1:
|
||||
failures.append("Red Cliffs Fire chain medicine should refresh battle Panacea inventory")
|
||||
if not chain_scene.campaign_state.has_claimed_camp_conversation_effects(RED_CLIFFS_FIRE_SCENARIO_ID, RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID):
|
||||
failures.append("Red Cliffs Fire chain medicine claim should be saved")
|
||||
if chain_scene._format_talk_status_text(chain_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
|
||||
failures.append("Red Cliffs Fire chain talk status should show claimed supply after claim")
|
||||
chain_scene.free()
|
||||
|
||||
var raid_scene = _new_prebattle_scene_for(
|
||||
failures,
|
||||
"Red Cliffs Fire night raid camp",
|
||||
RED_CLIFFS_FIRE_SCENARIO_ID,
|
||||
RED_CLIFFS_FIRE_SCENARIO_PATH,
|
||||
{"ordered_night_raid": true}
|
||||
)
|
||||
if raid_scene != null:
|
||||
if not raid_scene.campaign_state.joined_officers.has("zhang_he"):
|
||||
raid_scene.campaign_state.joined_officers.append("zhang_he")
|
||||
if not raid_scene.state.load_battle(
|
||||
RED_CLIFFS_FIRE_SCENARIO_PATH,
|
||||
raid_scene.campaign_state.get_roster_overrides(),
|
||||
raid_scene.campaign_state.get_inventory_snapshot(),
|
||||
raid_scene.campaign_state.get_flags_snapshot(),
|
||||
raid_scene.campaign_state.get_joined_officers_snapshot()
|
||||
):
|
||||
failures.append("Red Cliffs Fire night raid camp should reload with Zhang He joined")
|
||||
else:
|
||||
var night_beans: Dictionary = raid_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID)
|
||||
if night_beans.is_empty():
|
||||
failures.append("night raid flag should expose Red Cliffs Fire night beans")
|
||||
if not raid_scene._camp_conversation_by_id(RED_CLIFFS_FIRE_CHAIN_MEDICINE_CONVERSATION_ID).is_empty():
|
||||
failures.append("night raid flag should not expose Red Cliffs Fire chain medicine")
|
||||
if not night_beans.is_empty():
|
||||
if raid_scene._format_talk_status_text(raid_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 supplies ready":
|
||||
failures.append("Red Cliffs Fire night raid talk status should show one ready supply")
|
||||
if not raid_scene._format_camp_conversation_button_text(night_beans).contains("Supply Bean"):
|
||||
failures.append("Red Cliffs Fire night beans button should show Bean supply")
|
||||
var before_bean := int(raid_scene.campaign_state.get_inventory_snapshot().get("bean", 0))
|
||||
raid_scene._apply_camp_conversation_effects(night_beans)
|
||||
if int(raid_scene.campaign_state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
|
||||
failures.append("Red Cliffs Fire night beans should add Bean to campaign inventory")
|
||||
if int(raid_scene.state.get_inventory_snapshot().get("bean", 0)) != before_bean + 1:
|
||||
failures.append("Red Cliffs Fire night beans should refresh battle Bean inventory")
|
||||
if not raid_scene.campaign_state.has_claimed_camp_conversation_effects(RED_CLIFFS_FIRE_SCENARIO_ID, RED_CLIFFS_FIRE_NIGHT_BEANS_CONVERSATION_ID):
|
||||
failures.append("Red Cliffs Fire night beans claim should be saved")
|
||||
if raid_scene._format_talk_status_text(raid_scene._camp_conversation_entries()) != "Camp conversations | 3 topics | 1 claimed":
|
||||
failures.append("Red Cliffs Fire night raid talk status should show claimed supply after claim")
|
||||
raid_scene.free()
|
||||
|
||||
|
||||
func _check_talk_menu_closes_on_cancel_and_reload(failures: Array[String]) -> void:
|
||||
var scene = _new_prebattle_scene(failures, "talk menu close guards")
|
||||
if scene == null:
|
||||
|
||||
@@ -1987,6 +1987,17 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
failures.append("could not load Red Cliffs Fire data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, red_fire_state, "030 base")
|
||||
var red_fire_conversations: Array = red_fire_state.get_briefing().get("camp_conversations", [])
|
||||
if red_fire_conversations.size() != 2:
|
||||
failures.append("030 base briefing should expose exactly two camp conversations")
|
||||
else:
|
||||
_check_camp_conversation(failures, red_fire_conversations[0], "red_cliffs_fire_smoke_council", "topic", "")
|
||||
_check_camp_conversation(failures, red_fire_conversations[1], "red_cliffs_zhang_he_fire_boats", "officer", "zhang_he")
|
||||
var red_fire_merchant := red_fire_state.get_shop_merchant()
|
||||
if str(red_fire_merchant.get("name", "")) != "Red Cliffs Fire Sutler":
|
||||
failures.append("030 shop should expose Red Cliffs Fire merchant name")
|
||||
if (red_fire_merchant.get("lines", []) as Array).size() < 2:
|
||||
failures.append("030 shop should expose merchant flavor lines")
|
||||
if red_fire_state.get_unit("zhang_he_ch30").is_empty() or not red_fire_state.is_required_deployment("zhang_he_ch30"):
|
||||
failures.append("030 should deploy Zhang He as a required officer")
|
||||
_check_shop_item_visibility(failures, red_fire_state, "war_drum", false, "030 base")
|
||||
@@ -1996,6 +2007,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
if not red_fire_chain_state.load_battle("res://data/scenarios/030_red_cliffs_fire.json", {}, {}, {"reinforced_chain_line": true}, ["zhang_he"]):
|
||||
failures.append("could not load Red Cliffs Fire reinforced chain data")
|
||||
else:
|
||||
var chain_medicine: Dictionary = _find_camp_conversation(
|
||||
red_fire_chain_state.get_briefing().get("camp_conversations", []),
|
||||
"red_cliffs_reinforced_chain_medicine"
|
||||
)
|
||||
if chain_medicine.is_empty():
|
||||
failures.append("030 reinforced chain should expose chain medicine")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, chain_medicine, "panacea", 1)
|
||||
if not _find_camp_conversation(
|
||||
red_fire_chain_state.get_briefing().get("camp_conversations", []),
|
||||
"red_cliffs_night_raid_beans"
|
||||
).is_empty():
|
||||
failures.append("030 reinforced chain should not expose night raid beans")
|
||||
_check_shop_item_visibility(failures, red_fire_chain_state, "imperial_seal", true, "030 reinforced chain")
|
||||
_check_shop_item_visibility(failures, red_fire_chain_state, "war_drum", false, "030 reinforced chain")
|
||||
|
||||
@@ -2003,6 +2027,19 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
if not red_fire_raid_state.load_battle("res://data/scenarios/030_red_cliffs_fire.json", {}, {}, {"ordered_night_raid": true}, ["zhang_he"]):
|
||||
failures.append("could not load Red Cliffs Fire night raid data")
|
||||
else:
|
||||
var night_beans: Dictionary = _find_camp_conversation(
|
||||
red_fire_raid_state.get_briefing().get("camp_conversations", []),
|
||||
"red_cliffs_night_raid_beans"
|
||||
)
|
||||
if night_beans.is_empty():
|
||||
failures.append("030 ordered night raid should expose night raid beans")
|
||||
else:
|
||||
_check_camp_conversation_effect(failures, night_beans, "bean", 1)
|
||||
if not _find_camp_conversation(
|
||||
red_fire_raid_state.get_briefing().get("camp_conversations", []),
|
||||
"red_cliffs_reinforced_chain_medicine"
|
||||
).is_empty():
|
||||
failures.append("030 ordered night raid should not expose chain medicine")
|
||||
_check_shop_item_visibility(failures, red_fire_raid_state, "war_drum", true, "030 ordered night raid")
|
||||
_check_shop_item_visibility(failures, red_fire_raid_state, "imperial_seal", false, "030 ordered night raid")
|
||||
|
||||
@@ -2013,6 +2050,48 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
_check_shop_items_unique(failures, red_fire_old_flags_state, "030 old Red Cliffs setup flags")
|
||||
_check_shop_item_visibility(failures, red_fire_old_flags_state, "war_drum", false, "030 old Red Cliffs setup flags")
|
||||
_check_shop_item_visibility(failures, red_fire_old_flags_state, "imperial_seal", false, "030 old Red Cliffs setup flags")
|
||||
if not _find_camp_conversation(
|
||||
red_fire_old_flags_state.get_briefing().get("camp_conversations", []),
|
||||
"red_cliffs_reinforced_chain_medicine"
|
||||
).is_empty():
|
||||
failures.append("030 old Red Cliffs setup flags should not expose chain medicine")
|
||||
if not _find_camp_conversation(
|
||||
red_fire_old_flags_state.get_briefing().get("camp_conversations", []),
|
||||
"red_cliffs_night_raid_beans"
|
||||
).is_empty():
|
||||
failures.append("030 old Red Cliffs setup flags should not expose night raid beans")
|
||||
|
||||
var huarong_state = BattleStateScript.new()
|
||||
if not huarong_state.load_battle("res://data/scenarios/031_huarong_retreat.json", {}, {}, {}, ["zhang_he"]):
|
||||
failures.append("could not load Huarong Retreat data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, huarong_state, "031 base")
|
||||
if huarong_state.get_unit("zhang_he_ch31").is_empty() or not huarong_state.is_required_deployment("zhang_he_ch31"):
|
||||
failures.append("031 should deploy Zhang He as a required officer")
|
||||
_check_shop_item_visibility(failures, huarong_state, "war_drum", false, "031 base")
|
||||
_check_shop_item_visibility(failures, huarong_state, "imperial_seal", false, "031 base")
|
||||
|
||||
var huarong_held_state = BattleStateScript.new()
|
||||
if not huarong_held_state.load_battle("res://data/scenarios/031_huarong_retreat.json", {}, {}, {"held_red_cliffs_line": true}, ["zhang_he"]):
|
||||
failures.append("could not load Huarong held Red Cliffs line data")
|
||||
else:
|
||||
_check_shop_item_visibility(failures, huarong_held_state, "imperial_seal", true, "031 held Red Cliffs line")
|
||||
_check_shop_item_visibility(failures, huarong_held_state, "war_drum", false, "031 held Red Cliffs line")
|
||||
|
||||
var huarong_opened_state = BattleStateScript.new()
|
||||
if not huarong_opened_state.load_battle("res://data/scenarios/031_huarong_retreat.json", {}, {}, {"opened_huarong_retreat": true}, ["zhang_he"]):
|
||||
failures.append("could not load Huarong opened retreat data")
|
||||
else:
|
||||
_check_shop_item_visibility(failures, huarong_opened_state, "war_drum", true, "031 opened Huarong retreat")
|
||||
_check_shop_item_visibility(failures, huarong_opened_state, "imperial_seal", false, "031 opened Huarong retreat")
|
||||
|
||||
var huarong_old_flags_state = BattleStateScript.new()
|
||||
if not huarong_old_flags_state.load_battle("res://data/scenarios/031_huarong_retreat.json", {}, {}, {"reinforced_chain_line": true, "ordered_night_raid": true}, ["zhang_he"]):
|
||||
failures.append("could not load Huarong old Red Cliffs Fire setup flag data")
|
||||
else:
|
||||
_check_shop_items_unique(failures, huarong_old_flags_state, "031 old Red Cliffs Fire setup flags")
|
||||
_check_shop_item_visibility(failures, huarong_old_flags_state, "war_drum", false, "031 old Red Cliffs Fire setup flags")
|
||||
_check_shop_item_visibility(failures, huarong_old_flags_state, "imperial_seal", false, "031 old Red Cliffs Fire setup flags")
|
||||
|
||||
for item_id in ["bronze_sword", "training_spear", "short_bow", "hand_axe", "iron_armor", "panacea"]:
|
||||
var item := state.get_item_def(item_id)
|
||||
|
||||
Reference in New Issue
Block a user