Page 1 of 1

Playing a Land/Spell/Ability, Timing

PostPosted: 01 Apr 2010, 07:36
by silly freak
Hi all!

I'm currently on my first user action, but I can't really catch its essence. According to the rules, "To play a land, a player puts that land onto the battlefield from the zone it was in", so I guess that's exactly what to do. I worry more about the "when" (not specific to lands, btw): If I hardcode the "any time you could play a sorcery" into the land play, I can't account for effects that change that time.

So I guess the question has finally evolved into "how to store rules-changing effects?"

Re: Playing a Land/Spell/Ability, Timing

PostPosted: 02 Apr 2010, 21:16
by MageKing17
silly freak wrote:If I hardcode the "any time you could play a sorcery" into the land play, I can't account for effects that change that time.
If something says "Sorcery's can't be cast", it doesn't actually prevent you from playing lands, even though you couldn't actually play a Sorcery. You really just need to code the land-playing special action to work on your main phase while the stack is empty.

Re: Playing a Land/Spell/Ability, Timing

PostPosted: 02 Apr 2010, 22:35
by silly freak
"any time you could play a sorcery" was really just a metaphor for exactly that. there's probably nothing like that for lands, but plenty for spells, say Teferi, Mage of Zhalfir. If the time when playing a spell is legal is coded into the action, I can't modify that time.

Re: Playing a Land/Spell/Ability, Timing

PostPosted: 03 Apr 2010, 00:55
by MageKing17
silly freak wrote:"any time you could play a sorcery" was really just a metaphor for exactly that. there's probably nothing like that for lands, but plenty for spells, say Teferi, Mage of Zhalfir. If the time when playing a spell is legal is coded into the action, I can't modify that time.
Teferi may as well read "Opponent's can't cast spells unless the stack is empty and it's their turn", because that's what effect it has. Even if someone were to play Vedalken Orrery, it doesn't change when they "could play a sorcery" for the purposes of Teferi's ability.

Re: Playing a Land/Spell/Ability, Timing

PostPosted: 03 Apr 2010, 08:21
by silly freak
I'm not talking about the definition of "any time you could play a sorcery", but how abilities affect the time you can play spells in general. if my playing action does a check like

Code: Select all
if(instant || ability) {
  check for priority
} else {
  check for priority, your turn, main phase, stack empty
}
then this doesn't account for teferi. so once again: how can I store such effects to be more flexible?

such effects are rules-changing effects, and all affect the rules in different ways. Giving the game a list of effects for when lands can be played, then a list of effects for when spells can be played... you see, this doesn't sound like fun...

Re: Playing a Land/Spell/Ability, Timing

PostPosted: 03 Apr 2010, 09:53
by Marek14
The base two timings are instant and sorcery timing. There are other restrictions (cast this only during combat etc.), but those don't figure here and are added later.

In addition, there's the "immediate playing" during resolution of spell or ability, like cascade, for example. This ignores timing rules completely, with one single exception - not even this allows you to play land outside of your turn.

So, the complete tree says that a spell can be played as an instant if:

1. It's a spell with the type Instant.
2. It has the ability "flash".
3. There is an effect which allows you to cast the spell as though it had flash. These are:
Aluren
Armor of Thorns/Grave Servitude/Lightning Reflexes/Mystic Veil/Necromancy/Parapet/Relic Ward/Soar/Spider Climb/Ward of Lights
Qasali Ambusher
Quick Sliver
Quicken
Rootwater Shaman
Scout's Warning
Tawnos (Vanguard)
Vedalken Orrery
Vernal Equinox
Winding Canyons

For activated abilities, default is instant timing, except for mana abilities, of course (which can have "instant" limitation, like Lion's Eye Diamond). Any other limitations are added on top of that and checked afterwards.

In case of Teferi, he doesn't really override the basic timing. He adds flash to your creature cards (that is what overrides their timing), but he doesn't actually change timing of opponent's spells - he simply adds an additional condition to them, which is not too different from what, say, Rule of Law does.