no skillz

This commit is contained in:
ntr
2019-04-25 22:23:38 +10:00
parent 621676732d
commit 45cf9d9530
2 changed files with 91 additions and 0 deletions
+4
View File
@@ -138,6 +138,10 @@ impl Instance {
.position(|p| p.id == player_id)
.ok_or(err_msg("player_id not found"))?;
if self.players[i].cryps.iter().all(|c| c.skills.len() == 0) {
return Err(err_msg("your cryps have no skills"));
}
self.players[i].set_ready(true);
if self.phase == InstancePhase::Lobby && self.can_start() {