[confirmed]Teferi, Mage of Zhalfir vs. you-may-cast effects

Describe the bug:
I can activate Isochron Scepter and successfully cast the spell imprinted on it while the AI has a Teferi, Mage of Zhalfir on the bf.
Which card behaved improperly?
Teferi, Mage of Zhalfir.
Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Dev 70a9bcf.
What exactly should be the correct behavior/interaction?
Ruling: If an ability lets an opponent cast a spell as part of its effect (such as Isochron Scepter's ability does), that opponent can't cast that spell since the currently resolving ability is still on the stack.
Are any other cards possibly affected by this bug?
From Teferi's side, no. It was an unpleasant surprise to stumble upon this ruling, and I'd have been amazed if it were working right. I don't think any other of the other cards that prevent players from casting spells has a similar timing restriction.
From the side of effects that let you cast spells, oh yes plenty. Some of these are on activated abilities (examples: Aetherworks Marvel, Kaho, Minamo Historian), some on spells (Bring to Light, Yahenni's Expertise), and some on triggers (Maelstrom Archangel, My Wish Is Your Command, Bloodbraid Elf); all should be prevented.
There's a distinction here between effects that say "You may copy [an exiled card]. If you do, you may cast the copy [usually without paying its mana cost]", like on Spellbinder or Isochron Scepter, and effects that say "Copy [a usually-targeted] spell. You may choose new targets for the copy", like on Izzet Guildmage or Hive Mind. Only the first sort should be prevented, though I think Manalink implements them the same internally.
Teferi's other rulings - "you can suspend creatures at instant speed" and "opponents' suspended cards don't unsuspend" - should probably be tested too.
As an aside, it's surprisingly easy to make "you can cast [whatever restriction] spells as though they had flash" work properly instead of the current approximation. sub_476B90 has a check of (cards_data[iid].type & dword_60A53C); just replace that with whatever special cases are appropriate. There's a similar one in reassess_all_cards_helper() at 0x477410, which solely determines whether to highlight card titles yellow or black; that's slightly less straightforward to replace, since there's a later check in the same function against current_turn and current_phase. The only hard part is to integrate it with all the existing workarounds, like "activating" Dream Halls to cast cards with alternate costs, or Rules Engine to flashback cards.
Oh, and this should be a different bug, but Isochron Scepter dumps when it enters the battlefield in dev.
I can activate Isochron Scepter and successfully cast the spell imprinted on it while the AI has a Teferi, Mage of Zhalfir on the bf.
Which card behaved improperly?
Teferi, Mage of Zhalfir.
Which update are you using? (date, name)Which type? (duel, gauntlet, sealed deck)
Dev 70a9bcf.
What exactly should be the correct behavior/interaction?
Ruling: If an ability lets an opponent cast a spell as part of its effect (such as Isochron Scepter's ability does), that opponent can't cast that spell since the currently resolving ability is still on the stack.
Are any other cards possibly affected by this bug?
From Teferi's side, no. It was an unpleasant surprise to stumble upon this ruling, and I'd have been amazed if it were working right. I don't think any other of the other cards that prevent players from casting spells has a similar timing restriction.
From the side of effects that let you cast spells, oh yes plenty. Some of these are on activated abilities (examples: Aetherworks Marvel, Kaho, Minamo Historian), some on spells (Bring to Light, Yahenni's Expertise), and some on triggers (Maelstrom Archangel, My Wish Is Your Command, Bloodbraid Elf); all should be prevented.
There's a distinction here between effects that say "You may copy [an exiled card]. If you do, you may cast the copy [usually without paying its mana cost]", like on Spellbinder or Isochron Scepter, and effects that say "Copy [a usually-targeted] spell. You may choose new targets for the copy", like on Izzet Guildmage or Hive Mind. Only the first sort should be prevented, though I think Manalink implements them the same internally.
Teferi's other rulings - "you can suspend creatures at instant speed" and "opponents' suspended cards don't unsuspend" - should probably be tested too.
As an aside, it's surprisingly easy to make "you can cast [whatever restriction] spells as though they had flash" work properly instead of the current approximation. sub_476B90 has a check of (cards_data[iid].type & dword_60A53C); just replace that with whatever special cases are appropriate. There's a similar one in reassess_all_cards_helper() at 0x477410, which solely determines whether to highlight card titles yellow or black; that's slightly less straightforward to replace, since there's a later check in the same function against current_turn and current_phase. The only hard part is to integrate it with all the existing workarounds, like "activating" Dream Halls to cast cards with alternate costs, or Rules Engine to flashback cards.
Oh, and this should be a different bug, but Isochron Scepter dumps when it enters the battlefield in dev.
- backtrace | Open