Latest Diablo 3 News
Support the site! Become a Diablo: IncGamers PAL - Remove ads and more!

Higher spell damage through math

Discussion in 'Sorceress' started by scwizard, Aug 5, 2010.

  1. scwizard

    scwizard Diabloii.Net Member

    Jul 13, 2010
    Likes Received:
    Trophy Points:
    Higher spell damage through math

    First let it be known that this doesn't apply to the cold tree, because its mastery contributes -res instead of a damage multiplier.

    We know that the formula for the total damage of a spell is:
    spell base damage * (1 + %bonus from synergy) * (1 + %bonus from mastery + %bonus from items)

    Now we break the individual bits down further:
    %bonus from synergy = synergy base + [additional] hard points in synergy * synergy bonus
    %bonus from mastery = mastery base + mastery bonus * ([additional] hard points in mastery + item points in mastery)

    So you're respecing and you have a pool of unallocated skill points to put into a certain spell. You've already put 20 points into the spell itself. Now the question is, with a minimum of one in mastery and each of the skill's prerequisites how many skill points should be put into synergy and how many into mastery if I want to maximize the damage multiplier for that particular spell?
    This question reveals another formula:
    [additional] hard points in synergy + [additional] hard points in mastery = total unallocated points

    To answer this question, first we need to algebratize it.
    x = (additional) hard points in synergy
    y = (additional) hard points in mastery
    For constants, I will use capital letters:
    S = synergy bonus
    M = mastery bonus
    I = item points in mastery
    B = mastery base = level 1 mastery bonus
    P = synergy base = the amount of synergy you're required to give the skill due to preqs
    T = %bonus from items (Temper bonus)
    U = unallocated points

    Now we restate the problem:
    (1+P+Sx)(1+B+T+M(y+I)) = Multiplier
    U = x + y

    y = -x + U

    As you learned in school, (a+b)(c+d) = ac + ad + bc + bd :)
    (1+P)(1+B+T) + (1+P)(M(-x+U+I)) + (Sx)(1+B+T) + (Sx)(M(-x+U+I))

    And a(b + c) = ab + ac :)
    1+B+T+P+PB+PT + -Mx+MU+MI-PMx+PMU+PMI + Sx+SBx+STx + Sx(M(-x+U+I))

    The fourth term needs some additional factoring out:
    M(-x + U + I) = -Mx + MU + MI
    Sx(-Mx + MU + MI) = -SMxx + SMUx + SMIx

    Now we have:
    1+B+T+P+PB+PT + -Mx+MU+MI-PMx+PMU+PMI + Sx+SBx+STx + -SM(x^2)+SMUx+SMIx

    This is a second degree polynomial. You could graph it if you so wished. To find the maximum value of a second degree polynomial with respect to x, we examine the following values:
    The earliest value in x's domain. 0 hard points beyond the prereqs in this case.
    The latest value in x's domain. U hard points beyond the prereqs in this case.
    The value where x "peaks."

    One quality of x's "peak" is that a line drawn tangent to that point will be flat. Its slope will be zero. Here is a picture of what I'm talking about.
    To find the slope of a tangent line of a function, we take that function's derivative. Here's the derivative, we want to know when it's equal to 0:
    -M + -P + S+SB+ST + -2SMx+SMU+SMI = 0
    So we do algebra.
    -M-P+S+SB+ST+SMU+SMI = 2SMx
    (-M-P+S+SB+ST+SMU+SMI)/2SM = x
    That is the value of x that we are interested in, in terms of known constants. To be safe we'll want to examine both the floor and the ceiling of that value.

    Example coming later, I need a break from math right now.
  2. Kijya

    Kijya Diabloii.Net Member

    Feb 28, 2005
    Likes Received:
    Trophy Points:
  3. scwizard

    scwizard Diabloii.Net Member

    Jul 13, 2010
    Likes Received:
    Trophy Points:
    Re: Higher spell damage through math

    DOH >_>

    Whatever, it was something to do while I was on the train yesturday.

    The equation I ended up with: (-M-P+S+SB+ST+SMU+SMI)/2SM = x

    Is slightly more general though, taking things like "+5% to lightning skill damage" into account.

Share This Page