This is an excellent observation! It will allow me to simplify my setup even further.
I'd made this observation as well and corrected for it, but I didn't quite make it this elegant. Instead, I calculate the "min cost" of first component then remove from combined costs. I suspect my "min cost" will likely equal offset gold, so I can possibly improve this as well thanks to you.
I already have a universal setup that can calculate any cost and swizzle all the parts and target multipliers together. All an effect template has to do is specify the component costs and the rest is automatic. A single function call does all the work and spits out the gold and spell point costs.
When I get a bit more time, I'm going to drill into your unified formula a bit more, as I think it's possibly a nice simplification of the current method. But I am more than happy with the current setup. It's fast, simple to use, and most importantly it gives me the results matching classic.
I've set myself the goal of building around 90% of effect scripts by the end of May, so that's going to be my main focus moving forwards for the moment. But I am looking forwards to refining spell costs in future thanks to your latest updates. The nice thing is I can just replace the formulas and compare old vs. new versions to confirm working.
Thank you again.