Ejemplo n.º 1
0
 public void ActivateSkill(Skill activatedSkill)
 {
     if (!traits.Contains(activatedSkill)) throw new System.Exception("Learned trait not found in member!");
     else
     {
         activatedSkill.learned=true;
         activatedSkill.ActivateEffect(this);
         foreach (Trait memberTrait in new List<Trait>(traits))
         {
             if (memberTrait.GetType().BaseType==typeof(Skill))
             {
                 Skill memberSkill=memberTrait as Skill;
                 if (!memberSkill.learned) traits.Remove(memberTrait);
             }
         }
     }
 }