Files
systemic-game-design-course/course/03-death-step/expansion
Lucas WintherandClaude Opus 5.5 8a4eba1948 feat: module 03 death step
Deferred death: damage and destroy only mark minions; the Death Creation
Step removes them when the outermost Phase ends, and Death Phases resolve
Deathrattles in order of play until no new deaths occur. Deathrattle
summons use the board position the Death Event remembered. Harness adds
destroy(target). Expansion Drop: Twisting Nether as content only.

test_02_mortally_wounded_still_triggers no longer asserts the Acolyte is
still on the board: from Module 3 on it leaves at the end of the Sequence,
and verify-references runs Module 2's tests against the Module 3 reference.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-29 02:42:12 +01:00
..
2026-10-29 02:42:12 +01:00
2026-10-29 02:42:12 +01:00
2026-10-29 02:42:12 +01:00

Module 3 Expansion Drop: Twisting Nether

The lesson's Expansion Drop beat explains the task. This file holds the scenario, the test locations and the check.

  • Card: Twisting Nether, 8-mana spell, "Destroy all minions and locations." (Twisting Nether, hearthstone.wiki.gg). The course has no locations, so in this course it destroys all minions.
  • Tests: tests/rust/test_03x.rs and tests/ts/test_03x.test.ts. Copy the one for your track into your workspace's tests/.
  • Reference answer: solution/rust/src/content/mod.rs and solution/ts/src/content/index.ts. Each is the Module 3 reference content with one card added. Nothing under src/engine/ changes, and neither does the harness.
  • Check: commit your workspace before you start, then run node tools/expansion-check.mjs <your-workspace> <that-commit> from the course repository. It fails if any file under src/engine/ changed.

Scenario

test_03x_twisting_nether_destroys_all

  • Setup: newGame with a deck of 5 Test Filler for player 0. Summon Loot Hoarder for player 0 (id H), then Harvest Golem for player 0 (id G), then Test Filler for player 1 (id F). Call clearLog().
  • Action: player 0 casts Twisting Nether.
  • Assertions:
    • board(0) has one minion; call it D. hand(0) has one card; call it C.
    • The log is exactly, in this order: SpellCast{card: "Twisting Nether"}, Destroyed{id: H}, Destroyed{id: G}, Destroyed{id: F}, DeathPhase{round: 1}, Triggered{source: H, trigger: "deathrattle"}, Drew{player: 0, id: C}, Triggered{source: G, trigger: "deathrattle"}, Summoned{id: D}. All three minions, on both sides, leave play together before any Deathrattle resolves. D is summoned after the Death Creation Step, so the destroy never touches it, and there is no second Death Phase.
    • nameOf(D) is "Damaged Golem", and board(1) is empty.
    • zoneOf is graveyard for H, G and F.
    • health(H) is 1, health(G) is 3 and health(F) is 1: nothing was damaged.