Riddle of Steel is a cool game with incredibly granular combat. Like, you roll based on your attack - opponent's defense, and then roll to see if you hit. If you hit, you roll to see if you hit where you planned to hit (head vs hand vs chest). Then you roll how much damage and/or (I forget if it's 1 or 2 rolls) what sort of injury they got.
I'm playing it up to make it sound worse than it probably is in-play, but reading the rules makes it sound horrific to play in-person.

I fiddled with the idea of programming a combat engine for it.
You could use a lot of if-else statements for the rolling logic, or perhaps a pandas data table as a lookup for the different percentiles. Could even add in a feature to keep the character's equipment to factor in getting hurt; different armors on different parts of the body protect differently. E.g., your hand might have a different armor value than your head or arm.

Since talking coding for a gaming system, I'll throw out a link to my R program of dice-roller: https://forums.giantitp.com/search.php?searchid=1332885

---

If you want to program a simple, interactive game in Python, I found the turtle add-in helpful. Made something like Space Invaders via it.
But that's not really applicable for this sort of thing.