Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #9357 #9359

Merged
merged 1 commit into from Aug 22, 2022
Merged

Fix #9357 #9359

merged 1 commit into from Aug 22, 2022

Conversation

awjackson
Copy link
Contributor

@awjackson awjackson commented Aug 5, 2022

This PR fixes #9357.

Emrakul's "protection from spells" ability has been the subject of numerous bugs and regressions (#9357 itself was a regression caused by an incorrect fix for #7033, and that in turn was caused by an incorrect fix for #6946) and really needs a comprehensive set of tests:

  • Emrakul should not be targettable by instant or sorcery spells (this test already exists in ProtectionTest)
  • Emrakul should not be targettable by Aura spells
  • If and when mutate is successfully implemented, Emrakul should not be targettable by spells cast for their mutate cost
  • Emrakul should be targettable by activated and triggered abilities of instant and sorcery cards (e.g. Choking Tethers, but also Forecast cards like Piercing Rays)
  • Emrakul should be targettable by activated and triggered abilities of Aura cards (e.g. Gryff's Boon, Inferno Fist)
  • Emrakul should be targettable by activated and triggered abilities of all other cards (e.g. Banishing Light)

I've done each of these tests "by hand" before opening this PR, but they all need to be added to ProtectionTest which currently only tests the simplest case.

Also, this PR adds an explicit game.inCheckPlayableState test for the case of potential spells before casting, but this check is still problematic:

  • If you have an instant or sorcery card with a targetted Forecast ability (e.g. Piercing Rays) and Emrakul is the only potential target on the battlefield, the Forecast card will not be highlighted or selectable. However, if another, non-protected potential target also exists, then you will correctly be able to activate the Forecast ability targetting Emrakul.
  • Conversely, if you have an Aura card and Emrakul is the only potential target on the battlefield, the Aura card will incorrectly be highlighted (but you won't actually be able to cast it).

I don't know how to fix this without substantial changes to the process of scanning for playable abilities. The problem is that during the check-playable scan, the "source" passed to ProtectionAbility.canTarget is simply the Card object in whatever zone it's in, and there's no way to tell whether the proposed use of the card is casting it as a spell or activating one of its abilities.

@ldeluigi
Copy link
Contributor

It should also be a legal choice when any aura enters the battlefield without being cast

@awjackson
Copy link
Contributor Author

I'm merging this now and adding the tests later because it looks like there's something fundamentally fouled up with the tests at the moment.

@awjackson awjackson merged commit 54896b3 into magefree:master Aug 22, 2022
@awjackson awjackson deleted the fix_9357 branch August 22, 2022 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Emrakul, the Aeons Torn protection doesn't work against colored auras
2 participants