If he turns it into a gift at the last moment, all your outposts lose 20 shields (except for the outpost the king arrives at). The king takes 1/3 of the drillers that the attacker uses, away from the victim sub/outpost, so that would be your bonus. But a king could be gifted to an opponent if the lower shields help an upcoming attack.
For example, a king cancels two security chiefs when it comes to shields.
So if it looks like he's sending a king out of the blue, and prepare to be gifted a king. Your response could be to send it back. Or enjoy it, if you have a large sub/outpost with many drillers those will be even stronger now. If you have a Hypnotist you can promote that for a second king, stacking them makes a really strong combo.