Math debate regarding Elite buff + Shattered Defenses

Discuss pet battles, strategy and theorycrafting.
Post Reply
User avatar
Lolfixheal
Posts:229
Joined:November 9th, 2008
Pet Score:11928
Realm:Bronze Dragonflight-eu
Contact:
Math debate regarding Elite buff + Shattered Defenses

Post by Lolfixheal » July 30th, 2015, 10:49 am

Ever since this was active, I noticed this right away and it hasn't been changed in way. Its a favor to us pet battlers really, so I guess people don't want to report it as a bug or alike.

Its a really simple scenario, where you got shattered defenses debuff up on a tamer that has the elite buff. My discussion is more based on a mathematically approach to it.

Elite buff 'reduces damage taken by 50%' - it reduces damage taken by half
Shattered defenses debuff 'increases damage taken by 100%' - it doubles the damage taken

Whats the half of a double? Its 1.
Whats the double of a half? Its 1.

So having both effect active should equal each other out right? WRONG. Blizzard uses the % values on the tooltips additively rather than multiplicative. Where I learned math, Multiply and Divide comes before Adding and Substracting. I even think theres a american (I'm european) thing like "Order of Operations - PEMDAS".

Here is how the Blizzard game code does the calucation if both effects are on at the same time: -50% + 100% = 50% , they are adding the flat values together :D This is what happens currently ingame, where you actually get a 50% increase on your damage dealt instead :roll:

Here is how it should be calculated properly using an example of 450 damage dealt against a tamer with both effects active:

450 x 0,5 = 225 (Elite buff)

225 x 2 = 450 (Shattered Defenses debuff)

or

450 x 0,5 x 2 = 450

or

450 x 1 = 450


Taking the 450 damage, halfing it down to 225 and then applying the double damage taken effect to restore it up to 450 again. You multiply, you dont add.

The two effects should equal each other out using proper math or am I missing something completely here? Agree, disagree? I dont mind the poor math of Blizzard, its a serious boost to defeating tamers. 8-) Think about how valid bombteams and bypassing hard tamers using Shattered Defenses strategies are due to the fact its calculated wrong. Where would we have been today without this "bug" ?

User avatar
Oddjob
Posts:10
Joined:September 1st, 2014
Pet Score:3793
Realm:Eldre'Thalas-us
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by Oddjob » July 30th, 2015, 2:58 pm

This type of math with percentages, additive and subtractive, versus multiplicative, has been used for many other things in WoW for many years, so it is not unique to pet battles.

User avatar
Jerebear
Posts:1243
Joined:September 15th, 2013
Pet Score:13569
Realm:Llane-us
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by Jerebear » July 30th, 2015, 6:34 pm

As a note, this isn't an order of operations issue. Those arise when you have both types of operations (mult/div mixed with add/sub) in the same expression, such as 2 + 3 * 4, where you must do the multiplication before the addition. In this case it is more an issue of selecting the implementation of their algorithm (the are deciding to do addition instead of multiplication). Order of operations is a before/after decision rather than an A instead of B decision.

As noted by an above poster, additive vs multiplicative is not a new issue. It is most often times intentional. In fact at one point (either late Wrath or in Cata...I forget which) they did an overhaul of how player buffs stack, genned up a blog post and everything to explain their thoughts. They left some being additive and others multiplicative, sometimes just based on the source (self buff vs raid buff for example).

You might also note that the pet experience bonus buffs are additive as well (safari hat, pet treat, lesser pet treat, darkmoon tophat, pet exp bonus event).
Carry Pet Experience Reference Guide:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829

User avatar
Lolfixheal
Posts:229
Joined:November 9th, 2008
Pet Score:11928
Realm:Bronze Dragonflight-eu
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by Lolfixheal » July 31st, 2015, 4:47 am

Thanks for the replies, both of you have valid points regarding some aspects of WoW things working additively and others multiplicative. I know myself theres various pros/cons in using one method over the other. Take movement speed on a character as an example, because the numbers are so low it wouldn't make sense to make them multiplicative. I know aswell in WoD, they changed mounted movement speed from multiplicative to additive, probably due to ease-of-understanding or limiting our travelling speed. From my time tanking 25HC Madness of DW and having to mitigate the Impales, I also learned that damage reduction cooldowns stacked multiplicate (for good reason, else you would be invincible). I couldn't convince my guild that their google-spreadsheet of Impale-turns wouldn't work because they thought damage reduction cooldowns worked additively. They wanted a 70% DR for each of the 8 impales, so for some turns they thought a 40% Shield Wall + 30% Hand of Sacrifice would suffice. Lets just say my warrior tanking buddy consistenly died on specific Impale turns :D. Lets focus the discussion on a pet battle match shall we :)

In a pet battle match, your increased damage dealt buffs on your own pet stacks multiplicative. I've found that any combination of a racial buff, strong-against attack and 1 occurence of either Elite Buff or Shattered Defenses will also be calculated multiplicative. Whether you apply a single debuff for the enemy to take more or less damage, buffing your own pet to deal more or less damage, everything falls into the same category called "damage modifiers". All of those modifiers are being calculated multiplicative in pet battles. The only rule to the exception is Elite Buff + SD being active at the SAME TIME, then ONLY those two effects stack additively, rest is still multiplicatively.

I did a little testing with various combinations to confirm to myself that this is the case, so I wouldn't write nonsense up here on the forum. However should I be wrong or have missed something, I do apologize and would ask of you to state the example.

Now I have established that pet battle match damage modifiers works multiplicative across the board using different combinations of buffs and debuffs. Shouldn't the same basic game design be equal across the board and thus fair? How would you feel if say Beast racial would stack differently than Dragonkin racial, one being additive and the other multiplicative? They got the same design when active but with 2 different values, no?

Why is the combination of these 2 effects (Elite buff and SD) exception to the rule for damage modifiers in pet battles? An exception that has trivialized 'difficult' tamers who has the Elite buff (Beast of Fable, Tanaan Jungle).

User avatar
Kpb321
Posts:938
Joined:April 30th, 2013
Pet Score:3974
BattleTag®:kpb#1554
Realm:Sisters of Elune-us
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by Kpb321 » July 31st, 2015, 11:54 am

It's different categories for damage increases/decreases.


Everything that is a Percentage based on a buff/debuff on the target is done additively. Boss buff, Shattered defenses, Howl, Eetc. Any Percentage based buffs/debuffs on the attacker and the racial bonus I believe are another additive step that is separate from the ones on the target. + or - X amount of damage is another separate step and is actually done before the % based debuff I believe off hand. That works for and against you depending on the situation. If you opponent has something up that reduces the damage taking by some huge static number your Shattered Defenses or Howl isn't going to do much. But if you've got a Zandalari Raptor with Black Claw and Shattered Defenses your bonus damage from Black Claw will get doubled and you'll start doing ridiculous damage.

User avatar
FuxieDK
Posts:881
Joined:July 27th, 2009
Pet Score:14132
BattleTag®:FuxieDK#2678
Realm:Draenor-eu
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by FuxieDK » August 1st, 2015, 6:16 am

All defense is calculated BEFORE offence.

Take the Pandaren Fire Spirit fight as an example, we're all familiar with..
Anubis Idol vs Glowy:
Glowy attacks with swarm, dealing 3x50ish damage and applying Shattered Defense (2x damage)
Idol applies Stoneskin (-78 damage per attack)
Glowy continues swarm

How much damage does Glowy do to Idol? ((50x2)-78)x3 = 66? Nope..
((50-78)x2)x3 = 0 is the correct answer.

The 50 base damage is reduced by 78 (totalling zero), and only then, is it multiplied by two (shattered defense), yielding a harmless attack.. Repeated three times for a grand total of no damage at all..

User avatar
Lolfixheal
Posts:229
Joined:November 9th, 2008
Pet Score:11928
Realm:Bronze Dragonflight-eu
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by Lolfixheal » August 1st, 2015, 6:41 pm

Thanks for the replies, I've done some more testing and it turns out I'm wrong about some things. Its not a case of EB+SD, its all % debuffs/buff on your target stacking additively. So I tested the players side aswell and % debuffs/buffs stack additively here aswell. So % based damage modifiers in terms of debuffs and buffs all stack additively.

Using level 25 rare Darkmoon Monkey with Rake (231dmg) with Roar (25%), Beastracial (25%) against 1st pet of Antari in SMV who debuffed me with Attack Reduction (-25%):

Normal against with 25% + 25% - 25%:
231 x 1 x (1+0,25+0,25-0,25) = 289

After Antari I found a nearby Tainted Cockroach, again using Rake (231dmg) with Roar (25%) and Beastracial (25%):

Strong against with 25% + 25%:
231 x 1,5 x (1+0,25+0,25) = 521

I went to WoD's version of SMV and found a Royal Moth, again using Rake (231dmg) with Roar (25%) and Beastracial (25%):

Weak against with 25% + 25%:
231 x 0,66 x (1+0,25+0,25) = 229

This clearly shows I was wrong and that % damage modifers effects stack additively on the players side, and stacks additively on the enemys side. This settles the argument of fairness and equality as both sides works the same. The interesting thing we can derrive from this however is that the "strong, normal, weak" % damage modifers are not additive but multiplied in on the normal attack. We got dynamic tooltips on our attacks, showing "strong, normal, weak" realtime updated values allready multiplied. The game takes those values and multiplies with the combined additive value of % based damage modifers. They have probably done this for an ease-of-understanding, although I must admit it has confused me like hell :D.

It is also true that flat value buffs/debuffs are being calculated additively prior ANY multiplication with % based damage modifiers and also before "strong, normal, weak" % modifiers. I went to Darnak (3rd pet on Pandaren Earth Spirit tamer), he has a Stoneskin buff reducing attacks with a 80 flat value. Using same setup as above with the Darkmoon Monkey using Rake (231dmg) with Roar (25%) and Beastracial (25%) we get:

Normal against with 25% + 25%:
(231 - 80) x 1 x (1+0,25+0,25) = 227

I went again on Darnak with a blue quality level 25 PP Pocket Reaver using Metal Fist (361dmg) and Supercharge (125%), buffing it with Amplify Magic (50%) from a Mini Mindslayer that sadly had to sacrifice itself for the research. This was to make sure when the 80 value from Stoneskin was being subtracted as previous example had a 1 multiplier because it was a normal against attack.

Strong against with 50% + 125%:
(361 - 80) x 1,5 x (1+0,50+1,25) = 1159

This confirms that flat value buffs/debuffs are being calculated prior any multiplication, both % based damage modifers and the "strong, normal, weak" multiplier. The Glowy example that was kindly provided also shows if you deal less 'normal against' damage against a target with a Stoneskin buff or similiar you will deal 0 damage. Anything multiplied with 0 gives 0. An average player would simply take the number from a flat value buff/debuff and substract that from the number on his tooltip. However this is wrong and gives you a false value should you either be "weak against" or "strong against" the opponents pet, because the tooltip values have allready been multiplied. The easy-of-understanding just suddenly went out the window again I believe.

User avatar
Jerebear
Posts:1243
Joined:September 15th, 2013
Pet Score:13569
Realm:Llane-us
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by Jerebear » August 2nd, 2015, 9:43 am

This thread might be of interest to you. Last year we had a similar discussion as well. I believe the end result was:

damage = (1+APB-APD)*(Base+FD-FB)*(1+PD-PB)

where:

APB = attacker % buff (squak)
APD = attacker %debuff (affected by weakness)
FD = defender Fixed debuff (affected by Black Claw)
FB = defender Fixed buff (affected by Shell Shield)
PD = defender percentage debuff (affected by shattered defenses)
PB = defender percentage buff (crouch)

*note that multiple ones are additive with each other, so 2 PB's would be added together before the sum is subtracted out.

It doesn't include strong/weak modifiers, but you would just multiply them in:

damage = (1+APB-APD)*(Base+FD-FB)*(1+PD-PB)*SWM

where SWM = Strong/Weak modifer.

Old topic location:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=3&t=10757&p=86398&hilit=debuff#p86398

Note that it doesn't inlude unmodifiable damage (UMD) attacks like explode which are unaffected by both percentage and fixed damage buffs and debuffs or things like racials (magic caps total damage, beast and dragonkin multiply damage again)
Carry Pet Experience Reference Guide:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829

User avatar
Lolfixheal
Posts:229
Joined:November 9th, 2008
Pet Score:11928
Realm:Bronze Dragonflight-eu
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by Lolfixheal » August 4th, 2015, 11:18 am

Thanks for the link. I tried to search first myself before making my topic but didn't find anything. Might have been using wrong keywords. Its an interesting read and fully agree on Poofahs opinion in his last reply, that this isn't intuitive. You can't easily calculate your damage ingame at a glance. Tooltip allready being multiplied even though you need to reduce Stoneskin first, by checking the base value in the petjournal instead. You add buffs and debuffs together, then you multiply. Its a jungle, a mess. I'm glad to see the equation you concluded back in 2014 is similiar to what I found after seeing I was wrong at first.

Damage = (1+APB-APD)*(Base+FD-FB)*(1+PD-PB)*SWM is the correct equation as I see it too. Its the same as mine except I didn't multiply against % based damage modifiers on the opponent as my test subjects didn't have any.

You say racials like Magic, Beast and Dragonkin aren't affected by the above equation. Magic does indeed hardcap your damage. I had to move away from a dragonkin pet as my test subject because it did too much damage against magic pet, and I didn't get correct numbers because the Magic Racial occured :S. However I think you're wrong in saying that Beast and Dragonkin racials are being multiplied again. You can see in my examples using the Darkmoon Monkey with the Beast racial active, that the 25% works like any other additively-stacking % based damage modifier.

User avatar
Jerebear
Posts:1243
Joined:September 15th, 2013
Pet Score:13569
Realm:Llane-us
Contact:

Re: Math debate regarding Elite buff + Shattered Defenses

Post by Jerebear » August 8th, 2015, 9:48 am

Lolfixheal wrote: You say racials like Magic, Beast and Dragonkin aren't affected by the above equation. Magic does indeed hardcap your damage. I had to move away from a dragonkin pet as my test subject because it did too much damage against magic pet, and I didn't get correct numbers because the Magic Racial occured :S. However I think you're wrong in saying that Beast and Dragonkin racials are being multiplied again. You can see in my examples using the Darkmoon Monkey with the Beast racial active, that the 25% works like any other additively-stacking % based damage modifier.
Nope, I didn't say they aren't affected. I said they weren't included. You are right about the beast and dragon kin racials. They would be part of APB. Magic racials would be MAX () equation mods to the original
Carry Pet Experience Reference Guide:
http://www.warcraftpets.com/community/forum/viewtopic.php?f=10&t=8829

Post Reply