Improve Sishui Gate battle pacing

This commit is contained in:
2026-06-19 13:40:57 +09:00
parent f69438e964
commit 1cdb59aa1e
2 changed files with 212 additions and 14 deletions

View File

@@ -41,7 +41,7 @@ func _init() -> void:
failures,
"002 gated victory progress",
_progress_text("res://data/scenarios/002_sishui_gate.json", false),
"2군령에 전공 갱신"
"8군령에 전공 갱신"
)
_check_contains(
failures,
@@ -49,6 +49,12 @@ func _init() -> void:
_progress_text("res://data/scenarios/002_sishui_gate.json", false),
"적군 격파 0/"
)
_check_contains(
failures,
"002 gate capture progress",
_progress_text("res://data/scenarios/002_sishui_gate.json", false),
"관문 장악"
)
_check_contains(
failures,
"007 destination progress",
@@ -71,6 +77,7 @@ func _init() -> void:
_check_event_gated_multi_cell_objective_markers(failures)
_check_turn_gated_objective_does_not_create_marker(failures)
_check_opening_battle_requires_castle_capture(failures)
_check_sishui_gate_extended_pressure(failures)
_check_objective_update(failures)
_check_objective_notice(failures)
_check_terrain_recovery(failures)
@@ -304,6 +311,55 @@ func _check_opening_battle_extended_pressure(failures: Array[String]) -> void:
failures.append("opening battle should field 19 enemies after late reserve, got %d" % state.get_living_units(BattleStateScript.TEAM_ENEMY).size())
func _check_sishui_gate_extended_pressure(failures: Array[String]) -> void:
var state = BattleStateScript.new()
if not state.load_battle("res://data/scenarios/002_sishui_gate.json"):
failures.append("Sishui Gate pressure smoke could not load scenario")
return
if state.get_turn_limit() != 16:
failures.append("Sishui Gate should allow play through turn 16, got limit %d" % state.get_turn_limit())
if state.get_living_units(BattleStateScript.TEAM_ENEMY).size() != 8:
failures.append("Sishui Gate should start with 8 enemies, got %d" % state.get_living_units(BattleStateScript.TEAM_ENEMY).size())
if state._condition_gate_open({"after_event": "turn_8_gate_reserve"}):
failures.append("Sishui Gate final defeat-all condition should be gated until turn 8 reserve")
var marker_cells := state.get_objective_cells()
for gate_cell in [Vector2i(10, 3), Vector2i(11, 3), Vector2i(10, 4), Vector2i(11, 4), Vector2i(10, 5), Vector2i(11, 5)]:
if not marker_cells.has(gate_cell):
failures.append("Sishui Gate should mark gate capture cell %s: %s" % [str(gate_cell), str(marker_cells)])
if state.get_objective_cell_label(gate_cell) != "관문 장악":
failures.append("Sishui Gate gate marker should expose label at %s" % str(gate_cell))
var recovery_summaries := state.get_recovery_terrain_summaries()
var has_gate_recovery := false
var has_village_recovery := false
for summary in recovery_summaries:
if str(summary.get("name", "")) == "성채" and int(summary.get("count", 0)) >= 6 and int(summary.get("heal", 0)) == 8:
has_gate_recovery = true
if str(summary.get("name", "")) == "마을" and int(summary.get("count", 0)) == 4 and int(summary.get("heal", 0)) == 6:
has_village_recovery = true
if not has_gate_recovery:
failures.append("Sishui Gate should expose castle recovery terrain: %s" % str(recovery_summaries))
if not has_village_recovery:
failures.append("Sishui Gate should expose village recovery terrain: %s" % str(recovery_summaries))
state._run_events("turn_start", BattleStateScript.TEAM_ENEMY, 2)
state._run_events("turn_start", BattleStateScript.TEAM_ENEMY, 5)
state._run_events("turn_start", BattleStateScript.TEAM_ENEMY, 8)
if not state._condition_gate_open({"after_event": "turn_8_gate_reserve"}):
failures.append("Sishui Gate final gate should open after turn 8 reserve event")
if state.get_living_units(BattleStateScript.TEAM_ENEMY).size() != 16:
failures.append("Sishui Gate should field 16 enemies after gate reserve, got %d" % state.get_living_units(BattleStateScript.TEAM_ENEMY).size())
var scene = BattleSceneScript.new()
if not scene.state.load_battle("res://data/scenarios/002_sishui_gate.json"):
failures.append("Sishui Gate briefing smoke could not load scenario")
scene.free()
return
var overview := scene._format_briefing_battlefield_overview_text()
_check_contains(failures, "002 briefing map size", overview, "12칸 x 9칸")
_check_contains(failures, "002 briefing enemy count", overview, "적세 8명")
_check_contains(failures, "002 briefing village recovery", overview, "마을 4칸 +6")
_check_contains(failures, "002 briefing castle recovery", overview, "성채 6칸 +8")
scene.free()
func _check_opening_board_avoids_side_panel(failures: Array[String]) -> void:
var state = BattleStateScript.new()
if not state.load_battle("res://data/scenarios/001_yellow_turbans.json"):