Character

Namespace: J2N
We found 10 examples in language CSharp for this search. You will see 42 fragments of code.
        public static void AddArtificer(Character character)
        {
            Artificer.Base(character);
            Artificer.Features(character);
            Artificer.Equipment(character);
            character.Archetype = Artificer.ArtificerSpecialist;
        }
        public static void AddBarbarian(Character character)
        {
            Barbarian.Base(character);
            Barbarian.Features(character);
            Barbarian.Equipment(character);
            character.Archetype = Barbarian.PathName;
        }
        public static void AddBard(Character character)
        {
            Bard.Base(character);
            Bard.Features(character);
            Bard.Equipment(character);
            character.Archetype = Bard.BardicCollege;
        }
        public static void AddBloodhunter(Character character)
        {
            Bloodhunter.Base(character);
            Bloodhunter.Features(character);
            Bloodhunter.Equipment(character);
            character.Archetype = Bloodhunter.BloodhunterOrder;
        }
        public static void AddCleric(Character character)
        {
            Cleric.Base(character);
            Cleric.Features(character);
            Cleric.Equipment(character);
            character.Archetype = Cleric.DivineDomain;
        }
        public static void AddFighter(Character character)
        {
            Fighter.Base(character);
            Fighter.Features(character);
            Fighter.Equipment(character);
            character.Archetype = Fighter.MartialArchetype;
        }

        public void RunAddTemplate(Character character)
        {
            if (character.Template == true)
            {
                string templateName = character.ChosenTemplate;
                Console.WriteLine($"Because you are a/an {templateName} you can pick a new age.");
                character.Age = CLIHelper.GetNumberInRange(character.AdultAge, 15000);
                Template.NewTemplate(templateName, character);
            }
        }

        public static void NewRace(Character character)
        {
            switch (character.ChosenRace)
            {
                case "Aasimar(Protector)":
                    Aasimar.Protector(character);
                    break;
                case "Aasimar(Scourge)":
                    Aasimar.Scourge(character);
                    break;
                case "Aasimar(Fallen)":
                    Aasimar.Fallen(character);
                    break;
                case "Cambion":
                    Cambion.Base(character);
                    break;
                case "Changeling":
                    Changeling.Base(character);
                    break;
                case "Dhampir":
                    Dhampir.Base(character);
                    break;
                case "Dragonborn":
                    Dragonborn.Base(character);
                    break;
                case "Hill Dwarf":
                    Dwarf.Hill(character);
                    break;
                case "Mountain Dwarf":
                    Dwarf.Mountain(character);
                    break;
                case "Avariel":
                    Elf.Avariel(character);
                    break;
                case "Drow":
                    Elf.Drow(character);
                    break;
                case "Eladrin":
                    Elf.Eladrin(character);
                    break;
                case "Moon Elf":
                    Elf.Moon(character);
                    break;
                case "Sea Elf":
                    Elf.Sea(character);
                    break;
                case "Shadar-Kai":
                    Elf.ShadarKai(character);
                    break;
                case "High Elf":
                    Elf.High(character);
                    break;
                case "Wild Elf":
                    Elf.Wild(character);
                    break;
                case "Wood Elf":
                    Elf.Wood(character);
                    break;
                case "Forest Gnome":
                    Gnome.Forest(character);
                    break;
                case "Rock Gnome":
                    Gnome.Rock(character);
                    break;
                case "Goliath":
                    Goliath.Base(character);
                    break;
                case "Half-Elf":
                    HalfElf.Base(character);
                    break;
                case "Half-Orc":
                    HalfOrc.Base(character);
                    break;
                case "Lightfoot Halfling":
                    Halfling.Lightfoot(character);
                    break;
                case "Stout Halfling":
                    Halfling.Stout(character);
                    break;
                case "Human":
                    Human.Base(character);
                    break;
                case "Variant Human":
                    Human.Variant(character);
                    break;
                case "Minotaur":
                    Minotaur.Base(character);
                    break;
                case "Shade":
                    Shade.Base(character);
                    break;
                case "Tiefling":
                    Tiefling.Base(character);
                    break;
                case "Feral Tiefling":
                    Tiefling.Feral(character);
                    break;
                case "Demigod":
                    Demigod.Base(character);
                    break;
            }
        }
        public static void Spells(Character character)
        {
            switch (character.ChosenRace)
            {
                case "Cambion":
                    string command = "Command(1/LR, Cha to cast)";
                    string alterSelf = "Alter Self(1/LR, Cha to cast)";
                    HelpAddSpells(character, command, alterSelf);
                    break;
                case "Demigod":
                    DemigodSpells(character);
                    break;
                case "Drow":
                    string faerieFire = "Faerie Fire(1/LR, Cha to cast)";
                    string darkness = "Darkness(1/LR, Cha to cast)";
                    HelpAddSpells(character, faerieFire, darkness);
                    break;
                case "High Elf":
                    string detectMagic = "Detect Magic(1/LR, Int to cast)";
                    HelpAddSpells(character, detectMagic);
                    break;
                case "Wild Elf":
                    string animalFriendship = "Animal Friendship(1/LR, Wis to cast)";
                    HelpAddSpells(character, animalFriendship);
                    break;
                case "Forest Gnome":
                    string silentImage = "Silent Image(1/LR, Int to cast)";
                    HelpAddSpells(character, silentImage);
                    break;
                case "Tiefling":
                    if (character.TieflingMagic == "Infernal Legacy")
                    {
                        string hellishRebuke = "Hellish Rebuke(1/LR, Cha to cast)";
                        string burningHands = "Burning Hands(1/LR, Cha to cast)";
                        HelpAddSpells(character, hellishRebuke, burningHands);
                    }
                    else if (character.TieflingMagic == "Devil's Tongue")
                    {
                        string charmPerson = "Charm Person(1/LR, Cha to cast)";
                        string enthrall = "Entrall(1/LR, Cha to cast)";
                        HelpAddSpells(character, charmPerson, enthrall);
                    }
                    break;
            }
        }
        public static void HelpAddSpells(Character character, string str1)
        {
            int lvl = character.Lvl;
            if (lvl >= 3)
            {
                character.Spells[1].Add(str1);
            }
        }
        public static void HelpAddSpells(Character character, string str1, string str2)
        {
            int lvl = character.Lvl;
            if (lvl >= 3)
            {
                character.Spells[1].Add(str1);
            }
            if (lvl >= 5)
            {
                character.Spells[2].Add(str2);
            }
        }
        public static void HelpAddSpells(Character character, string str1, string str2, string str3)
        {
            int lvl = character.Lvl;
            if (lvl >= 3)
            {
                character.Spells[1].Add(str1);
            }
            if (lvl >= 5)
            {
                character.Spells[3].Add(str2);
            }
            if (lvl >= 7)
            {
                character.Spells[4].Add(str2);
            }
        }
        public static void DemigodSpells(Character character)
        {
            int index = -1;
            string spell = "";
            var spellList = new List<string>();
            switch (character.DemigodDomain)
            {
                case "Beauty":
                    string charmPerson = "Charm Person(1/LR, Cha to cast)";
                    string enthrall = "Entrall(1/LR, Cha to cast)";
                    HelpAddSpells(character, charmPerson, enthrall);
                    break;
                case "Knowledge":
                    string comprehendLang = "Comprehend Languages(1/LR, Int to cast)";
                    index = CLIHelper.PrintChoices("Pick a second level spell", WizardSpells.SecondLvls);
                    spell = WizardSpells.SecondLvls[index];
                    HelpAddSpells(character, comprehendLang, spell);
                    break;
                case "Life":
                    var list = new List<string> { "Cure Wounds(1/LR, Wis to cast)", "Healing Word(1/LR, Wis to cast)" };
                    index = CLIHelper.PrintChoices("Pick a spell", list);
                    spell = $"{list[index]}(1/LR, Wis to cast)";
                    string prayerOfHealing = "Prayer of Healing(1/LR, Wis to cast)";
                    HelpAddSpells(character, spell, prayerOfHealing);
                    break;
                case "Music":
                    index = CLIHelper.PrintChoices("Pick a first level spell", BardSpells.FirstLvls);
                    spell = $"{BardSpells.FirstLvls[index]}(1/LR, Cha to cast)";
                    index = CLIHelper.PrintChoices("Pick a second level spell", BardSpells.SecondLvls);
                    string spell2 = $"{BardSpells.SecondLvls[index]}(1/LR, Cha to cast)";
                    HelpAddSpells(character, spell, spell2);
                    break;
                case "Madness":
                    string tashasHideousLaughter = "Tasha's Hideous Laughter(1/LR, Cha to cast)";
                    string crownOfMadness = "Crown of Madness(1/LR, Cha to cast)";
                    HelpAddSpells(character, tashasHideousLaughter, crownOfMadness);
                    break;
                case "Protection":
                    string sanctuary = "Sanctuary(1/LR, Cha to cast)";
                    string wardingBond = "Warding Bond(1/LR, Cha to cast)";
                    HelpAddSpells(character, sanctuary, wardingBond);
                    break;
                case "The Earth":
                    string earthTremor = "Earth Tremor(1/LR, Wis to cast)";
                    string barkskin = "Barkskin(1/LR, Wis to cast)";
                    HelpAddSpells(character, earthTremor, barkskin);
                    break;
                case "The Hunt":
                    string huntersMark = "Hunter's Mark(1/LR, Wis to cast)";
                    string cordonOfArrows = "Cordon of Arrows(1/LR, Wis to cast)";
                    HelpAddSpells(character, huntersMark, cordonOfArrows);
                    break;
                case "The Sea":
                    string createDestroyWater = "Create or Destroy Water(1/LR, Int to cast)";
                    string tidalWave = "Tidal Wave(1/LR, Int to cast)";
                    string controlWater = "Control Water(1/LR, Int to cast)";
                    HelpAddSpells(character, createDestroyWater, tidalWave, controlWater);
                    break;
                case "The Sun":
                    string guidingBolt = "Guiding Bolt(1/LR, Cha to cast)";
                    string daylight = "Daylight(1/LR, Cha to cast)";
                    HelpAddSpells(character, guidingBolt, daylight);
                    break;
                case "Travel":
                    string expeditiousRetreat = "Expeditious Retreat(1/LR, Wis to cast)";
                    string mistyStep = "Misty Step(1/LR, Wis to cast)";
                    HelpAddSpells(character, expeditiousRetreat, mistyStep);
                    break;
                case "Trickery":
                    string disguiseSelf = "Disguise Self(1/LR, Int to cast)";
                    string invisibility = "Invisibility(1/LR, Int to cast)";
                    string silence = "Silence(1/LR, Int to cast)";
                    string darkness = "Darkness(1/LR, Int to cast)";
                    spellList = new List<string> { invisibility, silence, darkness };
                    spell = CLIHelper.PrintChoices(spellList);
                    HelpAddSpells(character, disguiseSelf, spell);
                    break;
                case "Undead":
                    string inflictWounds = "Inflict Wounds(1/LR, Int or Wis to cast)";
                    string rayOfEnfeeblement = "Ray of Enfeeblement(1/LR, Int or Wis to cast)";
                    string shadowBlade = "Shadowblade(1/LR, Int or Wis to cast)";
                    spellList = new List<string> { rayOfEnfeeblement, shadowBlade };
                    spell = CLIHelper.PrintChoices(spellList);
                    HelpAddSpells(character, inflictWounds, spell);
                    break;
            }
        }

        public static void Base(Character character)
        {
            character.RacialTraits.Add("Powerful Build: count as Large for carry capacity, etc");
            character.RacialTraits.Add("Godly Strength: adv on Str checks");
            character.RacialTraits.Add("Godly Protection: +2 AC");
            character.RacialTraits.Add("Divine Intervention: LR, gain adv on atk, save, or ability check");
            character.MinHeight = 60;
            character.MaxHeight = 78;
            character.MinWeight = 100;
            character.MaxWeight = 300;
            character.Speed += 40;
            character.Vision = "Darkvision 60ft";
            character.AlignmentOptions.Add("N-G");
            character.AlignmentOptions.Add("C-G");
            character.AlignmentOptions.Add("C-N");
            character.AdultAge = 30;
            character.MaxAgeStart = 800;
            character.MaxAgeEnd = 1200;
            character.Languages.Add("Celestial");
            BEHelper.AddLanguage(character, "race");

            int index = -1;
            switch (character.DemigodDomain)
            {
                case "Beauty":
                    character.RacialTraits.Add("Child of Love: impose disadv vs Enchantment spells");
                    character.RacialTraits.Add("Compelling Beauty: bonus, Cha save, disadv on atks, if attempt to move away from you Cha save");
                    character.Cantrips.Add("Friends(Cha to cast)");
                    character.SkillProficiencies.Add("Deception");
                    character.SkillProficiencies.Add("Persuasion");
                    break;
                case "Knowledge":
                    character.RacialTraits.Add("Child of Wisdom: gain 1 skill, 1 tool, and Expertise in 1 skill");
                    character.RacialTraits.Add("Wit Without Measure: adv on all Int-based DCs");
                    character.Cantrips.Add("Guidance(Int to cast)");
                    index = CLIHelper.PrintChoices("Pick a skill", Options.Skills);
                    character.SkillProficiencies.Add(Options.Skills[index]);
                    BEHelper.GetTool(character);
                    break;
                case "Life":
                    character.RacialTraits.Add("Child of Life: healing spells heal extra HP = Wis");
                    character.RacialTraits.Add("Refute Death: LR, 30ft, you or ally auto-succeeds on 1 death save");
                    character.Cantrips.Add("Spare the Dying(Wis to cast)");
                    break;
                case "Luck":
                    character.RacialTraits.Add("Child of Luck: Cha/LR, add 1D6 to any atk, save, or ability check");
                    character.RacialTraits.Add("Auspicious Dodge: LR, reaction, when hit - cause atk to miss");
                    character.RacialTraits.Add("Favored Attack: LR, on hit, cause atk to crit");
                    character.RacialTraits.Add("Prosperous Life: whenever you find treasure or try to sell goods, increase its value by 30%");
                    break;
                case "Madness":
                    character.RacialTraits.Add("Child of Madness: auto-succeed on all Con checks for drinking, gain Immunity to charm, fear, and poison");
                    character.RacialTraits.Add("Party Starter: Cha check in social area, gain adv on all Cha-based DCs for 2hr");
                    character.SkillProficiencies.Add("Acrobatics");
                    character.SkillProficiencies.Add("Persuasion");
                    character.Cantrips.Add("Create Bonfire(Cha to cast)");
                    character.Cantrips.Add("Dancing Lights(Cha to cast)");
                    break;
                case "Music":
                    character.RacialTraits.Add("Child of Music: creatures with Int 8 or less are charmed by music");
                    character.RacialTraits.Add("Devastating Notes: SR, Cha save, 30ft, all hostiles, 1 min, disadv on atks and saves");
                    character.SkillProficiencies.Add("Performance");
                    character.ToolProficiencies.Add("All instruments");
                    character.Cantrips.Add("Vicious Mockery(Cha to cast)");
                    break;
                case "Protection":
                    character.RacialTraits.Add("Child of Protection: Dodge as a bonus, +2 HP/lvl");
                    character.RacialTraits.Add("Experienced Knight: gain the Protection fighting style");
                    character.SkillProficiencies.Add("Athletics");
                    character.Proficiencies.Add("All armor and shields");
                    character.Cantrips.Add("Blade Ward(Cha to cast)");
                    break;
                case "Smithing":
                    character.RacialTraits.Add("Child of Creation: LR, create an object of any combination of wood, stone, iron, crystal, rope, or cloth" +
                        "The object must smaller than a 5ft cube, and the object must be in a form that you have seen before");
                    character.RacialTraits.Add("Child of the Forge: gain Immunity to Fire, adv on all tool checks you're prof in");
                    character.ToolProficiencies.Add("Carpenter's Tools");
                    character.ToolProficiencies.Add("Cobbler's Tools");
                    character.ToolProficiencies.Add("Mason's Tools");
                    character.ToolProficiencies.Add("Smith's Tools");
                    character.ToolProficiencies.Add("Tinker's Tools");
                    character.Cantrips.Add("Sword Burst(Wis to cast)");
                    break;
                case "The Earth":
                    character.RacialTraits.Add("Child of Nature: 30ft, create difficult terrain made of foliage, Str save or be restrained");
                    character.RacialTraits.Add("Earth Control: LR, cast Stoneshape or Wall of Stone");
                    character.SkillProficiencies.Add("Nature");
                    character.Cantrips.Add("Druidcraft(Wis to cast)");
                    break;
                case "The Hunt":
                    character.RacialTraits.Add("Child of the Hunt: adv on Survival, identify creatures from tracks");
                    character.RacialTraits.Add("Hunter's Eyes: gain Superior Darkvision 120ft, 1/SR - cast Detect Poison and Disease");
                    character.Vision = "Superior Darkvision 120ft";
                    character.RacialTraits.Add("Godly Precision: +2 to atk/dmg with ranged wep");
                    character.SkillProficiencies.Add("Survival");
                    character.Proficiencies.Add("All ranged weapons");
                    character.Cantrips.Add("Thorn Whip(Wis to cast)");
                    break;
                case "The Sea":
                    character.RacialTraits.Add("Child of the Sea: waterbreathing, swim 40ft");
                    character.RacialTraits.Add("Caress of the Ocean: gain regen = 1/4 lvl while in water");
                    character.Cantrips.Add("Shape Water(Int to cast)");
                    break;
                case "The Sky":
                    character.RacialTraits.Add("Child of the Sky: gain Resistance Thunder and Lightning");
                    character.RacialTraits.Add("Lightning Wielder: +2 to atk/dmg while unarmed, 1/LR - Cha spell atk, range 30/120, 4D8 + Cha Lightning dmg");
                    character.Cantrips.Add("Gust(Cha to cast)");
                    break;
                case "The Sun":
                    character.RacialTraits.Add("Child of the Sun: during the day, gain +2 Str, Dex, Con/at night, gain -2 Str, Dex, Con");
                    character.RacialTraits.Add("Solar Burst: LR, Con save - 30ft, 5D8 Radiant dmg, Con save - blindness");
                    character.Cantrips.Add("Light(Cha to cast)");
                    break;
                case "Travel":
                    character.RacialTraits.Add("Child of Travel: move speed +10ft");
                    character.Speed += 50;
                    character.RacialTraits.Add("Fast Travel: LR, cast Teleport");
                    character.Cantrips.Add("Message(Wis to cast)");
                    break;
                case "Trickery":
                    character.RacialTraits.Add("Child of Shadows: adv with Stealth and Thieves' Tools");
                    character.SkillProficiencies.Add("Deception");
                    character.SkillProficiencies.Add("Sleight of Hand");
                    character.SkillProficiencies.Add("Stealth");
                    character.ToolProficiencies.Add("Thieves' Tools");
                    character.Cantrips.Add("Minor Illusion(Int to cast)");
                    break;
                case "Undead":
                    character.RacialTraits.Add("Child of Death: gain Resistance to Necrotic, Superior Darkvision 120ft");
                    character.Vision = "Superior Darkvision 120ft";
                    character.RacialTraits.Add("Undead Affinity: SR, action, conjure 3 skeletons or zombies");
                    character.Cantrips.Add("Toll the Dead - Int or Wis to cast");
                    break;
                case "War":
                    character.RacialTraits.Add("Child of War: can't be surprised, +5 on Init, use Str for Intimiation");
                    character.RacialTraits.Add("Aura of War: LR, 30ft, Con save, fear and prone, you and allies gain Str temp HP");
                    character.RacialTraits.Add("Godly Precision: +2 atk/dmg with melee");
                    character.Proficiencies.Add("All weapons and armor");
                    break;
            }
        }

    static Font CreateDefaultFontWithOneCharacter(int character)
    {
        var font = new Font();
        CharacterInfo[] characterInfo = new CharacterInfo[1];
        characterInfo[0].index = character;
        font.characterInfo = characterInfo;
        return font;
    }

    [Test]
    public static void GetCharacterInfo_FindsCharacterInfoThatIsInSet()
    {
        char character = 'A';
        int charIndex = Convert.ToInt32(character);

        var font = CreateDefaultFontWithOneCharacter(charIndex);
        CharacterInfo result = new CharacterInfo();
        Assert.IsTrue(font.GetCharacterInfo(character, out result), "Could not find character info for '" + character + "' even though the Font contains it.");
        Assert.AreEqual(charIndex, result.index, "Incorrect character info was returned for " + character);
    }

    [Test]
    public static void GetCharacterInfo_DoesNotFindCharacterInfoThatIsNotInSet()
    {
        char character = 'A';
        char characterNotInSet = 'X';
        int charIndex = Convert.ToInt32(character);

        var font = CreateDefaultFontWithOneCharacter(charIndex);
        CharacterInfo result;
        Assert.IsFalse(font.GetCharacterInfo(characterNotInSet, out result), "Found character info for '" + characterNotInSet + "' even though the Font does not contain it.");
    }

    [Test]
    public static void HasCharacterReturns8BitChars()
    {
        char character = 'A';
        int charIndex = Convert.ToInt32(character);

        var font = CreateDefaultFontWithOneCharacter(charIndex);
        Assert.IsTrue(font.HasCharacter(character), "HasCharacter returned false even though it should have " + character);
    }

    [Test]
    public static void HasCharacterReturns16BitChars()
    {
        char character = '\u03A9';
        int charIndex = Convert.ToInt32(character);

        var font = CreateDefaultFontWithOneCharacter(charIndex);
        Assert.IsTrue(font.HasCharacter(character), "HasCharacter returned false even though it should have " + character);
    }

    static Font CreateDefaultFontWithOneCharacter(int character)
    {
        var font = new Font();
        CharacterInfo[] characterInfo = new CharacterInfo[1];
        characterInfo[0].index = character;
        font.characterInfo = characterInfo;
        return font;
    }

    [Test]
    public static void GetCharacterInfo_FindsCharacterInfoThatIsInSet()
    {
        char character = 'A';
        int charIndex = Convert.ToInt32(character);

        var font = CreateDefaultFontWithOneCharacter(charIndex);
        CharacterInfo result = new CharacterInfo();
        Assert.IsTrue(font.GetCharacterInfo(character, out result), "Could not find character info for '" + character + "' even though the Font contains it.");
        Assert.AreEqual(charIndex, result.index, "Incorrect character info was returned for " + character);
    }

    [Test]
    public static void GetCharacterInfo_DoesNotFindCharacterInfoThatIsNotInSet()
    {
        char character = 'A';
        char characterNotInSet = 'X';
        int charIndex = Convert.ToInt32(character);

        var font = CreateDefaultFontWithOneCharacter(charIndex);
        CharacterInfo result;
        Assert.IsFalse(font.GetCharacterInfo(characterNotInSet, out result), "Found character info for '" + characterNotInSet + "' even though the Font does not contain it.");
    }

    [Test]
    public static void HasCharacterReturns8BitChars()
    {
        char character = 'A';
        int charIndex = Convert.ToInt32(character);

        var font = CreateDefaultFontWithOneCharacter(charIndex);
        Assert.IsTrue(font.HasCharacter(character), "HasCharacter returned false even though it should have " + character);
    }

    [Test]
    public static void HasCharacterReturns16BitChars()
    {
        char character = '\u03A9';
        int charIndex = Convert.ToInt32(character);

        var font = CreateDefaultFontWithOneCharacter(charIndex);
        Assert.IsTrue(font.HasCharacter(character), "HasCharacter returned false even though it should have " + character);
    }

        public static void Base(Character character)
        {
            List<string> classSkills = new List<string> { "History", "Insight", "Medicine", "Persuasion", "Religion" };

            character.GP += 125;
            character.HitDie = 8;
            character.Proficiencies.Add("Light Armor");
            character.Proficiencies.Add("Medium Armor");
            character.Proficiencies.Add("Shields");
            character.Proficiencies.Add("Simple Weapons");
            character.Saves.Add("Wis");
            character.Saves.Add("Cha");

            BEHelper.GetSkills(character, classSkills, 2);
        }
        public static void Equipment(Character character)
        {
            Console.WriteLine("You have the choice for some of your equipment. Pick a number.");
            CLIHelper.Print2Choices("Mace", "Warhammer (if proficient)");
            int input1 = CLIHelper.GetNumberInRange(1, 2);
            CLIHelper.Print3Choices("Scale mail", "Leather armor", "Chain mail (if proficient)");
            int input2 = CLIHelper.GetNumberInRange(1, 3);
            CLIHelper.Print2Choices("Light crossbow and 20 bolts", "Any simple weapon");
            int input3 = CLIHelper.GetNumberInRange(1, 2);
            CLIHelper.Print2Choices("Priest's Pack", "Explorer's Pack");
            int input4 = CLIHelper.GetNumberInRange(1, 2);

            if (input1 == 1)
            {
                character.Equipment.Add(Options.SimpleMeleeWeapons[6]);
            }
            else
            {
                character.Equipment.Add(Options.MartialMeleeWeapons[16]);
            }
            if (input2 == 1)
            {
                character.Equipment.Add(Options.MediumArmor[2]);
            }
            else if (input2 == 2)
            {
                character.Equipment.Add(Options.LightArmor[1]);
            }
            else
            {
                character.Equipment.Add(Options.HeavyArmor[1]);
            }
            if (input3 == 1)
            {
                character.Equipment.Add(Options.SimpleRangedWeapons[0]);
                character.Equipment.Add("20 bolts");
            }
            else
            {
                BEHelper.AddSimpleWeapon(character);
            }
            if (input4 == 1)
            {
                character.Equipment.Add(Options.Packs[5]);
            }
            else
            {
                character.Equipment.Add(Options.Packs[4]);
            }

            character.Equipment.Add("Shield(+2 AC)(10gp, 6lb.)");
            BEHelper.AddHolySymbol(character);
        }
        public static void Features(Character character)
        {
            int lvl = character.Lvl;

            character.ClassFeatures.Add("Spellcasting", "use Wis for spell DCs, you use a Holy Symbol as a spell focus");
            string msg = "Pick a Divine Domain that will give you features at levels 2, 6, 8, and 17.";
            var archetype = new List<string> { "Ambition", "Arcana", "Death", "Forge", "Grave", "Knowledge", "Life", "Light",
                "Nature", "Order", "Peace", "Solidarity", "Strength", "Tempest", "Trickery", "Twilight", "War", "Water", "Zeal" };
            int input = CLIHelper.PrintChoices(msg, archetype);
            DivineDomain = archetype[input];

            switch (DivineDomain)
            {
                case "Ambition":
                    Ambition(character);
                    break;
                case "Arcana":
                    Arcana(character);
                    break;
                case "Death":
                    Death(character);
                    break;
                case "Forge":
                    Forge(character);
                    break;
                case "Grave":
                    Grave(character);
                    break;
                case "Knowledge":
                    Knowledge(character);
                    break;
                case "Life":
                    Life(character);
                    break;
                case "Light":
                    Light(character);
                    break;
                case "Nature":
                    Nature(character);
                    break;
                case "Order":
                    Order(character);
                    break;
                case "Peace":
                    Peace(character);
                    break;
                case "Solidarity":
                    Solidarity(character);
                    break;
                case "Strength":
                    Strength(character);
                    break;
                case "Tempest":
                    Tempest(character);
                    break;
                case "Trickery":
                    Trickery(character);
                    break;
                case "Twilight":
                    Twilight(character);
                    break;
                case "War":
                    War(character);
                    break;
                case "Water":
                    Water(character);
                    break;
                case "Zeal":
                    Zeal(character);
                    break;
            }
            if (lvl >= 2)
            {
                character.ClassFeatures.Add("Channel Divinity(Turn Undead)", "action, 30ft, Wis save - turn 1 min");
                character.ClassFeatures.Add("Channel Divinity uses", "1/SR");
                character.ClassFeatures.Add("Harness Divine Power", "bonus, expend a Channel Divinity use to regain a spell slot = 1/2 PB");
            }
            if (lvl >= 3)
            {
                character.ClassFeatures.Add("Cantrip Versatility", "When you get an Ability Score Improvement, you can replace a cantrip");
            }
            if (lvl >= 5)
            {
                int CR = 0;
                character.ClassFeatures.Add("Destroy Undead", "CR under 1/2 that fail against Turn Undead are instantly destroyed");
                for (int i = 8; i <= lvl ; i += 3)
                {
                    CR++;
                    character.ClassFeatures["Destroy Undead"] = $"CR under {CR} that fail against Turn Undead are instantly destroyed";
                }
            }
            if (lvl >= 6)
            {
                character.ClassFeatures["Channel Divinity uses"] = "2/SR";
            }
            if (lvl >= 8)
            {
                character.ClassFeatures.Add("Blessed Strikes", "instead of Divine Strike or Potent Spellcasting, weapon or cantrip dmg + 1D8 Radiant");
            }
            if (lvl >= 10)
            {
                character.ClassFeatures.Add("Divine Intervention", "if % dice roll <= lvl, DM decides nature of intervention, recharge 7 days, retry LR");
            }
            if (lvl >= 18)
            {
                character.ClassFeatures["Channel Divinity uses"] = "3/SR";
            }
            if (lvl >= 20)
            {
                character.ClassFeatures["Divine Intervention"] = "automatically succeed, DM decides nature of intervention";
            }
            Spells(character);
        }
        public static void Ambition(Character character)
        {
            int lvl = character.Lvl;
            DomainSpells[1].Add("Bane*");
            DomainSpells[1].Add("Disguise Self*");
            DomainSpells[2].Add("Mirror Image*");
            DomainSpells[2].Add("Ray of Enfeeblement*");
            DomainSpells[3].Add("Bestow Curse*");
            DomainSpells[3].Add("Vampiric Touch*");
            DomainSpells[4].Add("Death Ward*");
            DomainSpells[4].Add("Dimension Door*");
            DomainSpells[5].Add("Dominate Person*");
            DomainSpells[5].Add("Modify Memory*");

            character.ClassFeatures.Add("Warding Flare", "Wis/LR, reaction, 30ft, impose disadv, attacker can't be immune to blinding");
            if (lvl >= 2)
            {
                character.ClassFeatures.Add("Channel Divinity(Invoke Duplicity)", "action, conc 1 min, 30ft, create illusory double, bonus to move it 30ft" +
                    "\n        it must remain within 120ft, if you and double are within 5ft of target you gain adv on atks");
            }
            if (lvl >= 6)
            {
                character.ClassFeatures.Add("Channel Divinity(Cloak of Shadows)", "action, 1 turn, become invisible");
            }
            if (lvl >= 8)
            {
                character.ClassFeatures.Add("Potent Spellcasting", "cantrips + Wis dmg");
            }
            if (lvl >= 17)
            {
                character.ClassFeatures.Add("Improved Duplicity", "create 4 copies instead of 1, bonus to move any number of them");
            }
        }
        public static void Arcana(Character character)
        {
            int lvl = character.Lvl;
            DomainSpells[1].Add("Detect Magic*");
            DomainSpells[1].Add("Magic Missile*");
            DomainSpells[2].Add("Magic Weapon*");
            DomainSpells[2].Add("Nystul's Magic Aura*");
            DomainSpells[3].Add("Dispel Magic*");
            DomainSpells[3].Add("Magic Circle*");
            DomainSpells[4].Add("Arcane Eye*");
            DomainSpells[4].Add("Leomund's Secret Chest*");
            DomainSpells[5].Add("Planar Binding*");
            DomainSpells[5].Add("Teleportation Circle*");

            character.ClassFeatures.Add("Arcane Initiate", "gain prof in Arcana and learn 2 Wizard cantrips");
            character.SkillProficiencies.Add("Arcana");
            Console.WriteLine("Arcane Initiate: gain prof in Arcana and 2 Wizard cantrips");
            var wizCantrips = new List<string>();
            wizCantrips.AddRange(WizardSpells.Cantrips);
            string cantrip = CLIHelper.PrintChoices(wizCantrips);
            character.Cantrips.Add(cantrip);
            wizCantrips.Remove(cantrip);
            cantrip = CLIHelper.PrintChoices(wizCantrips);
            character.Cantrips.Add(cantrip);
            if (lvl >= 2)
            {
                character.ClassFeatures.Add("Channel Divinity(Arcane Abjuration)", "action, 30ft, 1 celestial/elemental/fey/fiend, present Holy Symbol, Wis save, the creature is turned");
            }
            if (lvl >= 5)
            {
                if (lvl < 8)
                {
                    character.ClassFeatures["Channel Divinity(Arcane Abjuration)"] += "\n        banish CR 1/2 or lower for 1 min, no conc";
                }
                else
                {
                    int CR = 1;
                    for (int i = 11; i <= lvl; i += 3)
                    {
                        CR++;
                    }
                    character.ClassFeatures["Channel Divinity(Arcane Abjuration)"] += $"\n        banish CR {CR} or lower for 1 min, no conc";
                }
            }
            if (lvl >= 6)
            {
                character.ClassFeatures.Add("Spellbreaker", "When you heal an ally, end 1 spell whose lvl is = or lower than the healing spell's lvl");
            }
            if (lvl >= 8)
            {
                character.ClassFeatures.Add("Potent Spellcasting", "cantrips + Wis dmg");
            }
            if (lvl >= 17)
            {
                character.ClassFeatures.Add("Arcane Mastery", "gain 6th, 7th, 8th, and 9th lvl Wizard spells (one each) as Domain spells");
                Console.WriteLine("Arcane Mastery: gain 6th, 7th, 8th, and 9th lvl Wizard spells (one each) as Domain spells");
                int wizSpellLvl = 6;
                AllSpells wizSpells = new AllSpells(character);
                for (int i = 0; i < 4; i++)
                {
                    string spell = CLIHelper.PrintChoices(wizSpells.Wizard[wizSpellLvl]);
                    character.Spells[wizSpellLvl].Add(spell + "*");
                    wizSpellLvl++;
                }
            }
        }
        public static void Death(Character character)
        {
            int lvl = character.Lvl;
            DomainSpells[1].Add("False Life*");
            DomainSpells[1].Add("Ray of Sickness*");
            DomainSpells[2].Add("Blindness/Deafness*");
            DomainSpells[2].Add("Ray of Enfeeblement*");
            DomainSpells[3].Add("Animate Dead*");
            DomainSpells[3].Add("Vampiric Touch*");
            DomainSpells[4].Add("Blight*");
            DomainSpells[4].Add("Death Ward*");
            DomainSpells[5].Add("Antilife Shell*");
            DomainSpells[5].Add("Cloudkill*");

            character.Proficiencies.Add("Martial Weapons");
            var necroCantrips = new List<string> { "Chill Touch", "Sapping Strike", "Spare the Dying", "Toll the Dead" };
            Console.WriteLine("Pick a Necromancy cantrip");
            string necro = CLIHelper.PrintChoices(necroCantrips);
            character.Cantrips.Add(necro);
            character.ClassFeatures.Add("Reaper", "Necromancy cantrips that target 1 creature can target 2 if adj");
            if (lvl >= 2)
            {
                character.ClassFeatures.Add("Channel Divinity(Touch of Death)", "when you hit with melee, extra Necrotic dmg = 5 + (lvl x 2)");
            }
            if (lvl >= 6)
            {
                character.ClassFeatures.Add("Inescapable Destruction", "spells and Channel Divinity that deal Necrotic dmg ignore Resistance");
            }
            if (lvl >= 8)
            {
                character.ClassFeatures.Add("Divine Strike", "1/turn, +1D8 Necrotic dmg");
            }
            if (lvl >= 14)
            {
                character.ClassFeatures["Divine Strike"] = "1/turn, +2D8 Necrotic dmg";
            }
            if (lvl >= 17)
            {
                character.ClassFeatures.Add("Improved Reaper", "Necromancy spells 1st-5th that target 1 creature can target 2 if adj");
            }
        }

        public static void Hill(Character character)
        {
            string msg = "Pick a Tool Proficiency from: Brewer's Supplies, Mason's Tools, or Smith's Tools";
            List<string> toolsList = new List<string> { "Brewer", "Mason", "Smith" };
            int index = CLIHelper.PrintChoices(msg, toolsList);
            string toolProficiency = toolsList[index];
            if (toolProficiency == "Brewer")
            {
                character.ToolProficiencies.Add("Brewer's Supplies");
            }
            else if (toolProficiency == "Mason")
            {
                character.ToolProficiencies.Add("Mason's Tools");
            }
            else
            {
                character.ToolProficiencies.Add("Smith's Tools");
            }

            character.RacialTraits.Add("Dwarven Resilience: gain Resistance to Poison, and advantage on saves vs Poison");
            character.RacialTraits.Add("Stonecunning: History checks on stonework are treated as if you are proficient and " +
                "\n        gain add your Proficiency bonus x2");
            character.RacialTraits.Add("Dwarven Toughness");
            character.MinHeight = 48;
            character.MaxHeight = 60;
            character.MinWeight = 100;
            character.MaxWeight = 200;
            character.Speed += 25;
            character.Speedstring += ", no speed penalty when wearing heavy armor";
            character.Vision = "Darkvision 60ft";
            character.AlignmentOptions.Add("L-G");
            character.AlignmentOptions.Add("L-N");
            character.AdultAge = 50;
            character.MaxAgeStart = 350;
            character.Languages.Add("Dwarven");
            character.Proficiencies.Add("Battleaxes");
            character.Proficiencies.Add("Handaxes");
            character.Proficiencies.Add("Throwing Hammers");
            character.Proficiencies.Add("Warhammers");
        }
        public static void Mountain(Character character)
        {
            string msg = "Pick a Tool Proficiency from: Brewer's Supplies, Mason's Tools, or Smith's Tools";
            List<string> toolsList = new List<string> { "Brewer", "Mason", "Smith" };
            int index = CLIHelper.PrintChoices(msg, toolsList);
            string toolProficiency = toolsList[index];
            if (toolProficiency == "Brewer")
            {
                character.ToolProficiencies.Add("Brewer's Supplies");
            }
            else if (toolProficiency == "Mason")
            {
                character.ToolProficiencies.Add("Mason's Tools");
            }
            else
            {
                character.ToolProficiencies.Add("Smith's Tools");
            }

            character.RacialTraits.Add("Dwarven Resilience: gain Resistance to Poison, and Advantage on saves vs Poison");
            character.RacialTraits.Add("Stonecunning: History checks on stonework are treated as if you are proficient and " +
                "\n        gain add your Proficiency bonus x2");
            character.MinHeight = 48;
            character.MaxHeight = 60;
            character.MinWeight = 100;
            character.MaxWeight = 200;
            character.Speed += 25;
            character.Speedstring += ", no speed penalty when wearing heavy armor";
            character.Vision = "Darkvision 60ft";
            character.AlignmentOptions.Add("L-G");
            character.AlignmentOptions.Add("L-N");
            character.AdultAge = 50;
            character.MaxAgeStart = 350;
            character.Languages.Add("Dwarven");
            character.Proficiencies.Add("Light Armor");
            character.Proficiencies.Add("Medium Armor");
            character.Proficiencies.Add("Battleaxes");
            character.Proficiencies.Add("Handaxes");
            character.Proficiencies.Add("Throwing Hammers");
            character.Proficiencies.Add("Warhammers");
        }

        public static void AddLanguage(Character character, string piece)
        {
            string msg = $"This {piece} gets to know one language of your choice, pick it now.";
            string input = CLIHelper.GetNew(Options.Languages, character.Languages, msg);
            character.Languages.Add(input);
        }
        public static void GetTool(Character character)
        {
            var allTools = new List<string>();
            allTools.AddRange(Options.Tools);
            allTools.AddRange(Options.ArtisanTools);
            allTools.AddRange(Options.MusicalInstruments);
            allTools.Remove("Artisan's Tools");
            allTools.Remove("Musical Instrument");
            string tool = CLIHelper.GetNew(allTools, character.ToolProficiencies, "Pick a tool");
            character.ToolProficiencies.Add(tool);
        }
        public static void GetSkills(Character character, List<string> classSkills, int numOfSkills)
        {
            string className = character.ChosenClass;
            int skillsToPick = numOfSkills;
            for (int i = 0; i < numOfSkills; i++)
            {
                string pickMsg = $"Pick {skillsToPick} skills from the {className}'s class skill list (enter them one at a time):";
                string skill = CLIHelper.GetNew(classSkills, character.SkillProficiencies, pickMsg);
                character.SkillProficiencies.Add(skill);
                Console.WriteLine($"You've picked: {skill}");
                skillsToPick--;
            }
        }
        public static List<string> GetTalents(Dictionary<string, string> dict, List<string> list, int optionsNum, string msg)
        {
            string availableOptions = String.Join("", list);
            var dictOptions = new Dictionary<string, string>();
            foreach (var item in dict.Keys)
            {
                if (availableOptions.Contains(item))
                {
                    dictOptions.Add(item, dict[item]);
                }
            }
            var returnList = new List<string>();
            for (int i = 0; i < optionsNum; i++)
            {
                Console.Clear();
                Console.WriteLine(msg + "\n");
                string option = CLIHelper.PrintChoices(dictOptions);
                returnList.Add(option);
                dictOptions.Remove(option);
            }

            return returnList;
        }
        public static void AddSkillExpertise(string str, Character character)
        {
            var skills = new Dictionary<string, int>();
            foreach (var skill in character.Skills.Keys)
            {
                skills.Add(skill, character.Skills[skill]);
            }
            foreach (var skill in skills.Keys)
            {
                if (skill.Contains(str))
                {
                    character.Skills[skill] += character.ProficiencyBonus;
                }
            }
        }
        public static void AddSpellDesc(Character character)
        {
            for (int i = 1; i <= character.Spells.Count; i++)
            {
                for (int j = 0; j < character.Spells[i].Count; j++)
                {
                    var spells = character.Spells[i];
                    var spell = spells[j];
                    if (spell.Contains("("))
                    {
                        spell = spell.Substring(0, spell.IndexOf("("));
                    }
                    else if (spell.Contains("*"))
                    {
                        spell = spell.Substring(spell.Length - 1);
                    }
                    if (AllSpells.Descriptions.ContainsKey(spell))
                    {
                        character.Spells[i][j] += $": {AllSpells.Descriptions[spell]}";
                    }
                }
            }
        }


        private void Awake()
        {
            foreach (var character in CharacterStorage.AvailableCharacters)
            {
                var button = Instantiate(SelectCharacterButtonPrefab, CharacterButtons).GetComponent<SelectCharacterButton>();
                button.Initialize(this, character);
                _buttons.Add(button);
            }
            _buttons[0].Toggle.isOn = true;
        }

        public void SelectCharacter(Character character)
        {
            _selectedCharacter = character;
            CharacterName.text = character.Name;
            CharacterDescription.text = character.Description;
            PreviewImage.sprite = character.PreviewImage;
            FirstAbilityText.text = "Ability 1: " + character.Abilities[0]?.Name + " - " + character.Abilities[0]?.Description;
            SecondAbilityText.text = "Ability 1: " + character.Abilities[1]?.Name + " - " + character.Abilities[1]?.Description;
        }

        public void Pick()
        {
            PickCharacterMenu.CharacterRepository.Add(PickCharacterMenu.PickedSlot, _selectedCharacter);
            PickCharacterMenu.gameObject.SetActive(true);
            gameObject.SetActive(false);
        }

        public void Cancel()
        {
            PickCharacterMenu.PickedSlot = 0;
            PickCharacterMenu.UnselectAllSlots();
            PickCharacterMenu.gameObject.SetActive(true);
            gameObject.SetActive(false);
        }

J2N.Character : Object

Fields :

public static Int32 MaxRadix
public static Int32 MinRadix
public static Char MinHighSurrogate
public static Char MaxHighSurrogate
public static Char MinLowSurrogate
public static Char MaxLowSurrogate
public static Char MinSurrogate
public static Char MaxSurrogate
public static Int32 MinSupplementaryCodePoint
public static Int32 MinCodePoint
public static Int32 MaxCodePoint

Methods :

public static Boolean IsValidCodePoint(Int32 codePoint = )
public static Boolean IsSupplementaryCodePoint(Int32 codePoint = )
public static Int32 CharCount(Int32 codePoint = )
public static Int32 ToCodePoint(Char high = , Char low = )
public static Int32 CodePointAt(ICharSequence seq = , Int32 index = )
public static Int32 CodePointAt(Char[] seq = , Int32 index = )
public static Int32 CodePointAt(StringBuilder seq = , Int32 index = )
public static Int32 CodePointAt(String seq = , Int32 index = )
public static Int32 CodePointAt(Char[] seq = , Int32 index = , Int32 limit = )
public static Int32 CodePointBefore(ICharSequence seq = , Int32 index = )
public static Int32 CodePointBefore(Char[] seq = , Int32 index = )
public static Int32 CodePointBefore(StringBuilder seq = , Int32 index = )
public static Int32 CodePointBefore(String seq = , Int32 index = )
public static Int32 CodePointBefore(Char[] seq = , Int32 index = , Int32 start = )
public static Int32 ToChars(Int32 codePoint = , Char[] destination = , Int32 destinationIndex = )
public static Char[] ToChars(Int32 codePoint = )
public static Int32 CodePointCount(ICharSequence seq = , Int32 startIndex = , Int32 length = )
public static Int32 CodePointCount(Char[] seq = , Int32 startIndex = , Int32 length = )
public static Int32 CodePointCount(StringBuilder seq = , Int32 startIndex = , Int32 length = )
public static Int32 CodePointCount(String seq = , Int32 startIndex = , Int32 length = )
public static Int32 OffsetByCodePoints(ICharSequence seq = , Int32 index = , Int32 codePointOffset = )
public static Int32 OffsetByCodePoints(Char[] seq = , Int32 index = , Int32 codePointOffset = )
public static Int32 OffsetByCodePoints(StringBuilder seq = , Int32 index = , Int32 codePointOffset = )
public static Int32 OffsetByCodePoints(String seq = , Int32 index = , Int32 codePointOffset = )
public static Int32 OffsetByCodePoints(Char[] seq = , Int32 start = , Int32 count = , Int32 index = , Int32 codePointOffset = )
public static Int32 Digit(Char c = , Int32 radix = )
public static Int32 Digit(Int32 codePoint = , Int32 radix = )
public static Char ForDigit(Int32 digit = , Int32 radix = )
public static Int32 GetNumericValue(Char c = )
public static Int32 GetNumericValue(Int32 codePoint = )
public static UnicodeCategory GetType(Char c = )
public static UnicodeCategory GetType(Int32 codePoint = )
public static Boolean IsDefined(Char c = )
public static Boolean IsDefined(Int32 codePoint = )
public static Boolean IsDigit(Char c = )
public static Boolean IsDigit(Int32 codePoint = )
public static Boolean IsIdentifierIgnorable(Char c = )
public static Boolean IsIdentifierIgnorable(Int32 codePoint = )
public static Boolean IsISOControl(Char c = )
public static Boolean IsISOControl(Int32 codePoint = )
public static Boolean IsLetter(Char c = )
public static Boolean IsLetter(Int32 codePoint = )
public static Boolean IsLetterOrDigit(Char c = )
public static Boolean IsLetterOrDigit(Int32 codePoint = )
public static Boolean IsLower(Char c = )
public static Boolean IsLower(Int32 codePoint = )
public static Boolean IsSpace(Char ch = )
public static Boolean IsSpaceChar(Char c = )
public static Boolean IsSpaceChar(Int32 codePoint = )
public static Boolean IsTitleCase(Char c = )
public static Boolean IsTitleCase(Int32 codePoint = )
public static Boolean IsUnicodeIdentifierPart(Char c = )
public static Boolean IsUnicodeIdentifierPart(Int32 codePoint = )
public static Boolean IsUnicodeIdentifierStart(Char c = )
public static Boolean IsUnicodeIdentifierStart(Int32 codePoint = )
public static Boolean IsUpper(Char c = )
public static Boolean IsUpper(Int32 codePoint = )
public static Boolean IsWhiteSpace(Char c = )
public static Boolean IsWhiteSpace(Int32 codePoint = )
public static Char ReverseBytes(Char c = )
public static Int32 ToLower(Int32 codePoint = )
public static Int32 ToLower(Int32 codePoint = , CultureInfo culture = )
public static Int32 ToUpper(Int32 codePoint = )
public static Int32 ToUpper(Int32 codePoint = , CultureInfo culture = )
public static String ToString(Int32[] codePoints = )
public static String ToString(Int32[] codePoints = , Int32 startIndex = , Int32 length = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()