siphon test apply new effect
This commit is contained in:
parent
c2c9113996
commit
8830378b22
@ -2121,6 +2121,9 @@ mod tests {
|
||||
|
||||
// que ota?
|
||||
game.resolve(Cast::new(source, player_id, target, Skill::Siphon));
|
||||
game.resolve(Cast::new(source, player_id, target, Skill::Siphon));
|
||||
game.resolve(Cast::new(source, player_id, target, Skill::Siphon));
|
||||
|
||||
let last = game.resolutions.len() - 1;
|
||||
let resolutions = &game.resolutions[last];
|
||||
|
||||
@ -2129,7 +2132,18 @@ mod tests {
|
||||
_ => false,
|
||||
}).count();
|
||||
|
||||
let effect_events = resolutions.iter().filter(|r| match r.event {
|
||||
Event::Effect { construct, effect, duration: _, display: _ } =>
|
||||
construct == target && effect == Effect::Siphon,
|
||||
_ => false,
|
||||
}).count();
|
||||
|
||||
// Deal siphon dmg once
|
||||
assert_eq!(damage_events, 1);
|
||||
// 3 new applications of siphon
|
||||
assert_eq!(effect_events, 3);
|
||||
// Siphon + Siphoned
|
||||
assert!(game.players[1].constructs[0].effects.len() == 2);
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user