add new battle logic algorithm