Merge branch 'core' of ssh://git.mnml.gg:40022/~/mnml into core

This commit is contained in:
ntr 2019-12-12 14:22:10 +10:00
commit 5d29b4509e
2 changed files with 31 additions and 1 deletions

View File

@ -1,5 +1,4 @@
# FIXME
check silence skill multiplier
game ready not auto starting resolve phase

View File

@ -1709,6 +1709,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]
fn invert_test() {
let mut game = create_2v2_test_game();