Add camp talk supply claims
This commit is contained in:
@@ -39,6 +39,7 @@ func _check_battle_visual_data(failures: Array[String]) -> void:
|
||||
_check_camp_conversation(failures, conversations[0], "cao_cao_strategy", "officer", "cao_cao")
|
||||
_check_camp_conversation(failures, conversations[1], "xiahou_dun_vanguard", "officer", "xiahou_dun")
|
||||
_check_camp_conversation(failures, conversations[2], "northern_woods_cache", "topic", "")
|
||||
_check_camp_conversation_effect(failures, conversations[2], "bean", 1)
|
||||
var merchant := state.get_shop_merchant()
|
||||
if merchant.is_empty() or (merchant.get("lines", []) as Array).is_empty():
|
||||
failures.append("001 shop should expose merchant lines")
|
||||
@@ -88,6 +89,11 @@ func _check_scene_texture_loading(failures: Array[String]) -> void:
|
||||
failures.append("battle scene should find Cao Cao camp conversation by id")
|
||||
elif not scene._format_camp_conversation_button_text(strategy).contains("Cao Cao"):
|
||||
failures.append("camp conversation button text should include label/speaker")
|
||||
var cache := scene._camp_conversation_by_id("northern_woods_cache")
|
||||
if cache.is_empty():
|
||||
failures.append("battle scene should find cache camp conversation by id")
|
||||
elif not scene._format_camp_conversation_button_text(cache).contains("Supply Bean"):
|
||||
failures.append("camp conversation button text should preview supply effect")
|
||||
scene.free()
|
||||
|
||||
|
||||
@@ -282,6 +288,20 @@ func _check_attack_motion_signal(failures: Array[String]) -> void:
|
||||
failures.append("attack motion signal missing expected Cao Cao attack: %s" % str(motions))
|
||||
|
||||
|
||||
func _check_camp_conversation_effect(failures: Array[String], conversation: Dictionary, expected_item_id: String, expected_count: int) -> void:
|
||||
var effects: Array = conversation.get("effects", [])
|
||||
if effects.is_empty():
|
||||
failures.append("camp conversation %s should expose effects" % str(conversation.get("id", "")))
|
||||
return
|
||||
var effect: Dictionary = effects[0]
|
||||
if str(effect.get("type", "")) != "grant_item":
|
||||
failures.append("camp conversation effect should be grant_item: %s" % str(effect))
|
||||
if str(effect.get("item_id", "")) != expected_item_id:
|
||||
failures.append("camp conversation effect item mismatch: %s" % str(effect))
|
||||
if int(effect.get("count", 0)) != expected_count:
|
||||
failures.append("camp conversation effect count mismatch: %s" % str(effect))
|
||||
|
||||
|
||||
func _check_camp_conversation(failures: Array[String], conversation: Dictionary, expected_id: String, expected_group: String, expected_officer_id: String) -> void:
|
||||
if str(conversation.get("id", "")) != expected_id:
|
||||
failures.append("camp conversation id mismatch: expected %s got %s" % [expected_id, str(conversation.get("id", ""))])
|
||||
|
||||
Reference in New Issue
Block a user