It doesn't need to be so complicated. This is how I do it in Tabletop:

Target AC is 10 + Dex/Ability Modifiers + Shield + Armor + Magic Enhancements

Using cleric as example with Dex 16 (+3), a shield and studded leather armor and +2 for Haste. 16 HP

Any roll of less than 10 = Raw dodge. This means enemy fires or shoots and character dodges it by fading back for a moment or dodging to the side, etc. Like the game does now.

10-12 = Dodge + Deflect with weapon or shield (if wielded) because it represents ability to react quickly above and beyond someone's normal dodge ability. This would be sidestep while slapping enemy weapon to the side with the flat of your blade (or shield because if wielding a shield that is your primary defense), or something to that effect. Monks and Barbarians and Dragon blooded Sorcerers would do this more often with Unarmored Defense, etc.

13-14 = Block with shield. This is full on enemy weapon would hit you if you didn't have a shield so you threw it up to block. Enemy blade or whatever slams hard into the shield. Only applies if wielding a shield.

15-16 = enemy weapon hits but glances off armor. Only applies if wearing armor. This represents how if you didn't have armor, you'd certainly be cut.

17-18 = if it wasn't for the haste spell, he'd been hit, so enemy weapon glances off armor while character is Dodge + Deflect, all at the same time. Only applies if magical enhancement enabled.

19+ = Hit target. Rolls damage. Gets 8. Takes off half target damage = slash through armor on chest. Minor blood spilled but nothing severe. Nothing a bandage and some medicine can't help dull the pain to put you back in action.

Second hit. Does 2 damage = hit shoulder. Very little blood. It's just a scratch. Third hit. Does 5 more. Slashes side. About same blood as first attack.

Final hit. Rakes gut. Considerable blood gushes out onto the ground. Target staggers and falls. OR hit target in the head. Considerable blood gushes out of head wound. OR does critical hit and takes off 17 total damage (remaining damage + max HP). Insta-killed. Head lobbed off or run through the stomach or chest or even hacked in half. Ain't no coming back from that.

A computer could do this easily.