Dev Diary: Sylvan Library
As was previewed, one of the Special Guests cards for Secrets of Strixhaven is one of the most iconic cards from Magic's history:
And it's coming to MTG Arena.
This has caused quite a bit of amusement and/or consternation here on the MTG Arena Development team. You see,
Why?
Well, that goes back to the basic mission statement of MTG Arena, which is to provide fast, fun Magic for everyone, anywhere. And the sticking point here is that first word: fast.
Let's turn the Magic history dial all the way back to 1994, when
You may draw two extra cards during your draw phase, then either put two of the cards drawn this turn back on top of your library (in any order), or lose 4 lives per card not replaced. Effects that prevent or redirect damage may not be used to counter this loss of life.
Putting aside how antiquated the Legends rules text is from a modern perspective, imagine how naturally that action would actually play out. You are drawing "extra" cards, meaning that intuitively you draw them at the same time as your first card. So, it turns your "draw for turn" into a "draw three, then put two back," except you can also pay 4 life or 8 life to put fewer back. Once you get how it works, it's a very quick and natural action.
If you were narrating your turn very carefully, you might say something like this:
"Untap. Upkeep. Use Sylvan. Hmm … Okay, put this one back and lose 4 life."
Now, let's compare that wording to the current Oracle text:
At the beginning of your draw step, you may draw two additional cards. If you do, choose two cards in your hand drawn this turn. For each of those cards, pay 4 life or put the card on top of your library.
What would carefully narrating that sound like?
"Untap. Upkeep. Draw. Trigger Sylvan. Sylvan resolves, I choose to draw two cards. Hmm. Okay, I choose these two cards. I pick this one as the first. I put it back on top of my library. Now, for the second, I pay 4 life."
I kind of doubt that even very careful tabletop players really narrate it like that; particularly the "I choose these two cards" part. But that is the rub. Our job on MTG Arena is to fully and correctly implement the rules, which means we can't generally skip steps of cards resolving or shortcut things. So, how many clicks would it take to resolve
- The trigger would go on the stack, which you would normally not get to respond to unless you were in full control.
- Then, you would have to click yes or no for "Draw two cards?" This is completely unavoidable because you clearly need the choice to not deck yourself, give your opponent Treasures from
Hullbreacher , or what have you. - Then, you would have to choose two of the cards in your hand. That's two more clicks to choose them, then one more to submit.
- Then, you would have to click which one of them goes first.
- Then, you would have to click to decide whether to pay 4 life or put it on top.
- Then, for the other one of the two chosen cards, you have to click to decide whether to pay 4 life or put it on top.
That's seven clicks! And in addition to those seven clicks, there's a potentially major pain point where you can't get to the last step and decide to change the order of the cards you selected.
Now, would we never print a card which required seven clicks to resolve? There are no fixed limits on the number of clicks or decisions a player can make. But an active
In fact, the MTG Arena UI flow for
The purpose of the question was not to see how many of the problems inherent to
So, here we are.
I'll note that the "we" in this article primarily refers to the MTG Arena designers, with some help from RULE engineers like me. Typically, this type of decision would be entirely owned by the designers, but this card was complicated enough and had enough finnicky implications that it ended up being an all-hands-on-deck situation.
The first step was to try to imagine the cleanest interface we possibly could, our ultimate
People resolve
Could we just do that for
Well, how are
Brainstorm lets you choose any card in your hand, while Sylvan only lets you choose cards drawn this turn.Brainstorm always makes you put back two cards.Sylvan Library lets you put back zero, one, or two cards and forces you to pay life if you put back fewer than two.
For a quick aside on that first point: There's a deep irony about this entire issue, which is that because of the text "two cards in your hand drawn this turn,"
While this is a massive issue in paper Magic, it's a complete non-issue for digital Magic because MTG Arena always knows what cards in your hand were drawn this turn. The game can enforce that restriction trivially, incorruptibly, and invisibly. In fact, we'd already set up all the syntax and semantics necessary to make that text work due to the digital-only card
How is this problem actually solved in paper Magic? To really do it right, you need to keep the cards you've drawn this turn separate from the other cards in your hand. And for someone to make it through an entire game without ever messing that up would be something of a miracle.
But other than those differences, they're very similar. So, let's assume we implemented
After some thought, we decided that it would result in gameplay with no differences from following the steps precisely … unless it wouldn't. That is, if Sylvan is resolving in isolation, with no other effects interfering, then our
For instance, what if you control
Now paying life involves exiling cards from the top of your library. So, you should be able to exile the top four cards of your library, look at them, then decide what to do with the other card in your hand. Or you could choose to put one card back, then exile the top four cards of your library to keep the other card, which would cause you to exile the other card.
So, we found ourselves with a difficult choice to make. We had chosen a card, and we had to decide what to do with it. Pay 4 life, or put it into our hand? Wait, I mean, make it as fast as possible, or make it as rules-correct as possible?
And what we decided to do was … both.
So, when you resolve
What does our fast, clean, interface look like?
So, you select zero, one, or two cards from your hand. When you are done selecting, you click this button, which will automatically update to indicate how much life you will be paying:
If you put back one card, then you are done. If you put back two, you see this:
If you put back zero cards and pay 8 life (which people do a lot), then there's only one button press involved.
That's what you'll see the vast majority of the time if you play with
- The number of cards you choose won't always be "up to two." If you can't pay any life, then you will have to choose two cards, not "up to."
- On very rare occasions that involve
Platinum Angel orNarset, Parter of Veils , you may draw less than two cards when Sylvan resolves, in which case you won't be able to pick two cards. But you'll still have to pay 4 life for each card you keep. - And, of course, if you have fond memories of breaking everyone's brains back in the late '90s and have drawn more than three cards when
Sylvan Library resolves, you'll pick your two cards from a larger selection than just three.
Finally, there were a few less-obvious details we had to get right:
When you resolve
Similarly, paying 8 life for
As for the rules-accurate interface, well, it's rules-accurate. It's a lot of clicking. It works fine, and I bet most of you will never see it.
But I do have one little challenge for you all. As I said, there are some cards which necessitate the rules-accurate interface. One of them is
Of course, every story about implementing a card on MTG Arena ends with " … and then QA got their hands on it and found a bug." This story is no different. Our testers discovered that
Thanks for reading, and enjoy your time at the library!

