How to properly structure this kind of rpg/card game mix?
I'm trying to create a system of 'cards', where every card is an event in the game world. These cards will come in sequences, of about 10, and the idea is that each card will be able to do anything to the game's data (will keep it in a single dictionary with arrays and other dictionaries nested inside it). Now, I don't want a system where each card is it's own .gd file, because the idea is to have thousands of cards, most of them doing simple stuff, so I want a single .gd file to store a single sequence of cards, or eventually multiple sequences.
I have already found two ways of doing this, but both suck in different ways.
First one: http://pasteall.org/84909/python The cards are Objects with functions and arguments stored as strings. When the card is run, the functions are run using call(). Sucks because I can only do simple stuff that way, cards can't create temporary variables, do if/else statements, math etc.
Second one: http://pasteall.org/84911/python The card sequence is just a long if/else statement. Sucks, because the card sequence is just a long if/else statement.
Anyone knows an alternative to these methods? Any help appreciated.