Okay, I'm making a MUD right now and trying to implement a new combat system. My MUD is based on each player having different energy levels (Ranging from 1 into the billions) and I need some kind of equation that will determine the damage for two people battling.
PlayerA has a level of 406
PlayerB has a level of 719
Now, if PlayerA hits PlayerB, it should do slightly less damage than if PlayerB hits PlayerA, since they're pretty close in power. I've been trying to come up with a way to do this, so that it's one equal equation and I didn't have to do an IF statement and give the underdog an upper hand.
Any help will be much appreciated. Thanks.