Improve Qingzhou campaign battle pacing
This commit is contained in:
@@ -67,6 +67,18 @@ func _init() -> void:
|
||||
_progress_text("res://data/scenarios/003_xingyang_ambush.json", false),
|
||||
"동쪽 길목"
|
||||
)
|
||||
_check_contains(
|
||||
failures,
|
||||
"004 gated victory progress",
|
||||
_progress_text("res://data/scenarios/004_qingzhou_campaign.json", false),
|
||||
"제9군령에 전공 갱신"
|
||||
)
|
||||
_check_contains(
|
||||
failures,
|
||||
"004 village protection progress",
|
||||
_progress_text("res://data/scenarios/004_qingzhou_campaign.json", false),
|
||||
"촌락 보호"
|
||||
)
|
||||
_check_contains(
|
||||
failures,
|
||||
"007 destination progress",
|
||||
@@ -91,6 +103,7 @@ func _init() -> void:
|
||||
_check_opening_battle_requires_castle_capture(failures)
|
||||
_check_sishui_gate_extended_pressure(failures)
|
||||
_check_xingyang_ambush_extended_pressure(failures)
|
||||
_check_qingzhou_campaign_extended_pressure(failures)
|
||||
_check_objective_update(failures)
|
||||
_check_objective_notice(failures)
|
||||
_check_terrain_recovery(failures)
|
||||
@@ -435,6 +448,59 @@ func _check_xingyang_ambush_extended_pressure(failures: Array[String]) -> void:
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_qingzhou_campaign_extended_pressure(failures: Array[String]) -> void:
|
||||
var state = BattleStateScript.new()
|
||||
if not state.load_battle("res://data/scenarios/004_qingzhou_campaign.json"):
|
||||
failures.append("Qingzhou Campaign pressure smoke could not load scenario")
|
||||
return
|
||||
if state.get_turn_limit() != 17:
|
||||
failures.append("Qingzhou Campaign should allow play through turn 17, got limit %d" % state.get_turn_limit())
|
||||
if state.get_living_units(BattleStateScript.TEAM_ENEMY).size() != 8:
|
||||
failures.append("Qingzhou Campaign should start with 8 enemies, got %d" % state.get_living_units(BattleStateScript.TEAM_ENEMY).size())
|
||||
if state._condition_gate_open({"after_event": "turn_9_village_last_stand"}):
|
||||
failures.append("Qingzhou Campaign final defeat-all condition should be gated until turn 9 last stand")
|
||||
var marker_cells := state.get_objective_cells()
|
||||
for village_cell in [Vector2i(10, 3), Vector2i(11, 3), Vector2i(10, 5), Vector2i(11, 5)]:
|
||||
if not marker_cells.has(village_cell):
|
||||
failures.append("Qingzhou Campaign should mark village protection cell %s: %s" % [str(village_cell), str(marker_cells)])
|
||||
if state.get_objective_cell_label(village_cell) != "촌락 보호":
|
||||
failures.append("Qingzhou Campaign village marker should expose label at %s" % str(village_cell))
|
||||
var recovery_summaries := state.get_recovery_terrain_summaries()
|
||||
var has_village_recovery := false
|
||||
for summary in recovery_summaries:
|
||||
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_village_recovery:
|
||||
failures.append("Qingzhou Campaign should expose village recovery terrain: %s" % str(recovery_summaries))
|
||||
state._run_events("turn_start", BattleStateScript.TEAM_ENEMY, 3)
|
||||
state._run_events("turn_start", BattleStateScript.TEAM_ENEMY, 6)
|
||||
state._run_events("turn_start", BattleStateScript.TEAM_ENEMY, 9)
|
||||
if not state._condition_gate_open({"after_event": "turn_9_village_last_stand"}):
|
||||
failures.append("Qingzhou Campaign final gate should open after turn 9 last stand event")
|
||||
if state.get_living_units(BattleStateScript.TEAM_ENEMY).size() != 17:
|
||||
failures.append("Qingzhou Campaign should field 17 enemies after last stand, got %d" % state.get_living_units(BattleStateScript.TEAM_ENEMY).size())
|
||||
for enemy in state.get_living_units(BattleStateScript.TEAM_ENEMY):
|
||||
enemy["alive"] = false
|
||||
state._check_battle_status()
|
||||
if str(state.battle_status) != BattleStateScript.STATUS_ACTIVE:
|
||||
failures.append("Qingzhou Campaign should not end before village protection, got %s" % str(state.battle_status))
|
||||
var cao_cao: Dictionary = state.get_unit("cao_cao_ch4")
|
||||
cao_cao["pos"] = Vector2i(10, 3)
|
||||
state._check_battle_status()
|
||||
if str(state.battle_status) != BattleStateScript.STATUS_VICTORY:
|
||||
failures.append("Qingzhou Campaign should end after last stand falls and village is protected, got %s" % str(state.battle_status))
|
||||
var scene = BattleSceneScript.new()
|
||||
if not scene.state.load_battle("res://data/scenarios/004_qingzhou_campaign.json"):
|
||||
failures.append("Qingzhou Campaign briefing smoke could not load scenario")
|
||||
scene.free()
|
||||
return
|
||||
var overview := scene._format_briefing_battlefield_overview_text()
|
||||
_check_contains(failures, "004 briefing map size", overview, "14칸 x 10칸")
|
||||
_check_contains(failures, "004 briefing enemy count", overview, "적세 8명")
|
||||
_check_contains(failures, "004 briefing village recovery", overview, "마을 4칸 +6")
|
||||
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"):
|
||||
|
||||
Reference in New Issue
Block a user