Merge branch 'develop' of ssh://git.mnml.gg:40022/~/mnml into develop
This commit is contained in:
commit
ba5627b36b
@ -982,7 +982,9 @@ mod tests {
|
|||||||
.learn(Skill::Siphon)
|
.learn(Skill::Siphon)
|
||||||
.learn(Skill::Amplify)
|
.learn(Skill::Amplify)
|
||||||
.learn(Skill::Stun)
|
.learn(Skill::Stun)
|
||||||
.learn(Skill::Block);
|
.learn(Skill::Block)
|
||||||
|
.learn(Skill::Sleep)
|
||||||
|
.learn(Skill::Decay);
|
||||||
|
|
||||||
let mut y = Construct::new()
|
let mut y = Construct::new()
|
||||||
.named(&"lemongrass tea".to_string())
|
.named(&"lemongrass tea".to_string())
|
||||||
@ -1019,39 +1021,6 @@ mod tests {
|
|||||||
return game.start();
|
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 {
|
fn create_2v2_test_game() -> Game {
|
||||||
let mut i = Construct::new()
|
let mut i = Construct::new()
|
||||||
.named(&"pretaliate".to_string())
|
.named(&"pretaliate".to_string())
|
||||||
@ -1232,7 +1201,7 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn sleep_cooldown_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 x_player = game.players[0].clone();
|
||||||
let y_player = game.players[1].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());
|
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::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(x_player.id).unwrap();
|
||||||
game.player_ready(y_player.id).unwrap();
|
game.player_ready(y_player.id).unwrap();
|
||||||
game = game.resolve_phase_start();
|
game = game.resolve_phase_start();
|
||||||
@ -1278,9 +1248,6 @@ mod tests {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn counter_test() {
|
fn counter_test() {
|
||||||
let mut game = create_test_game();
|
let mut game = create_test_game();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user