magic factor and foci costs

refactored the magic stat. I hope nothing is broken.

Added the karma cost and limits on buying foci. Still need to make sure
weapon foci have their limits