Generic Card Class.
Bases: object
Card can be saved to, and loaded from, a string. Call str() on a Card instance or .save_string() on the instance. This will return a string that when evaluated using eval() can be unpacked into the Card constructor re-create that card. For example. original = Card(1, 'cool card') savestring = str(card) loaded = Card(*eval(savestring)) assert loaded == original
Add the given ability to this Card under the given phase. Returns the length of the abilities for the given phase after the addition.
Add the given attribute to this Card. Returns the length of attributes after addition.
Returns an ability list for the given phase ID.
Return a value in the info for this card with the given key.
Return true if this card contains the given attribute.
Returns True if code is not 0 and self.name is not ‘’.
Takes a carddict as produced by Card.save and sets this card instances information to the previously saved cards information.
Converts the Card as is into a dictionary capable of reconstructing the card with Card.load or serialized to a string for storage.
Set any special info you wish to the given key. Each info is stored in a list and will be appended to rather then overriden unless append is False.