purify test

This commit is contained in:
Mashy 2019-12-12 14:03:26 +10:00
parent 9ec1d2974e
commit 2ddfcd0a96
2 changed files with 31 additions and 1 deletions

View File

@ -1,5 +1,4 @@
# FIXME # FIXME
last round of animations skipped cause no skill phase to add new vec
check silence skill multiplier check silence skill multiplier
game ready not auto starting resolve phase game ready not auto starting resolve phase

View File

@ -1705,6 +1705,37 @@ mod tests {
})); }));
} }
#[test]
fn purify_test() {
let mut game = create_2v2_test_game();
let source_player_id = game.players[0].id;
let target_player_id = game.players[1].id;
let source = game.players[0].constructs[0].id;
let target = game.players[1].constructs[0].id;
game.resolve(Cast::new(source, source_player_id, target, Skill::Decay));
// 3 for Decayed =/
assert!(game.players[1].constructs[0].effects.len() == 3);
game.resolve(Cast::new(target, target_player_id, target, Skill::Purify));
assert!(game.players[1].constructs[0].effects.len() == 1);
let last = game.resolutions.len() - 1;
let resolutions = &game.resolutions[last];
assert!(resolutions.iter().any(|r| match r.event {
Event::Effect { construct, effect, duration: _, display: _ } =>
construct == target && effect == Effect::Pure,
_ => false,
}));
// Check for healing here
}
#[test] #[test]
fn invert_test() { fn invert_test() {
let mut game = create_2v2_test_game(); let mut game = create_2v2_test_game();