WOW, I wanted to know the first answer, but the second one is also very educating :)
Now I know what the variables are, but it would still be nice to know how the formula looks like within COMBAT_FORMULA_LEVELMAGIC. If I am not mistaken, in version 2.x or so you could write the formula...