Polish battle log location text
This commit is contained in:
@@ -28,6 +28,7 @@ func _init() -> void:
|
||||
_check_event_dialogue_side_passthrough(failures)
|
||||
_check_opening_battle_camp_context(failures)
|
||||
_check_opening_battle_tactical_spacing(failures)
|
||||
_check_opening_battle_log_location_labels(failures)
|
||||
_check_opening_battle_lure_line_ai_reaction(failures)
|
||||
_check_opening_battle_post_battle_bridge(failures)
|
||||
_check_sishui_gate_camp_context(failures)
|
||||
@@ -712,6 +713,42 @@ func _check_opening_battle_tactical_spacing(failures: Array[String]) -> void:
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_opening_battle_log_location_labels(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 log location labels")
|
||||
return
|
||||
|
||||
var sample_label := state._format_cell(Vector2i(1, 6))
|
||||
if sample_label.contains("(") or sample_label.contains(")") or sample_label.contains(","):
|
||||
failures.append("battle log location labels should not expose raw coordinates: %s" % sample_label)
|
||||
if not sample_label.contains("서측"):
|
||||
failures.append("battle log location labels should include battlefield zones: %s" % sample_label)
|
||||
|
||||
var logs: Array[String] = []
|
||||
state.log_added.connect(func(message: String) -> void:
|
||||
logs.append(message)
|
||||
)
|
||||
if not state.select_unit("cao_cao"):
|
||||
failures.append("could not select Cao Cao for log location check")
|
||||
return
|
||||
var moved := false
|
||||
for cell in state.get_movement_range("cao_cao"):
|
||||
if not state.get_unit_at(cell).is_empty():
|
||||
continue
|
||||
if state.try_move_selected(cell, true):
|
||||
moved = true
|
||||
break
|
||||
if not moved:
|
||||
failures.append("could not move Cao Cao for log location check")
|
||||
return
|
||||
var log_text := "\n".join(logs)
|
||||
if log_text.contains("?") or log_text.contains("(") or log_text.contains(")"):
|
||||
failures.append("battle movement logs should use polished Korean location text: %s" % log_text)
|
||||
if not (log_text.contains("서측") or log_text.contains("중앙") or log_text.contains("동측")):
|
||||
failures.append("battle movement logs should name battlefield zones: %s" % log_text)
|
||||
|
||||
|
||||
func _check_opening_battle_lure_line_ai_reaction(failures: Array[String]) -> void:
|
||||
var state = BattleStateScript.new()
|
||||
if not state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
|
||||
|
||||
Reference in New Issue
Block a user