Here is the sequence of what happens during an attack, step by step.
This order also applies to the use of other non-attack abilities, ignoring the parts that are specific to attacks.
1. Declare all legal targets for multiple targeting abilities like Blaster Barrage or Furious Assault.
2. Declare a target. If the attacker can choose from among several targets, declare which enemy to target. When attacking multiple targets designated in step 1, the character must still be a legal target when selected in this step.
3. Resolve effects that trigger when a character is targeted. Draw Fire comes into play on this step, effectively changing the target for the attack. (Draw Fire allows an attack to be diverted only if the attack follows the normal targeting rules. Thus, it can't divert the attacks of a Lightsaber Sweep or an attack of opportunity, because they don't use the targeting rules.)
4. When affecting multiple characters with a Force power like Force Burst or Force Lightning 2 for example, select one to affect.
5. Declare the attack, including combined fire, Careful Shot, Deadeye, and other abilities that must be declared before making the attack roll. The total bonus to attack, defense of the target, and possible damage (barring critical hits or later adjustments) should be declared and agreed upon before continuing.
6. Resolve abilities that occur before making the attack roll, like Pheromones.
7. Make the attack roll. You can spend Force points to reroll on this step, if necessary.
8. Resolve effects that occur when a character is attacked. For example, Sonic Attack takes effect as soon as the target is attacked, regardless of whether or not the attack hits, preventing the target from using Force powers (such as Lightsaber Deflect). If multiple effects are all triggered, use the simultaneous effects rule to determine the order in which they are resolved.
9. Determine the attack roll result. Some special effects trigger on the attack roll (such as Betrayal, Disintegration, and so on), while effects might stop the sequence entirely. However, if Disintegration is triggered, don't stop the sequence; it's resolved later unless the target is a huge or larger character in which case the damage is immediately converted to +40 damage. Effects that require a character to be hit do not take place yet.
10. Resolve effects that trigger when this character is hit. Some effects trigger (or can voluntarily be triggered) when the target is hit by an attack, such as Evade, Flurry, Lightsaber Block, Lightsaber Deflect, Lightsaber Reflect, and Lightsaber Riposte. (Force Points may be used to reroll saves on this step, if the character is still able to use Force Points during this turn.) If multiple effects trigger, use the simultaneous effects rule to determine the order in which they are resolved. You may see the results of one effect before resolving another, but no single effect may be resolved more than once. For example, a character can never Lightsaber Deflect the same attack twice. (Effects such as Flurry and Lightsaber Riposte begin new attack sequences that interrupt this sequence; resolve the new attack completely, then continue where you left off with the original attack.)
11. Resolve "when this character takes damage" effects. Some effects/abilities trigger (or can be voluntarily triggered) when the target takes damage, such as Shields and Bodyguard. Perform this step only if damage will be applied, using the simultaneous effects rule as necessary. If Bodyguard is being used, it must be resolved prior to other effects like Shields, Damage Reduction, and Dark Armor.
12. Calculate and apply the total damage and/or resolve Disintegration (if it was not converted to damage previously), and determine if the character is defeated. Resolve Avoid Defeat or any other "when defeated" effects that can prevent defeat in this step.
13. Resolve any remaining "when defeated" effects such as Impulsive Shot, Impulsive Sweep, Self-Destruct, Cleave, Rolling Cleave, Mon Mothma's commander effect, and so on. Use the simultaneous effects rule as usual. As in previous steps, Impulsive Shot and Impulsive Sweep can begin new attack sequences that interrupt this sequence; resolve the new attack completely, then continue where you left off with the original attack.
14. Remove the defeated character from the battle grid.
15. Resolve any non-damaging effects that have not yet triggered like movement from Force Push, or activation saves from Shockwave.
16. Resolve Twin Attack by returning to step 5 and repeating the remainder of the process (except this step.)
17. Resolve effects that affect multiple targets by returning to step 2 or affect multiple characters by returning to step 4 then selecting a character that has not been previously affected. If you reach this step and no characters are left to resolve, the procedure ends.