fix: module 10 review round 1 (module-local SpellGrid cards, cast target check, CLI without panic hook)
- 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]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
a0cf9be214
commit
6f576940b7
@@ -55,14 +55,17 @@ test("card_schema_accepts_fixtures", () => {
|
||||
}
|
||||
});
|
||||
|
||||
// Card data the course ships: course/cards (every card the references load) and the
|
||||
// Card data the course ships: course/cards (every module's cards), module-local cards in
|
||||
// course/NN-*/cards (Module 10's SpellGrid cards, staged from that module on), and the
|
||||
// Expansion Drop answers in course/NN-*/expansion/solution/cards.
|
||||
function courseCardFiles() {
|
||||
const courseDir = join(here, "../../course");
|
||||
const dirs = [join(courseDir, "cards")];
|
||||
for (const m of readdirSync(courseDir).filter((d) => /^\d\d-/.test(d))) {
|
||||
const d = join(courseDir, m, "expansion/solution/cards");
|
||||
if (existsSync(d)) dirs.push(d);
|
||||
for (const sub of ["cards", "expansion/solution/cards"]) {
|
||||
const d = join(courseDir, m, sub);
|
||||
if (existsSync(d)) dirs.push(d);
|
||||
}
|
||||
}
|
||||
return dirs.flatMap((d) => readdirSync(d).filter((f) => f.endsWith(".json")).map((f) => join(d, f)));
|
||||
}
|
||||
@@ -141,3 +144,12 @@ test("course_levels_valid", () => {
|
||||
for (const card of level.hand ?? []) assert.ok(cards.has(card), `${f}: no card data for ${card}`);
|
||||
}
|
||||
});
|
||||
|
||||
test("spellgrid_cards_are_module_local", () => {
|
||||
// course/cards reaches every workspace from Module 5; SpellGrid's cards must not reach
|
||||
// Modules 5-9 (their spawnText effect and their place in Assemble pools are Module 10's).
|
||||
const shared = join(here, "../../course/cards");
|
||||
for (const f of readdirSync(shared).filter((f) => f.endsWith(".json"))) {
|
||||
assert.notEqual(json(join(shared, f)).game, "spellgrid", `${f} belongs in course/10-spellgrid/cards`);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user