Aza posted the current avoidance code in another thread:
Azarael wrote: Mon Aug 06, 2018 5:08 pm
Code: Select all
#region Parry, Dodge, Disrupt
//Parry/Dodge/Disrupt chance from tooltip
double secondaryDefense = (((defensiveStat) * 100) / ((target.EffectiveLevel * 7.5 + 50) * 7.5));
//Contestion based on offensive stat. This gets added to make it harder to actually do a defensive event, without actually contesting it directly above.
//This should mimic the live formula.
double removedDefense = (((offensiveStat) * 100) / (((caster.EffectiveLevel * 7.5) + 50) * 7.5));
double baseRoll = 0d;
baseRoll += removedDefense;
if (cmdInfo.DamageInfo != null)
secondaryDefense += cmdInfo.DamageInfo.Defensibility;
secondaryDefense += target.StsInterface.GetTotalStat(Stats.Disrupt) - caster.StsInterface.GetStatLinearModifier(Stats.DisruptStrikethrough);
secondaryDefense = secondaryDefense * caster.StsInterface.GetStatPercentageModifier(Stats.DisruptStrikethrough);
double finalRoll = (StaticRandom.Instance.NextDouble() * (100d + baseRoll));
if (secondaryDefense >= finalRoll) // Disrupt
{
target.CbtInterface.SetDefenseTimer((byte)CombatEvent.COMBATEVENT_DISRUPT);
caster.CbtInterface.SetDefendedAgainstTimer((byte)CombatEvent.COMBATEVENT_DISRUPT);
defenseEvent = (byte)CombatEvent.COMBATEVENT_DISRUPT;
}
I'm going to do everyone a favor and walk through this step-by-step, so we can get real, factual numbers.
First, let's work with the assumption that any mRDPS class will have 1050 Intelligence, and any healer will have 1050 Willpower. These stats are trivial to get, at least with Sov gear, and endgame itemization should be the basis for handling balance - otherwise your **** breaks when everyone is at the endgame. Likewise, we'll assume all players involved are level 40.
Code: Select all
secondaryDefense = (((1050) * 100) / ((40 * 7.5 + 50) * 7.5)) -> 40
removedDefense = (((1050) * 100) / (((40 * 7.5) + 50) * 7.5)) -> 40
First we work out what our base defense chance is going to be. 1050 willpower at level 40 gives a value of 40. Likewise, 1050 Int seems to remove 40 from our defense chances... at least, that's the implication. As we'll see shortly, it doesn't.
Code: Select all
double baseRoll = 0;
baseRoll += 40;
Rather than reducing disrupt directly, the strikethrough value seems to increase the
denominator of the avoidance equation. As we'll see, our disrupt chance is no longer 40/100, it's now 40/140.
Code: Select all
secondaryDefense += target.StsInterface.GetTotalStat(Stats.Disrupt) - caster.StsInterface.GetStatLinearModifier(Stats.DisruptStrikethrough);
This is where we add the target's increased chance to disrupt, and where we remove the attackers reduced chance to be disrupted, from the overall disrupt chance. We will assume that the defender has the same +disrupt% on his gear as the attacker has disrupt strikethrough%. Therefore the the disrupt% remains the same.
Code: Select all
secondaryDefense = secondaryDefense * caster.StsInterface.GetStatPercentageModifier(Stats.DisruptStrikethrough);
This line looks like it should do something, but it doesn't. The function call on the right always returns '1'. I honestly don't know what this is doing here, it was probably left in because the same line did nothing on the old code either, and someone didn't want to change it, or thought it did something useful.
Code: Select all
double finalRoll = (StaticRandom.Instance.NextDouble() * (100d + baseRoll));
if (secondaryDefense >= finalRoll) // Disrupt
So as I said before, secondaryDefense has a value of 40, and we are generating a number between 0 and 140, give or take the slimmest fraction. If the generated number is less than or equal to 40, we disrupt. Therefore, our disrupt chance is 40/140.
A caster with 1050 int casting at a healer with 1050 willpower is facing a 28.5% disrupt chance. This is before Deft Defender, or True Strike. This is before disrupt or strikethrough on gear. This is before tactics.
Interestingly, if both the attacker and the defender have
lower stats, the base disrupt actually decreases. If you run the same equation with 750 Intelligence vs. 750 Willpower (at level 40), the base disrupt chance is 22.2%. But if the attacker only has 800 Int and the defender has 1050 Willpower? 30.6% chance to be disrupted.
When we compare this to the old formula...
Code: Select all
int secondaryDefense = (int)((((double)defensiveStat / offensiveStat * 0.075) * 100));
if (secondaryDefense > 25)
secondaryDefense = 25;
...
secondaryDefense += bonus_disrupt - bonus_strikethrough
if (StaticRandom.Instance.Next(100) <= secondaryDefense) // Disrupt
In the AoR formula, no single avoidance chance could be greater than 25%, from stats alone. Tactics, gear, renown, etc. could increase this value above 25%, but 10 Intelligence vs. 1050 Willpower would have 25% disrupt base.
So our example of 1050 Int versus 1050 Willpower would result in a 7.5% disrupt chance, base. Technically 7%, because it's an int and those round down to the nearest whole number.
So the AoR formulas had 7% disrupt. The current RoR formulas give 28.5% disrupt in the same scenario. Again, without any tactics, renown, or gear.
So how did this happen? I suspect that whomever wrote this code thought that this line:
Code: Select all
secondaryDefense = secondaryDefense * caster.StsInterface.GetStatPercentageModifier(Stats.DisruptStrikethrough);
Would actually return something useful. If this line returned the percent-value of the attacker's base chance to strikethrough, i.e. 1050 Intelligence would return 40/100 = 0.4. This would make the defender's chance to disrupt the attack
(40 * 0.4) / 140 -> 16/140 -> 11.4%.
A base disrupt chance of 11.4% is higher than AoR, but not obscene. However, if that were how that line worked, then it would actually cause intelligence to
hurt your disrupt strikethrough. 800 Int vs 1050 Willpower would only have a (40 * 0.3047)/130.47 -> 9.3% disrupt rate. So that's a wash. If someone thought this line did something, the equation would still be wrong.
Looking at these numbers, I have to agree that the formulas have to be reverted to the AoR calculation. Or at least adjusted significantly downward, and the intentions behind this change closely examined. Healers are literally 4x as likely to disrupt incoming spells, for free. Literally just for having the stat that they needed anyways. They give up nothing to get that. That is
insane.