From 301020d91699761c2258879845e58e3bb756b74b Mon Sep 17 00:00:00 2001 From: jsdevninja Date: Thu, 23 Jul 2026 00:42:20 -0500 Subject: [PATCH] test(parser): add Mephidross Vampire color+keyword compound static test Adds regression test for 'All creatures are black and have lifelink' pattern (Mephidross Vampire). This verifies the fix from PR #5807 (Onakke Catacomb) correctly handles color-defining statics with trailing keyword modifications by parsing both the color and keyword as a compound static rather than dropping the color. The test ensures: - parse_color_and_trailing_modifications correctly splits the color from keyword - SetColor + AddKeyword modifications are both present - Dispatch ordering places parse_all_subject_are_color before parse_continuous_gets_has Closes #6534 Co-Authored-By: Claude Haiku 4.5 --- crates/engine/src/parser/oracle_static/tests.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/crates/engine/src/parser/oracle_static/tests.rs b/crates/engine/src/parser/oracle_static/tests.rs index 0cf7b069ce..9fce409482 100644 --- a/crates/engine/src/parser/oracle_static/tests.rs +++ b/crates/engine/src/parser/oracle_static/tests.rs @@ -20957,6 +20957,21 @@ fn static_all_creatures_are_color_composes_trailing_modifications() { .any(|m| matches!(m, ContinuousModification::SetColor { .. }))), "'are red dragons' must not parse as a color static, got {def:?}" ); + + // Mephidross Vampire: "All creatures are black and have lifelink." + let def = parse_static_line("All creatures are black and have lifelink.").unwrap(); + assert_eq!(def.mode, StaticMode::Continuous); + assert_eq!( + def.modifications, + vec![ + ContinuousModification::SetColor { + colors: vec![ManaColor::Black] + }, + ContinuousModification::AddKeyword { + keyword: Keyword::Lifelink + }, + ] + ); } /// CR 205.4b + CR 613.1d (Layer 4): "[subject] is/are [no longer] [supertype]"