Magic will work by laws, and it will make sense. But one probably shouldn't put the word "formulae" to it, or relate it to magic. It's only in high fantasy (the fireball flinging wizard) that magic is that reliable. Even when one works through the complexity, the ritual, and all extraneous variables, there is still and element of uncertainty. The laws of magic are not precise like the laws of physics, for they vary based upon perception and emotion. The word "suffering" does not mean exactly the same thing to every user, and in itself is somewhat vague, so magic invoking such a sphere will not be the same every time even if it is prepared exactly the same as before. A mage's conscious and unconscious perceptions will vary with time, mood, and what else they are thinking about, and so will their magic, channeled through their mind. And the wizard's mind isn't the only to include, as perceptions of many people will define the spheres of other forces the wizard must work with. Such as a civilization [POWER].
Because this is a game, and not an entire universe to work with, this system cannot be made ideal. But if one saves right before some magic working, and returns to that save after the working, it should not turn out the same as it did on the previous save.