Hi Nikhil,
I think you have to go for custom code wherein the logic would be: Check for material A/B - Qty >or EQ - (XX Qty) then execute this Discount Condition Type.
Please assign this Routine in Calculation type column to the Discount Condition type in the pricing procedure.
Also please make sure to maintain condition record for this MAT A & B.
Please let me know for any further information.
Regards