Stack - the problem zone
Posted: 11 Jun 2009, 18:32
Hi, I just wanted to get everyone's opinion about the stack. Technically only spells and abilities go on the stack and it is the only zone that doesn't hold cards. Currently MTG Forge just treats it like a special zone. In version 2 I'm planning on letting the stack hold Card objects. This won't affect how the game plays and it will be transparent to the user. By allowing the stack to hold Card objects, I can use one method moveCard(Card, Zone to, Zone from) for all card movement.
Currently MTG Forge only allows SpellAbility objects to be put on the stack, but every SpellAbility has a reference to the Card object, Elvish Piper activated ability holds a reference back to the card Elvish Piper, SpellAbility -> Card. In version 2 I'm just going to reverse SpellAbility and Card, and put the Card on the stack that points to the SpellAbility that is being played, Card -> SpellAbility. You the player won't notice but I think it will make a few things much easier.
Currently MTG Forge only allows SpellAbility objects to be put on the stack, but every SpellAbility has a reference to the Card object, Elvish Piper activated ability holds a reference back to the card Elvish Piper, SpellAbility -> Card. In version 2 I'm just going to reverse SpellAbility and Card, and put the Card on the stack that points to the SpellAbility that is being played, Card -> SpellAbility. You the player won't notice but I think it will make a few things much easier.