Add Sishui Gate camp content
This commit is contained in:
@@ -6,6 +6,9 @@ const CAMPAIGN_PATH := "res://data/campaign/campaign.json"
|
||||
const SCENARIO_ID := "001_yellow_turbans"
|
||||
const SCENARIO_PATH := "res://data/scenarios/001_yellow_turbans.json"
|
||||
const CONVERSATION_ID := "northern_woods_cache"
|
||||
const SISHUI_SCENARIO_ID := "002_sishui_gate"
|
||||
const SISHUI_SCENARIO_PATH := "res://data/scenarios/002_sishui_gate.json"
|
||||
const SISHUI_CONVERSATION_ID := "sishui_quartermaster_antidote"
|
||||
const BRANCH_SCENARIO_ID := "003_xingyang_ambush"
|
||||
const BRANCH_SCENARIO_PATH := "res://data/scenarios/003_xingyang_ambush.json"
|
||||
const WUCHAO_SCENARIO_ID := "013_wuchao_raid"
|
||||
@@ -21,6 +24,7 @@ func _init() -> void:
|
||||
|
||||
_check_claim_updates_campaign_and_battle(failures)
|
||||
_check_shop_and_armory_preserve_claim(failures)
|
||||
_check_sishui_gate_camp_supplies(failures)
|
||||
_check_manual_checkpoint_reverts_claim(failures)
|
||||
_check_completed_replay_cannot_claim(failures)
|
||||
_check_conditional_camp_conversations(failures)
|
||||
@@ -107,6 +111,28 @@ func _check_shop_and_armory_preserve_claim(failures: Array[String]) -> void:
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_sishui_gate_camp_supplies(failures: Array[String]) -> void:
|
||||
var scene = _new_prebattle_scene_for(failures, "Sishui camp supplies", SISHUI_SCENARIO_ID, SISHUI_SCENARIO_PATH)
|
||||
if scene == null:
|
||||
return
|
||||
var conversation: Dictionary = scene._camp_conversation_by_id(SISHUI_CONVERSATION_ID)
|
||||
if conversation.is_empty():
|
||||
failures.append("Sishui should expose quartermaster antidote conversation")
|
||||
scene.free()
|
||||
return
|
||||
if not scene._format_camp_conversation_button_text(conversation).contains("Supply Antidote"):
|
||||
failures.append("Sishui quartermaster button should preview Antidote supply")
|
||||
var before_antidote := int(scene.campaign_state.get_inventory_snapshot().get("antidote", 0))
|
||||
scene._apply_camp_conversation_effects(conversation)
|
||||
if int(scene.campaign_state.get_inventory_snapshot().get("antidote", 0)) != before_antidote + 1:
|
||||
failures.append("Sishui quartermaster should add Antidote to campaign inventory")
|
||||
if int(scene.state.get_inventory_snapshot().get("antidote", 0)) != before_antidote + 1:
|
||||
failures.append("Sishui quartermaster should refresh battle Antidote inventory")
|
||||
if not scene.campaign_state.has_claimed_camp_conversation_effects(SISHUI_SCENARIO_ID, SISHUI_CONVERSATION_ID):
|
||||
failures.append("Sishui quartermaster claim should be saved")
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_manual_checkpoint_reverts_claim(failures: Array[String]) -> void:
|
||||
var scene = _new_prebattle_scene(failures, "manual checkpoint")
|
||||
if scene == null:
|
||||
|
||||
Reference in New Issue
Block a user