Files
systemic-game-design-course/course/02-action-queue/expansion/README.md
T
2026-10-29 02:30:26 +01:00

19 lines
1.4 KiB
Markdown

# Module 2 Expansion Drop: Frothing Berserker
The lesson's [Expansion Drop](../lesson.md#expansion-drop) beat explains the task. This file holds the scenario, the test locations and the check.
- Card: Frothing Berserker, 3-mana 2/4, "Whenever a minion takes damage, gain +1 Attack." ([Frothing Berserker, hearthstone.wiki.gg](https://hearthstone.wiki.gg/wiki/Frothing_Berserker)).
- Tests: `tests/rust/test_02x.rs` and `tests/ts/test_02x.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 2 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_02x_frothing_counts_each_damage
- Setup: an empty game. Summon `Frothing Berserker` for player 0 (id F), then a `Test Filler` for player 0, then a `Test Filler` for player 1. Record `attack(F)`.
- Action: player 0 casts `Whirlwind`.
- Assertions:
- `attack(F)` is 3 more than before: three minions took damage (F itself and both Fillers, the enemy one included), so F triggers three times.
- The log has exactly three `Triggered` events whose source is F.