Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ MUDs
➜ General
➜ Combat damage equation
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Lerkista
(57 posts) Bio
|
Date
| Mon 07 Nov 2005 01:35 AM (UTC) |
Message
| To the mud coders, how do you manage damage??
i've str,dex,con,weapon value and armor value, (other stats like int,charisma don't count to calculate the damage)
i've put a max stats of 50 points, 50 for weapon value, and 250 for armor value
So what would be a good way to handle the damage??
Dex i consider that only affects the hit or miss factor, so maybe not to use it on damage
The main problem i have is to consider the other's player armor, the stats that are involved are
Player1 - str and weapon
Player2 - con and armor
Since the armor is higher than weapon, doing a str+weapon - con-armor don't work because with the max values the result are always <0, so i'm stuck with that formula
Any ideas??
| Top |
|
Posted by
| Zeno
USA (2,871 posts) Bio
|
Date
| Reply #1 on Mon 07 Nov 2005 02:03 AM (UTC) |
Message
| It depends on how much damage you expecting. It makes a large difference if players start off with 5hp compared to 1000hp. Try taking a look at some existing codebases such as ROM, SMAUG, or Circle. |
Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org | Top |
|
Posted by
| Lerkista
(57 posts) Bio
|
Date
| Reply #2 on Mon 07 Nov 2005 03:05 AM (UTC) |
Message
| Smaug, rom, etc uses to many variables, for example weapon mastery, armor mastery, etc, i want something simpler but fair
The amount of HP of the players can be adjusted without problem, but now the maximum is 442hp, 42+level*8, so a level 1 starts with 50hp
Having the damage formula everything else can be adjusted
| Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #3 on Mon 07 Nov 2005 03:08 AM (UTC) |
Message
| Take a look at this post of mine, it might give you some ideas:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=5959
For a formula I think you need to consider:
- How much damage the weapon does.
A lot depends on your figures, like Zeno said. Is 10 damage a lot or a little? Assuming that they are wielding a weapon that does 20 damage, then you could factor in strength, by saying something like "for every 10 strength you get 1 more damage from the weapon".
So, damage could be:
weapon damage + (strength / 10)
- How much the armor deflects.
A simple formula could be that for every 10 armor you reduce the attack by 2% (not 2). By having armor cause a percent reduction you never get to negative numbers.
Since you have 250 (max) armor, then 250 X (2 / 10) = 50%, giving a max reduction of 50%.
So, a fight might go:
- Weapon: 20 damage per hit
- Strength: 30 (adds 3 damage)
- Defender: 100 armor (reduces damage by 20%)
So, total damage received is:
23 * (100 - 20)/100 = 18.4 damage
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| Nick Gammon
Australia (23,158 posts) Bio
Forum Administrator |
Date
| Reply #4 on Tue 08 Nov 2005 03:03 AM (UTC) |
Message
| An example of a damage reduction formula for armour as used in World Of Warcraft game is at:
http://www.worldofwar.net/guides/damagereduction.php
Their formula is:
Damage-Reduction = armor / (armor + 85*level + 400)
... with maximum reduction capped at 75%.
You might need to tweak this depending on your armour and level ranges, but it works for them. That page also shows a graph of how the armour reduction levels out.
|
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
17,826 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top