Improve Puyang raid battle pacing
This commit is contained in:
@@ -79,6 +79,18 @@ func _init() -> void:
|
||||
_progress_text("res://data/scenarios/004_qingzhou_campaign.json", false),
|
||||
"촌락 보호"
|
||||
)
|
||||
_check_contains(
|
||||
failures,
|
||||
"005 gated victory progress",
|
||||
_progress_text("res://data/scenarios/005_puyang_raid.json", false),
|
||||
"제9군령에 전공 갱신"
|
||||
)
|
||||
_check_contains(
|
||||
failures,
|
||||
"005 camp capture progress",
|
||||
_progress_text("res://data/scenarios/005_puyang_raid.json", false),
|
||||
"군영 장악"
|
||||
)
|
||||
_check_contains(
|
||||
failures,
|
||||
"007 destination progress",
|
||||
@@ -104,6 +116,7 @@ func _init() -> void:
|
||||
_check_sishui_gate_extended_pressure(failures)
|
||||
_check_xingyang_ambush_extended_pressure(failures)
|
||||
_check_qingzhou_campaign_extended_pressure(failures)
|
||||
_check_puyang_raid_extended_pressure(failures)
|
||||
_check_objective_update(failures)
|
||||
_check_objective_notice(failures)
|
||||
_check_terrain_recovery(failures)
|
||||
@@ -501,6 +514,65 @@ func _check_qingzhou_campaign_extended_pressure(failures: Array[String]) -> void
|
||||
scene.free()
|
||||
|
||||
|
||||
func _check_puyang_raid_extended_pressure(failures: Array[String]) -> void:
|
||||
var state = BattleStateScript.new()
|
||||
if not state.load_battle("res://data/scenarios/005_puyang_raid.json"):
|
||||
failures.append("Puyang Raid pressure smoke could not load scenario")
|
||||
return
|
||||
if state.get_turn_limit() != 17:
|
||||
failures.append("Puyang Raid 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("Puyang Raid should start with 8 enemies, got %d" % state.get_living_units(BattleStateScript.TEAM_ENEMY).size())
|
||||
if state._condition_gate_open({"after_event": "turn_9_lu_bu_encirclement"}):
|
||||
failures.append("Puyang Raid final defeat-all condition should be gated until turn 9 encirclement")
|
||||
var marker_cells := state.get_objective_cells()
|
||||
for camp_cell in [Vector2i(10, 3), Vector2i(11, 3), Vector2i(10, 5), Vector2i(11, 5)]:
|
||||
if not marker_cells.has(camp_cell):
|
||||
failures.append("Puyang Raid should mark camp capture cell %s: %s" % [str(camp_cell), str(marker_cells)])
|
||||
if state.get_objective_cell_label(camp_cell) != "군영 장악":
|
||||
failures.append("Puyang Raid camp marker should expose label at %s" % str(camp_cell))
|
||||
var recovery_summaries := state.get_recovery_terrain_summaries()
|
||||
var has_camp_recovery := false
|
||||
var has_supply_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)) == 8:
|
||||
has_camp_recovery = true
|
||||
if str(summary.get("name", "")) == "마을" and int(summary.get("count", 0)) == 4 and int(summary.get("heal", 0)) == 6:
|
||||
has_supply_recovery = true
|
||||
if not has_camp_recovery:
|
||||
failures.append("Puyang Raid should expose camp recovery terrain: %s" % str(recovery_summaries))
|
||||
if not has_supply_recovery:
|
||||
failures.append("Puyang Raid should expose supply 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_lu_bu_encirclement"}):
|
||||
failures.append("Puyang Raid final gate should open after turn 9 encirclement event")
|
||||
if state.get_living_units(BattleStateScript.TEAM_ENEMY).size() != 17:
|
||||
failures.append("Puyang Raid should field 17 enemies after encirclement, 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("Puyang Raid should not end before camp capture, got %s" % str(state.battle_status))
|
||||
var cao_cao: Dictionary = state.get_unit("cao_cao_ch5")
|
||||
cao_cao["pos"] = Vector2i(10, 3)
|
||||
state._check_battle_status()
|
||||
if str(state.battle_status) != BattleStateScript.STATUS_VICTORY:
|
||||
failures.append("Puyang Raid should end after encirclement falls and camp is captured, got %s" % str(state.battle_status))
|
||||
var scene = BattleSceneScript.new()
|
||||
if not scene.state.load_battle("res://data/scenarios/005_puyang_raid.json"):
|
||||
failures.append("Puyang Raid briefing smoke could not load scenario")
|
||||
scene.free()
|
||||
return
|
||||
var overview := scene._format_briefing_battlefield_overview_text()
|
||||
_check_contains(failures, "005 briefing map size", overview, "14칸 x 10칸")
|
||||
_check_contains(failures, "005 briefing enemy count", overview, "적세 8명")
|
||||
_check_contains(failures, "005 briefing village recovery", overview, "마을 4칸 +6")
|
||||
_check_contains(failures, "005 briefing camp recovery", overview, "성채 4칸 +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"):
|
||||
|
||||
Reference in New Issue
Block a user