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.
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 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.
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.
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.
Now update the Blossoming Defense duplicate entry (it's in both Complete and Partial sections).
Now update the Flamekin Gildweaver, Stratosoarer entries, and remove stale "Fix needed" from already-fixed cards.
Now let me add the comprehensive Remaining Work Summary at the end of the file.
Let me read more of the execute_effects code and check if BeginCombat event type exists.
The ECL remediation audit is complete. Here's a summary of what was done:
ECL Remediation Doc Updates (uncommitted):
pay_costs() no-op issue affecting 3 cards with Cost::RemoveCounters/Cost::BlightThese doc changes are staged but not committed. The last commit was cb70447e83 which covered Batches 4-10. Let me know what you'd like to do next — commit these doc updates, continue with the next batch (Batch 11: Modal spells), or something else.
Let me read the current ECL remediation doc and the card implementations to build an accurate dependency graph.
Let me read the ecl.rs to get precise card-level data for the graph, and cross-reference with the remediation doc I already have.
Now let me verify which cards have Custom stubs vs. which are truly complete.
Good, now I have precise data. Let me count and verify the categorizations.
Now I have all the data I need. Let me build the dependency graph. I need to cross-reference code-complete cards with the remediation doc to find cards that are code-complete but functionally incomplete (e.g., shock lands with no abilities, placeholders with no stubs).
Let me fix a few issues in the diagram — duplicate nodes and a card that's in Complete but also listed under Modal.
Now fix the duplicate/incorrect nodes:
Let me verify all 267 cards are accounted for in the diagram.
Just one card with a mismatched ID. Let me fix it.
Now let me verify all 267 are accounted for and update the summary table to be accurate.
Let me read the GainKeywordUntilEndOfTurn handling in execute_effects.
All 267 cards accounted for. Now let me update the summary table to match the actual counts (which include multi-dep cards being counted in multiple capability groups).
Now let me also update the capability node labels in the mermaid diagram to show accurate counts including multi-dep cards.
Let me do a final verification that the diagram is correct.
All 267 cards verified. The graph is at docs/ecl-dependency-graph.md. Here's the structure:
ECL Complete (root)
| Capability | Cards | Notes |
|---|---|---|
| Research & Implementation | 93 | Need Java source analysis first |
| Conditional/Dynamic | 12 | Most diverse category |
| Cost System | 9 | pay_costs() match arms |
| Vivid Mechanic | 9 | Color-counting for X |
| Aura System | 9 | Creature enchantment |
| Player Choice | 8 | Runtime decisions |
| Misc Effects | 6 | Individual small fixes |
| Modal Spells | 5 | Choose one/two |
| Shock Lands | 5 | ETB replacement |
| Eclipsed Cycle | 5 | Look at top 4 |
| Equipment | 4 | Attach/detach/equip |
| Behold | 4 | Reveal+exile from hand |
| Creature Type Choice | 4 | Choose-type |
| Dynamic Mana | 3 | Color-dependent production |
| Evoke | 3 | Alt cost + sacrifice |
| Impulse Draw | 3 | Exile-and-play |
| Spell Copy, PW, Control, Delayed, Cast-from-Exile | 1 each |
6 multi-dependency cards have edges to 2 capabilities each (e.g., Champion of the Weird needs both Behold and Cost System).
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.
I'll start by reading the work queue to find the next unchecked batch.
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.