1.4 KiB
1.4 KiB
Module 2 Expansion Drop: Frothing Berserker
The lesson's 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).
- Tests:
tests/rust/test_02x.rsandtests/ts/test_02x.test.ts. Copy the one for your track into your workspace'stests/. - Reference answer:
solution/rust/src/content/mod.rsandsolution/ts/src/content/index.ts. Each is the Module 2 reference content with one card added. Nothing undersrc/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 undersrc/engine/changed.
Scenario
test_02x_frothing_counts_each_damage
- Setup: an empty game. Summon
Frothing Berserkerfor player 0 (id F), then aTest Fillerfor player 0, then aTest Fillerfor player 1. Recordattack(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
Triggeredevents whose source is F.