# MUD Programming: Combat

• 10-10-2001
dizolve
MUD Programming: Combat
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.

Example:

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.
• 10-10-2001
vale
forest
You'd probably have better luck with this thread in the games section, but...

My 2 cents: if energy level can go into the billions, then the difference between 406 and 719 is really trivial... hardly a noticable difference in the scale of things. It's like saying, 'players A and B are both 25 years old, but A must be stronger and faster than B, because A was born 2 seconds before B'.

That said, perhaps you'd have better luck with some sort of percentage thing. Your formula would look at the difference between the two players, represent the difference as a percentage, and then use that percentage to determine what the modifier is.

• 10-10-2001
Aran
my friend worked out a rather nifty system of equations using sine curves for my game (but it's stats only range from 1 to 2500)... you may want to mess around with something like that.
• 10-10-2001
Maghappy
DBZ fan huh? I have the damage values used in the Dragonball Z card game on hand if you would like them. Values are based on physical combat but implimenting energy attacks wouldn't be to hard once you had a basis to go by. Energy attacks would deal an amount of damage directly porportional to the difference in powerlevels amoung the combatants(I made a very small DBZ game in a consule app once).

I am assuming that your are making a DBZ game and if not these values would work also. Sounds like you are preparing for some big Buu vs Goku SS level 3 battles to me;)
• 10-11-2001
dizolve
haha, you hit the nail on the head maghappy. yup, dbz fan, trying to get a decent all around DBZ mud codebase going. thanks for the help guys, i'll try some of your ideas.
• 10-12-2001
Maghappy
I wouldn't mind helping any if you need any assistance just drop me a line sometime. Is it going to be a windows program or console application?