You're probably going to need to over write one of the Providers, maybe the DiscountInfoProvider class.
Here's the article: https://docs.kentico.com/display/K9/Custom+Info+provider+example
This function may be it, but you may need to email support to get the correct one and it's logic (they can provide the source function logic so you can base your overwrite off of it)
public static double CalculateUnitDiscount(
double basePrice = 0