Requirements: You want a Shopify Function to do a 2 for $25 discount like what is availble in Shopify Scripts (soon to be removed).
Your products can have different prices, some might be $29.99, some might be $25.99, others might be $19.99. You don't want to change the original prices. You want every combination of eligible produccts to be discounted to $12.50, i.e. "2 for $25" and if you have an odd total: say a cart has 2 of one eligble product and 3 of other eligible products, the most expensive one is not fully discounted (don't discount one of them). You also want a call to action to the customer to add another item in the not fully discounted line item to get the full discount.
Your eligible products are identified with a tag "2FOR25" .
Your run.graphql should look like this: