If there are any Robin Hoods out there who are thinking about shooting down drones while they’re making deliveries, Amazon has a patented plan to stop you.

The patent, filed in 2014 but published just last week, lays out countermeasures for potential threats ranging from computer hacking to lightning flashes to bows and arrows.

If nothing else, the 33-page application illustrates how many things could possibly go wrong with an autonomous navigation system for unmanned aerial vehicles, or UAVs.

The “compromise system” that Amazon’s engineers propose relies on an array of sensors to orient the drone based on the sun’s position in the sky, if need be. That’s in case the drone gets confused by, say, lightning or a muzzle flash.

The system also provides for a mesh network, in which drones would check with each other and other data sources – including satellite signals – to verify the readings they’re following. If there’s a discrepancy in the data, the drone would tally up the verdicts from all of the sources available, then go with the majority opinion.

The onboard compromise system would be designed to keep the drone on track even if someone tried jamming its communication system. And if the drone became completely disoriented, it would be programmed to land safely and broadcast its location to its handlers.

Now, about those arrows: Amazon lays out a scenario in which an attacker shoots an arrow at a drone in the air. “The malicious person may be attempting to cause the UAV to fall to ground, so that that malicious person may steal or destroy the UAV,” the application reads.

Shorn of its numerical annotations, here’s what Amazon suggests would happen:

“The compromise module detects the presence of the arrow and generates the UAV compromise data indicating that a threat exists that may compromise the UAV. “The fail-safe module terminates the navigation to the first computing device, and the fail-safe module directs the UAV towards the ground. In some implementations, the fail-safe module may be configured to direct the UAV to take evasive maneuvers, navigate to a safe landing or parking zone for inspect, and so forth.”

The “so forth” includes sending out an alert with location data, so that the authorities can go out and look for the drone – and try tracking down Robin Hood.

Just because a patent has been granted doesn’t mean that Amazon will actually use all the features described in the application. As a rule, Amazon doesn’t comment on what may or may not be incorporated in its drones.

However, the publication of the patent application comes at a propitious time: Amazon already has started using drones to deliver items to a smattering of customers in England, and over the next couple of years it’s likely that the pace of drone operations will accelerate, in the United States as well as abroad.

Unfortunately, the urge to waylay robots on their rounds appears to be part of human nature, based on last year’s destruction of HitchBot, a road-traveling robot that was the subject of a social experiment. So maybe a bow-and-arrow attack isn’t all that far-fetched.

But there’s at least one plausible attack mode that isn’t covered in Amazon’s patent application: eagles.