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; }
public void Forget(LearnedSpell spell) { if (spells.Contains(spell)) { spells.Remove(spell); if (this == Program.entities[0]) Program.Report(String.Concat("Forgot ", spell.name, "!")); } }