MoP Block Calculations – Part 1

There’s been some question about how the new block mechanics will affect our damage intake, and how the different stats (dodge, parry, matery, hit, expertise, and even haste) will compare for minimizing that metric. While damage intake isn’t always the most relevant metric, it is one that’s fairly easy to calculate and gives some basic information about the baseline effectiveness of different stats. In this series of posts, I will work through the full derivation and make some comparisons between the different secondary stats.

It’s also worth noting that our mechanics will be changing in the near future, according to a new forum post by Ghostcrawler. The previous version had us gaining 25% block value and one guaranteed block for 6 seconds. The new version will have us gaining 45% block value for the guaranteed block (total of 75%) and 20% block value (total of 50%) for the remainder of the buff duration. I’m modeling the new mechanics, though it’s fairly trivial to convert this derivation to the old mechanics if things change down the line.

The formula for time-averaged damage taken per second (DTPS) is

$D = D_0F_a(1-A)F_b$

$D$ is the net damage taken per second after all mitigation and avoidance effects
$D_0$ is DTPS before all mitigation and avoidance effects
$F_a$ is the armor mitigation factor, calculated the usual way
$A$ is your decimal avoidance from all sources, after diminishing returns
$F_b$ is the “block factor” which models blocking mitigation.

As I said in an earlier blog post, this differs from the old one-roll system because it converts a combined avoidance/block factor like $(1-A-B_vB_c)$ into two multiplicative factors $F_{\rm avoid}=(1-A)$ and $F_b$. In that earlier post, I gave an explicit form for the block factor: $F_b=(1-B_vB_c)$. If we ignored Shield of the Righteous (SotR), $B_v$ is just your block value (30%) and $B_c$ is your character sheet block chance. However, SotR throws a wrench into everything. We can still express it in a form similar to the one given above, but with more complicated expressions for the average block value $\tilde{B_v}$ and average block chance $\tilde{B_c}$. And we’ll find that there’s no compelling reason to do so, as there’s a different form that gives more insight into what’s going on anyway.

To calculate $F_b$, we start with the following expression:

$F_b = G(1-B_v”) + (1-G)\left [ B_c S (1-B_v')+ B_c(1-S)(1-B_v) + (1-B_c)\right ]$

Let’s go through this term by term. The first term is the chance that we are guaranteed a block by Shield of the Righteous ($G$) times the amount of damage we take when that happens $(1-B_v”)$, where $B_v”$ is our block value for the guaranteed block (75%). After distributing, the second term is $(1-G)B_c(1-S)(1-Bv’)$, which is the chance that we don’t get a guaranteed block $(1-G)$ multiplied by our block chance $B_c$ multiplied by the probability that the SotR buff is active $S$ multiplied by the damage taken during that buff $(1-B_v’)$, with $B_v’$ being our block value during the 6-second SotR buff (50%). In other words, this term represents the chance that we aren’t guaranteed a block, but block anyway during the 6-second duration of the SotR block value buff. There’s a subtlety here involving $S$ that complicates matters, but we’ll come back to that later.

The third term is $(1-G)B_c(1-S)(1-B_v)$, which represents the chance that we aren’t guaranteed a block, but do so anyway without the SotR buff active. And the final term is $(1-G)(1-B_c)$, which is the chance we don’t get a guaranteed block and that our natural block mechanism fails us, forcing us to take a full sized hit (damage taken = 1). Those are the four possible outcomes of the system, each weighted by their individual probabilities. And in fact, it’s easy to show that this expression is correct: let $B_v$ and $B_v’$ equal zero, and the expression sums to 1, just as one would expect for a sum of probabilities that spans the space of possible outcomes.

With a little bit of algebra, we can put this in one of two simpler forms:

$F_b = 1 – G B_v” – (1-G)B_c(S B_v’+(1-S) B_v)$ (1)

or, equivalently

$F_b = 1 – G B_v” – (1-G) B_c S B_v’ – (1-G) B_c (1-S) B_v$ (2)

Each expression gives slightly different intuition. The first expression says your block mitigation factor is just one minus the mitigation from guaranteed blocks minus the mitigation from non-guaranteed blocks, with an average block value $\overline{B_v} = (1-S) B_v + S B_v’$ based on SotR uptime $S$. In other words, it breaks it down by the type of block – guaranteed versus not guaranteed. The second expression breaks it down differently, by the amount of block value. In this case, the factor is one minus the mitigation from blocks of size $B_v”$ minus the mitigation from blocks of size $B_v’$ minus the mitigation of regular blocks ($B_v$). The coefficients of each term are simply the probabilities for blocking each amount.

As I said earlier, we could put this in a form $F_b = 1 – \tilde{B_c}\tilde{B_v}$ by defining the overall chance of blocking $\tilde{B_c}=G+(1-G)B_c$. With that definition, we get the following form for $\tilde{B_v}$:

$\tilde{B_v} = \frac{G B_v” + (1-G) B_c S B_v’ + (1-G) B_c (1-S) B_v}{G + (1-G) B_c}\large$.

But this version doesn’t do much for us – it’s no simpler an expression than (1) or (2), and it doesn’t give us any additional insight into the meaning of the terms. So for any of our calculations, we’ll start with one of the numbered equations.

We already know $B_v”$, $B_v’$, $B_v$, and $B_c$ from the character sheet. All that remains is to calculate $G$ and $S$ and we have a complete analytical expression describing the new block mechanics. Let’s proceed to do that.

Calculating $G$ is fairly straightforward. The probability that any given attack will be a guaranteed block is simply

$G = R_{\rm SotR} / R_{\rm att}$

where $R_{\rm SotR}$ is your SotR cast rate, and $R_{\rm att}$ is the incoming blockable attack rate, or one over the time between blockable attacks $T_{\rm att}$. Note that this is a little different from the boss’s attack rate because of avoidance. It’s actually $(1-A)/T^{(0)}_{\rm att}$, where $T^{(0)}_{\rm att}$ is the boss’s “true” attack/swing timer. So we need to assume a boss attack speed to get useful results, which is annoying, but do-able. Since SotR is off-GCD, we can estimate the SotR cast rate pretty straightforwardly as your HP generation rate divided by three, or

$R_{\rm SotR} = R_{\rm HPG}/3$

However, $R_{\rm SotR}$ is complicated slightly if we want to include talents. Holy Avenger is actually fairly easy since it can be modeled as a simple increases to your average HPG rate. Divine purpose is more irritating, because it’s a 15% chance on every SotR to proc the effect. So it modifies the SotR cast rate as follows:

$R_{\rm SotR} = R_{\rm HPG}/3 + \alpha_{\rm DP} R_{\rm SotR}$

where I’ve let $\alpha_{\rm DP}$ be the DP proc rate in case it changes. Solving for SotR:

$R_{\rm SotR}= R_{\rm HPG}/3 (1-\alpha_{\rm DP}) $

Luckily, $R_{\rm HPG}$, is easily calculable (analytically or via simulation) for a given rotation and haste value. So we can get the information we need to calculate $G$.

$S$ looks very tricky, but ends up being deceptively simple. My first attempts were pretty ugly, involving double-integrals of a comb function multiplied by a rect function. And they were correct, but I realized afterward that the resulting expression was something I could have guessed using geometry. So I’ll give you the easy version:

The duration of the SotR buff is $T_{\rm buff}$. The uptime of the buff is $R_{\rm SotR}T_{\rm buff}$, bounded by $[0, 1]$ (i.e. if the product ever goes above 1, it equals 1 because we cap out at 100% uptime). The number of boss attacks that occur during the buff is $R_{\rm SotR}T_{\rm buff}/T_{\rm att} = R_{\rm SotR}R_{\rm att}T_{\rm buff}$, bounded by $[0, R_{\rm att}]$. So far so good.

But $S$ isn’t the probability that the SotR block value buff is active (i.e., it’s not the uptime). In fact, it’s the probability that the buff is active for attacks that weren’t already guaranteed to be blocked due to the other SotR buff. So we need to account for the guaranteed blocks. The rate of guaranteed-blocked attacks is just $G R_{\rm att} = R_{\rm SotR}$, bounded by $[0, R_{\rm att}]$, and the rate of non-auto-blocked attacks is $(1-G) R_{\rm att} = R_{\rm att} – R_{\rm SotR}$, bounded by $[0, R_{\rm att}]$.

To calculate $S$ properly, we need to find

$\frac{\text{number of attacks during buff – number of attacks auto-blocked}}{\text{number of attacks not auto-blocked}}\large$

or their equivalent rates. Which is:

$S = \frac{R_{\rm SotR}R_{\rm att} T_{\rm buff} – R_{\rm SotR}}{R_{\rm att} – R_{SotR}}\large$

You might notice that this expression looks questionable, in particular the denominator. If $R_{\rm SotR} \rightarrow R_{\rm att}$, it looks like $S \rightarrow \infty$. In fact, it doesn’t, because the numerator goes to zero in that situation as well. This is why I was careful about specifying the bounds of each term earlier on – in the limit where $R_{\rm SotR} \rightarrow R_{\rm att}$, the term $R_{\rm SotR}R_{\rm att} T_{\rm buff}$ approaches its upper bound of $R_{\rm att}$, and the expression approaches 1. That’s good, because it’s what you’d logically expect – if you’re casting SotR as often as the boss is swinging, the buff should be up for every attack (though note that $G\rightarrow 1$ in this limit as well, making this a bit of a moot point).

This expression for $S$ is the last piece of the puzzle, because we have all of those values already. From this point it’s just a matter of doing some substitutions and taking some derivatives. In the next installment, I’ll make those substitutions and derive the expressions that will tell us how mastery stacks up to dodge, parry, hit, expertise, and haste.

This entry was posted in Tanking, Theck's Pounding Headaches, Theorycrafting and tagged , , , , , , , , . Bookmark the permalink.

8 Responses to MoP Block Calculations – Part 1

  1. kalbear says:

    Well, thank goodness that they are taking out all those complicated mechanics like arpen and going to these simple mechanics like double roll block with diminishing returns.

  2. Weebey says:

    It’s a good thing that SoTR duration buffs are additive; accounting for clipping, especially when thinking about things like Divine Purpose and Holy Avenger, would have probably made an analytic expression for S almost impossibly hard to compute.

    I was a little confused by the following paragraph:

    “S looks very tricky, but ends up being deceptively simple. My first attempts were pretty ugly, involving double-integrals of a comb function multiplied by a rect function. And they were correct, but I realized afterward that the resulting expression was something I could have guessed using geometry. So I’ll give you the easy version:”

    I don’t see any geometry in the subsequent derivation of the expression for S in terms of known quantities; it seems to be a fairly elementary argument based on the definition of the terms in question. Was the point that something about the geometry of the other argument showed you that this simple approach would actually work?

    Also, one other point, which I’m sure you are aware of, but which could be useful to other readers, is that one of the definitions above as stated isn’t quite right. T_{att} isn’t just be the boss’s attack/swing timer, since, as you showed in the MoP testing thread, the SoTR buff is not consumed if the next melee attack is avoided, so the value that should be used here is something
    like T_{att}/(1-Av).

    This actually brings up a possible complication: what happens if you refresh SoTR while the guaranteed block buff is still in effect? This can definitely happen with e.g. Divine Purpose procs. The model above implicitly assumes that nothing is overwritten, so that when this happens you block the next two melee attacks, but I honestly don’t know if that is how it works in game. It looks like logs indicate that the duration of the guaranteed block portion do NOT add, which makes me think that clipping probably happens. If it does, then the expression for G isn’t quite right.

    • Theck says:

      The geometry comment is actually only relevant to the part where I say that the number of attacks during the buff is $latex T_{rm buff}/T_{rm att}$. You can get that from the integral, or you can draw a comb function with $latex T_{rm att}$ spacing and a rect function with $latex T_{rm buff}$ width, and see geometrically that it’s the right answer. Otherwise you’d have to resort to some combinatorics.

      You’re correct about $latex T_{rm att}$ not strictly being the boss’s swing timer. I realized that about halfway through the derivation, and decided that it was easier to encapsulate that factor of $latex 1/(1-A)$ into $latex T_{rm att}$ directly. We never end up using $latex T_{rm att}$ outside of the calculation for $latex S$, and the correction occurs in each instance. So it seemed logical to handle that when we plugged in numbers. Also, I didn’t think anyone would notice. :P Now that you’re pointing it out, though, I’m second-guessing whether that was the clearest way to approach it.

      The SotR guaranteed block buff does not extend additively. It just over-writes itself. So you’re correct that clipping can happen. Here’s why we don’t have to worry about it – we assume the player is smart enough not to spam SotR, and since it’s off-GCD, we can assume they cast it as soon as it’s useful again. So if we cast it at 3 Holy Power, we have the time it takes to generate another 5 Holy Power before we’re in danger of wasting a cast. As long as HPG is slow (we’re going to be generating less than 0.4/sec, so on average we’re talking 13 or more seconds, it’s reasonable to assume that a block occurs before we recast SotR. Divine Purpose procs fool around with that some too, of course, but that’s still a pretty large window.

      In practice, there will be some clipping that reduces G compared to the model. It shouldn’t be a very large effect, but it will take some combinatorics (or a simulation, if we’re lazy) to figure out the magnitude of that effect. That’s in the cards for Part 3, where I’ll be writing a very basic combat simulator to see how well the model holds up.

      • Weebey says:

        I see. When I first read the post I thought it was intuitively obvious that the average number of attacks that occur with the buff up (per unit of time) was R_{sotr} * T_{buff}/ T_{att}. I still think that, to be honest, but when I tried to formalize my intuitions they ended up relying on a mathematical fact which, while again intuitively very plausible, is probably not much easier to prove than other methods (*).

        I think I should apologize for pointing out the subtlety with T_{att}; I know how annoying it can be when “that guy” points out some little technicality which you didn’t really want to burden the exposition with! I only noticed it because none of the terms seemed to depend on your avoidance rate, whereas it is obvious that there has to be some effect.

        I am not on the beta, so I can’t fiddle around with it, but at least as stated I’m not so sure we can be that confident that Divine Purpose won’t ever, or even often, overwrite the initial block buff. While one obviously should wait, my guess is that a lot of people hit a DP SotR as soon as they can, which means they will only have at most one melee attack to consume the buff before it gets overwritten. Optimal play of course will minimize this, while still ensuring that the block value doesn’t drop, but my guess is that will take some getting used to to really get it right.

        (*) For anyone who cares: the formula follows from the fact that, if I have a discrete probability measure on a finite interval of the real line, with a fixed distance between the points in the support of the measure, all of which have equal weight, then, as the “mesh” of the discrete measure goes to 0 (equivalently, as the length of the interval goes to infinity), these discrete measures will converge to the continuous uniform probability measure on the interval.

        • Theck says:

          I’ve gone back and re-written the portions with $latex R_{rm att}$ and $latex T_{rm att}$ to make the distinction between “true” swing timer and effective swing timer clearer. After thinking about it more, the encapsulation made it easier to work with the math in my hand-calculations, but it really hampers the understanding when you’re reading it (and aren’t burdened by having to write excess $latex ^{(0)}$ superscripts.

  3. Pingback: MoP Block Calculations – Part 2 | Sacred Duty

  4. Pingback: Warrior Block Calculations – Part 1 | Sacred Duty

  5. Pingback: 5.1 Warrior Simulations – Part 1 – The Model | Sacred Duty

Leave a Reply