public SpellSlotFeature(int level, FeatureBundle parent = null) : base() { this.level = level; ups.Add((character) => { SpellLibrary.SpellSlot slot = new SpellLibrary.SpellSlot(); slot.level = level; slot.used = false; character.spellSlots.Add(slot); }); downs.Add((character) => { character.spellSlots.Remove(cached); }); }
public Cast(Actor actor = null) : base(actor) { this.ActionOptions.Add(new SpellClassOption()); this.ActionOptions.Add(new SpellOption()); this.ActionOptions.Add(new SpellSlotOption()); this.ActionOptions.Last().choiceFilters.Add((choices, action) => { if ((action as Cast).Spell.isCantrip) { choices.Clear(); SpellLibrary.SpellSlot cantripSlot = new SpellLibrary.SpellSlot(); cantripSlot.level = 0; cantripSlot.used = false; choices.Add(new SpellSlotChoice(cantripSlot)); return(choices); } return(choices); }); }
public int numSiblings = 1; //for self public SpellSlotChoice(SpellLibrary.SpellSlot slot) { this.slot = slot; }