there are an infinite number of possible options for simulating combat. i think we should go from simple to complex. the easiest option is a fight between two warriors.
each warrior has pieces of armor. for example, on the hands of plate armlets which passes only 5% of the incoming hits, but the hands are only a small part of the total area of the warrior's body, so their contribution to the overall protection(if we simulate the overall protection) is small. the body is wearing leather armor which passes 20% of incoming hits, it occupies a large area(which specifically it should be looked up in a guide of human anatomy) of the warrior's body. etc. that is, for each part of the body, we have a chance to pass damage and a percentage of the total body area- i.e. we can calculate the relative contribution of each element of defense to the overall defense, more precisely in the total percentage of how many hits will be completely blocked. you can also take into account that passed damage to the head is more important than in the hand. but regardless of how many criteria we will take into account, in the end we must come to the total percentage of completely blocked strikes for the warrior as a whole- this is our defense. of course, the developers will make a bug here and with 100% protection the simulation will never end, so you need to enter the maximum protection cap, for example only 99% of incoming hits wil be blocked regardless of anything.
for the simulation we can not take into account the type of damage, only its value. what is a battle of two fighters? this is an exchange of strikes until the amount of damage for one of them exceeds the value of its hitpoints. we "roll the dice" for each hit, and if it is below the overall protection defense threshold then the damage is not taken into account. yes, the simulation may be somewhat longer relative to the previous one, but we all have multiprocessor systems just created for this type of parallel calculations. that sometimes in the end we will get a result when the weak overcomes the strong(this happens in real life, called luck). according to the results of this combat we have one fighter with some remaining number of hitpoints- remember this is his current state, since the battle of two armies is a series of single combats. we also have a losing fighter whose hitpoints have gone into the negative- we will remember this value(it will be useful to us later).
how do introduce a horse into this equation? in two ways. if a warrior on a horse and with a bow(as long as there are arrows for the bow), then this increases the percentage of misses on it(does not exclude hits at all(remember the maximum protection cap), since in real life a horse can be killed or a warrior himself can make a mistake. in addition, the enemy can also have a bow. but we agreed not to consider the damage type, but if we can take into account, then we need to consider not only bows, but all other combinations of type of protection and type of damage that will complicate the task). if a warrior is on a horse but with a melee weapon, then this increases his damage by a certain percentage over that given by his weapon. initially, we consider a horseman as an archer(if he has a bow), and after he uses up arrows in a series of strikes(and if he is still alive by that time), we will consider him as a horseman with a melee weapon(if he has a melee weapon in his inventory). what to do if he has no weapons in his inventory(it should be borne in mind that developers will create such bugs) at all? then it is immediately a corpse with some random negative hitpoints value.
how to choose an opponent for each fighter? you can just "roll the dice". and we can calculate several pairs of fighters at once. the simulation ends when there is no one left alive on one side or for some other reason(for example, a timeout is a good solution to get around bugs).
but in real battles a large percentage of warriors survive. here we will need the previously stored negative values of hitpoints. we will restore a random number of hitpoints to everyone(the hero's medicine skill will be added to this case) and those who have above zero will return to the world of the living.
i did not think about a specific algorithm, it is something i came up with in a hurry. i was just talking about a system based on blocked damage(for combats) or on misses(for simulation), but in practice it is the same thing.
ps: what i am saying is that your pathos demonstration does not matter for me, because you are nothing(just like me, by the way). so you might as well just keep quiet in the future