This explains Battle Mechanics & Damage.
I copied this from a chat. English isn't their first language so wording is a bit off but to my knowledge this explains how damage is assigned in battle fairly accurately. If I'm mistaken then let me know because I don't want to steer others wrong.