feat: module 04 interceptors

Trigger multipliers as aura data on cards, snapshotted by an Aura Update
(Other) after each Death Creation Step and on summon, and applied by one
generic routine (activations) when each queued trigger starts. Baron
Rivendare is content only (stacking "max"); Brann Bronzebeard is the
content-only Expansion Drop. Adds play (now required) and Battlecry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Lucas WintherandClaude Opus 5.5 committed 2026-10-29 02:54:37 +01:00
1 parent 8a4eba1948
commit bcdaca0cd2
40 files changed
+4421 -1

No files matched your search

@@ -0,0 +1,33 @@
// Module 4 Expansion Drop: Brann Bronzebeard. Matches expansion/README.md.
use engine::harness::*;
#[test]
fn test_04x_brann_doubles_battlecry() {
let mut g = new_game(GameOpts {
decks: Some([vec!["Test Filler".to_string(); 5], vec![]]),
});
let brann = g.summon("Brann Bronzebeard", 0);
let e = g.add_to_hand("Novice Engineer", 0);
g.clear_log();
g.play(e);
let hand = g.hand(0);
assert_eq!(hand.len(), 2);
let (c1, c2) = (hand[0], hand[1]);
let battlecry = GameEvent::Triggered {
source: e,
trigger: "battlecry".to_string(),
};
assert_eq!(
g.log(),
vec![
GameEvent::Summoned { id: e },
battlecry.clone(),
GameEvent::Drew { player: 0, id: c1 },
battlecry,
GameEvent::Drew { player: 0, id: c2 },
]
);
assert_eq!(g.board(0), vec![brann, e]);
}
@@ -0,0 +1,24 @@
// Module 4 Expansion Drop: Brann Bronzebeard. Matches expansion/README.md.
import { expect, test } from "vitest";
import { newGame } from "../src/harness";
test("test_04x_brann_doubles_battlecry", () => {
const g = newGame({ decks: [Array(5).fill("Test Filler"), []] });
const brann = g.summon("Brann Bronzebeard", 0);
const e = g.addToHand("Novice Engineer", 0);
g.clearLog();
g.play(e);
const hand = g.hand(0);
expect(hand).toHaveLength(2);
const [c1, c2] = hand;
expect(g.log()).toEqual([
{ type: "Summoned", id: e },
{ type: "Triggered", source: e, trigger: "battlecry" },
{ type: "Drew", player: 0, id: c1 },
{ type: "Triggered", source: e, trigger: "battlecry" },
{ type: "Drew", player: 0, id: c2 },
]);
expect(g.board(0)).toEqual([brann, e]);
});