Monday, December 8, 2008

Understanding the stack

Whenever you play a spell or use an ability in Magic, it doesn't just happen instantly. There's a space between when you cast it, and when it actually happens, a kind of magical limbo called the stack, where your spell goes. Whenever anybody puts something on the stack, everyone has a chance to respond to that and play their own spells or abilities and put them on the stack as well. When nobody has anything to add anymore, the spells start happening, or resolving, in the order of the last spell cast to the first one. In other words, last is first. The original spell is cast, then another is put on top of it, like a building block, signifying the order. When it is time for the spells to resolve, they resolve one at a time, from top to bottom.

SPELLS

Let's suppose you're playing green and have a Llanowar Elves in play.


You have a Giant Growth in your hand.

Your opponent is playing red, and casts a Shock, targeting your Llanowar Elves. What happens now? The Shock doesn't happen instantly, in real time, at least. It goes on the stack.


Now, you have a chance to respond to it. If you do nothing, the Shock will resolve, and your Llanowar Elves will be dealt 2 damage, killing it.

But you want to save your Llanowar Elves. So you cast Giant Growth in response to Shock. What happens now? Your Giant Growth goes on the stack, above Shock.


Your opponent has no response. Since neither of you have decided to play anything else, the stack begins resolving, one at a time. The top item, the one that was played last in real time, resolves first.


Your Giant Growth resolves first, and gives your Llanowar Elves +3/+3 until end of turn. After that, the Shock resolves and deals 2 damage to the Llanowar Elves, but it survives because it is already a 4/4.

Now suppose this Llanowar Elves is attacking your opponent later into the game. You want to deal more than 1 damage, so you cast a Giant Growth targeting your Llanowar Elves before damage is dealt. (Combat damage uses the stack too, by the way.) Your Giant Growth goes on the stack. In response, your opponent casts Shock, targeting your Elf as well. The Shock goes on top of the stack, above your Giant Growth. You have no response. The stack begins to resolve, and since the Shock is on top it resolves first. It deals 2 damage to your Llanowar Elves, and it dies. Next, your Giant Growth resolves, but there is no creature left for it to pump up, so it does nothing and your attack is thwarted. You'll have to find another way to win.

COUNTERSPELLS


Counterspells work in a similar way. What a counterspell does is go on top of a spell on the stack, and resolve first. The effect of the counterspell resolving is to kill the spell it's targeting; it takes it off the stack and throws it into the graveyard. That spell never has a chance to even hit the table. What is key to understand is that they counter spells, which means they can only do their work when that spell still exists as a spell, on the stack, not as a card in your hand, or an object in play. Once that moment is gone the counter does nothing.

ABILITIES

Abilities use the stack as well. When you activate an ability, that ability goes on the stack and waits to resolve, along with other spells that may have been played before or after.

Suppose you control a Master Healer.



I'm tired of you constantly saving your creatures and hurl a Lightning Blast at your Master Healer.



My Lightning Blast goes on the stack. In response, you tap Master Healer and activate her ability, choosing your Master Healer. Her ability goes on the stack, above my spell. It resolves first; the next 4 damage that would be dealt to Master Healer this turn will be prevented. Next, my Lightning Blast resolves and deals 4 damage to Master Healer, but it is prevented. Nothing happens to her.

If we did it in the reverse order, something else would happen. If you tapped Master Healer to prevent 4 damage to herself, for whatever reason, and I cast Lightning Blast in response, my spell would go above hers on the stack and resolve first, killing her. Her ability would resolve next, but she wouldn't be there anymore to have any damage prevented to her, and it does nothing.

What I have described is called an activated ability. It is an ability that is used when you activate it by paying a certain cost. The format is, "[COST] : [EFFECT]". As long as you can pay the cost, you can play the ability. It doesn't matter when, unless it specifies it.

But there are other kinds of abilities that use the stack. There are triggered abilities, which only happen when something it is set to detect triggers it. These usually are written as, "Whenever something happens, do something."


At the beginning of your upkeep, Phyrexian Arena's ability triggers and goes on the stack. After it resolves, you lose 1 life (and draw an extra card — the POWER!). It can be responded to, as well, just like any other item on the stack. For instance, if you are at 1 and have this out, you could play a spell in response to Phyrexian Arena activating to gain some life before it resolves and makes you lose.

There are also mana abilities, which are simply abilities that produce mana. These do not use the stack and cannot be responded to. The last kind of ability are static abilities, and these do not use the stack either; they are simply characteristics of the card, like "flying," or "first strike." They are always on.

The stack is one of the confusing aspects of Magic for newer players, but as you can see, it is not as complicated as it seems. Once you grasp the fundamentals, it becomes second nature. There is another level to it with combat, but I'll save that for another day.