Not sure what's wrong with this, been up and down this file. It's something i made myself, not something borrowed from another file.
Everything seems to work properly except for thunder based spells. It won't switch to the Chatoyant Staff for thunder based spells.
any help is appreciated
http://pastebin.com/F6aqA03i