This commit is contained in:
ntr
2018-12-05 19:41:13 +11:00
parent e1acdc6fa7
commit 16c838db8b
6 changed files with 144 additions and 58 deletions
+3 -1
View File
@@ -218,7 +218,9 @@ impl Cryp {
}
pub fn available_skills(&self) -> Vec<&CrypSkill> {
self.skills.iter().filter(|s| !self.disabled(s.skill).disabled).collect()
self.skills.iter()
.filter(|s| s.skill.cd().is_none())
.filter(|s| !self.disabled(s.skill).disabled).collect()
}
pub fn knows(&self, skill: Skill) -> bool {
+1 -1
View File
@@ -35,7 +35,7 @@ impl Team {
.filter(|c| !c.is_ko())
.filter(|c| c.available_skills().len() > 0)
.collect::<Vec<&Cryp>>().len();
// println!("{:?} requires {:?} skills this turn", self.id, required);
println!("{:?} requires {:?} skills this turn", self.id, required);
return required;
}