Author Topic: Attack vs Defense, an initial analysis  (Read 1741 times)

0 Members and 1 Guest are viewing this topic.

Dweller admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 926
    • View Profile
Attack vs Defense, an initial analysis
« on: October 26, 2012, 12:58:23 AM »
Ok, so I've been pondering the melee attack vs defense balance. At some point I thought the defense stat needed to be revised, but now I'm not so sure. I have a test framework where I can try out different kinds of scenarios using the same data and code that is used in Dweller.

I let two warriors fight each other and varied their attack and defense stat to see how the damage was distributed and how much different values of attack and defense impact the result. The fight was made using shortsword and buckler. I varied attack and defense stats from 10 to 50 in increments of 10. 1000 melee attacks where made for each attack/defense configuration.

The most interesting thin to observe is how often the defender comes out of a melee attack unharmed:

At attack 10 versus defense 50 71% of attacks result in no damage
10 vs 40 = 65%
10 vs 30 = 56%
10 vs 20 = 44%
10 vs 10 = 40%
20 vs 10 = 38%
30 vs 10 = 34%
40 vs 10 = 35%
50 vs 10 = 31%

If you're at two, three or four times as much defense as the attack value it does make a significant difference. As the defense to attack ratio increases the number of missed attacks increase and the average damage decrease. At 10 vs 10 the average damage is between 4 and 5 points. At 10 vs 20 the average damage is between 3 and 4 points, and so on.

Another interesting thing is to look at average damage when attacks actually do harm the defender. As expected the maximum damage increase quite a bit as the attack value increases. The maximum damage doubles at 50 attack compare to when at attack 10.

Full results here:
https://docs.google.com/spreadsheet/ccc?key=0AhgDR4JS0YELdGR1VzBiZUhDYnlQaThFdF95bk91VXc
« Last Edit: October 26, 2012, 07:40:46 AM by Dweller admin »

Dweller admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 926
    • View Profile
Re: Attack vs Defense, an initial analysis
« Reply #1 on: October 26, 2012, 07:44:31 AM »
Note that a scenario where the defender is totally unharmed by an attack can be caused by up to three things:

1) the defender managed to dodge the attack (based on attacker and defenders speed)
2) the defender managed to block the attack using an off-hand item (shield etc)
3) the defender's defense roll was higher than the attacker's attack roll, ie the attack was poor and the armor protected the defender

Mateusz P-G

  • Hero Member
  • *****
  • Posts: 558
  • Polish Translator
    • View Profile
Re: Attack vs Defense, an initial analysis
« Reply #2 on: October 26, 2012, 11:49:33 AM »
The damage part (when the damage is actuall dealt) looks really good.
It's the miss/dodge part that is frustrating. Missing a goblin 3-4 times
in a row with a veteran Warrior sometimes can be really depressing.

It's even worse when summoners are around, since the casting time
for summoning seems to be rather short and every turn of missed or
no-damage attack means yet another enemy to fight.

Notice how most of the games go for only one of scenarios with their
combat system: either defence means hit/miss balance and damage
is always dealt fully, OR all attacks always hit and defence is stricltly
damage reduction. While neither of these is perfect, they provide fast
combat in which the player can easily guesstimate his chances.
When both of these parts are considered, it's a common practice to
make the hit chance reach 90-95% for the well skilled character, so
that the fight doesn't drag on forever with everyone wasting like half
of their time on missed attacks.
« Last Edit: October 26, 2012, 11:51:53 AM by Mateusz P-G »
If you remember the sprites from my avatar, know that you're awesome!

Dweller admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 926
    • View Profile
Re: Attack vs Defense, an initial analysis
« Reply #3 on: October 26, 2012, 12:43:16 PM »
Well, missing 3 to 4 times with a high level warrior probably means that the Goblin manages to dodge your attack. I'll do some more simulations and possibly adjust dodge chance (or remove dodge completely).