Captain Kagi reads: "When an enemy ship acquires a target lock, it must lock onto your ship if able."
So how does this interaction work with U-Boats?
Let's say that you have a Decimator directly in front of a U-Boat and the U-Boat has a focus token. Now let's say that Captain Kagi is directly behind the U-Boat.
When the U-Boat spends the focus to activate their torpedoes, and the intended target is the Decimator directly in front of them, does the target lock go on the Decimator or Captain Kagi?
R4 Agromech specifies that the target lock goes on the defender, but based on the Dark Curse ruling that I read, spending your focus token to activate a secondary weapon occurs before declaring a defender? But, if there's no defender yet, how can R4 Agromech acquire the target lock? I'm a bit muddled on the timing.
Your input is appreciated.