Merge branch 'core' of ssh://git.mnml.gg:40022/~/mnml into core
This commit is contained in:
commit
c8561dba9a
@ -1703,4 +1703,29 @@ mod tests {
|
||||
_ => false,
|
||||
}));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn siphon_test() {
|
||||
let mut game = create_2v2_test_game();
|
||||
let player_id = game.players[0].id;
|
||||
let source = game.players[0].constructs[0].id;
|
||||
let target = game.players[1].constructs[0].id;
|
||||
|
||||
game.resolve(Cast::new(source, player_id, target, Skill::Siphon));
|
||||
|
||||
let last = game.resolutions.len() - 1;
|
||||
let resolutions = &game.resolutions[last];
|
||||
|
||||
assert!(resolutions.iter().any(|r| match r.event {
|
||||
Event::Damage { construct, colour, amount, mitigation: _, display: _ } =>
|
||||
construct == target && amount > 0 && colour == Colour::Blue,
|
||||
_ => false,
|
||||
}));
|
||||
|
||||
assert!(resolutions.iter().any(|r| match r.event {
|
||||
Event::Healing { construct, colour, amount, overhealing: _ } =>
|
||||
construct == source && amount > 0 && colour == Colour::Green,
|
||||
_ => false,
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user