The rules of war protect people. Here’s how