1 min pleaese.
why not leave the first line of item as it without any change, then add a line discount for it with negative amount. in the past we have made a plugin for a client that do maybe the same request but with a whole discount with free domain, so the Packages X, XX, XXX who include the domain Y, YY, we include a 100% coupj discount for the domain, wo they can offer free domain with only some packages, in creation and renewals, and is working perfectly .
in the plugin setting we have page that he select the terms that will have free domains, and another setting for selecting the free applicable domains packages.
so finnaly you can have invoice with lines
Line Description , Qnt , Unit Price , Total
package name (from ...to ....) 12 mounth , 1 , 10$ , 10$
10% Discount for package name (from ...to ....) 12 mounth , 1 , -1$ , -1$
Total Invoice ; 9$
is this what you want ?