- SpellGrid cards move to course/10-spellgrid/cards; start-module and verify-references stage course/cards plus module-local cards up to the module, so M5-M9 workspaces get exactly the pre-M10 card set. - cast() rejects a chosen-target spell without a target (checkCast/checkPlay); new test_10_targeted_spell_needs_target. - Rust CLI pre-validates instead of swapping the global panic hook. - Catalog: CRIER noun; DEATHRATTLE/BATTLECRY note on lexicon vs catalog role. - Lesson: design note on mid-movement reparse. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2.3 KiB
2.3 KiB
Module 10 Expansion Drop: BATTLECRY IS DOUBLE
The lesson's Expansion Drop beat explains the task. This file holds the scenario, the test locations and the check.
- Word:
BATTLECRY, a noun that names a trigger, asDEATHRATTLEdoes. With it,BATTLECRY IS DOUBLEwritten on the grid makes every Battlecry trigger twice, like Brann Bronzebeard ("Your Battlecries trigger twice.", Module 4). - Card: Town Crier, a SpellGrid card that is already in
course/10-spellgrid/cards/, the module's own cards ("game": "spellgrid"): a 1-cost 1/1 minion, nounCRIER, "Battlecry: Deal 1 damage to the enemy hero." - Tests:
tests/rust/test_10x.rsandtests/ts/test_10x.test.ts. Copy the one for your track into your workspace'stests/. - Reference answer, two data files and no code:
solution/words.json: the Module 10 reference'ssrc/content/words.jsonwith one entry added,{ "name": "BATTLECRY", "role": "noun" }.solution/seams.json: the Module 10 reference'ssrc/content/seams.jsonwith one entry added totriggerWords,"BATTLECRY": "battlecry".- Nothing under
src/engine/changes, and neither does the harness. The seam compiles any trigger word joined to any multiplier word; Module 4's oneactivationsroutine already multiplies Battlecries.
- 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_10x_battlecry_is_double
- Setup:
newSpellGridwith a level 5 wide and 3 high holdingBATTLECRY (0,0) IS (1,0) DOUBLE (2,0), no cards on the grid, and hand["Town Crier"]. - Assertions 1:
activeRules()contains"BATTLECRY IS DOUBLE". - Action:
clearLog(), thenplay("Town Crier", 0, 2), returningcrier. - Assertions 2:
- The log holds exactly two
Triggered { source: crier, trigger: "battlecry" }. health(hero(1))is 28: two Battlecries of 1 damage each.kindsAt(0,2)is["crier"]: the minion entered the grid as its card's noun.
- The log holds exactly two
Before the drop the lexicon doesn't know BATTLECRY, so the text spells no rule, and the first assertion fails. (Without that assertion the Battlecry would trigger once and the hero would have 29 Health.)