diff --git a/src/game/engine/tests/integration/test_p2_58b_ambient_encounter.gd b/src/game/engine/tests/integration/test_p2_58b_ambient_encounter.gd index 68672945..5f31b565 100644 --- a/src/game/engine/tests/integration/test_p2_58b_ambient_encounter.gd +++ b/src/game/engine/tests/integration/test_p2_58b_ambient_encounter.gd @@ -78,6 +78,11 @@ func _make_state(grid: RefCounted) -> RefCounted: assert_not_null(state, "GdGameState must be registered") ## Attach the pre-seeded fauna grid. state.call("set_grid_from_gridstate", grid) + ## p2-71c — add_player_militarist refuses to spawn without the runtime units + ## catalog (MapUnit base_moves=0 otherwise). Load it before spawning. + var units_json: String = AiTurnBridge._harvest_runtime_units_json() + if not units_json.is_empty(): + state.call("set_units_runtime_catalog_json", units_json) ## Add one militarist player. Unit spawns near FAUNA_COL/ROW via ## add_player_militarist which places units close to the city. ## We use the fauna tile coordinates directly as the city so the unit @@ -130,6 +135,9 @@ func test_ambient_encounter_count_zero_on_barren_tile() -> void: if not is_instance_valid(state): return state.call("set_grid_from_gridstate", grid) + var units_json: String = AiTurnBridge._harvest_runtime_units_json() + if not units_json.is_empty(): + state.call("set_units_runtime_catalog_json", units_json) state.call("add_player_militarist", FAUNA_COL, FAUNA_ROW) state.set("seed", 42)