How hard would it have been to kill a king leading his troops into battle?

Abraham Lincoln had a brush with death in 1864 when he went to inspect the battle at Fort Stevens. He got within range of Confederate snipers and a man next to him was shot. It’s possible that the soldiers shooting at him knew who he was, and tried to kill him, but just missed.