[MUD-Dev] Modelling combat

Vladimir Prelovac tomcat at galeb.etf.bg.ac.yu
Fri Jul 14 18:16:06 New Zealand Standard Time 2000

It is interesting to speak about combat systems because no one knows for
sure what is the formula that "nature" uses in real combat to check if one
hits another. I think it might be intersting to discuss.

For example if you look at two very powerful and skillful characters engaged
in combat, it may last for very long time with both of them dodging and
parrying other person's blows until they both fall to the ground exhausted
(a combat in "Red Sonia" movie betwee Arnold and the girl comes to my mind).
On the other hand it can last for just a piece of a second, for example
battle between two samurai warriors. Of course the latter variant is what
you usually dont want in MUD as it makes it unintersting for players. Also
what would combat look like if two totally unskilled characters (newbies)
are engaged. Obviously we have to set up a model. I'll write how did I do
it, and would like to hear from other's their own ideas.

My idea was that two equally skillful fighters would hit each other 50% of
the time. That is a starting fact that I based my model on. Equally skilled
fighters are for example two total newbies or two most powerful players in
the mud (of lets say same level)

so this is how I did check_hit(attacker, defender) function


this is where attacker's "magic number" is calculated.
SKILL represents character's attacking skill  (be it with sword, axe,
unarmed or whatever is he using for this attack)
BONUSES represent the level of detail you want in your model. Currently I
include bonuses (or penalties) for attacker's agility, their physical state
(encumberance, tired, drunk..), fighting style (aggressive or evasive), some
racial bonuses that are matter of taste (for example: I feel that big
creatures like trolls have affinity towards large weapons like clubs, so
they tend to be better with it; or dwarves fight much better when defending
their mines - I didnt merge this with SKILL variable beacuse I think it is
different, like some special bonus given by the nature, almost a kind of a

Then the crucial part comes.
I felt like that in combat you can not MISS your opponent. This was very big
step to make but after some thinking (and some simulations of combat with my
friends - that was fun) we agreed. So you always want to hit your opponent,
and you cant not miss them, but rather they will avoid your attack with
dodge, parry or block.

So after attacker's bonuses are calulated a roll is made to randomly
determine what kind of a blow was that - kind that is best dodged, parried
or blocked. This maybe arguable, but this is a model and it is made to work
in big numbers.

there is 40% chance that the blow is of that kind that it would be best to
dodge it.
35% is for parry, and 25% for block.

These numbers are of course personal preference, and I "felt" them like


there is a dodge, parry and shiled skill. bonuses are similar to those
already described. Note: if parry was chosen and defender had no weapon to
parry that attack, he would try to alternatly dodge it, but would have a
certain penalty. That apllies to shiled block as well. I also made some
compensation to those percentages (40%, 35%, 25%), so if a character does
not have a weapon or a shiled, I assume he would make such moves that most
of the coming attacks would be of type dodge (for example those numbers
would become 65%, 20%, 15)

SKILL varies from 0 - 100. bonuses may add another 100 or more.

RESULT = ( (ATTACK - DEFENSE) + 100) / 2;

lets take a look at this. When two newbies fight, their skill is more or
less 0, their bonuses are also around 0 (considered two average humans for
result = ((0 - 0) +100) / 2 = 50

I got a 50 % chance of one hitting another. The chance stays the same given
that ATTACK and DEFENSE are not much different. Should ATTACK go up a bit,
or DEFENSE go down,  chance for hitting raises, and other way around..

I also put a 3% chance of making a certain miss, or incredibly well hit.

So that is how done it. Any comments welcome.

Vladimir Prelovac

MUD-Dev mailing list
MUD-Dev at kanga.nu

More information about the MUD-Dev mailing list