TCG software that lets you alter the cards: Does it exist?

I’m looking for a trading card game that lets you play against the AI, and that also allows you to modify and/or create new cards. Does such a thing even exist?

Google gives me tons of results for TCG software that helps you design cards, but you can’t actually play them. I can also find games that enable you to play against the AI or online, but they don’t allow you to modify the cards. The card database is encrypted or in strange format that I can’t edit, probably to prevent cheating during online playing.

I can’t imagine there could be such a thing. You’d have to be restricted to a narrow set of abilities for that to work, or do some pretty extensive scripting: I imagine that the makers of Magic the Gathering Online or the like need to custom-code a few cards with each new expansion. And then even if you could do that, to get anything like an interesting game, you’d also need to train the AI on how to use the new cards effectively.