Adds course/12-combat: lesson, scenarios, nine test_12 tests in both tracks, the cumulative reference (Module 11's plus combat) and the drop. The Damage action carries per-target hits with a priority; react stable-sorts its Queue by priority before order of play, so the triggers answering the defender's Damage Event go first. orderAttack/canAttack/endTurn join the harness (orderAttack because attack(id) already reads Attack). endOfTurn triggers fire, so Drakkari Enchanter's data is live. Test Bell is scoped to Module 12's cards. Harness contract, catalog, research notes and earlier lessons' forward pointers follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
1.3 KiB
Rust
48 lines
1.3 KiB
Rust
// Module 12 Expansion Drop: Bonechewer Brawler. Matches expansion/README.md.
|
|
use engine::harness::*;
|
|
|
|
#[test]
|
|
fn test_12x_bonechewer_brawler() {
|
|
let mut g = new_game(GameOpts {
|
|
decks: Some([
|
|
vec!["Test Filler".to_string(); 5],
|
|
vec!["Test Filler".to_string(); 5],
|
|
]),
|
|
});
|
|
let w = g.summon("Bonechewer Brawler", 1);
|
|
let h = g.summon("Loot Hoarder", 1);
|
|
let a = g.summon("Harvest Golem", 0);
|
|
g.clear_log();
|
|
|
|
let reason = g.can_attack(a, h).expect("the Brawler has Taunt");
|
|
assert!(reason.contains("Taunt"), "{reason}");
|
|
|
|
g.order_attack(a, w).unwrap();
|
|
|
|
assert_eq!(
|
|
g.log(),
|
|
vec![
|
|
GameEvent::Damaged {
|
|
target: w,
|
|
amount: 2
|
|
},
|
|
GameEvent::Damaged {
|
|
target: a,
|
|
amount: 2
|
|
},
|
|
GameEvent::Triggered {
|
|
source: w,
|
|
trigger: "damaged".to_string()
|
|
},
|
|
GameEvent::StatsChanged {
|
|
id: w,
|
|
attack: 4,
|
|
health: 1
|
|
},
|
|
]
|
|
);
|
|
// The Golem took the Brawler's Attack as it was when the damage was dealt.
|
|
assert_eq!(g.health(a), 1);
|
|
assert_eq!(g.attack(w), 4);
|
|
}
|