New sql functions related to combat