示例#1
0
 public bool Learn(Spell spell)
 {
     LearnedSpell newSpell = new LearnedSpell(spell);
     if ((spells.Count < maxspells) && (this.spells.Where(item => (item.DuplicateCheck(spell) == true)).Count() == 0))
     {
         this.spells.Add(new LearnedSpell(spell));
         if (this == Program.entities[0]) Program.Report(String.Concat("Learned ", spell.name,"!"));
         return true;
     }
     else
         return false;
 }
示例#2
0
 public void Forget(LearnedSpell spell)
 {
     if (spells.Contains(spell))
     {
         spells.Remove(spell);
         if (this == Program.entities[0])
             Program.Report(String.Concat("Forgot ", spell.name, "!"));
     }
 }