no more targeting KO cryps

This commit is contained in:
ntr 2018-11-27 20:26:12 +11:00
parent 5c86a6411c
commit a8672bbd45

View File

@ -322,10 +322,11 @@ impl Game {
let team = self.team_by_id(team_id); let team = self.team_by_id(team_id);
// is the target in the team? // is the target in the team?
match team.cryp_by_id(cryp_id) { let cryp = team.cryp_by_id(cryp_id).ok_or(err_msg("cryp not in team"))?;
Some(c) => c,
None => return Err(err_msg("cryp not in team")), if cryp.is_ko() {
}; return Err(err_msg("you cannot target ko cryps"));
}
} }
// set the target // set the target