Bridge opening victory to Sishui
This commit is contained in:
@@ -27,6 +27,7 @@ func _init() -> void:
|
||||
_check_dialogue_localization_and_side(failures)
|
||||
_check_event_dialogue_side_passthrough(failures)
|
||||
_check_opening_battle_camp_context(failures)
|
||||
_check_opening_battle_post_battle_bridge(failures)
|
||||
_check_opening_battle_event_dialogue_structure(failures)
|
||||
_check_sishui_gate_event_dialogue_structure(failures)
|
||||
_check_xingyang_ambush_event_dialogue_structure(failures)
|
||||
@@ -661,6 +662,20 @@ func _check_opening_battle_camp_context(failures: Array[String]) -> void:
|
||||
failures.append("villager route report should mention %s: %s" % [expected, report_text])
|
||||
|
||||
|
||||
func _check_opening_battle_post_battle_bridge(failures: Array[String]) -> void:
|
||||
var state = BattleStateScript.new()
|
||||
if not state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
|
||||
failures.append("could not load opening battle for post-battle bridge")
|
||||
return
|
||||
var lines: Array = state.get_post_battle_dialogue()
|
||||
if lines.size() < 5:
|
||||
failures.append("opening battle should have a multi-beat post-battle bridge")
|
||||
var bridge_text := _dialogue_lines_text(lines)
|
||||
for expected in ["사수관", "화웅", "하후연", "조인", "난세의 길"]:
|
||||
if not bridge_text.contains(expected):
|
||||
failures.append("opening post-battle bridge should mention %s: %s" % [expected, bridge_text])
|
||||
|
||||
|
||||
func _check_opening_battle_event_dialogue_structure(failures: Array[String]) -> void:
|
||||
var state = BattleStateScript.new()
|
||||
if not state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
|
||||
@@ -1606,6 +1621,16 @@ func _camp_conversation_text(conversation: Dictionary) -> String:
|
||||
return "\n".join(parts)
|
||||
|
||||
|
||||
func _dialogue_lines_text(lines: Array) -> String:
|
||||
var parts: Array[String] = []
|
||||
for line in lines:
|
||||
if typeof(line) != TYPE_DICTIONARY:
|
||||
continue
|
||||
parts.append(str((line as Dictionary).get("display_speaker", (line as Dictionary).get("speaker", ""))))
|
||||
parts.append(str((line as Dictionary).get("text", "")))
|
||||
return "\n".join(parts)
|
||||
|
||||
|
||||
func _event_has_set_objective_action(event: Dictionary) -> bool:
|
||||
var actions: Array = event.get("actions", [])
|
||||
for action in actions:
|
||||
|
||||
Reference in New Issue
Block a user