I am an action card. When you play me, you immediately get +$X, where X is as a direct result of playing this action card, not from gaining treasure cards via consequences of this action card. For example, if you play a Swindler, X is 2. Or if you play a Salvager to trash an Estate, X is 2 (assuming the Estate costs 2 at the time). X must come from the action itself, not from getting treasure cards from a result of the action -- e.g. if you play a Smithy and pick up 3 silvers, X is not 6 - it would be 0. Also, if you had 4 coppers and a Coppersmith, playing the Coppersmith doesn't immediately give you any coins, so X would also be 0 in that case. You may or may not get other stuff besides the +$X (+buys, +cards, etc.) when you play me. X is the greatest that it can be, for any action cards. What am I? Assume anything can be in your hand, the supply, the trash, etc. Also to clarify, if say you Thrown Room a Swindler, X would be 0 for the Thrown Room and 2 for each of the Swindlers (I'm not sure how Goko would actually calculate this, but lets say it works this way for the sake of simplicity). Also, as always, no shenanigans (Possesion, etc.).
Bonus: What is X?
Note: I don't know what the answer is. I have a hunch as to what it is, but am curious to see what people come up with.