How can you stop a player from hurting the enemy?

Here is a functional turn-based battle system: