Atlantiss / NetherwingBugtracker

Official bugtracker for the Netherwing and Karazhan (2.4.3) realms.
52 stars 36 forks source link

[Spell] Partial resistance on non-binary spells #4042

Closed Realnairoby closed 5 years ago

Realnairoby commented 5 years ago

Description: There are 2 kinds of resistance. Normal resistance and a level-based resistance.. Some bosses have resistance against one magic school, called the normal resistance. (You can reduce this with CoE and Spell Penetration). However theres also a level-based base resistance every mob got for every level its above the player. Its a complete different resistance system and will lead into partial resists of casted non-binary spells. Its a bit like the Hit-System. You can get up to 16% hit, however there will always be a 1% chance for a miss. Its the same here, no matter how much spell penetration or debuffs you are using you can't go below this level-based resistance.

Current behaviour: I haven't noticed any partial resistance here yet nor did i find anything about it on the bugtracker.

Expected behaviour: For every level a boss is above the player he should gain a level-based resistance value, which will lead into a partial resist with either 0, 25, 50, 75 or 100% resist of the spell.

The Third Calculation: Resistances The Basics

The third thing that is checked when casting a spell at a hostile target is how much, if any, of the damage will be resisted. When we take resistances into consideration, a damage spell can do more than just hit or miss. It’s damage can be reduced by: 25%, 50%, or 75% as well. This shows up in the combat log as “Your hits for ( resisted)”.

Your spell school resistances increases the chance that you will resist spells of a given spell school. When attacking other players or monsters, their spell resistances increase the chance that they will resist your spells.

You can see what your base spell school resistance is by pressing “c” and looking at your character pane. You will have values listed for Shadow Resistance, Nature Resistance, Arcane Resistance, Frost Resistance, and Fire Resistance. There is not a Holy Resistance stat for player characters.

Note: Resistances affect spell schools and not spell lines. (Click here for more information on the difference between spell schools and spell lines.)

The listed resistance stats on your character pane are a total of your:

  • Gear bonuses to resistances (including enchants and gems)
  • Class buffs that affect resistances
  • Potions/elixirs, etc.
  • And your racial bonus (if applicable)

Note that class buffs/auras/totems that increase a player’s resistances do not stack. Prayer of Shadow Protection will not stack with the paladin’s Aura of Shadow Resistance. A shaman’s Nature Resistance totem will not stack with Aspect of the Wild. You will only have the highest amount provided, so keep that in mind.

What Spell Resistance Does

Spell resistance gives a chance to resist spells of the corresponding spell school (shadow resistance for shadow school spells, etc.). How much gets resisted depends not only how much spell resistance you have, but the target’s level as well. Spell resistance can be a number anywhere ranging from 0 to 365 (it can be more than that, but 365 is the practical limit, explanation below). How the numerical stat works out is that it gives you percent chance to resist spells (and damage) of a given school.

There is a formula for this, as follows:

Average Resist Rate of Defender (as a decimal) = 0.75 (defenderSpellResistance) / (5attackerLevel)

It should be noted that a defender (whether mob or player) can never have a better than 75% resistance rate from spell resistance. It caps out at 75%. Since the highest level target we can encounter is effectively level 73, the practical upper limit on spell resistance is 365 (or, in terms of PvP, the practical limit is 350 since the highest level we would see is level 70). The 75% maximum in terms of spell resistance can be thought of as just being 5 times the attacker’s level (300 for a level 60 character, for instance).

Example: I am attacking another level 70 player who has a shadow protection buff for 70 shadow resistance. I am hurling every shadow spell I have at the other player. Using the formula above, I can calculate this other player should, on average, resist 15% of the my shadow spells and shadow damage.

0.75 (defenderSpellResistance) / (5attackerLevel) = 0.75 (70) / 570 = 52.5 / 350 = 0.15 = 15%

The phrases “resistance rate” and “average resistance” (used interchangeably) may need a little elaboration: It means that spells (and spell damage) from that particular school are resisted at an average rate over time. It doesn’t mean that you will automatically only do (or take) that much less damage.

So, for instance, if a target you are attacking has enough spell resistance to have an average resistance rate of 25% against your spells (computed using the above formula), it doesn’t mean that all your damage spells will individually do 25% less damage. If you average them, then yes, you should see results like that. But some will fully hit, some will be fully resisted, some will do half damage, etc.

Binary and Non-Binary Spells

Spell Resistance functions slightly differently depending on what kind of spell you are casting. There are only two different kinds of spells in this regard: Binary and Non-Binary.

Binary spells as named as such as there are only two outcomes for them; they can either hit or miss. Spells that do no damage, or that have a snare effect built in to them (like Mind Flay or Frostbolt), are binary spells. Examples of some priest spells that are binary: Vampiric Embrace, Mind Flay, Dispel Magic, Chastise.

Everything else is non-binary. Since there is a damage component in them, the damage can be fully resisted, 75% resisted, 50% resisted, 25% resisted, or can hit for normal damage. Some priest spells that are non-binary: Mind Blast, Holy Fire, Shadowguard, Smite.

DoTs like Vampiric Touch and Shadow Word: Pain are binary in their initial cast, but each damage tick can fall victim to resists just as a non-binary spell.

Effective Resistance

There are other things that can affect spell school resistance that would not show up on a character pane. The chance that a spell is resisted depends on the amount of effective spell school resistance a mob or player has to the school of magic that you are casting after all these other factors are taken into account.

The initial effective spell school resistance is just the school resistance stat (mentioned above) corresponding to what is being cast (the target’s shadow resistance for when you are casting shadow school spells, etc.). Most mobs will have no base resistances, and most players will only have what is granted to them by racial bonuses (dwarves’ frost resistance, etc.) or from class spells (Shadow Protection, etc.). This is also modified by gear, enchants, etc., as mentioned above.

The second thing that could change a target’s effective spell resistance is the difference in level between you and your opponent. For non-binary spells only: Each difference in level gives a 2% resistance chance that cannot be negated (by spell penetration or otherwise). In other words, if you are attacking a mob three levels higher than yourself (like a boss), even if that mob has no base spell resistance to speak of, the level difference between you an it awards it a non-negatable 6% spell resist against the spell school you are casting from (a total of 24 spell resistance if you are level 60, 28 at level 70). Again, let me repeat, level-based spell resistance applies to non-binary spells only.

Here is a table illustrating how much level-based spell resistance your target would have per level, depending on your level:

                              Your Level          |             Target’s Bonus SR (per level)
                                    10                 |                            1.33
                                    20                 |                            2.67
                                    30                 |                            4
                                    40                 |                            5.33
                                    50                 |                            6.67
                                    60                 |                            8
                                    70                 |                            9.33

A basic formula to determine the amount of level-based spell resistance granted would be: levelDifference * bonusSRperLevel.

Example: You are level 60 attacking a target four levels higher than you. That target will then have an non-negatable 32 spell resistance against your non-binary spells.

The last thing that modifies the effective spell resistance is the amount of spell penetration the attacker has. Each point of spell penetration reduces the base spell resistance of the target by a point (but it cannot be reduced below zero, and it cannot off-set the level-based spell resistance for non-binary spells as mentioned above).

Calculating Effective Spell Resistance

The target’s effective spell resistance is equal to its base spell resistance (from racial abilities, gear, buffs, items, etc.) minus your spell penetration. For non-binary spells, it is then increased by a 2% rate in resistance per each level higher the target it than the caster.

As a formula for a target’s effective spell resistance against you: https://dwarfpriest.files.wordpress.com/2008/01/spellpen.gif?w=426 Notes: Total cannot go below zero. Level-based spell resistance only affects non-binary spells.

Example: You have 10 spell penetration. The player you are attacking has a Shadow Protection buff for 70 shadow resistance. This player now only effectively has 60 shadow resistance against you, not 70.

Example: You are attacking mobs two levels higher than you are that have no special spell resistances to speak of. Given your level, and the level difference between you and the mobs you are fighting, they effectively have 10 spell resistance against you. Even if you have 10 spell penetration (or more), these mobs will have 10 spell resistance from being higher level. Your spell penetration cannot change this.

An important note: Blizzard has (supposedly) removed all instances and mechanics of negative spell resistances from the game. Spell penetration and level differences will never lower a player’s or mob’s spell resistance below zero; zero is the lowest effective spell resistance can be.

Resistances, and Binary Spell Hit Chance

Spell school resistances can cause a binary spell to sometimes miss. This can be calculated as a simple expression.

Your effective spell hit is:

Spell hit chance Resistance non-mitigation chance Or, simply: H R

Your spell hit chance was what we discussed in section “Calculation 1: Spell Hit” above. Your “resistance non-mitigation chance” sounds complicated, but is isn’t.

We used this formula from above to calculate Average Resist Rate:

0.75 (defenderSpellResistance) / (5attackerLevel)

As that expression provides the average rate that spells go mitigated, for the non-mitigation chance, we just need to subtract that value from 1.

1 – 0.75 (defenderSpellResistance) / (5attackerLevel)

And that is your resistance non-mitigation chance.

Example: I have a 96% chance to hit (with talents, gear, etc.). The target I am attacking has a 20% chance to resist spells of that school. A 20% chance of resist, means that there is an 80% (or, 100%-20%) chance that the spell will go unmitigated. So: .96 * .8 = .768 = ~77% chance that the spell will hit.

Reminder: Since we are talking about binary spells here, the level-based spell resistance does not come into play as a part of the “defenderSpellResistance” used. That is just the base spell resist minus any spell penetration the attacker may have.

Resistances, and Non-Binary Spell Hit Chance

For non-binary spells, it is best to think of it as a two-step system. You have to pass the first barrier (spell hit), then you get a chance at the second (spell resistance). Spell resistance can cause a non-binary spell to be fully resisted, and it will show up as a miss in your combat log. There is no way to differentiate a complete resist (due to spell resistance) from a miss (due to spell hit).

Blizzard has a delightfully vague page on the Warcraft official site that illustrates that your spell hit on non-binary spells can greatly varies depending on the resistances of your target. As the function to determine effective spell hit with resistances taken into account on non-binary spells cannot be modeled in any linear fashion, it really is best thought of as two separate calculations, for simplicity’s sake.

The following table was extrapolated from the Blizzard page: https://dwarfpriest.files.wordpress.com/2008/01/resistc.gif?w=426

It shows, based on mitigation percent, the chances of a spell being: fully resisted, 75% resisted, 50% resisted, 25% resisted, or not resisted at all.

In a general sense, looking at the above table, you can see that as mitigation percent gets smaller, the chance that the non-binary spell gets fully resisted hit zero. Thus, we can say that for non-binary spells, your spell hit chance is essentially just your base spell hit chance, provided the spell resistance of your target is adequately small.

Sources:

  1. http://web.archive.org/web/20081110041835/http://elitistjerks.com/f31/t8760-tbc_mage_theorycrafting/p116/#post477168
  2. http://web.archive.org/web/20071213045306/http://elitistjerks.com/f31/t18865-working_theories_theorycrafting_2_3_a/
  3. http://wowwiki.wikia.com/wiki/Formulas:Magical_resistance
  4. http://wowwiki.wikia.com/wiki/Resistance
  5. http://web.archive.org/web/20070905224947/http://forums.subcreation.net/viewtopic.php?id=482
  6. https://dwarfpriest.wordpress.com/2008/01/07/spell-hit-spell-penetration-and-resistances/

Server Revision: 2604

tsu-1 commented 5 years ago

@Evolvee @Wolffenstein @aresbrutus @Easyfraggy

Jalapan commented 5 years ago

same result here.

Realnairoby commented 5 years ago

Got my first 2 partial resists just right now. So nevermind. Its working.