Show side event markers
This commit is contained in:
@@ -172,6 +172,7 @@ func _init() -> void:
|
||||
_check_event_gated_objective_markers(failures)
|
||||
_check_event_gated_multi_cell_objective_markers(failures)
|
||||
_check_turn_gated_objective_does_not_create_marker(failures)
|
||||
_check_opening_battle_side_event_markers(failures)
|
||||
_check_opening_battle_requires_castle_capture(failures)
|
||||
_check_opening_battle_capture_events(failures)
|
||||
_check_sishui_gate_extended_pressure(failures)
|
||||
@@ -327,6 +328,42 @@ func _check_turn_gated_objective_does_not_create_marker(failures: Array[String])
|
||||
failures.append("turn-gated objective should not create map markers: %s" % str(marker_cells))
|
||||
|
||||
|
||||
func _check_opening_battle_side_event_markers(failures: Array[String]) -> void:
|
||||
var state = BattleStateScript.new()
|
||||
if not state.load_battle("res://data/scenarios/001_yellow_turbans.json"):
|
||||
failures.append("opening side event marker smoke could not load scenario")
|
||||
return
|
||||
|
||||
var cache_cell := Vector2i(4, 2)
|
||||
var village_cell := Vector2i(6, 5)
|
||||
var initial_cells := state.get_event_marker_cells()
|
||||
if not initial_cells.has(cache_cell):
|
||||
failures.append("opening battle should mark the northern woods supply cache: %s" % str(initial_cells))
|
||||
if not initial_cells.has(village_cell):
|
||||
failures.append("opening battle should mark village supply side event cells: %s" % str(initial_cells))
|
||||
if state.get_event_marker_label(cache_cell) != "북숲 보급고":
|
||||
failures.append("northern woods cache marker should expose Korean label: %s" % state.get_event_marker_label(cache_cell))
|
||||
if state.get_event_marker_kind(cache_cell) != "supply":
|
||||
failures.append("northern woods cache marker should be a supply marker")
|
||||
if state.get_event_marker_label(village_cell) != "마을 보급":
|
||||
failures.append("village supply marker should expose Korean label: %s" % state.get_event_marker_label(village_cell))
|
||||
if state.get_event_marker_kind(village_cell) != "supply":
|
||||
failures.append("village supply marker should be a supply marker")
|
||||
|
||||
var cao_cao: Dictionary = state.get_unit("cao_cao")
|
||||
cao_cao["pos"] = cache_cell
|
||||
state._run_events("unit_reaches_tile", BattleStateScript.TEAM_PLAYER, 1, cao_cao)
|
||||
if state.get_event_marker_cells().has(cache_cell):
|
||||
failures.append("northern woods supply marker should clear after pickup")
|
||||
if int(state.get_inventory_snapshot().get("bean", 0)) < 1:
|
||||
failures.append("northern woods supply marker event should grant a Bean")
|
||||
|
||||
cao_cao["pos"] = village_cell
|
||||
state._run_events("unit_reaches_tile", BattleStateScript.TEAM_PLAYER, 2, cao_cao)
|
||||
if state.get_event_marker_cells().has(village_cell):
|
||||
failures.append("village supply marker should clear after securing the village")
|
||||
|
||||
|
||||
func _check_opening_battle_requires_castle_capture(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