A Deathrattle summon used the dying minion's board index from before the Death Creation Step removed anything. That index is stale when a minion to its left dies in the same step, so the token landed one place too far right. Each Death Event now records `before`: the nearest minion to the right that is not dying in the same step. The position handed to the effect context is resolved when the trigger resolves: the current index of `before`, or the right end. Applied to the Rust and TS references of Modules 3-10. Module 3 gains two tests, documented in scenarios.md: test_03_summon_position_after_simultaneous_deaths (fails before the fix) and test_03_simultaneous_summons_keep_board_order. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Module 5 reference engine (Rust)
The course's own engine as of the end of Module 5. Every card is now data: a JSON file in the course's card format (course/schema/card.schema.json), and the Rust functions that were card effects in Modules 2–4 are gone. One interpreter turns effects into actions. Assemble builds a new card by replacing half of one card's text with the same half of another's. Module 4's reference was the starting point, so a diff between the two shows what this module adds.
cards/(at the crate root; not in this directory): the card data. It is a copy ofcourse/cards/, the single source:tools/verify-references.mjsstages it next to the crate, andtools/start-module.mjscopies it into a learner's workspace.src/engine/: generic machinery. Names no cards.card.rs: the card format as Rust types (CardDef,Clause,Effect,Target,Aura, read withserde), and the library. Registering a definition compiles its clauses into triggers, auras and a spell's effects, and marks whether Assemble may offer it (minions with text that were not themselves assembled).TriggerOngainsEndOfTurn, which card data may name (Drakkari Enchanter's aura does); the course has no turns, so nothing fires it.effect.rs: the interpreter: one effect plus its context in, actions out. The only code that knows whatdealDamage,draw,summon,assemble,buffHand, ... mean.assemble.rs:assemble(base, donor, half)(list surgery ontextatsplit; fails withAssembleErrorif the text is unchanged), and theassembleeffect, which asks the chooser for a base from the filtered pool, a donor and a half.queue.rs: as in Module 4, plus two actions (Assemble,Buff). An ability's effects are interpreted and performed one at a time, in printed order.world.rs: as in Module 4, plus card registration, cost, the chooser, andbuff.aura.rs,death.rs,event.rs: unchanged from Module 4.
src/content/mod.rs: reads every.jsonfile incards/. No card is named in Rust any more.src/harness.rs: the adapter the course tests call. Module 5 addsregister_cards,assemble,costandset_chooser.
Run it with the module's tests: node tools/verify-references.mjs 05 from the course repository. cargo test in this directory alone fails: there is no cards/ here.