You can set the conditions under which the discount will apply.
Yes, you can calculate the discount based on specific price options and fields.
To do this, open the price component Applicability tab.
On it, set only those price options and fields, from which the discount will be calculated.
If you do not set any of them, the discount will be calculated from the total cost.