eryndel
Explorer
I knew this look familiar. You're summing a bunch of odd numbers, so use the formula: sum (2n-1) [n=0] = n^2 as a base. Then, because of the progression of bonus spells for high abilities, you'll be adding powers of two. To translate from your original, Y = (Stat-10)/2; X = Lvl/2. Maybe somthing like:
f(X,Y) = X^2 + [int((Y-4)/4) * 2(X-4)]
No, that's not quite right... Let me think about it.
We'll need to add even powers to the square. +2..+8 then +12, +16... as you go along the diagonal of the matrix. For every four rows, the sum in between the steps is +2m where m = int((Y-4)/4).
f(X,Y) = X^2 + [int((Y-4)/4) * 2(X-4)]
No, that's not quite right... Let me think about it.
We'll need to add even powers to the square. +2..+8 then +12, +16... as you go along the diagonal of the matrix. For every four rows, the sum in between the steps is +2m where m = int((Y-4)/4).