private void bonusAlwaysPreparedSpellsToolStripMenuItem_Click(object sender, EventArgs e) { BonusSpellPrepareFeature f = new BonusSpellPrepareFeature(); f = new FeatureForms.BonusSpellPrepareFeatureForm(f).edit(HistoryManager); list.Add(f); fill(); }
//[XmlIgnore] // public string Displayname { get; set; } public List <ModifiedSpell> GetPrepared(Player player, OGLContext context, int level = 0) { CombinePrepared(player, context, level); List <ModifiedSpell> res = new List <ModifiedSpell>(from s in Prepared select new ModifiedSpell(context.GetSpell(s, null), null, false, false)); foreach (Feature f in player.GetFeatures(level)) { if (f is BonusSpellPrepareFeature && ((BonusSpellPrepareFeature)f).SpellcastingID == SpellcastingID) { BonusSpellPrepareFeature bspf = (BonusSpellPrepareFeature)f; foreach (string s in bspf.Spells) { res.Add(new ModifiedSpell(context.GetSpell(s, bspf.Source), bspf.KeywordsToAdd, true, false)); } } } res.Sort(); return(res); }