Selectable additional costs

I was thinking about how we can code "As an additional cost to cast [creature], reveal a [creature type] card from your hand or pay
". While kevlahnota's implementation in DotP2013 was OK most of the times (increase cost by
when you don't have a card to reveal, otherwise just force the player to reveal a card), it had a weak point: additional costs should be always paid, no matter how I cast the card. So, for example, if I cast it through Intet, the Dreamer, I should still reveal a proper card or pay
.
I tried to make an additional cost that asks how to pay in a query, disabling the options that can't be used, but there's a big problem: I have no way to check if the player can afford
plus the card cost plus increases/decreases.
Just a note: I tried to make a resource cost as UTILITY_ABILITY and call CanPayResourceCost from the additional cost block, but it didn't work: it allowed me to choose the "Pay
" option even if I didn't have enough mana, and it raised a "C stack overflow" error in SCRIPT_LOG.TXT.
If someone has a good idea, please share it.



I tried to make an additional cost that asks how to pay in a query, disabling the options that can't be used, but there's a big problem: I have no way to check if the player can afford

Just a note: I tried to make a resource cost as UTILITY_ABILITY and call CanPayResourceCost from the additional cost block, but it didn't work: it allowed me to choose the "Pay

If someone has a good idea, please share it.