feat(parser+engine): Gideon of the Trials — compound conditional emblem locks#6127
Conversation
There was a problem hiding this comment.
Code Review
This pull request implements support for parsing and executing compound, condition-gated game-outcome locks, specifically targeting Gideon of the Trials' emblem. It introduces a parser for compound win/lose statics, updates the card name normalizer to keep subtype-word occurrences literal when preceding a core-type word, and defers emblem-granting spells to the effect-chain parser. Comprehensive unit and integration tests are added to verify the rules and parser behavior. No review comments were provided, and the changes are highly idiomatic and compliant with the MTG Comprehensive Rules and repository guidelines.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
…em locks
Emblem bodies now parse to multiple condition-gated statics
(parse_static_line_multi); "you can't lose the game and your opponents
can't win the game" splits into CantLoseTheGame/CantWinTheGame, each
gated on IsPresent(Gideon planeswalker, you) (CR 104.2b/104.3e,
CR 611.3a, CR 114.4, CR 205.3j). Standalone emblem-granting
instants/sorceries now defer to the effect parser via the shared
is_emblem_creation_head predicate in should_defer_spell_to_effect —
previously the quoted static body misclassified the line as a static
pattern and the emblem was never created. Card-name normalizer keeps
subtype-word short names literal in type-adjective position
("a Gideon planeswalker") while subject uses still normalize.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
910530d to
e9b071b
Compare
|
Maintainer rebase and implementation review completed on |
Parse changes introduced by this PR · 10 card(s), 19 signature(s) (baseline: main
|
matthewevans
left a comment
There was a problem hiding this comment.
Approved after current-head implementation review. The rebased branch preserves both independent parser regressions. The required parse-diff shows the intended subtype-word/type-adjective class (ten cards), with no unexplained surface. The shared emblem-head and static-condition seams are used, all required checks and trust/security gates are green, and no blocking feedback remains.
Summary
Implements Gideon of the Trials (AKH #14), with the emblem's compound conditional lock as the class-level target: "As long as you control a Gideon planeswalker, you can't lose the game and your opponents can't win the game."
parse_static_line_multi): the can't-lose/can't-win conjunct splits intoCantLoseTheGame+CantWinTheGame, each gated onIsPresent(Gideon planeswalker, you).~.Root cause (why the emblem never appeared)
Standalone emblem-granting spell lines (
You get an emblem with "…") were misclassified by the spell IR loop: the quoted static body ("can't lose the game") pattern-matched as a static ability, so the line never reached the effect parser and no emblem was created. Fixed at the classification seam —should_defer_spell_to_effectnow defers any line whose head matches the shared combinator predicateis_emblem_creation_head(single authority, reused from the effect parser; both call sites spell-scoped).Class coverage
as long as you control …) goes through the shared condition combinator, not bespoke matching.CR citations (all verified against MagicCompRules.txt)
Tests
gideon_trials_emblem.rs): emblem materializes on −0; loss SBA blocked per-controller while a Gideon is controlled; opponents' win events blocked; protection evaporates when the last Gideon leaves.CreateEmblem(guards the classifier seam).🤖 Generated with Claude Code