Finished putting the cost stuff, fixed some bugs

Completed a preliminary system to adjust spell cost based on spell
attributes. The numbers will be re-tuned once play-testing begins and
balance issues become apparent.