Beispiel #1
0
        public List <string> SelectSpells(Cleric cleric, int spellLvl, Stats abilityModifiers)
        {
            //Select prepared spells. Clerics can change their spells daily, however this is included for quick-start setup.
            int    count;
            string prompt;

            if (spellLvl == 0)  //Clerics start with 3 cantrips at level 1
            {
                count  = 3;
                prompt = "Cantrips are 0 level spells with unlimited uses. Unlike prepared spells, they are permanent choices once gaming starts. \r\n" +
                         "Select 3 cantrips: ";
            }
            else    //Prepared spells for Cleric = Wisdom modifier + Cleric level
            {
                count  = abilityModifiers.Wisdom + 1;
                prompt = "Clerics prepare a list of spells daily. The amount of spells available is determined by their Wisdom modifier + Cleric level. \r\n" +
                         "Character level: 1 \r\n" +
                         $"Wisdom Modifier: {abilityModifiers.Wisdom} \r\n" +
                         $"Select {count} spells: \r\n";
            }
            List <string> spellList = new List <string>();

            string[] spellArray = cleric.SpellList(spellLvl);
            for (int i = 0; i < count; i++)
            {
                string spellToList = "";
                while (spellToList == "")
                {
                    spellToList = Builder.Selection(prompt, spellArray, spellArray);
                }
                spellList.Add(spellToList);
                spellArray = Proficiency.Configuration.ProficiencyListUpdate(spellList, spellArray);
            }
            return(spellList);
        }
        public static void Conditionals(CharacterBasic character, Health health, Stats abilityModifiers, Equipment equipment, Languages languages, Proficiency proficiencies, CharacterClass characterClass, Features features, SpellBook spellCasting)
        {
            //Collects all relevant objects from Program Main and overwrites their properties from corresponding objects from a 'Character Class' class determined by the controller.

            Console.Clear();
            characterClass             = Controller(character.CClass); //Gets character class properties
            character.SubClass         = characterClass.SubClass;
            health.HitPointsConstant   = characterClass.HitPointsConstant;
            health.HitDice             = characterClass.HitDice;
            proficiencies.ClassArms    = characterClass.ClassArmsProficiencies;
            proficiencies.SavingThrows = characterClass.SavingThrows;
            features.Class             = characterClass.Features;

            equipment.ClassBag   = Equipment.Controller(character.CClass, character, abilityModifiers, features);                                   //Gets the equipment setting/options. Determined by character class.
            equipment.Bag        = Proficiency.Configuration.ListHelper(equipment.Bag, equipment.RaceBag, equipment.ClassBag);                      //Consolidates equipment into a main list.
            proficiencies.Tools  = Proficiency.Configuration.ListHelper(proficiencies.Tools, proficiencies.RaceTools, proficiencies.ClassTools);    //Consolidates tools into a main list.
            proficiencies.Arms   = Proficiency.Configuration.ListHelper(proficiencies.Arms, proficiencies.RaceArms, proficiencies.ClassArms);       //Consolidates armaments into a main list.
            proficiencies.Skills = Proficiency.Configuration.ListHelper(proficiencies.Skills, proficiencies.RaceSkills, proficiencies.ClassSkills); //Consolidates skills into a main list.


            if (characterClass.SubClass == "Life") //Heavy armor proficiency is granted by Life Domain.
            {
                Cleric cleric = new Cleric();
                cleric.DomainSpells = new List <string> {
                    "Bless", "Cure Wounds"
                };
                cleric.Cantrips = cleric.SelectSpells(cleric, 0, abilityModifiers);
                foreach (string cantrip in cleric.Cantrips)
                {
                    features.Class.Add(cantrip);
                }
                features.Class.Add("Bless");
                features.Class.Add("Cure Wounds");
                features.Class.Add("Disciple of Life");

                characterClass.ClassArmsProficiencies.Add("Heavy Armor");
            }
            if (characterClass.SubClass == "Evocation") //Heavy armor proficiency is granted by Life Domain.
            {
                Wizard wizard = new Wizard();
                wizard.Cantrips  = wizard.SelectSpells(wizard, 0, abilityModifiers);
                wizard.SpellBook = wizard.FillSpellBook(wizard);
                foreach (string cantrip in wizard.Cantrips)
                {
                    features.Class.Add(cantrip);
                }
                foreach (string spell in wizard.SpellBook)
                {
                    features.Class.Add(spell);
                }
                features.Class.Add("Arcane Recovery");
            }
            Console.Clear();
            if (character.Background == "Acolyte")
            {
                equipment.Bag.Add("Holy Symbol");
                features.Background.Add(BackgroundFeatures.Acolyte());
            }
        }