By-and-large this script is so far a clone of how UOX handles magic, however there are some issues that need to be taken care of before the entire system is ported out.
Firstly, Known issues:
Currently there is no way to have a character attack another in JS.
There are no LoS checks avaiable in the JS engine.
Secondly, Possible Issues:
As my knowledge of the JS engine is still limited, I do not know of any way to have a global-type script that other scripts can call (to centralize common code).
That being the case, we would have to re-write hundreds of duplicate lines of code for every single spell, this to me, is quite silly, as the main handling should be in one place (while still in JS) and the specific spells seperate.
Lastly, User Input:
I, myself, have not played UO for years now, not even on an unofficial (emulator) server. Thus I have NO clue what the state of the spells are, what needs to be added/removed/adjusted. This is where the users come in, before we begin fully implementing the new spells system, lets get it working right. We need to know what is missing, what shouldn't behave as it does, and what works just as it should.
Of course anyone who wants to have a peek at clumsy.js and begin tooling around with it, you are more than welcome to do so, the entire purpose of the JS engine is to put the power into the users hands.