fix: skip 303.4g aura ETB check for face-down permanents#15604
Open
mvanhorn wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Casting Gift of Doom face down with Morph no longer crashes the server. The CR 303.4g guard in
PlayerImpl.moveCards("Aura entering the battlefield with no legal object to enchant") fired for face-down casts because it read the printed card's Aura subtype, then found the morph cast's SpellAbility with an empty target list and threwIllegalArgumentException: Something wrong, found etb aura with empty spell ability or without any targets. Per CR 708.2, a face-down spell resolves as a 2/2 face-down creature with no name, types, or subtypes, so the Aura ETB check must not apply when the permanent enters face down — the guard is now skipped forfaceDownentries.Why this matters
The reporter in #15580 hit a full game crash from a legal line of play with any morph Aura (Gift of Doom being the canonical example). The change is one condition on the existing guard; face-up Aura entries keep the exact 303.4g handling they have today.
Testing
Added
MorphTestcases: casting Gift of Doom face down resolves as a nameless 2/2 face-down creature, and turning it face up (sacrificing a creature for its own trigger, then attaching to a target) works end to end, including the deathtouch/indestructible grants on the enchanted creature. Tests run underMage.Testsin CI.Fixes #15580