Fix Lighthouse Chronologist level trigger condition#5535
Conversation
…ouse-chronologist-extra-turn-condition
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
…ouse-chronologist-extra-turn-condition
matthewevans
left a comment
There was a problem hiding this comment.
Reviewed and verified — holding only on CI (5 checks still running); will approve on settled green.
Correct, and on the general seam. The bug is in the level-block reparsing pass, which was unconditionally overwriting each trigger's condition with the level-counter gate — so for LEVEL 7+, the printed intervening-if if it's not your turn was dropped and the extra-turn trigger would fire at the controller's own end step. AND-composing the level gate with any existing condition is the right fix, and because it lives on the shared reparsing path it covers every leveler with a printed intervening-if, not just Lighthouse Chronologist.
Verified:
- Oracle text matches live Scryfall exactly (
At the beginning of each end step, if it's not your turn, take an extra turn after this one.). - CR citations grep-verified against the Comprehensive Rules: 711.2a/711.2b (level symbols are static abilities active while in the counter range) and 603.4 (intervening-if). All accurate.
- Test is discriminating: it destructures
TriggerCondition::Andand asserts both theHasCounters{level, minimum:7}gate and theNot{DuringPlayersTurn{Controller}}gate are present — before the fix theAndwouldn't exist at all, so the test fails closed.
Nice fix. Enqueue is pending only on the rollup settling green.
Parse changes introduced by this PR · 1 card(s), 1 signature(s) (baseline: main
|
matthewevans
left a comment
There was a problem hiding this comment.
Approving. The fix AND-composes the level-counter gate with the printed intervening-if on the shared level-block reparse path (TriggerCondition::And { conditions: vec![existing, trigger_condition] }), so it covers every leveler with a printed condition, not just Lighthouse Chronologist. Pre-fix, the reparse unconditionally overwrote the condition, dropping if it's not your turn and firing the extra-turn trigger at the controller's own end step. CR 711.2a/711.2b/603.4 verified; the test destructures the And and asserts both gates (fails closed pre-fix). CI green, merge CLEAN.
Summary
Fixes the level-trigger condition composition for Lighthouse Chronologist.
Closes #4728.
The LEVEL 7+ trigger now keeps both required gates: the creature must have at least seven level counters, and the printed intervening-if condition (
if it's not your turn) must also be true. Previously the level-block reparse replaced the printed condition with the level-counter gate, allowing the extra-turn trigger to fire on the controller's own end step.Files changed
crates/engine/src/parser/oracle.rscrates/engine/src/parser/oracle_trigger_tests.rsCR references
CR 711.2aCR 711.2bCR 603.4Track
Developer
LLM
Model: codex-5
Thinking: high
Tier: Standard
Gate A
./scripts/check-parser-combinators.shexited 0 with no output.Anchored on
crates/engine/src/parser/oracle_trigger.rs:6964- existing trigger-condition composition helper wraps an existing condition and a new gate inTriggerCondition::And.crates/engine/src/parser/oracle_trigger_tests.rs:16796- existing regression test for composing a trigger gate with a printed intervening-if condition.Verification
cargo fmt --all -- --check- clean./scripts/check-parser-combinators.sh- cleangit diff --check origin/main...HEAD- cleancargo test -p engine level_trigger_preserves_printed_intervening_if_condition- 1 passed / 0 failedcargo clippy -p engine --all-targets -- -D warnings- cleanTilt was not running, so direct cargo fallback was used.
Scope Expansion
None.
Validation Failures
Independent fresh-context subagent review was not run because subagent delegation was not explicitly requested; local
doc-guardianandcode-reviewerchecklist passes found no findings.CI Failures
None.