Units take damage before facilities and population. Weapon Platforms get destroyed before other units. Units are destroyed randomly, though in favor of fewest hit points being destroyed first (but not always). Facilities and population take damage at the same time.