counter against counter shouldn't infinite loop
This commit is contained in:
parent
02311680ae
commit
98bcb88f1c
@ -1236,7 +1236,7 @@ mod tests {
|
||||
|
||||
game = game.resolve_phase_start();
|
||||
|
||||
println!("{:?}", game.player_by_id(x_player.id).unwrap().constructs[0]);
|
||||
// println!("{:?}", game.player_by_id(x_player.id).unwrap().constructs[0]);
|
||||
assert!(game.player_by_id(x_player.id).unwrap().constructs[0].skill_on_cd(Skill::Stun).is_some());
|
||||
assert!(game.player_by_id(y_player.id).unwrap().constructs[0].skill_on_cd(Skill::Block).is_none());
|
||||
}
|
||||
@ -1893,6 +1893,21 @@ mod tests {
|
||||
} == 320.pct(Skill::Blast.multiplier()) - 125);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn multi_counter_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, source, Skill::Counter), vec![]);
|
||||
game.resolve(Cast::new(target, player_id, target, Skill::Counter), vec![]);
|
||||
game.resolve(Cast::new(source, player_id, target, Skill::Attack), vec![]);
|
||||
|
||||
assert!(game.players[0].constructs[0].is_ko() == false);
|
||||
assert!(game.players[1].constructs[0].is_ko() == false);
|
||||
}
|
||||
|
||||
/*
|
||||
#[test]
|
||||
fn tick_speed_tests() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user