What happens if a character’s declared action becomes impossible?

What happens if a character’s declared action becomes impossible before they can attempt it in the attack phase? Do the core rules support the idea that they get to pick a different action, or perform a similar action, or do they effectively lose the ability to act in that round?

For example, if a character wants to shoot someone but the target suddenly disappears from this plane of existence, is that character still forced to spend her round shooting at nothing, or can she now opt not to pull the trigger?

Since "shooting at the location where the target recently was" isn’t impossible, a better example might be if a character is disarmed before they can use a weapon. Can that character do nothing but follow through with their declared weapon-attack, albeit pantomimed?

Considering actions other than attacks, if someone declares that they’ll run across a room and through an open door, but the door is closed and bolted shut before their turn in the initiative order, are they then forced to run up to the door, or would they be allowed to remain in place since their intention is now impossible?

Notes

  • This is setting aside the rules for aborting an attack in favor of a defensive action.
  • It makes sense that changing an attack’s target during the attack phase would not be allowed, since that would give the attacker an unfair advantage in surprising a higher-initiative target who did not anticipate being attacked and thus had no defensive action prepared.