Refine Korean briefing and expand first battle

This commit is contained in:
2026-06-19 12:33:37 +09:00
parent 0a23b8aa75
commit 77db064d03
9 changed files with 403 additions and 170 deletions

View File

@@ -23,7 +23,7 @@ func _init() -> void:
failures,
"001 turn pressure risk",
_defeat_text("res://data/scenarios/001_yellow_turbans.json"),
"잔여 군령 7"
"잔여 군령 15"
)
_check_contains(
failures,
@@ -60,6 +60,7 @@ func _init() -> void:
_check_turn_gated_objective_does_not_create_marker(failures)
_check_objective_update(failures)
_check_objective_notice(failures)
_check_terrain_recovery(failures)
if failures.is_empty():
print("objective progress smoke ok")
@@ -111,8 +112,8 @@ func _check_objective_update(failures: Array[String]) -> void:
failures.append("objective update signal victory mismatch: %s" % str(signal_value.get("victory", "")))
if str(signal_value.get("defeat", "")) != "Cao Cao is defeated.":
failures.append("objective update signal defeat mismatch: %s" % str(signal_value.get("defeat", "")))
_check_log_contains(failures, logs, "軍令 개정: Defeat the new vanguard.")
_check_log_contains(failures, logs, "敗兆 개정: Cao Cao is defeated.")
_check_log_contains(failures, logs, "군령 갱신: Defeat the new vanguard.")
_check_log_contains(failures, logs, "패배 조건 갱신: Cao Cao is defeated.")
signal_values.clear()
logs.clear()
@@ -125,7 +126,7 @@ func _check_objective_update(failures: Array[String]) -> void:
failures.append("defeat-only objective signal should not include victory: %s" % str(defeat_signal_value.get("victory", "")))
if str(defeat_signal_value.get("defeat", "")) != "Supply train is lost.":
failures.append("defeat-only objective signal mismatch: %s" % str(defeat_signal_value.get("defeat", "")))
_check_log_contains(failures, logs, "敗兆 개정: Supply train is lost.")
_check_log_contains(failures, logs, "패배 조건 갱신: Supply train is lost.")
func _check_event_gated_objective_markers(failures: Array[String]) -> void:
@@ -205,26 +206,44 @@ func _check_log_contains(failures: Array[String], logs: Array, expected: String)
failures.append("expected log `%s` in `%s`" % [expected, logs])
func _check_terrain_recovery(failures: Array[String]) -> void:
var state = BattleStateScript.new()
if not state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
failures.append("terrain recovery smoke could not load scenario")
return
var cao_cao: Dictionary = state.get_unit("cao_cao")
cao_cao["pos"] = Vector2i(6, 5)
cao_cao["hp"] = 10
state._reset_team_actions(BattleStateScript.TEAM_PLAYER)
if int(cao_cao.get("hp", 0)) != 16:
failures.append("village terrain should recover 6 hp at phase start, got %d" % int(cao_cao.get("hp", 0)))
var boss: Dictionary = state.get_unit("yellow_turban_1")
boss["hp"] = 20
state._reset_team_actions(BattleStateScript.TEAM_ENEMY)
if int(boss.get("hp", 0)) != 28:
failures.append("castle terrain should recover 8 hp at phase start, got %d" % int(boss.get("hp", 0)))
func _check_objective_notice(failures: Array[String]) -> void:
var scene = BattleSceneScript.new()
scene._create_hud()
scene._on_objective_updated("Defeat the new vanguard.", "")
if scene.objective_notice_panel == null or not scene.objective_notice_panel.visible:
failures.append("objective notice panel should be visible after objective update")
elif not scene.objective_notice_label.text.contains("急詔 軍令改封") or not scene.objective_notice_label.text.contains("朱批Defeat the new vanguard."):
failures.append("objective notice label should use sealed edict wording: %s" % scene.objective_notice_label.text)
elif not scene.objective_notice_label.text.contains("군령 갱신") or not scene.objective_notice_label.text.contains("목표Defeat the new vanguard."):
failures.append("objective notice label should use Korean order wording: %s" % scene.objective_notice_label.text)
scene._on_objective_updated("", "Supply train is lost.")
if scene.objective_notice_panel == null or not scene.objective_notice_panel.visible:
failures.append("objective notice panel should be visible after defeat update")
elif not scene.objective_notice_label.text.contains("急詔 軍令改封") or not scene.objective_notice_label.text.contains("墨戒Supply train is lost."):
failures.append("objective notice label should use omen wording: %s" % scene.objective_notice_label.text)
if scene._format_log_entry_text("Objective updated: Defeat the new vanguard.") != "軍令 개정: Defeat the new vanguard.":
failures.append("objective log display should use edict wording")
if scene._format_log_entry_text("Defeat condition updated: Supply train is lost.") != "敗兆 개정: Supply train is lost.":
failures.append("defeat log display should use omen wording")
if scene._format_log_entry_text("軍令 개정: Defeat the new vanguard.") != "軍令 개정: Defeat the new vanguard.":
elif not scene.objective_notice_label.text.contains("군령 갱신") or not scene.objective_notice_label.text.contains("주의Supply train is lost."):
failures.append("objective notice label should use Korean risk wording: %s" % scene.objective_notice_label.text)
if scene._format_log_entry_text("Objective updated: Defeat the new vanguard.") != "군령 갱신: Defeat the new vanguard.":
failures.append("objective log display should use Korean order wording")
if scene._format_log_entry_text("Defeat condition updated: Supply train is lost.") != "패배 조건 갱신: Supply train is lost.":
failures.append("defeat log display should use Korean risk wording")
if scene._format_log_entry_text("군령 갱신: Defeat the new vanguard.") != "군령 갱신: Defeat the new vanguard.":
failures.append("localized objective log should pass through")
if scene._format_log_entry_text("敗兆 개정: Supply train is lost.") != "敗兆 개정: Supply train is lost.":
if scene._format_log_entry_text("패배 조건 갱신: Supply train is lost.") != "패배 조건 갱신: Supply train is lost.":
failures.append("localized defeat log should pass through")
if scene.objective_notice_timer <= 0.0:
failures.append("objective notice timer should be active")