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);
     });
 }
示例#2
0
            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);
                });
            }
示例#3
0
        public int numSiblings = 1;         //for self


        public SpellSlotChoice(SpellLibrary.SpellSlot slot)
        {
            this.slot = slot;
        }