If the rest of the Hero's fleet is destroyed but the Hero survives, they'll continue commanding the (now empty besides their ship) fleet. If a Hero's ship is destroyed in combat, but at least one other ship from their fleet survives, they'll revive at end of combat with minimal health. Every hero has a Hero Ship specific to their class these take a diverse set of modules (including some unique to Hero ships) and do not add any CP to the fleet. You can assign Heroes to your fleets, and they will participate in space combat. If the attacker's fleet contains a ship with the Tractor Beam module (only equippable on Behemoths and Carrier-class hulls), the defender is not allowed to Retreat.If not, the retreating fleet will be entirely destroyed (after a confirmation dialog warning about this). If there is a starlane connecting to a friendly or neutral system, the retreating fleet will take 60% health damage (possibly destroying already-damaged ships) and begin moving toward it. The defender attempts to leave the system before being destroyed by the opposing fleet.The battle ends after the third phase, or if either side loses all their ships. When the battle begins, the flotillas fire weapons at each other across three distinct combat phases, gradually moving to optimal ranges as determined by each fleet's tactics. Each fleet chooses a battle tactic, and distributes their ships across up to three flotillas, aided by some basic information provided about the enemy fleet's composition and effectiveness.
(If there are multiple hostile factions in the system, the attacker can choose which to engage.) From this position, the attacked fleet has 2 options, fight or retreat. It occurs when an attacker's fleet chooses to attack another hostile fleet in the same system (only possible in neutral or attacker territory if in cold war with the defender unless the attacker has "Righteous Fury" law) by taking the Attack action, which causes them to automatically engage the strongest hostile fleet. Ship combat takes place in orbit around systems.