Fix Talion, the Kindly Lord chosen-number spell trigger (#1999) - #2295
Conversation
Parse mana value/power/toughness vs chosen number and skip commas inside that spell-quality phrase when splitting condition from effect.
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Run rustfmt on oracle_trigger imports and tests. Narrow continues_spell_quality_disjunction so unrelated ", power, or …" phrases do not skip the effect boundary (swallowed-clause ratchet).
a3ad7fd to
4c89a1e
Compare
🤖 Architecture Review (automated)Verdict: Seam: PASS — Correct layer (trigger parser), reuses existing CR check: CR 202.3 (mana value) and CR 208.1 (creature P/T numbers) both verified present in Findings
No correctness or CR defects found beyond the above; the boundary trace for the Talion line is sound (comma-1 → |
Replace starts_with/contains dispatch in continues_spell_quality_disjunction with tag/preceded/alt matching Talion disjunction segments; verify continuation via trailing comma tag instead of clause splitting.
fc5dd65 to
98f511a
Compare
I updated code from the review |
|
Maintainer follow-up pushed. Changes made:
Verification run:
I also rechecked the final diff for the handler security/instruction-path exclusions before pushing. |
matthewevans
left a comment
There was a problem hiding this comment.
Maintainer review: approved after nom-parser cleanup, runtime trigger regression coverage, and final architecture pass.
Summary
Fixes #1999: Talion, the Kindly Lord was triggering on every opponent spell cast but never applying life loss or draw.
Root cause was twofold:
find_effect_boundarytreated the comma inmana value, power, or toughnessas the effect boundary, truncating the trigger condition and breaking spell-quality parsing.with mana value equal to the chosen number, not Talion’s fullmana value, power, or toughnessdisjunction, sovalid_cardwas never set and the trigger fired unconditionally.Changes
find_effect_boundaryto skip commas that continue a spell-stat disjunction (continues_spell_quality_disjunction).parse_spell_chosen_number_qualityproducingFilterProp::AnyOfover CMC / power / toughness== ChosenNumber.,(condition text is already effect-free).Test plan
cargo test -p engine --lib talioncargo test -p engine --lib find_effect_boundary_skips_spell_quality_comma