feat(parser): attach put Equipment to source follow-up (The Invincible Iron Man) (#4796)#5451
Merged
matthewevans merged 1 commit intoJul 9, 2026
Conversation
…e>, attach it to ~"
The Invincible Iron Man's begin-of-combat trigger ("you may put an
artifact card from your hand onto the battlefield. If it's an Equipment,
attach it to ~") misparsed the follow-up into an illegal self-attach
(Attach{ParentTarget, ParentTarget} -- an Equipment can't equip itself,
CR 301.5c) gated by a wrong-subject TargetMatchesFilter that tested the
injected source (Iron Man) instead of the just-moved card. So a put
Equipment was never attached.
Recognize the "if it's a[n] <subtype>, attach it to ~" follow-up as a
unit (try_parse_moved_card_subtype_attach_followup), guarded on a
preceding battlefield put, and emit the already-supported forward_result
idiom used by Armored Skyhunter / Gilgamesh: parent ChangeZone(Hand->
Battlefield) with sub_ability Attach{attachment: SelfRef (the moved
card), target: ParentTarget (the source)} gated by
ZoneChangedThisWay{Equipment}. No new variant, no new runtime -- the
runtime forward_result Attach path already resolves this shape;
rewire_result_anchored_subchain re-affirms forward_result.
Sibling cards phrased "if an Equipment is put onto the battlefield this
way" use a different combinator and are unaffected. Typed (non-source)
hosts remain an honest gap.
CR 608.2c (later text modifies earlier), CR 301.5b (abilities may attach
an Equipment to a creature), CR 301.5c (self-attach illegal), CR 701.3a
(attach).
Closes phase-rs#4796.
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
1 similar comment
Contributor
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
Parse changes introduced by this PR · 1 card(s), 1 signature(s) (baseline: main
|
matthewevans
approved these changes
Jul 9, 2026
matthewevans
left a comment
Member
There was a problem hiding this comment.
Maintainer review: parser diff is scoped to The Invincible Iron Man, the change lands in the existing moved-card follow-up parser path, and the production parser test pins ChangeZone -> Attach wiring with forward_result and ZoneChangedThisWay. Green required checks and no blocking review comments.
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.
Closes #4796.
Bug: The Invincible Iron Man ("At the beginning of combat on your turn, you may put an artifact card from your hand onto the battlefield. If it's an Equipment, attach it to The Invincible Iron Man.") misparsed the follow-up: the "if it's an Equipment, attach it to ~" clause lowered to an illegal self-attach
Attach{ParentTarget, ParentTarget}(an Equipment can't equip itself, CR 301.5c) gated by a wrong-subjectTargetMatchesFilterthat tested the injected source (Iron Man) instead of the just-moved card. So a put Equipment was never attached.Fix: A dedicated nom recognizer
try_parse_moved_card_subtype_attach_followup(inoracle_effect/conditions.rs), dispatched in the effect-chunk loop before the generic conditional cascade and guarded on a preceding battlefield put, emits the already-supportedforward_resultidiom (the same one Armored Skyhunter / Gilgamesh use):ChangeZone(Hand→Battlefield)withsub_ability=Attach{attachment: SelfRef (the moved card, rebound to the forwarded object), target: ParentTarget (the source host)}ZoneChangedThisWay{Equipment}(reads the moved card's type, not a target slot)rewire_result_anchored_subchainre-affirmsforward_result. No new variant, no new runtime — the runtimeforward_resultAttach path already resolves this shape.Sibling cards phrased "if an Equipment is put onto the battlefield this way" use a different combinator and are unaffected; typed (non-source) hosts remain an honest gap.
CR 608.2c (later text modifies earlier), CR 301.5b (abilities may attach an Equipment), CR 301.5c (self-attach illegal), CR 701.3a (attach).