kellyelton/OCTGN — Issue #94: (controversial) have the card class assign missing card properties as empty strings
Author: brine
Created: 2012-02-08 19:54:02+00:00
State: open

You don't HAVE to declare each property/value pair in the set xml, if its missing from a card then it simply returns a null value.

This is a bit of a pain when you try to grab card.properties['Property Name'] through python, as the script will fail if that property doesn't exist on a particular card.

So what I'm proposing is that, when the card class pulls card properties from the database, it assigns empty strings to the missing properties instead of leaving them as null values.

So even if a card's "Type" property is missing, for example, you could still run this:
if card.Type == "Monster":

whereas if the card had NO type, the python would fail at that 'IF' line.