I am working on a classic CCG type mechanics game, similar to Heathstone and most other card games.
In these card games, you have a pack of cards which can be purchased for real life money, which contains random cards when opened of various rarity, and the cards can be destroyed in exchange for a different currency (in HS, it's called "dust") which can be spent to craft any card you like.
It was working great using the old Economy setup, I have each Card as a Container which is consumable and contains the currency. Then I have containers that represent packs which are consumable and contain drop tables which contain the Card containers.
This allows all of the basic CCG economy mechanics without writing a single line of code or worrying about atomic operations.
How can I achieve something similar using the new Economy setup? How can I disperse cards randomly and allow a user to consume a card and obtain a currency using an atomic transaction to prevent any possibilities of dupe type bugs?