(self, log, abilities, objectives)
| 85 | return existing |
| 86 | |
| 87 | def verify(self, log, abilities, objectives): |
| 88 | for ability_id in self.atomic_ordering: |
| 89 | if not next((ability for ability in abilities if ability.ability_id == ability_id), None): |
| 90 | log.warning('Ability referenced in adversary %s but not found: %s', self.adversary_id, ability_id) |
| 91 | |
| 92 | if not self.objective: |
| 93 | self.objective = DEFAULT_OBJECTIVE_ID |
| 94 | elif not next((objective for objective in objectives if objective.id == self.objective), None): |
| 95 | log.warning('Objective referenced in adversary %s but not found: %s. Setting default objective.', |
| 96 | self.adversary_id, self.objective) |
| 97 | self.objective = DEFAULT_OBJECTIVE_ID |
| 98 | |
| 99 | self.has_repeatable_abilities = self.check_repeatable_abilities(abilities) |
| 100 | |
| 101 | def has_ability(self, ability): |
| 102 | for a in self.atomic_ordering: |
no test coverage detected