I'm trying to come up with a formula for the computer to determine who should win a match between an attacker and a defender, in a way that would improve how engaging the battle rules would be in a Player Vs Player scenario.
In short, what should the math be where I can build a character in a certain way, without having a clear-cut winner when my build goes up another build each time I attack.
Example
Attacker 15 strength - would this be a function of Attack and Stamina? 60% chance of a critical hit
Defender 7 Agility - would this be a function of Energy and Defense? 10 defense
The outcome should have the following: Who wins, how much damage dealt, health lost (health is normally 100)
Any play between Attack, Defense, Stamina, Energy and Crit Chance would be good for us to discuss as well.
Any help would be appreciated.
Extra info
It's a simple text based game where people can hit each other. Just a single hit not multiple.
A person has Stamina, Attack, Defense. Depending on the weapons equiped also increase your defense and attack.
At first comparing the attacks Attack vs defenders Defense was considered. But it results in to many draws. So we added in chance of a critical hit and change do dodging.
Attack = Users attack stat + weapons attack stat * {crit=2, hard=1.5, normal=1}(Chance) Defense = Users defense stat + weapson defense stat * {dodge=2, sway=1.5, normal=1}(Chance)
if draw who has the better chance wins.
It just seems to easy.
