Skip to content

fix: skip 303.4g aura ETB check for face-down permanents#15604

Open
mvanhorn wants to merge 1 commit into
magefree:masterfrom
mvanhorn:fix/15580-morph-aura-etb-crash
Open

fix: skip 303.4g aura ETB check for face-down permanents#15604
mvanhorn wants to merge 1 commit into
magefree:masterfrom
mvanhorn:fix/15580-morph-aura-etb-crash

Conversation

@mvanhorn

Copy link
Copy Markdown

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 threw IllegalArgumentException: 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 for faceDown entries.

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 MorphTest cases: 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 under Mage.Tests in CI.

Fixes #15580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SERVER - game error on cast Gift of Doom using Morph (empty spell)

1 participant