## Wednesday, November 21, 2007

### Partial Derivatives

I discovered something today which maybe everyone knows, but which I thought was very interesting. I had always implicitly assumed that for a given class, everything was linear; specifically, for melee dps, 1 point of attack power is worth x, and 1 percent of crit chance/hit chance is worth y. If this were true, it would be easy to evaluate gear changes once you knew the relevant coefficients to translate attributes into those base terms.

This is not true, however. The actual formula for dps from melee attacks is (dps)*(hit chance + crit chance), which to put it another way is (base dps + a*attack power)*(hit chance + crit chance). If you take partial derivatives:

1 point of attack power is worth crit chance + hit chance
1 percent of hit or crit chance is worth b+a*(attack power), where a and b are some constants

In particular, it pays to be well-balanced! When deciding between x amount of attack power and y hit/crit, the answer varies depending on your other gear. This is especially relevant for my paladin when considering strength (only affects the first factor) versus agil/hit/crit (only affects the second, not counting the minuscule change in armor from agil) -- the answer is not constant. And, finally, since your hit chance varies from opponent to opponent (immobile level 70 mob versus slippery level 72 boss), the coefficients are not even constant from battle to battle, raising the rather alarming possibility that the optimal solution for melee dps is to carry two sets of gear optimized for different opponents...

The equivalent for casters, of course, is spell damage versus spell hit/crit, which follows a similar equation for overall dps and thus exhibits the same phenomenon.