Read docs/work-queue.md and do the next unchecked batch. For each batch:
mtg-engine/src/abilities.rs, mtg-engine/src/game.rs) to understand current Effect/StaticEffect variantsgame.rs mod tests)cargo check -p mtg-cards && cargo test --libdocs/{fdn,tla,tdm,ecl}-remediation.md, update ROADMAP.mddocs/work-queue.md with today's dateIf a batch turns out to be wrong or more complex than described, update the queue with what you learned and move on to the next one.
I'll start by reading the work queue to find the next unchecked batch.
The next unchecked batch is Batch 10: Compound self-counter + target effects. Let me investigate the current state of these cards and the engine.
Dream Seizer is already fixed (Batch 3). The only remaining card is Warren Torchmaster. Let me understand how the engine handles targets in compound effects — the key challenge is that the self-counter has no target while the haste grant targets a creature.
Let me read the relevant parts of game.rs.
Let me read more of the execute_effects code and check if BeginCombat event type exists.
Let me read the GainKeywordUntilEndOfTurn handling in execute_effects.
Now I understand the problem. When AddCounters has targets from TargetSpec::Creature, it applies to the target creature, not self. I need to add an Effect::AddCountersSelf variant that always applies to the source permanent. Let me also check if there's a Java implementation of Warren Torchmaster.
There is a Java implementation. Let me read it.
Now I understand the full picture. The Java uses BlightCost(1) + reflexive trigger. In our engine, I need Effect::AddCountersSelf to keep the counter on self while GainKeywordUntilEndOfTurn targets the chosen creature.
Let me implement this. I'll work on:
Effect::AddCountersSelf variant + constructor + match armLet me also search for other cards that might benefit from AddCountersSelf.
Good — Warren Torchmaster is the only card that needs this right now. Let me implement the changes.
First, add the AddCountersSelf variant to the Effect enum in abilities.rs.
Now add the constructor method.
Now add the match arm in execute_effects in game.rs. Let me read the area around the AddCounters match arm again to get the exact context.
Now let me add a test. Let me find the test section in game.rs.
Good. Let me find the end of that test and the surrounding context to add a new test right after it.
Now I'll add the test right after add_counters_self_when_no_targets.
Now let me fix Warren Torchmaster in ecl.rs.
Now let's compile and test.
Compiles clean. Now let's run the tests.
All tests pass, including the new add_counters_self_with_separate_target test. Now let me update the docs. Let me read and update the remediation docs and work queue.
Now let me update all the docs. I'll update the work queue, ECL remediation, and ROADMAP.
Now update the ROADMAP.md with the Batch 10 change.
Now let me also update the ROADMAP to note Warren Torchmaster is fixed in the Phase 1 section.
Let me run the full test suite one more time to confirm everything is clean.
All 255 tests pass (166 engine + 52 AI + 18 cards + 19 integration). Let me also update the memory with the new API info.
Batch 10 complete. Here's the summary:
Engine change: Added Effect::AddCountersSelf { counter_type, count } variant + add_counters_self() constructor + match arm in execute_effects. Unlike AddCounters (which falls back to source only when targets are empty), AddCountersSelf always applies counters to the source permanent regardless of other targets. This enables compound effects where one part targets self and another targets a chosen creature.
Cards fixed (1):
Effect::Custom(...) → add_counters_self("-1/-1", 1) + gain_keyword_eot("haste") with TargetSpec::Creature + .set_optional(). Matches the Java implementation's BlightCost(1) + ReflexiveTriggeredAbility pattern.Test added: add_counters_self_with_separate_target — verifies that in a compound effect, AddCountersSelf puts -1/-1 on the source while GainKeywordUntilEndOfTurn grants haste to the target, with neither effect bleeding to the wrong permanent.
All 255 tests passing.
Let's commit the current wor
Let's commit the current work
The diff includes work from batches 4-10 (all uncommitted). Let me commit everything together.
Committed as cb70447e83. Working tree is clean. 12 files changed with 1,495 insertions and 180 deletions covering batches 4-10 of the card remediation work.
Let's look at @mtg-rl/docs/work-queue.md and @mtg-rl/docs/ecl-remediation.md and update ECL Remediation to match the current state, identify all the remaining work to complete ECL.
Let me read both files to understand the current state.
This is a significant audit. Let me systematically check the actual ecl.rs against the remediation doc to find cards that are now complete, still partial, and truly stub. I'll launch parallel investigations.
Good overview. Let me verify some of the surprising "complete" classifications and get detailed breakdowns of what remains.
Many of those "complete" cards are pure placeholders (no abilities defined at all). Let me verify the specific cards the doc flagged as "may be fully functional" and check cost handling.
Let me check whether Blight, RemoveCounters, and ExileFromGraveyard costs are actually handled in the engine.
Critical finding: Cost::RemoveCounters, Cost::Blight, and Cost::Custom are all no-ops in pay_costs() — they fall through to _ => {} and silently succeed without actually paying. This means cards using these costs are "overpowered" (ability always activatable). Let me now write the comprehensive update.
Now I have a clear picture. Let me update the remediation doc systematically. I'll promote cards that are now complete, fix stale notes, and add a remaining work summary.
Now update the "Working Effects" list to include newly working effects.
Now promote cards from Partial to Complete. Let me do the clear ones.
Now update Bristlebane Battler — it's fully functional now.
Now update Dose of Dawnglow and Midnight Tilling.
Now update the Gnarlbark Elm, Moonlit Lamenter, and Gristle Glutton entries to note their cost issues.