public TraitAllowed DeepCopy() { TraitAllowed copy = new TraitAllowed(); copy.name = this.name; copy.tag = this.tag; copy.atWhatLevelIsAvailable = this.atWhatLevelIsAvailable; copy.automaticallyLearned = this.automaticallyLearned; copy.allow = this.allow; copy.useableInSituation = this.useableInSituation; copy.associatedSpellTag = this.associatedSpellTag; copy.needsSpecificTrainingToLearn = this.needsSpecificTrainingToLearn; copy.traitWorksOnlyWhen = new List <string>(); foreach (string s in this.traitWorksOnlyWhen) { copy.traitWorksOnlyWhen.Add(s); } copy.traitWorksNeverWhen = new List <string>(); foreach (string s in this.traitWorksNeverWhen) { copy.traitWorksNeverWhen.Add(s); } return(copy); }
public TraitAllowed DeepCopy() { TraitAllowed copy = new TraitAllowed(); copy.name = this.name; copy.tag = this.tag; copy.atWhatLevelIsAvailable = this.atWhatLevelIsAvailable; copy.automaticallyLearned = this.automaticallyLearned; copy.allow = this.allow; return copy; }
public bool hasTraitAlready(TraitAllowed ta) { //return this.knownTraitsTags.Contains(ta.tag); if (this.knownTraitsTags.Contains(ta.tag)) { return(true); } if (this.learningTraitsTags.Contains(ta.tag)) { return(true); } return(false); }