Optimize battle participation calculation