Func file from Applet version

This includes functions for calculations including DPS, sampled DPS
9which includes crit chance/damage etc.