tidy up test
This commit is contained in:
parent
a4b0fc0c4f
commit
542a0916ef
@ -984,7 +984,9 @@ mod tests {
|
||||
.learn(Skill::Siphon)
|
||||
.learn(Skill::Amplify)
|
||||
.learn(Skill::Stun)
|
||||
.learn(Skill::Block);
|
||||
.learn(Skill::Block)
|
||||
.learn(Skill::Sleep)
|
||||
.learn(Skill::Decay);
|
||||
|
||||
let mut y = Construct::new()
|
||||
.named(&"lemongrass tea".to_string())
|
||||
@ -1021,39 +1023,6 @@ mod tests {
|
||||
return game.start();
|
||||
}
|
||||
|
||||
fn create_cd_test_game() -> Game {
|
||||
let mut x = Construct::new()
|
||||
.named(&"pronounced \"creeep\"".to_string())
|
||||
.learn(Skill::Sleep)
|
||||
.learn(Skill::Decay);
|
||||
|
||||
let mut y = Construct::new()
|
||||
.named(&"lemongrass tea".to_string())
|
||||
.learn(Skill::Buff);
|
||||
|
||||
let mut game = Game::new();
|
||||
|
||||
game
|
||||
.set_player_num(2)
|
||||
.set_player_constructs(1);
|
||||
|
||||
let x_player_id = Uuid::new_v4();
|
||||
x.account = x_player_id;
|
||||
let x_player = Player::new(x_player_id, &"ntr".to_string(), vec![x]);
|
||||
|
||||
let y_player_id = Uuid::new_v4();
|
||||
y.account = y_player_id;
|
||||
let y_player = Player::new(y_player_id, &"mash".to_string(), vec![y]);
|
||||
|
||||
game
|
||||
.player_add(x_player).unwrap()
|
||||
.player_add(y_player).unwrap();
|
||||
|
||||
assert!(game.can_start());
|
||||
|
||||
return game.start();
|
||||
}
|
||||
|
||||
fn create_2v2_test_game() -> Game {
|
||||
let mut i = Construct::new()
|
||||
.named(&"pretaliate".to_string())
|
||||
@ -1234,7 +1203,7 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn sleep_cooldown_test() {
|
||||
let mut game = create_cd_test_game();
|
||||
let mut game = create_test_game();
|
||||
|
||||
let x_player = game.players[0].clone();
|
||||
let y_player = game.players[1].clone();
|
||||
@ -1260,6 +1229,7 @@ mod tests {
|
||||
assert!(game.player_by_id(x_player.id).unwrap().constructs[0].skill_on_cd(Skill::Sleep).is_some());
|
||||
|
||||
game.add_skill(x_player.id, x_construct.id, y_construct.id, Skill::Decay).unwrap();
|
||||
// game.add_skill(x_player.id, x_construct.id, y_construct.id, Skill::Attack).unwrap();
|
||||
game.player_ready(x_player.id).unwrap();
|
||||
game.player_ready(y_player.id).unwrap();
|
||||
game = game.resolve_phase_start();
|
||||
@ -1280,9 +1250,6 @@ mod tests {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#[test]
|
||||
fn counter_test() {
|
||||
let mut game = create_test_game();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user