Card Development Questions
Posted: 22 Dec 2010, 06:15
I've noticed a number of people besides myself asking card development questions recently, so I thought it might be nice to have a place where all such questions can be dumped.
I'll start...
I've read through a good portion of the API at this point and something occured to me. Every card (that I can think of) can be defined in terms of costs and benefits.
By using iff (if and only if) for cost and then for benefits one can create any card.
Some examples might be helpful...
Kilnmouth Dragon
If Kilnmouth Dragon enters battlefield, if Kilnmouth Dragon on battlefield, if hand reveal x type Dragon cards; then Kilnmouth Dragon gains 3x +1/+1 counters.
If Kilnmouth Dragon on battlefield; then Kilnmouth Dragon gains flying.
If Kilnmouth Dragon on battlefield, if tap Kilnmouth Dragon, if Kilnmouth Dragon x +1/+1 counters, then deal x damage target creature or player.
Sanguine Bond
If Sanguine Bond on battlefield, if controller Sanguine Bond gains x life; then target opponent loses x life.
I'm not a programmer, but this seems like a very simple and organized way to do things.
X variables become easy to use because they are applied separately for each set of if/then statements.
Each if cost is checked before then benefits apply. Each set of statements can have any number of if or then statements.
Each if/then statement is a puzzle piece that increases the complexity and number of cards that can be created.
Is there a flaw in my logic that I'm missing? Do things already basically work this way and I just haven't been exposed to the coding structure long enough to see the big picture?
I'll start...
I've read through a good portion of the API at this point and something occured to me. Every card (that I can think of) can be defined in terms of costs and benefits.
By using iff (if and only if) for cost and then for benefits one can create any card.
Some examples might be helpful...
Kilnmouth Dragon
If Kilnmouth Dragon enters battlefield, if Kilnmouth Dragon on battlefield, if hand reveal x type Dragon cards; then Kilnmouth Dragon gains 3x +1/+1 counters.
If Kilnmouth Dragon on battlefield; then Kilnmouth Dragon gains flying.
If Kilnmouth Dragon on battlefield, if tap Kilnmouth Dragon, if Kilnmouth Dragon x +1/+1 counters, then deal x damage target creature or player.
Sanguine Bond
If Sanguine Bond on battlefield, if controller Sanguine Bond gains x life; then target opponent loses x life.
I'm not a programmer, but this seems like a very simple and organized way to do things.
X variables become easy to use because they are applied separately for each set of if/then statements.
Each if cost is checked before then benefits apply. Each set of statements can have any number of if or then statements.
Each if/then statement is a puzzle piece that increases the complexity and number of cards that can be created.
Is there a flaw in my logic that I'm missing? Do things already basically work this way and I just haven't been exposed to the coding structure long enough to see the big picture?