Deferred death: damage and destroy only mark minions; the Death Creation Step removes them when the outermost Phase ends, and Death Phases resolve Deathrattles in order of play until no new deaths occur. Deathrattle summons use the board position the Death Event remembered. Harness adds destroy(target). Expansion Drop: Twisting Nether as content only. test_02_mortally_wounded_still_triggers no longer asserts the Acolyte is still on the board: from Module 3 on it leaves at the end of the Sequence, and verify-references runs Module 2's tests against the Module 3 reference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.6 KiB
Rust
53 lines
1.6 KiB
Rust
// Module 3 Expansion Drop: Twisting Nether. Matches expansion/README.md.
|
|
use engine::harness::*;
|
|
|
|
#[test]
|
|
fn test_03x_twisting_nether_destroys_all() {
|
|
let mut g = new_game(GameOpts {
|
|
decks: Some([vec!["Test Filler".to_string(); 5], vec![]]),
|
|
});
|
|
let h = g.summon("Loot Hoarder", 0);
|
|
let golem = g.summon("Harvest Golem", 0);
|
|
let f = g.summon("Test Filler", 1);
|
|
g.clear_log();
|
|
|
|
g.cast("Twisting Nether", 0, None);
|
|
|
|
let board = g.board(0);
|
|
assert_eq!(board.len(), 1);
|
|
let d = board[0];
|
|
let hand = g.hand(0);
|
|
assert_eq!(hand.len(), 1);
|
|
let c = hand[0];
|
|
assert_eq!(
|
|
g.log(),
|
|
vec![
|
|
GameEvent::SpellCast {
|
|
card: "Twisting Nether".to_string()
|
|
},
|
|
GameEvent::Destroyed { id: h },
|
|
GameEvent::Destroyed { id: golem },
|
|
GameEvent::Destroyed { id: f },
|
|
GameEvent::DeathPhase { round: 1 },
|
|
GameEvent::Triggered {
|
|
source: h,
|
|
trigger: "deathrattle".to_string()
|
|
},
|
|
GameEvent::Drew { player: 0, id: c },
|
|
GameEvent::Triggered {
|
|
source: golem,
|
|
trigger: "deathrattle".to_string()
|
|
},
|
|
GameEvent::Summoned { id: d },
|
|
]
|
|
);
|
|
assert_eq!(g.name_of(d), "Damaged Golem");
|
|
assert_eq!(g.board(1), Vec::<Id>::new());
|
|
for id in [h, golem, f] {
|
|
assert_eq!(g.zone_of(id), Zone::Graveyard);
|
|
}
|
|
assert_eq!(g.health(h), 1);
|
|
assert_eq!(g.health(golem), 3);
|
|
assert_eq!(g.health(f), 1);
|
|
}
|