mangosR2 / mangos

Production (stable and testing) versions of current mangosR2 v2 server (World of Warcraft: Wrath of the Lich King, 3.3.5a client).
http://mangosr2.2x2forum.com/
GNU General Public License v2.0
175 stars 77 forks source link

Armor penetration bugged #1138

Open Tiquihit opened 12 years ago

Tiquihit commented 12 years ago

Honestly, I don't know how to report properly this issue but searching I found in TC github a topic with the SAME problem. The problem is ARP is not working properly in PvP, seems like it is double affected by resillence (?). At retail, warriors went allways with ARP gear in arena because it was bettet than STR. But here, going with ARP gear you are wasting your stats, your damage is worst.

Here's the topic https://github.com/TrinityCore/TrinityCore/issues/162

Could all of us discuss about this problem and search a solution? It's a major bug.

Thanks!

rsa commented 12 years ago

need more detailed bug defining. in style "currently ..., but must be ...". PS please, test SQL from #1054

Tiquihit commented 12 years ago

I guess you wanted to say #1064. Tomorrow or the next day I'll report the tests.

About armor penetration it must be bug. The tests I did the other day shows:

100% arpen and only 600 more damage is simply ridiculous when in PvP a feral druid or a warrior can only get ~60% as much (wasting lot of resillence).

This evening I will post these data with images.

Thanks

rsa commented 12 years ago

need tests without resilience always. seems ARP good, but resilience add big effect. also, with 100% ARP, your target has approx on 2000-8000 less armor then before (full equipped def-pal has 18k armor, with 100% ARP - 10k, retr-pal - 10k/7k), your sure that ARP must give much more effect, then current?

Tiquihit commented 12 years ago

Yes, only you need to see that in retail all warriors were ARP and in R2 are STR. But is logical, with STR you do more damage here.

The think is ARP in PvE is working good (30k ferocious bite I have done with trinket active (100% arp) but in PvP you don't see any damage increased being with ARP gear.

Later im gonna test with and without resilience and with/out ARP. Thanks

michalpolko commented 12 years ago

First of all, dont test crits but normal damage and also test things like Concussion Blow (stun from Warrior talent), spells that have constant damage, so you will eliminate unwanted variables.

If without things mentioned above you will have proper results, then you will know where to look for the real problem in low dmg.

Tiquihit commented 12 years ago

I tested it with mangle (http://www.wowhead.com/spell=33876) to an enemy with 15175 armor and 968 (20.54% against normal dmg) resilience (if necessary, I can test it with Concussion Blow).

Ganztxd commented 12 years ago

I tested 100% armor pen dmg on a target with no resilience. with armor. http://i49.tinypic.com/6ifiup.jpg No armor. http://i47.tinypic.com/2zimvzn.jpg

Seems armor is reducing to much dmg? If 569 is 100% of the dmg caused with no armor then 369 is 65% reduced from armor and in screen is 53% Regards.

michalpolko commented 12 years ago

Autoattack has min-max damage, test with a spell with static damage (like Concussion Blow - warrior protection talent)

Tiquihit commented 12 years ago

Yes, I'm going to test it with concussion blow with 0% and 100% against pally with and w/o resilience. But now I haven't so much time so in the next days I guess...

Edit: oh, I didn't see Ganztxd's post.

Ganztxd commented 12 years ago

In my test autoattack were done without melee weapon (fist) xD thats why the dmg is always the same :) Regards.

Kaasss-woe commented 11 years ago

I made some tests with arPen and Resilience. Here are the logs I got. The target has 4032 armor (-20.93% melee damage) and 816 resilience (-19.04% damage on critical hit, and additionnal -17.31% damage on any hit).

The damage dealer hits first with only 60 arPen (-4.29% armor) and then with 1874 arpen (-100% armor). The base damage are also greatly different, but as we talk about percentage resistance it's not a matter.

Tests are made with auto-attacks and then with a melee spell. The reductions are calculated in different fonctions, and the operations order is not the same, but here again, it's not a problem for the final result.

I - Tests with auto-attacks 1) with no arPen a. normal hit

Unit::CalculateMeleeDamage : damage = 499
    armorApplied : armor_affected_damage = 499 ; armor_reduced_damage = 402 ; damage = 402
    MELEE_HIT_NORMAL
    global resilience : resilienceReduction = 69 ; damage = 333

final damage is 333

b. critical hit

Unit::CalculateMeleeDamage : damage = 499
    armorApplied : armor_affected_damage = 499 ; armor_reduced_damage = 402 ; damage = 402
    MELEE_HIT_CRIT : mod = 0 ; damage = 804
    MELEE_HIT_CRIT : resilienceReduction = 153 ; damage = 651
    global resilience : resilienceReduction = 112 ; damage = 539

final damage is 539

2) with max arPen a. normal hit

Unit::CalculateMeleeDamage : damage = 639
    armorApplied : armor_affected_damage = 639 ; armor_reduced_damage = 639 ; damage = 639
    MELEE_HIT_NORMAL
    global resilience : resilienceReduction = 110 ; damage = 529

final damage is 529

b. critical hit

Unit::CalculateMeleeDamage : damage = 626
    armorApplied : armor_affected_damage = 626 ; armor_reduced_damage = 626 ; damage = 626
    MELEE_HIT_CRIT : mod = 0 ; damage = 1252
    MELEE_HIT_CRIT : resilienceReduction = 238 ; damage = 1014
    global resilience : resilienceReduction = 175 ; damage = 839

final damage is 839

II - Tests with spell Mangle (http://www.wowhead.com/spell=33876) like Tiquihit did 1) with no arPen a. normal hit

Unit::CalculateSpellDamage Spell: 48566 ; schoolmask: 1 ; damagetype: 1 ; damage: 1666
    SPELL_DAMAGE_CLASS_MELEE
    SPELL_DAMAGE_CLASS_MELEE : DamageMultiplier = 1.000000 ; damage = 1666
    SPELL_DAMAGE_CLASS_MELEE : damage after bonus = 1666
    SPELL_DAMAGE_CLASS_MELEE : Critical Hit : damage = 3332
    SPELL_DAMAGE_CLASS_MELEE : Critical Hit : reduction_affected_damage = 3332 ; damageCritReduction = 634 ; damage = 2698
    end case
    global resilience : resilienceReduction = 467 ; damage = 2231
    armor_affected_damage = 2231 ; armor_reduced_damage = 1798 ; damage = 1798

final damage is 1798

b. critical hit

CalculateSpellDamage Spell: 48566 ; schoolmask: 1 ; damagetype: 1 ; damage: 1658
    SPELL_DAMAGE_CLASS_MELEE
    SPELL_DAMAGE_CLASS_MELEE : DamageMultiplier = 1.000000 ; damage = 1658
    SPELL_DAMAGE_CLASS_MELEE : damage after bonus = 1658
    end case
    global resilience : resilienceReduction = 287 ; damage = 1371
    armor_affected_damage = 1371 ; armor_reduced_damage = 1105 ; damage = 1105

final damage is 1105

2) with max arpen a. normal hit

CalculateSpellDamage Spell: 48566 ; schoolmask: 1 ; damagetype: 1 ; damage: 3102
    SPELL_DAMAGE_CLASS_MELEE
    SPELL_DAMAGE_CLASS_MELEE : DamageMultiplier = 1.000000 ; damage = 3102
    SPELL_DAMAGE_CLASS_MELEE : damage after bonus = 3102
    end case
    global resilience : resilienceReduction = 537 ; damage = 2565
    armor_affected_damage = 2565 ; armor_reduced_damage = 2565 ; damage = 2565

final damage is 2565

b. critical hit (NB in this one I got talent predatory instincts, which explains +10% critical damage, 6930 instead of 6300)

CalculateSpellDamage Spell: 48566 ; schoolmask: 1 ; damagetype: 1 ; damage: 3150
    SPELL_DAMAGE_CLASS_MELEE
    SPELL_DAMAGE_CLASS_MELEE : DamageMultiplier = 1.000000 ; damage = 3150
    SPELL_DAMAGE_CLASS_MELEE : damage after bonus = 3150
    SPELL_DAMAGE_CLASS_MELEE : Critical Hit : damage = 6930
    SPELL_DAMAGE_CLASS_MELEE : Critical Hit : reduction_affected_damage = 6930 ; damageCritReduction = 1319 ; damage = 5611
    end case
    global resilience : resilienceReduction = 971 ; damage = 4640
    armor_affected_damage = 4640 ; armor_reduced_damage = 4640 ; damage = 4640

final damage is 4640

My conclusion is there seem to be no bug on arpen neither on resilience. They do what is said in player character sheet. Armor penetration and resilience are calculated separately, and only once. The percent reductions are respected (at least for 0 and 100% arPen).

P.S. @boxa I looked at this topic as you asked me, now you owe me a favor :) I'd like you to look at this one. https://github.com/mangosR2/mangos/issues/942 Thanks :)

rsa commented 11 years ago

@Krahken , I have already said that your discussions with boxa extremely useful. I'm not that well versed in all this math (so that went out the calculations required to understand the time :)), but it all looks very convincing. Thank you.

boxa commented 11 years ago

@rsa =) @Krahken Thank you for logs with damage values. Seems calculation is right.

One note: I looked at the code and see that in CalculateMeleeDamage() function, sequence of calculations is:

calculated damage, add damage bonus,

  1. calculated damage decrease by armor (with penetration) \ if crit added crit damage and bufs crit damage decreased by resilience **
  2. remaining damage decreased by resilience

should not be - if crit - first add crit damage, then decrease by armor, 1 move to 2?

and more: in CalculateSpellDamage sequence

calculated damage (and crit),

  1. overall damage decreased by resilience
  2. only after this damage decreased by armor

should not be 1 exchanged with 2?

you already have the output to the logs, try to change the sequence of calculation and look on damage. theoretically resilience should be calculated at the end.

p.s. i'll see today on #942

Kaasss-woe commented 11 years ago

All of these effets are about percent values. if we have -50% armor reduction, x2 critical damage, -20% resilience critical damage reduction and -15% resilience global damage reduction damage * 0.50 * 2 * 0.80 * 0.85 and damage * 2 * 0.80 * 0.50 * 0.85 should have the same result (damage * 0.68 in both cases).

p.s. i'll see today on #942

Thanks :) @rsa included me to the team yesterday (thanks) so I think I could commit it by myself, but as I didn't understand all previous russian comments, having an additionnal opinion is better :)