diff --git a/server/src/game.rs b/server/src/game.rs index 960088cd..1eaa786b 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -982,7 +982,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()) @@ -1019,39 +1021,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()) @@ -1232,7 +1201,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(); @@ -1258,6 +1227,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(); @@ -1278,9 +1248,6 @@ mod tests { } - - - #[test] fn counter_test() { let mut game = create_test_game();