How does spending tokens and modifying dice chances work?

By Blail Blerg, in X-Wing

My question began as trying to figure out this interaction:

Lambda with Sensor Jammer is attacked by Han Solo with Luke crew. Or attacked by Corvette with the Single Turbolasers.

When can you spend a focus token?

When does Sensor Jammer work?

I think it would work like this: Han rolls the Luke attack, Luke changes the focus to a hit, Sensor Jammer changes one of the hits to a focus. If Han has a focus (usually doesn't in modern builds), he can spend it now.

Defenders modify attack dice first, attackers modify defense dice first.

And Luke's ability to turn a focus into a hit only works for the second attack if the first fails to hit.

Edit: This is better suited to the rules subforum above.

Edited by Eltnot