private bool IsFeatureShouldBeApplied() { if (!required_facts.Empty() && !required_facts.Any(f => this.Owner.HasFact(f))) { return(false); } int class_level = ReplaceCasterLevelOfAbility.CalculateClassLevel(this.classes[0], this.classes.Skip(1).ToArray(), this.Owner, this.archetypes); if (!class_bonuses.Empty()) { for (int i = 0; i < class_bonuses.Length; i++) { if (this.Owner.Progression.Classes.Any(cd => cd.CharacterClass == classes[i])) { class_level += class_bonuses[i]; } } } if (class_level < min_level || class_level > max_level) { return(false); } return(true); }
protected override int CalcLevel() => ReplaceCasterLevelOfAbility.CalculateClassLevel(Class, AdditionalClasses, Owner, Archetypes);