Implement the following plan:
Plan: Fix 5 FDN Cards + Add LoseLifeOpponents Effect
Context
The FDN remediation doc identifies "Partial" cards using Effect::Custom(...) for abilities that should use typed variants. Four of these cards say "each opponent loses N life" — the Java implementation uses LoseLifeOpponentsEffect (life loss), which is mechanically distinct from damage in MTG rules. Our engine has DealDamageOpponents but no life-loss-to-opponents variant. We'll add LoseLifeOpponents to match the Java model, then fix 5 cards.
Step 1: Add Effect::LoseLifeOpponents variant
mtg-engine/src/abilities.rs
- Add variant to
Effect enum in the // -- Life -- section (~line 77):
rust
- Add constructor (~line 583):
rust
mtg-engine/src/game.rs — Add match arm in execute_effects() (after LoseLife arm, ~line 1015):
rust
(Same implementation as DealDamageOpponents for now, but semantically correct — when damage prevention is added later, only DealDamageOpponents will be affected.)
Step 2: Fix 5 FDN cards
All in mtg-cards/src/sets/fdn.rs — single-line replacements:
| Card | Current | Fix |
|---|
| Marauding Blight-Priest (~line 836) | Effect::Custom("Each opponent loses 1 life.".into()) | Effect::lose_life_opponents(1) |
| Pulse Tracker (~line 850) | Effect::Custom("Each opponent loses 1 life.".into()) | Effect::lose_life_opponents(1) |
| Vampire Spawn (~line 967) | Effect::Custom("Each opponent loses 2 life, you gain 2 life.".into()) | Effect::lose_life_opponents(2), Effect::gain_life(2) |
| Vampire Neonate (~line 1702) | Effect::Custom("Each opponent loses 1 life, you gain 1 life.".into()) | Effect::lose_life_opponents(1), Effect::gain_life(1) |
| Phyrexian Arena (~line 1410) | Effect::Custom("You lose 1 life.".into()) | Effect::lose_life(1) |
Verification
cargo check -p mtg-engine — new variant compiles
cargo check -p mtg-cards — card changes compile
cargo test --lib — all tests pass
If you need specific details from before exiting plan mode (like exact code snippets, error messages, or content you generated), read the full transcript at: /mnt/dest-btrfs/home/jc/.claude/projects/-mnt-dest-btrfs-home-jc-src-mage/a83bffdc-973c-4730-8a88-2ef219ba63de.jsonl
If this plan can be broken down into multiple independent tasks, consider using the TeamCreate tool to create a team and parallelize the work.