Fixed magic attacks not doing damage. Fixed mana correcting function.